arXiv:2602.02422cs.LGcs.AI2026-02被引 3

提出可高效计算的高阶注意力机制,解决Transformer无法处理三元关联的问题。

Poly-attention: a general scheme for higher-order self-attention

  • 定义通用高阶注意力框架,支持任意张量计算与关系结构
  • 新机制可在二次时间内精确计算,并实现任意固定数量函数复合
  • 首次给出精确与近似计算的紧致复杂度下界,揭示表达力与效率权衡

自注意力机制虽能有效建模词元间的成对交互,却难以完成涉及三元相关或组合性任务。现有高阶注意力与斯特拉森注意力虽可处理部分多变量任务,但运行时间超二次方,效率低下。本文提出广义的多阶注意力(poly-attention)机制,涵盖前述方法作为特例,支持任意高维张量运算与输入词元间的关系结构。系统研究其计算复杂度与表征能力,给出计算注意力矩阵的精确与近似算法,以及匹配的复杂度下界,严格界定各机制可执行的多变量任务。结果揭示表达能力与模型系数大小之间的紧密关系:仅当系数足够小时,才能在近乎线性时间内近似计算。特别地,提出一种可在二次时间内精确计算的新机制,可实现任意固定数量函数的复合;而此前即使仅两函数复合也需超二次时间,且下界证明更快算法不可行。

原文摘要 · Abstract (English)

The self-attention mechanism, at the heart of the Transformer model, is able to effectively model pairwise interactions between tokens. However, numerous recent works have shown that it is unable to perform basic tasks involving detecting triples of correlated tokens, or compositional tasks where multiple input tokens need to be referenced to generate a result. Some higher-dimensional alternatives to self-attention have been proposed to address this, including higher-order attention and Strassen attention, which can perform some of these polyadic tasks in exchange for slower, superquadratic running times. In this work, we define a vast class of generalizations of self-attention, which we call poly-attention mechanisms. Our mechanisms can incorporate arbitrary higher-order (tensor) computations as well as arbitrary relationship structures between the input tokens, and they include the aforementioned alternatives as special cases. We then systematically study their computational complexity and representational strength, including giving new algorithms and matching complexity-theoretic lower bounds on the time complexity of computing the attention matrix exactly as well as approximately, and tightly determining which polyadic tasks they can each perform. Our results give interesting trade-offs between different desiderata for these mechanisms, including a tight relationship between how expressive a mechanism is, and how large the coefficients in the model may be so that the mechanism can be approximated in almost-linear time. Notably, we give a new attention mechanism which can be computed exactly in quadratic time, and which can perform function composition for any fixed number of functions. Prior mechanisms, even for just composing two functions, could only be computed in superquadratic time, and our new lower bounds show that faster algorithms for them are not possible.

注意力机制高阶计算复杂度分析

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