News
Loom Attention Enables Dynamic Rewiring in Transformers
LoomFormer introduces loom attention, enabling Transformers to dynamically rewire circuits, achieving efficiency gains and surpassing baselines in NLP tasks.
A new research paper titled "Rewirable Circuits in Transformers with Loom Attention" introduces a novel mechanism called loom attention, which allows Transformers to dynamically rewire their circuits at the token level. The paper, authored by Da Xiao, Qingye Meng, Shengping Li, and Xingyuan Yuan from Beijing University of Posts and Telecommunications and ColorfulClouds Technology, was published on arXiv on November 24, 2026. The accompanying open-source implementation is available on GitHub.
Key Features of Loom Attention
Loom attention interweaves a head’s vertical attention over outputs of earlier heads with horizontal attention over tokens. This dynamic rewiring is achieved through normalized and gated linear attention over a per-token matrix memory, which stores compressed head outputs and serves as a secondary residual stream. This approach results in LoomFormer, a dual-stream architecture that separates control (vector residual stream) and content (matrix memory stream).
Performance and Efficiency
Across various model sizes and training budgets, LoomFormer demonstrates significant efficiency and performance gains. For instance, LoomPythia-2.8B, trained on 300 billion tokens with only 2% additional FLOPs, achieves approximately 1.6 times the average downstream gain of mHC-Pythia-2.8B over Pythia-2.8B and matches or surpasses the performance of Pythia-12B in zero-shot and five-shot tasks. These results highlight LoomFormer's ability to match Transformers trained with over three times the compute resources and outperform recent residual-stream baselines such as HC/mHC, MUDDFormer, and AttnRes, which require 1.7 to 2.8 times more compute.
Open-Source Availability
The LoomFormer implementation is available on GitHub, featuring JAX-based training code and PyTorch inference code optimized with Triton. The repository also includes pre-trained checkpoints for LoomPythia-2.8B and its mHC-Pythia-2.8B baseline, providing researchers and developers with tools to explore and extend this architecture.
This breakthrough in Transformer architecture design has garnered significant attention, climbing to the third position on HuggingFace Daily Papers as of November 25, 2026, with 60 community upvotes. The research has the potential to redefine efficiency benchmarks in natural language processing and other machine learning applications.