Attention Contact Planning (wip)
Implementation of Humanoid Mobility via Attention-based Contacts (paper), out of ETH Zürich
Install
pip install attention-contact-planning
Usage
The proposed cross attention, where body queries attend over terrain points, with a learned no-contact slot at index 0
import torch
from attention_contact_planning import CrossAttention
cross_attn = CrossAttention(
dim = 96,
heads = 32,
dim_head = 3,
point_dim = 3
)
body_queries = torch.randn(2, 9, 96) # b i d
terrain_points = torch.randn(2, 187, 3) # b j 3
point_mask = torch.ones(2, 187, dtype = torch.bool)
out = cross_attn(
body_queries,
terrain_points,
point_mask = point_mask
)
out.contact_probs # (2, 32, 9, 188), column 0 is no-contact
Train the contact distribution against soft targets straight from the attention logits
from attention_contact_planning import contact_probs_loss
soft_target_probs = torch.randn(2, 9, 187).softmax(dim = -1) # b i j
loss = contact_probs_loss(
out.attn_logits,
soft_target_probs,
point_mask = point_mask
)
Citations
@article{acp2026humanoid,
title = {Humanoid Mobility via Attention-based Contacts},
author = {He, Junzhe and Wen, Kehan and Zhang, Chong and Schwarke, Clemens and
Zhang, Zewei and Qu, Kaixian and Hu, Siyuan and M{\"u}ller, Matthias and
Koltun, Vladlen and Hutter, Marco},
journal = {arXiv preprint arXiv:2610.31608},
year = {2026}
}
@article{shazeer2020talkingheads,
title = {Talking-Heads Attention},
author = {Shazeer, Noam and Lan, Zhenzhong and Cheng, Youlong and Ding, Nan and Hou, Le},
journal = {arXiv preprint arXiv:2003.02436},
year = {2020}
}
@article{jaegle2021perceiver,
title = {Perceiver: General Perception with Iterative Attention},
author = {Jaegle, Andrew and Gimeno, Felix and Brock, Andrew and Zisserman, Andrew and
Vinyals, Oriol and Carreira, Jo{\~a}o},
journal = {arXiv preprint arXiv:2103.03206},
year = {2021}
}
Metadata
Release files for attention-contact-planning 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| attention_contact_planning-0.0.9.tar.gz | 10.1 kB | Without provenance | Details for attention_contact_planning-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| attention_contact_planning-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for attention_contact_planning-0.0.9-py3-none-any.whl |
Total release size: 19.8 kB
Release files / attention_contact_planning-0.0.9.tar.gz
| Download URL | attention_contact_planning-0.0.9.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
411f695d114600bd1fd19727607dd21d3e150de2a35e1b82bcea6d120f4b1f7b
|
|
BLAKE2b-256 checksum How to use checksums |
436175f10032a1f074a155ece77cb4d18fb78e10a7f613ea44dddd89a02c10b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Release files / attention_contact_planning-0.0.9-py3-none-any.whl
| Download URL | attention_contact_planning-0.0.9-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e58c9cbdcb18cc37181f71b23703d251263037f946933166b90abe770be779a
|
|
BLAKE2b-256 checksum How to use checksums |
d23ea7fc945fbf02d59c586a490f51ab35eee0ddf61ee106b2a262e0fde17be1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Security for attention-contact-planning 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.