ReWY: Faster Backpropagation for Delta-Rule Attention - From 7 to 3 Matrix Multiplications
Not on the map. Why?
Abstract (arXiv)
Delta-rule linear attention underlies language models such as Kimi Linear and Qwen3-Next. Chunkwise implementations expose matrix parallelism, but their backward passes compute unnecessary auxiliary adjoints. We present ReWY, an algebraic reformulation that reduces this work before optimizing accelerator execution. Differentiating the chunk correction as one triangular residual system eliminates the inverse adjoint and reduces seven local WY matrix products to three. Two complementary transformations expose further reuse: centered matrix contractions replace pairwise vector-gate processing, and scalar-gate reductions reuse key-gradient products instead of forming a key Gram matrix. These identities simplify backward computation for DeltaNet, GDN, KDA, and GDN2 while preserving the recurrence and gradients in exact arithmetic, without changing the architecture or training objective. We implement the reduced graph on GPUs and Ascend NPUs. Under matched recomputation and full-saving policies, precision-qualified six-shape comparisons with frozen FLA references yield 1.15-1.81× geometric-mean complete low-level backward speedups on NVIDIA GPUs. All four operators achieve 1.18-1.70× on H100 and H200 while retaining original FP32 working matrices. A separate public-autograd evaluation on Ascend 950DT, including gradient conversions, yields 1.09-2.89× under available matched policies. Paired ablations establish further ReWY gains after optimizing the complementary contractions. Complete-gradient checks validate the recorded operator cases; supplementary full-model backward measurements assess integration into community FLA models and a GDN2 layer port. Code and reproduction materials: https://github.com/flashserve/ReWY.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 6 of its 17 references that are in the map. Submitted 1 Nov 2026.
Builds on
6 of 17 references.
References · 6
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,893
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 690
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 571
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 455
- 2025Kimi Linear: An Expressive, Efficient Attention Architecturecited by 249
- 2026A Contract-Grade Verifier for LLM-Generated GPU Kernels, and a Native Blackwell Backward for the Gated-Linear-Recurrence Familycited by 3
Built on by
Not cited yet.