Depth-Wise Gated Delta-Rule Updates for Interference-Free Matrix Memory
Add a gated erasure rule to the per-token depth memory so later layers can overwrite stale features without expanding memory slots.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
In LoomFormer's matrix stream (Section 3.1, Section 3.3, and Appendix A.7), all head writes from LoomMHA and FFN_M accumulate purely additively across depth with identity transition (Phi_l = I), relying only on whole-matrix MNorm rescaling before reads.
“when more than dk writers are on, slots are shared and writers interfere, as in linear attention.”
Limitation
Because writes accumulate additively without selective erasure or decay, slots become overloaded and writers interfere whenever more than dk writers are active simultaneously, while increasing dk yields diminishing validation loss gains (Figure 7) at linear FLOP and HBM I/O cost.
Proposed Solution
Replace the purely additive update M_{l+1} = M_l + Delta M with a depth-wise gated delta-rule update Phi_l = gamma_l (I - beta_l (k^m_l)^T k^m_l) computed from the vector stream x, enabling each writing head or FFN_M branch to selectively decay or erase obsolete slot content before writing new features.
Why This Matters
Selective erasure along depth should reduce slot interference at small dk (such as dk = n or 2n), potentially improving representation capacity and downstream accuracy without increasing matrix memory footprint or HBM bandwidth.
How to Get Started
How to test it: Test whether adding a per-layer gated delta-rule update improves Pile validation loss over standard additive LoomFormer at dk = 16 and dk = 32 (Medium 432M, 7B tokens) while keeping relative training speed >= 88%; stop if validation loss improves by less than 0.005 or throughput drops below 80%.
- Clone the released LoomFormer codebase (https://github.com/Caiyun-AI/LoomFormer) and reproduce the Medium (432M, 7B tokens, dk = 16 and 32) baseline on The Pile.
- Implement a depth-wise delta-rule transition in MWrite/LoomFormer blocks using scalar decay gamma and erasure strength beta projected from the vector stream x.
- Extend the fused Triton/Pallas memory kernels to execute the Householder-like rank-n update in SRAM/VMEM without extra HBM round-trips.
- Evaluate Pile validation loss across dk in {8, 16, 32} and inspect dynamic effective rank and slot interference metrics via Section 5.3's attribution protocol.
Code linked to this paper on Hugging Face: github.com/Caiyun-AI/LoomFormer
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Works like Systolic Linear Attention and Gated Attention for Large Language Models discuss gating mechanisms and delta rules in linear attention or matrix memory contexts, but none explicitly combine depth-wise gating with an interference-free matrix memory update using this exact formulation.
- Systolic Linear Attention: Co-Designing Tile-Grouped Gated Delta Attention for TPUs · 2026 · 0 citations
- Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Free · 2025 · 476 citations
- Muir: Linear Attention with Sensitivity-Allocated Gating and Matched-Filter Readout · 2026 · 0 citations
- GDKVM: Echocardiography Video Segmentation via Spatiotemporal Key-Value Memory with Gated Delta Rule · 2025 · 7 citations
- $δ$-mem: Efficient Online Memory for Large Language Models · 2026 · 26 citations
We searched OpenAlex and arXiv for “gated delta rule depth-wise linear attention matrix residual stream” and “Depth-Wise Gated Delta-Rule Updates for Interference-Free Matrix Memory” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
Rewirable Circuits in Transformers with Loom AttentionDa Xiao, Qingye Meng, Shengping Li +1 more · 2026
The paper introduces loom attention and LoomFormer, a dual-stream Transformer architecture that makes inter-head circuits dynamically rewirable at every token rather than fixed by static virtual weights. By routing head outputs and inputs vertically through a shared per-token matrix memory alongside standard horizontal token attention, LoomFormer achieves the language modeling and downstream accuracy of Transformers trained with over 3x compute and recent residual-stream baselines trained with 1.7-2.8x compute at only 2.0-3.7% extra forward FLOPs.
Related Ideas
- Geometrically Contracted Kronecker Hyper-Connections for High Stream RegimescmHC: Balancing Stream Mixing in Hyper-Connections via Geometric Contraction🟠Medium
- Controlled Block-Level Comparison of Content-Gated Recurrent Depth ReadersLoopback Transformer: Towards a Unified View of Residual Looped Transformers🟡Fairly easy
- Hybrid Sliding-Window and Fixed-State Depth Memory for Deeply Looped TransformersLoopback Transformer: Towards a Unified View of Residual Looped Transformers🔴Hard
- Frequency- and Batch-Aware Expert Cache Replacement Beyond Global LRUFreeToken: Efficient Edge-Native MoE Serving with Bandwidth-Adaptive Execution🟡Fairly easy
- Factorized Binary Compression for Vocabulary Embeddings and Language Model HeadsLittleBit: Ultra Low-Bit Quantization via Latent Factorization🟡Fairly easy