Computer Science > Computer Vision and Pattern Recognition
Title:BiLoopFormer: Reusing a Shared Transformer Stack Forward and Backward for Vision
Abstract:Looped transformers reuse one block across depth, but they still traverse it in one direction. Making such a model bidirectional is harder than it looks: reversing the token order between passes, the way a bi-LSTM does, is close to a no-op, because self-attention is permutation-equivariant and both passes then compute the same function. What breaks the symmetry is masking. We run the shared stack forward under a prefix mask and backward, in reverse block order, under a suffix mask, so that every token receives a prefix summary and a suffix summary, and concatenate the two pooled states in a bi-LSTM read-out. At matched FLOPs this model carries $3.6\times$ fewer parameters than a ViT and reaches \mainCifarOurs\% on CIFAR-10, against \mainCifarVit\% for the ViT and \mainCifarCnn\% for a compute-matched ResNet. The masked second sweep is worth \ablUniGap\ points over unidirectional looping, while transposed weights and swapped query/value roles both fall short of plain weight tying. On a synthetic underwater-restoration probe it lands within 0.5\,dB of a compute-matched UNet; on polyp segmentation and two MedMNIST datasets the same pattern holds, with BLF the most parameter-efficient encoder and never the most accurate. We make no claim of state-of-the-art accuracy: at this compute scale the convolutional prior still wins on every dataset, and what bidirectionality buys is parameter efficiency rather than accuracy. The contribution is a cheap way to give a looped transformer two directions, plus an explanation of why the obvious version of it fails.
| Subjects: | Computer Vision and Pattern Recognition (cs.CV) |
|---|---|
| Cite as: | arXiv:2612.03102 [cs.CV] |
| (or arXiv:2612.03102v1 [cs.CV] for this version) | |
| https://doi.org/10.48550/arXiv.2612.03102 arXiv-issued DOI via DataCite (pending registration) |
Submission history
Access Paper:
- HTML (experimental)
Additional Features
- Audio Summary
Current browse context:
References & Citations
- Google Scholar
- Semantic Scholar
BibTeX formatted citation
Bookmark
Bibliographic and Citation Tools
Code, Data and Media Associated with this Article
Demos
Recommenders and Search Tools
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.