arXiv:2509.07963cs.LG2025-09ICML被引 2

用结构化矩阵增强注意力,提升高维输入和长序列建模效果

Customizing the Inductive Biases of Softmax Attention using Structured Matrices

  • 引入高秩结构矩阵(BTT、MLR)替代标准注意力的评分函数
  • 在高维输入任务中,相同算力下性能优于标准注意力
  • 适合处理具有局部性或长距离依赖的任务,如时序预测

注意力的核心是打分函数,将输入映射为低维查询与键,并计算每对的点积。尽管低维投影提升了效率,但对具有固有高维输入的任务会造成信息损失。此外,注意力对所有输入对使用相同的打分函数,未引入邻近词元间的距离依赖计算偏置。本文提出基于计算高效结构矩阵的新打分函数,包括块张量-列车(BTT)和连续多层级低秩(MLR)矩阵。在高维输入的上下文回归任务中,我们的方法在固定计算预算下均优于标准注意力。在具备局部性模式的语言建模任务中,基于MLR的注意力实现优于标准注意力及滑动窗口变体的缩放规律。同时,我们证明BTT与MLR属于更广泛的高效结构矩阵家族,可编码全秩或距离依赖的计算偏置,显著改进标准注意力的缺陷。最后,实验显示MLR注意力在长程时间序列预测中表现优异。

原文摘要 · Abstract (English)

The core component of attention is the scoring function, which transforms the inputs into low-dimensional queries and keys and takes the dot product of each pair. While the low-dimensional projection improves efficiency, it causes information loss for certain tasks that have intrinsically high-dimensional inputs. Additionally, attention uses the same scoring function for all input pairs, without imposing a distance-dependent compute bias for neighboring tokens in the sequence. In this work, we address these shortcomings by proposing new scoring functions based on computationally efficient structured matrices with high ranks, including Block Tensor-Train (BTT) and contiguous Multi-Level Low Rank (MLR) matrices. On in-context regression tasks with high-dimensional inputs, our proposed scoring functions outperform standard attention for any fixed compute budget. On language modeling, a task that exhibits locality patterns, our MLR-based attention method achieves improved scaling laws compared to both standard attention and variants of sliding window attention. Additionally, we show that both BTT and MLR fall under a broader family of efficient structured matrices capable of encoding either full-rank or distance-dependent compute biases, thereby addressing significant shortcomings of standard attention. Finally, we show that MLR attention has promising results for long-range time-series forecasting.

注意力机制结构矩阵时序预测高效计算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。