Rewirable Circuits in Transformers with Loom Attention
On the map: Mechanistic interpretability → Circuits and mechanistic analysis
Abstract (arXiv)
We propose loom attention, which allows a Transformer to dynamically rewire its circuits at every token by interweaving a head's vertical attention over the outputs of earlier heads (to obtain its query, key and value) with its horizontal attention over tokens. We instantiate vertical attention efficiently with normalized and gated linear attention over a per-token matrix memory, which stores the compressed head outputs and serves as a second residual stream. This yields LoomFormer, a dual-stream architecture that splits control and content between the vector and matrix streams. Across model sizes and training token budgets in language modeling and downstream tasks, LoomFormer matches Transformers trained with over 3x compute and recent residual-stream baselines (HC/mHC, MUDDFormer, AttnRes) trained with ~1.7-2.8x. For example, trained on the same 300B tokens with only 2% extra FLOPs, LoomPythia-2.8B achieves ~1.6x the average downstream gain of mHC-Pythia-2.8B over Pythia-2.8B, and matches (0-shot) or surpasses (5-shot) Pythia-12B. Code is available at https://github.com/Caiyun-AI/LoomFormer
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Circuits and mechanistic analysis, one of 13 directions in Mechanistic interpretability. Builds on 50 of its 64 references that are in the map. Submitted 23 Nov 2026, announced 24 Nov 2026.
Builds on
50 of 64 references.
Closest ancestors · 2
Same direction, newest first
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretability28 Apr
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small1 Nov
Other references · 48
- 2015Deep Residual Learning for Image Recognitioncited by 53,116
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,771
- 2016Densely Connected Convolutional Networkscited by 6,825
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,433
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 5,336
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 5,132
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 5,111
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,388
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,272
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 3,052
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,575
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,444
36 more
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,320
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,130
- 2020GLU Variants Improve Transformercited by 2,000
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,891
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,479
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,241
- 2022Toy Models of Superpositioncited by 1,084
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 1,077
- 2024DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Modelscited by 943
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 898
- 2017Crowdsourcing Multiple Choice Science Questionscited by 823
- 2023The Flan Collection: Designing Data and Methods for Effective Instruction Tuningcited by 766
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 690
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 571
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 554
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 455
- 2019Learning Deep Transformer Models for Machine Translationcited by 319
- 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 251
- 2026Kimi K3: Open Frontier Intelligencecited by 233
- 2024Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrencecited by 180
- 2015Training Very Deep Networkscited by 177
- 2024Have Faith in Faithfulness: Going Beyond Circuit Overlap When Finding Model Mechanismscited by 172
- 2024Reducing Transformer Key-Value Cache Size with Cross-Layer Attentioncited by 163
- 2025mHC: Manifold-Constrained Hyper-Connectionscited by 112
- 2024Hyper-Connectionscited by 99
- 2026Attention Residualscited by 79
- 2024DenseFormer: Enhancing Information Flow in Transformers via Depth Weighted Averagingcited by 63
- 2024Talking Heads: Understanding Inter-layer Communication in Transformer Language Modelscited by 45
- 2025MUDDFormer: Breaking Residual Bottlenecks in Transformers via Multiway Dynamic Dense Connectionscited by 38
- 2024Selective Attention Improves Transformercited by 33
- 2023Cross-Layer Retrospective Retrieving via Layer Attentioncited by 25
- 2021OmniNet: Omnidirectional Representations from Transformerscited by 24
- 2025Residual Matrix Transformers: Scaling the Size of the Residual Streamcited by 14
- 2022Depth-Wise Attention (DWAtt): A Layer Fusion Method for Data-Efficient Classificationcited by 12
- 2024Strengthening Layer Interaction via Dynamic Layer Attentioncited by 11
- 2024Benchmarking and Understanding Compositional Relational Reasoning of LLMscited by 5
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Adaptive Computation Depth via Learned Token Routing in Transformers
- 2025Value-State Gated Attention for Mitigating Extreme-Token Phenomena in Transformers
- 2026The Recurrent Transformer: Greater Effective Depth and Efficient Decoding
- 2025SCOUT: Toward Sub-Quadratic Attention via Segment Compression for Optimized Utility in Transformers
- 2025On-the-Fly Adaptive Distillation of Transformer to Dual-State Linear Attention
- 2025Log-Linear Attention
- 2023Rethinking Attention: Exploring Shallow Feed-Forward Neural Networks as an Alternative to Attention Layers in Transformers
- 2026Sparse Token Routing in Efficient Transformers