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

你需要更好的注意力先验

You Need Better Attention Priors

stanford(斯坦福大学)

Elon Litman, Gabe Guo

AI总结:

GOAT通过引入可学习的连续先验改进注意力机制,提升计算效率并解决注意力汇点问题。

摘要:

我们通过熵最优传输的视角泛化了注意力机制,揭示标准注意力对应于一个由隐含均匀先验正则化的传输问题。我们介绍了通用最优传输注意力(GOAT),这是一种新的注意力机制,用可学习的连续先验替代了这种朴素假设。该先验与优化内核如FlashAttention保持完全兼容。GOAT还提供了基于EOT的注意力汇点解释,并提供了其解决方案,避免了标准注意力的表示权衡。最后,通过将空间信息纳入核心注意力计算,GOAT学习了一个可外推的先验,结合了学习位置嵌入的灵活性和固定编码的长度泛化能力。

英文摘要:

We generalize the attention mechanism by viewing it through the lens of Entropic Optimal Transport, revealing that standard attention corresponds to a transport problem regularized by an implicit uniform prior. We introduce Generalized Optimal transport Attention with Trainable priors (GOAT), a new attention mechanism that replaces this naive assumption with a learnable, continuous prior. This prior maintains full compatibility with optimized kernels such as FlashAttention. GOAT also provides an EOT-based explanation of attention sinks and materializes a solution for them, avoiding the representational trade-offs of standard attention. Finally, by absorbing spatial information into the core attention computation, GOAT learns an extrapolatable prior that combines the flexibility of learned positional embeddings with the length generalization of fixed encodings.

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

↑