Pith.
Menu

Computer Vision and Pattern Recognition · arXiv:2612.03102 v2 · submitted 2 Dec 2026 · 26 references

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

Zhuoran Zheng

The paper says

“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 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× 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.

from the abstract

Pith says

Holds up. This paper shows that making a looped transformer bidirectional requires directional masking, not token reversal, and provides a controlled study of the resulting parameter-efficiency trade-off.

Machine review · 4 Dec 2026 · Full text · 4 minor

Challenge this review Reply to this review
How this review was made

Machine review · deepseek-v4-flash · 4 Dec 2026 · read the full text (117,141 characters) · not checked by a person

The reviewer was given the whole text, 117,141 characters. Not checked: figures, code, what the 26 references say.

How the review went

5 passes by deepseek-v4-flash · 4 Dec 2026

  1. Reader holds up confidence high
  2. Skeptic concern withdrawn: the paper already says this 56 s · 37,366 tokens read, 5,044 written
  3. Referee 4 minor 24 s · 37,689 tokens read, 1,894 written
  4. Check against the paper kept 0 of 1 objection 25 s · 37,923 tokens read, 2,452 written
  5. Editor wrote the verdict above 10 s · 37,979 tokens read, 587 written

Not run on this paper: the simulated authors' defence.

Pith's passes raised 1 objection. A check against the paper's text kept 0 and withdrew 1 (1 the paper already says).

The test under “What would settle it” is from Pith's summary of the paper.

Fingerprints, costs and the commands that check them

What would settle it

A concrete falsifier would be to train a compute-matched bidirectional transformer using the naive token-reversal approach and show that it matches the performance of the masked version, contradicting the paper's claim that masking is necessary.

4 minor objections

  1. Abstract The paper uses many LaTeX macros for numerical values (e.g., `ablUniGap`, `mainCifarOurs`). While this ensures consistency, it makes the source hard to follow. Consider providing a table of all macro values in the appendix for reviewers and readers who inspect the source.
  2. Table 3 Table 3 (ablation) reports deltas relative to the reference row. The row for 'no step embeddings' shows a positive delta of +0.69, which is described as 'neutral within run-to-run noise'. It would be helpful to state explicitly whether this difference is within the expected seed variance for the 25k-image subset, perhaps by reporting a standard deviation from multiple seeds.
  3. §4.1 The paper states that the SSM baseline is S4D rather than S6/Mamba because the selective scan is not trainable on CPU within the budget. This is a reasonable limitation, but the paper could briefly note whether a fused-kernel Mamba (e.g., from the official repository) would be feasible at this compute scale, to help readers assess the strength of the SSM baseline.
  4. §5.8 In the language experiments (Section 5.8), BLF uses 8 block applications while the full-attention baseline uses 6. The paper acknowledges this compute advantage but does not correct for it. A simple correction would be to compare BLF at 6 applications (if feasible) or to note that the advantage is small (33% more FLOPs). The current discussion is honest but could be more quantitative.

A machine wrote this review. Check any line against the paper. If a line is wrong, say so, and the correction goes on the record.

Are you an author of this paper?

Reply on the record, clarify a point, or challenge an error.

A reply is published word for word beside the review once Pith has verified that the paper is yours.

The review in full

The review in brief

The paper identifies a genuine problem: a naive bidirectional looped transformer (reversing token order between passes) is nearly a no-op because self-attention is permutation-equivariant. The fix—directional masking (prefix in one sweep, suffix in the other)—is simple and principled. The authors prove the redundancy formally and validate it empirically. The resulting BiLoopFormer is evaluated in a carefully matched-compute setting across vision and language tasks. The study is honest about what it does and does not show: BLF is never the most accurate model at this scale (a compute-matched ResNet wins on every vision benchmark), but it is the most parameter-efficient, carrying 3.6× fewer parameters than a ViT at similar FLOPs. The bidirectional sweep is worth about 2.6 points over unidirectional looping. The paper also reports negative results (e.g., test-time loop scaling fails, the backward operator is best as plain weight tying) and limitations (CPU-scale, single-seed for the largest grids, S4D rather than S6 SSM). The language experiments show that the advantage is task-shaped: masked infilling benefits from two-sided context, while causal generation does not. The writing is direct and avoids overclaiming. The paper is a solid, self-aware architecture study that delivers a clear mechanism and a reproducible experimental protocol. It deserves a serious referee. I recommend sending it to peer review.

The stress test's concern

Withdrawn: the paper already says this.

The paper says

“(ii) The grid points are single-seed; ablations on the 25k subset are single-seed too, and we report point estimates rather than means over seeds. Deltas of a few tenths of a point should be read as indicative, not as significance tests.”

The referee's report

The paper makes a clear and well-supported contribution: it identifies why naive token reversal fails for bidirectional transformers (permutation equivariance), proposes directional masking as the necessary fix, and validates the design through a carefully controlled compute-matched study. The experiments are thorough, covering classification, dense prediction, segmentation, and language modeling, and the authors are admirably honest about limitations (CPU-scale, single-seed, not state-of-the-art). The central claim—that directional masking is necessary and that the resulting model is parameter-efficient—is convincingly demonstrated. The paper will be of interest to researchers working on efficient transformers, recurrent depth, and bidirectional sequence models.

Pith's reading

The paper tries to establish that a transformer can be made bidirectional in the bi-LSTM sense by running a shared stack forward under a prefix mask and backward under a suffix mask, concatenating the pooled states. This directional masking is necessary because the obvious approach—reversing token order—is provably a no-op due to permutation equivariance. At matched FLOPs, BiLoopFormer uses 3.6× fewer parameters than a ViT but is less accurate; the masked second sweep is worth 2.63 points over unidirectional looping. The contribution is a parameter-efficient architecture and an explanation of why the naive reversal fails.

What carries the argument. The key machinery is a single pre-LayerNorm transformer block shared across all applications, applied forward under a prefix mask and backward under a suffix mask, with per-application step embeddings and ReZero-style residual gates. The two sweeps produce complementary half-context representations that are concatenated in the read-out, mimicking a bi-LSTM.

Core claim. The central discovery is that directional masking is the key ingredient for a second transformer sweep to be informative. By applying a shared block forward with a prefix mask and backward with a suffix mask, each token receives both a prefix and a suffix summary, which are concatenated in a bi-LSTM-style read-out. This breaks the permutation symmetry that makes the naive token-reversal approach nearly vacuous. The resulting model, BiLoopFormer, achieves parameter efficiency (3.6× fewer parameters than a ViT) at matched compute, though it is not more accurate than a compute-matched ResNet.

The premise it rests on. The study assumes that the diagonal S4D variant is a representative SSM baseline at this compute scale, but the selective S6/Mamba scan is not trainable on CPU within the budget; if a stronger SSM baseline were used, the relative ranking of BLF against SSMs could change, though the central claim about bidirectionality is unaffected.

If the paper is right

Looped transformers can be made bidirectional without increasing parameters, only compute.

The naive token-reversal approach is not a viable alternative for bidirectionality.

Parameter efficiency comes at the cost of accuracy at small scale, but the trade-off may shift at larger scales.

The bidirectional sweep is most beneficial when the task requires two-sided context, such as masked infilling in text.

The paper's findings suggest that the benefit of bidirectionality is task-dependent: it helps where the target is a contiguous discrete gap (text infilling) but not where it is a regression problem (pixel reconstruction).

The failure of test-time loop scaling indicates that the learned function is tied to the specific number of cycles, limiting flexibility.

The paper's CPU-scale experiments leave open whether the parameter-efficiency advantage persists at larger scales with more data and longer training.

Check this review

What was read

The passes were given all 117,141 characters of the paper's LaTeX source.

Fingerprint of that text (SHA-256): 571e02430f4ed5a4a3586a08f539e968bae1369ca3848409bdf38e894c38c35c

Pith does not keep that text. Rebuilt from the paper's source or PDF by the same code, it has this fingerprint if it is the same text. From a copy of Pith's code:

PYTHONPATH=. python scripts/review_input_check.py 2612.03102

The passes, in the order they ran

  1. Reader deepseek-v4-flash · medium effort · $0.0038 · instructions of the Reader, fingerprint f9ead7300382…
  2. Skeptic deepseek-v4-flash · medium effort · $0.0038 · instructions of the Skeptic, fingerprint 8f88c0f61488…
  3. Referee deepseek-v4-flash · medium effort · $0.0033 · instructions of the Referee, fingerprint a852d99aea0d…
  4. Check against the paper deepseek-v4-flash · medium effort · $0.0034 · instructions of the Check against the paper, fingerprint 6c7a6883d551…
  5. Editor deepseek-v4-flash · medium effort · $0.0031 · instructions of the Editor, fingerprint e7211f6a3d27…
  6. Circularity check deepseek-v4-flash · medium effort · $0.0030 · instructions of the Circularity check, fingerprint e9946e39d67b…
  7. Summary for the page deepseek-v4-flash · medium effort · temperature 0.2 · $0.0035 · instructions of the Summary for the page, fingerprint e4f56bf568e7…

The passes cost $0.024 in model calls together.

Version stamped on this review: pith-pipeline@v1.4.1-daily-deepseek-or-medium+deepseek/deepseek-v4-flash+p.d60f54226f00

Each link opens a pass's instructions as plain text, the exact bytes its fingerprint was taken over. Every stored set of instructions.

curl -s https://pith.science/methodology/prompts/f9ead730038216984cfb56d7cb34332bdf691828296a1de4245f3d6667d4bf56 | sha256sum

prints the fingerprint of the reader's instructions. The same works for every pass.

The receipt

The review's fingerprint was taken on 4 Dec 2026. The review you are reading still matches it.

Fingerprint of the review (SHA-256): d839dcf7fa50b442397698f7e036d9dbfa441ef45780f1929a528f42f0dc300c

curl -s 'https://pith.science/api/v1/verdicts/2612.03102?form=canonical' | sha256sum

prints the fingerprint of the review as it stands now. The rule, in four steps.

A matching fingerprint shows the review has not changed since that date. It does not show that the review is right.

Reviews like this one: written by deepseek-v4-flash, from the paper's LaTeX source.

Every value above, in the review's public record (JSON)

No person has reviewed this paper on Pith yet. A scientist listed on Pith can review it for a fee, and the review is published here whatever it concludes. Request a human review

How Pith checks papers · The full audit of this paper · Review history (2 versions)

The paper

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× 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.

A classifier labelled each sentence of the abstract by the part it plays in the paper. The labels are kept beside the review and separate from it: the review read the paper's text, and these labels cover the abstract only. Every quoted sentence is the authors' own. No sentence in this record was written by a model.

abstract compiled · 3 Dec 2026

The main claim

“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.”

Stated as asserted.

The abstract, sentence by sentence

This table labels the abstract only (arXiv listing abstract v1). The number is the probability the classifier gave the label.

SentenceRoleThe authors' own workStates the main conclusionStrength
Looped transformers reuse one block across depth, but they still traverse it in one direction. background 0.94 0.08 0.04 asserted 1.00
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. background 0.88 0.41 0.07 asserted 0.99
What breaks the symmetry is masking. background 0.63 0.26 0.06 asserted 1.00
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. method 0.99 0.94 0.09 asserted 1.00
At matched FLOPs this model carries 3.6× fewer parameters than a ViT and reaches mainCifarOurs% on CIFAR-10, against mainCifarVit% for the ViT and mainCifarCnn% for a compute-matched ResNet. result 1.00 0.95 0.15 asserted 1.00
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. result 0.98 0.95 0.09 asserted 1.00
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. result 1.00 0.95 0.13 asserted 1.00
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. limitation 0.81 0.79 0.65 asserted 1.00
The contribution is a cheap way to give a looped transformer two directions, plus an explanation of why the obvious version of it fails. contribution 1.00 0.87 0.52 asserted 1.00

What kind of paper the classifier reports this is: method or tool 1.00 · evidence from observation or experiment 0.92

What was examined, and what was not

These lists are about the sentence labels. What the review read is said with the review.

Read

  • arXiv listing abstract v1

Not read

  • full text
  • figures and tables
  • references and citing sentences
  • relations to other papers

Labelled

  • abstract

Not labelled

  • sections
  • body sentences
  • citations
  • cross-paper relations

The main claim, as probabilities

picked as the main claim 0.97 · how strongly it is stated 1.00

What the abstract itself states, as probabilities

claims first 0.07 · states limitation 0.98 · human participants 0.13 · controlled comparison 0.95 · randomized assignment 0.02 · states quantitative result 0.98 · compares with prior results 0.98 · mentions code or data availability 0.02

How the labels were made

Compiled by classifier-1.13.0 via TypeSafe API, question bank abstract-p1-20260923, 2026-12-03: 1 request, 7,180 input tokens.

This record as JSON, with every label and the probability the classifier gave it.

Figures (9)
Figure 1 of the paper
Figure 1. BiLoopFormer. One shared stack is applied 2NK times: a forward sweep under a prefix mask, then a backward sweep under a suffix mask with the blocks in reverse order. The two sweeps are chained (X ←Y) into K cycles, and the read-out concatenates the pooled forward and backward states as in a bi-LSTM. where Att⊤ uses Q = xW⊤ Q , K = xW⊤ K , V = xW⊤ V and projects with WO instead of W⊤ O . For the linear part this is exactly the adjoint of the forward map, so the pair (B,B ⊤) behaves like a forward/adjoint pair in forward–backward inference or loopy belief propagation, and because W⊤W…
Figure 2 of the paper
Figure 2. BLF unrolls two directionally masked sweeps per cycle; the blocks Bi , the step embeddings s and the mask pattern M f /Mb are the only ingredients. Proposition 3.1 says that in an unmasked transformer the only effect of a reversed sweep is to change the order in which the same blocks are composed (BN ◦ ··· ◦B1 versus B1 ◦ ··· ◦BN); the token reversal itself contributes nothing. Order reversal is a weak perturbation of the function class, and the measurements agree: the naive reversal recovers only +1.09 of the +2.63 points that masking buys over unidirectional looping (Section 4.3),…
Figure 3 of the paper
Figure 3. (a) Test accuracy per epoch on CIFAR-10 at matched compute. (b) The model trained with K = 2 evaluated at other loop counts; each point is annotated with its accuracy and K is the number of forward–backward cycles, i.e. 4K block applications. crop with reflect padding and horizontal flips for the image datasets, no augmentation for MNIST. CIFAR-10 runs for 8 epochs, MNIST 4, Tiny-ImageNet 3. Everything runs on 4 CPU cores; a CIFAR-10 run takes ≈10 min. Each run uses one fixed seed; grid points are single-seed and we report the final-epoch value, with the caveat recorded in Section…
Figure 4 of the paper
Figure 4. Linear CKA between pooled token states of all eight applications, applications numbered in execution order; the horizontal line separates the forward sweep (1–4) from the backward sweep (5–8). (a) Masked bidirectional sweeps: the backward block is visibly a different representation, so the two sweeps are not copies. (b) Naive reversal: the backward block is closer to the forward one. The difference exists but is small, and Section 4.4 says so. 0.00 0.02 0.05 0.10 Gaussian noise σ 65 70 75 80 85 90 test accuracy (\%) (a) input noise BLF (ours) ViT SSM (S4D) ResNet 0 2 4 6 8 accuracy…
Figure 5 of the paper
Figure 5. Robustness of the trained CIFAR-10 models. (a) Accuracy under additive Gaussian noise. (b) Accuracy lost at the two severe settings, σ = 0.1 and centre occlusion. The two axes do not agree, so no model wins everywhere. robustness benefit for the bidirectional sweep. The intuition that a second, complementary sweep should smooth the representation does not survive contact with the measurement: at this scale the looped model is both less accurate and less stable than the plain one. 9
Figure 6 of the paper
Figure 6. Restoration on the synthetic underwater pairs. Each row is one held-out image; from left to right: the degraded input, the four restorations and the clean target. What this does and does not show. The benchmark is synthetic. We did not run UIEB or LSUI, so the table is a controlled probe of how the four encoders handle a dense output, not a claim about the state of the art in underwater enhancement. Two observations survive: the encoders separate by less than a decibel from best to worst (19.88 to 18.81 dB), so a 3.6× parameter reduction does not cost a dense task more than 0.5 dB;…
Figure 7 of the paper
Figure 7. Polyp segmentation. Green is the annotated mask, red the prediction. From left: input, ground truth, and the four encoders. the table does support is the narrower claim BLF was built for: within a fixed token budget, a masked second sweep is a better use of 150 MFLOPs than a deeper single-direction stack. 4.10 Medical classification: DermaMNIST and BloodMNIST Two standard medical benchmarks, DermaMNIST (7 skin-lesion classes, 7007 training images) and BloodMNIST (8 blood-cell classes, 11 959 images), both at the same ≈42-MFLOP budget and the same six-epoch recipe as CIFAR-10, with…
Figure 8 of the paper
Figure 8. Restoration on the synthetic underwater pairs. Each row is one held-out image; from left to right: the degraded input, the four restorations and the clean target
Figure 9 of the paper
Figure 9. Polyp segmentation. Green is the annotated mask, red the prediction. From left: input, ground truth, and the four encoders

Figures are the authors', reproduced from the paper.

References (26)
  1. [1] Attention Is All You Need , author=. Advances in Neural Information Processing Systems , year= on Pith
  2. [2] An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale , author=. International Conference on Learning Representations , year= on Pith
  3. [3] Training data-efficient image transformers & distillation through attention , author=. International Conference on Machine Learning , year= on Pith
  4. [4] Swin Transformer: Hierarchical Vision Transformer using Shifted Windows , author=. International Conference on Computer Vision , year= on Pith
  5. [5] Deep Residual Learning for Image Recognition , author=. IEEE Conference on Computer Vision and Pattern Recognition , year= on Pith
  6. [6] MLP-Mixer: An all-MLP Architecture for Vision , author=. Advances in Neural Information Processing Systems , year= on Pith
  7. [7] A ConvNet for the 2020s , author=. IEEE Conference on Computer Vision and Pattern Recognition , year= on Pith
  8. [8] Graves, Alex and Schmidhuber, J. Framewise phoneme classification with bidirectional. IEEE International Joint Conference on Neural Networks , year= on Pith
  9. [9] Long Short-Term Memory , author=. Neural Computation , volume= on Pith
  10. [10] Universal Transformers , author=. International Conference on Learning Representations , year= on Pith
  11. [11] Lan, Zhenzhong and Chen, Mingda and Goodman, Sebastian and Gimpel, Kevin and Sharma, Piyush and Soricut, Radu , booktitle= on Pith
  12. [12] Deep Equilibrium Models , author=. Advances in Neural Information Processing Systems , year= on Pith
  13. [13] Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach , author=. arXiv preprint arXiv:2502.05171 , year= on PithPith's reviewarXiv
  14. [14] Looped Transformers as Programmable Computers , author=. International Conference on Machine Learning , year= on Pith
  15. [15] Mamba: Linear-Time Sequence Modeling with Selective State Spaces , author=. arXiv preprint arXiv:2312.00752 , year= on PithPith's reviewarXiv
  16. [16] Efficiently Modeling Long Sequences with Structured State Spaces , author=. International Conference on Learning Representations , year= on Pith
  17. [17] Zhu, Lianghui and Liao, Bencheng and Zhang, Qian and Wang, Xinlong and Liu, Wenyu and Wang, Xinggang , booktitle=. Vision on Pith
  18. [18] Liu, Yue and Tian, Yunjie and Zhao, Yuzhong and Yu, Hongtian and Xie, Lingxi and Wang, Yaowei and Ye, Qixiang and Liu, Wenyu , booktitle= on Pith
  19. [19] Learning Multiple Layers of Features from Tiny Images , author= on Pith
  20. [20] Gradient-based learning applied to document recognition , author=. Proceedings of the IEEE , volume= on Pith
show 6 more
  1. [21] Decoupled Weight Decay Regularization , author=. International Conference on Learning Representations , year= on Pith
  2. [22] Bachlechner, Thomas and Majumder, Bodhisattwa Prasad and Mao, Huanru Henry and Cottrell, Garrison W. and McAuley, Julian , booktitle= on Pith
  3. [23] Similarity of Neural Network Representations Revisited , author=. International Conference on Machine Learning , year= on Pith
  4. [24] Layer Normalization , author=. arXiv preprint arXiv:1607.06450 , year= on PithPith's reviewarXiv
  5. [25] Rethinking the Inception Architecture for Computer Vision , author=. IEEE Conference on Computer Vision and Pattern Recognition , year= on Pith
  6. [26] Sea-Thru: A method for removing water from underwater images , author=. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , year= on Pith

Challenges and discussion

Disagree with the review, or know something it missed? Leave a comment, or challenge this review formally: a challenge becomes a permanent entry in this paper's record, and its decision is published here.

No comments yet.

Sign in to comment