arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.17512cs.CLstat.ML
收藏

通过潜在概率建模统一线性时间注意力

Unifying Linear-Time Attention via Latent Probabilistic Modelling

University College London, AI Centre(伦敦大学学院,人工智能中心);UiPath

Rares Dolga, Lucas Maystre, Marius Cobzarenco, David Barber

AI总结:

本文通过潜在概率建模统一线性时间注意力,提出定向参数化方法以解决方向性问题,并在语言建模中取得优于现有方法的性能。

摘要:

变换器在多个领域取得了最先进的成果,但其二次注意力机制对长序列建模提出了重大挑战。最近设计线性时间注意力机制的努力产生了更具扩展性的替代方案,但往往以性能为代价,特别是在离散数据如语言上。在本工作中,我们通过概率图模型的视角重新审视线性注意力。我们首先证明标准线性注意力可以被解释为一个无向潜在变量模型,揭示了一个关键限制:方向性的缺失。为了解决这个问题,我们提出了一种新的定向参数化方法,引入了不对称结构,使解释与语言的因果和序列性质相一致。我们的公式整合了全局潜在变量注意力与局部标准注意力在一个完全概率框架中。此外,我们引入了一种递归参数化查询和键的方法,避免了依赖相对位置编码,通常与线性注意力不兼容。在语言建模基准上的实验表明,我们的模型在与标准注意力竞争的同时,优于现有的线性注意力变体。

英文摘要:

Transformers have achieved state-of-the-art results across a range of domains, but their quadratic attention mechanism poses significant challenges for long-sequence modelling. Recent efforts to design linear-time attention mechanisms have yielded more scalable alternatives, yet often at the cost of performance, particularly on discrete data such as language. In this work, we revisit linear attention through the lens of probabilistic graphical models. We first show that standard linear attention can be interpreted as an undirected latent variable model, revealing a key limitation: the absence of directionality. To address this, we propose a novel directed parameterisation of linear attention that introduces an asymmetric structure, enabling an interpretation aligned with the causal and sequential nature of language. Our formulation integrates global latent-variable attention with local standard attention in a fully probabilistic framework. Additionally, we introduce a recurrent parameterisation of queries and keys that avoids reliance on relative positional encodings, often incompatible with linear attention. Experiments on language modelling benchmarks demonstrate that our model achieves competitive performance with standard attention and outperforms existing linear attention variants.

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

↑