Geometry Matters in Packed 3D Attention
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 22 of its 29 references that are in the map. Submitted 28 Oct 2026.
Builds on
22 of 29 references.
References · 22
- 2017Attention Is All You Needcited by 62,125
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 31,279
- 2015U-Net: Convolutional Networks for Biomedical Image Segmentationcited by 20,127
- 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,673
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 5,133
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,893
- 2020Longformer: The Long-Document Transformercited by 3,606
- 2016V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentationcited by 2,361
- 2020Rethinking Attention with Performerscited by 1,669
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,555
- 20163D U-Net: Learning Dense Volumetric Segmentation from Sparse Annotationcited by 1,528
- 2018Self-Attention with Relative Position Representationscited by 1,163
10 more
- 2021Scaling Vision Transformerscited by 1,026
- 2021UNETR: Transformers for 3D Medical Image Segmentationcited by 987
- 2022Swin UNETR: Swin Transformers for Semantic Segmentation of Brain Tumors in MRI Imagescited by 872
- 2023Scaling Vision Transformers to 22 Billion Parameterscited by 720
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 481
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 469
- 2021CoTr: Efficiently Bridging CNN and Transformer for 3D Medical Image Segmentationcited by 229
- 2021nnFormer: Interleaved Transformer for Volumetric Segmentationcited by 194
- 2023MethaneMapper: Spectral Absorption aware Hyperspectral Transformer for Methane Detectioncited by 14
- 2023Deep learning based Image Compression for Microscopy Images: An Empirical Studycited by 3
Built on by
Not cited yet.