arXiv:2602.00294cs.LGcs.AI2026-02

让自注意力计算成本恒定,突破上下文长度限制

Self-Attention at Constant Cost per Token via Symmetry-Aware Taylor Approximation

  • 通过对称性分析泰勒展开,构建多项式核特征映射
  • 每标记计算成本恒定,内存与算力消耗降几个数量级
  • 适合大规模生成场景,降低模型部署能耗

当前主流的AI模型如Transformer依赖自注意力机制,其计算成本随上下文长度增加而增长,已超出社会可提供的存储、算力和能源能力。本文提出一种新方法,使自注意力在任意精度下实现每标记恒定成本,大幅降低内存使用和计算开销。通过将传统公式的泰勒展开分解为对称张量积链,并利用其对称性,高效地将查询与键映射到最小多项式核特征基坐标。值得注意的是,成本与头大小成反比,允许每标记处理更多注意力头。我们实现了该方法并实证验证了正确性。本工作使无界标记生成成为可能,显著降低大规模Transformer模型的基础设施与能耗需求。所引入的数学技术本身也具有独立研究价值。

原文摘要 · Abstract (English)

The most widely used artificial intelligence (AI) models today are Transformers employing self-attention. In its standard form, self-attention incurs costs that increase with context length, driving demand for storage, compute, and energy that is now outstripping society's ability to provide them. To help address this issue, we show that self-attention is efficiently computable to arbitrary precision with constant cost per token, achieving orders-of-magnitude reductions in memory use and computation. We derive our formulation by decomposing the conventional formulation's Taylor expansion into expressions over symmetric chains of tensor products. We exploit their symmetry to obtain feed-forward transformations that efficiently map queries and keys to coordinates in a minimal polynomial-kernel feature basis. Notably, cost is fixed inversely in proportion to head size, enabling application over a greater number of heads per token than otherwise feasible. We implement our formulation and empirically validate its correctness. Our work enables unbounded token generation at modest fixed cost, substantially reducing the infrastructure and energy demands of large-scale Transformer models. The mathematical techniques we introduce are of independent interest.

自注意力模型压缩高效计算Transformer

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