Gated KalmaNet: A Fading Memory Layer through Test-time Ridge Regression
Liangzu Peng, Aditya Chattopadhyay, Luca Zancato, Elvis Nunez, Wei Xia, Stefano Soatto
摘要
Linear State-Space Models (SSMs) offer an efficient alternative to softmax Attention with constant memory and linear compute, but their lossy, fading summary of the past hurts recall-oriented tasks. We propose Gated KalmaNet (GKA, pronounced "gee-ka"), a layer that accounts for the full past while retaining SSM-style efficiency. We ground our approach in the Kalman Filter (KF), and show that several existing SSM layers (DeltaNet, Gated DeltaNet, Kimi Delta Attention) are approximations to the KF recurrence under an identity error covariance assumption, which ignores how past keys and values should optimally influence state updates. In contrast, GKA maintains the full error covariance and computes the exact Kalman gain. Under a steady-state assumption that enables parallelization, this reduces to an online ridge regression with constant memory and linear compute. The standard KF equations are numerically unstable in low-precision settings (e.g., bfloat16) and hard to parallelize on GPUs. We address this with (1) adaptive regularization via input-dependent gating to control the ridge regression's condition number, and (2) Chebyshev Iteration, which we show is more stable than conventional iterative solvers in low precision. We further develop hardware-aware chunk-wise kernels for efficient training. Empirically, GKA outperforms existing SSM layers (e.g., Mamba2, Gated DeltaNet) on short-context tasks and achieves more than 10% relative improvement on long-context RAG and LongQA up to 128k tokens. We further show GKA outperforms Mamba when extended to ImageNet classification. Our code, including Triton kernels for training and inference (vLLM), 1 along with a model zoo of GKA-based Hybrid models at 8B and 32B scale on HuggingFace, 2 is released under Apache 2.0.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model 引用了 Reformer: The Efficient Transformer
- Beyond Test-Time Memory: State-Space Optimal Control for LLM Reasoning 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Beyond Test-Time Memory: State-Space Optimal Control for LLM Reasoning 引用了 Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
- Kalman Linear Attention: Parallel Bayesian Filtering For Efficient Language Modeling and State Tracking 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Kalman Linear Attention: Parallel Bayesian Filtering For Efficient Language Modeling and State Tracking 引用了 Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Test-Time Training with KV Binding Is Secretly Linear Attention 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Test-Time Training with KV Binding Is Secretly Linear Attention 引用了 Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
- Preconditioned DeltaNet: Curvature-aware Sequence Modeling for Linear Recurrences 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Preconditioned DeltaNet: Curvature-aware Sequence Modeling for Linear Recurrences 引用了 Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
引用它的顶会 Paper5
- Test-Time Training with KV Binding Is Secretly Linear AttentionJunchen Liu, Sven Elflein, Or Litany, Zan Gojcic 等ICML 2026 · 6 次引用
- Kalman Linear Attention: Parallel Bayesian Filtering For Efficient Language Modeling and State TrackingVaisakh Shaj, Cameron Barker, Aidan Scannell, Andras Szecsenyi 等ICML 2026 · 5 次引用
- Preconditioned DeltaNet: Curvature-aware Sequence Modeling for Linear RecurrencesNeehal Tumma, Noel Loo, Daniela RusICML 2026 · 3 次引用
- Learning When to Attend: Conditional Memory Access for Long-Context LLMsSakshi Choudhary, Aditya Chattopadhyay, Luca Zancato, Elvis Nunez 等ICML 2026 · 2 次引用
- Beyond Test-Time Memory: State-Space Optimal Control for LLM ReasoningPeihao Wang, Shan Yang, Xijun Wang, Tesi Xiao 等ICML 2026
它引用的 Paper28
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 次引用
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
- SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao 等ICLR 2024 · 2,082 次引用
- Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space ModelLianghui Zhu, Bencheng Liao, Qian Zhang, Xinlong Wang 等ICML 2024 · 1,725 次引用
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space DualityTri Dao, Albert GuICML 2024 · 1,407 次引用
相关 Paper
- Gated Delta Networks: Improving Mamba2 with Delta RuleSonglin Yang, Jan Kautz, Ali HatamizadehICLR 2025
- Mamba-3: Improved Sequence Modeling using State Space PrinciplesAakash Sunil Lahoti, Kevin Y. Li, Berlin Chen, Caitlin Wang 等ICLR 2026 · 96 次引用
- Gated Linear Attention Transformers with Hardware-Efficient TrainingSonglin Yang, Bailin Wang, Yikang Shen, Rameswar Panda 等ICML 2024 · 390 次引用
- Parallelizing Linear Transformers with the Delta Rule over Sequence LengthSonglin Yang, Bailin Wang, Yu Zhang, Yikang Shen 等NeurIPS 2024 · 412 次引用
- Artificial Hippocampus Networks for Efficient Long-Context ModelingYunhao Fang, Weihao Yu, Shu Zhong, Qinghao Ye 等ICML 2026 · 9 次引用
