Skip to content
AI-generated research idea🟡Fairly easy💡Moderate InnovationRelated work found

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

several weeks

Compute level

Multiple GPUs

Resources

Multi-GPU node (e.g., 8x A800/H100) or TPU v5p-16 pod and The Pile dataset for Medium/Large scaling runs; TPU cluster for 2.8B validation

What the paper used

JAX/MaxText pretraining on TPU v5p pods (v5p-16 for 432M/7B tokens, v5p-32 for 778M/14B and 1.4B/26B tokens, v5p-128 for 2.8B/300B tokens) on The Pile, plus single NVIDIA A800-80GB inference benchmarks.

Prerequisites

Transformer architectures, linear attention and delta-rule state updates, custom Triton/Pallas fused kernels

Scope

modify existing code

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.”
From the paper, Section 3.3, page 5. Matched against the PDF text.

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

  1. 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.
  2. 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.
  3. Extend the fused Triton/Pallas memory kernels to execute the Householder-like rank-n update in SRAM/VMEM without extra HBM round-trips.
  4. 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?

Related work found

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.

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 Attention

Da 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

Is this a good idea?

Share onXLinkedIn