arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.10743cs.LG
收藏

Kalman线性注意力:用于高效语言建模和状态跟踪的并行贝叶斯滤波

Kalman Linear Attention: Parallel Bayesian Filtering For Efficient Language Modelling and State Tracking

University of Cambridge(剑桥大学)

Vaisakh Shaj, Cameron Barker, Aidan Scannell, Andras Szecsenyi, Elliot J. Crowley, Amos Storkey

AI总结:

提出Kalman线性注意力层,将序列混合重写为信息形式的精确贝叶斯滤波,实现时间并行推理,在相同计算成本下比GLA更具表达力,并在状态跟踪任务中超越线性SSM和注意力。

摘要:

状态空间语言模型如Mamba和门控线性注意力(GLA)提供了线性复杂度、可并行的Transformer替代方案,但其线性状态更新限制了表达力和鲁棒的状态跟踪。我们从概率角度弥合这一差距,将序列混合视为精确贝叶斯滤波,以卡尔曼滤波为核心原语。经典卡尔曼滤波提供有原则的状态和不确定性估计,但被认为是固有顺序的;我们展示了将其重参数化为信息形式后,更新变为关联扫描——因此每个token的循环更新是非线性的(莫比乌斯/精度递归),但保持时间并行。由此产生的Kalman线性注意力(KLA)层是一个即插即用的序列混合器,执行时间并行概率推理,携带显式的信念状态不确定性,并且在相同计算成本下比GLA风格的线性更新具有严格更强的表达力。这种表达力直接转化为更强的状态跟踪:KLA解决了线性SSM和注意力无法解决的排列组合($A_5$)任务,同时保持扫描并行。作为即插即用原语,它在合成token操作和零样本常识基准测试中匹配或改进了现代SSM和GLA,并且是首批在十亿token规模下训练的堆叠贝叶斯滤波原语之一。

英文摘要:

State-space language models such as Mamba and gated linear attention (GLA) offer linear-complexity, parallelisable alternatives to transformers, but their linear state updates limit expressivity and robust state tracking. We close this gap from a probabilistic angle, casting sequence mixing as exact Bayesian filtering with the Kalman filter as the core primitive. Classical Kalman filters give principled state and uncertainty estimates but are viewed as inherently sequential; we show that reparameterising them in information form turns their updates into an associative scan - so the per-token recurrent update is non-linear (a Möbius/precision recursion) yet remains temporally parallel. The resulting Kalman Linear Attention (KLA) layer is a drop-in sequence mixer that performs time-parallel probabilistic inference, carries an explicit belief-state uncertainty, and is strictly more expressive than GLA-style linear updates at the same computational cost. This expressivity translates directly into stronger state tracking: KLA solves permutation-composition ($A_5$) tasks that linear SSMs and attention cannot, while staying scan-parallel. As a drop-in primitive it also matches or improves on modern SSMs and GLAs across synthetic token-manipulation and zero-shot commonsense benchmarks, and is among the first stacked Bayesian-filtering primitives trained at the billion-token scale.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑