BiLoopFormer: Reusing a Shared Transformer Stack Forward and Backward for Vision

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.

Authors

Publication Details

Journal
arXiv
Published
2026-12-02
Primary Topic
Advanced Neural Network Applications
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

BiLoopFormer: Reusing a Shared Transformer Stack Forward and Backward for Vision

Zhuoran Zheng
arXiv
Advanced Neural Network Applications
preprint

BiLoopFormer: Reusing a Shared Transformer Stack Forward and Backward for Vision

Zhuoran Zheng
preprint en

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.

arXiv
Advanced Neural Network Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon