Geometry Matters in Packed 3D Attention
Abstract
Packing a 3D field into a token sequence gives every token two indices: a coordinate in the sample and a position in memory. Raster, Morton, and block-contiguous layouts change the position and leave the coordinate alone. A positional mechanism indexed by sequence position can therefore learn the memory layout rather than the object, and accuracy on the training layout cannot reveal that it has. We introduce PACK3D, a local-global attention operator that separates memory layout from attention geometry. It attends exactly within a coordinate-defined neighborhood, sees the whole field through pooled summaries, and rotates queries and keys with axial RoPE at token-grid coordinates. Because keys are rotated before pooling, each query-to-summary logit is a weighted sum of query-key terms evaluated at the summarized tokens' displacements from the query. The operator is equivariant to any repacking that carries coordinates, neighborhoods, summary memberships, and within-block slots along with the tokens. When evaluated on Allen WTC-11 microscopy at 262k tokens, PACK3D and a matched packed-sequence RoPE control reach comparable Dice on the training layout. Repacking the same validation volumes then costs the packed control 0.048 macro Dice on average, with a loss in all six seeds, while PACK3D changes by 0.0001. On MSD Heart and Spleen, sequence indexing again changes more predictions under repacking, at little cost in Dice. PACK3D also exceeds a parameter-matched 3D U-Net by 0.009 Dice over six seeds, and a full PACK3D layer runs within 7-31% of window-attention latency while adding a global pathway. Geometry, not storage order, should index attention over packed 3D fields. Code is available at https://github.com/amilworks/Pack3D.
Create a lesson
Metadata
- Categories
- cs.CV, cs.AI, cs.LG
- Comments
- Accepted to NeurIPS 2026 (Poster)
Related papers
ET: Efficient Transfer from Softmax to Hybrid Attention
Shared title terminologycs.CVGuangfu Guo, Xiaoqian Lu, Linsey Pang et al.
GeoMVGen: Joint Appearance-Geometry Modeling for Multi-View Video Generation in Robotic Manipulation
Shared title terminologycs.CVQiaoqiao Jia, Guile Wu, Dongfeng Bai
RePT: 3D Geometry Emerges from 2D Relational Pretraining
Shared title terminologycs.CVXize Duan, Binke Hou, Xingqiao Huang et al.
CrownFusion: 3D Dental Crown Generation Using Geometry Images and Latent Diffusion
Shared title terminologycs.CVJohan Ziruo Ye, Xingguang Yan, Søren Hauberg et al.
XFreq: Geometry-Aligned Cross-View Residual Learning for Sparse 3D Ultrasound Reconstruction
Shared title terminologycs.CVYuhuan Lu, P. Ellen Grant, Davood Karimi
Auxiliary Clues Aware's Geometry Problem Solving
Shared title terminologycs.CVQigong Lei, Qingsong Wang, Wang Lin et al.