arXiv:2608.01283cs.LGcs.AI2026-08

用黎曼几何替代传统注意力,解决深层模型表征退化问题。

Riemannian Attention Mechanisms for Transformers: A Theoretical Framework and Architecture Design

  • 以可学习的逐令牌黎曼度量替换欧氏内积,从数学上重构注意力机制。
  • 低秩度量因子使几何运算复杂度降至O(d*r),支持百亿参数规模应用。
  • 提出纤维丛变换器架构,显式建模曲率与扭曲,为未来实验铺路。

所有基于Transformer的大语言模型均使用欧氏内积计算注意力,据Dong等(2021)证明,这种设计会导致纯自注意力堆叠中表征秩随深度呈双指数衰减。本文提出一个理论框架,通过将平坦的欧氏度量替换为可学习的逐令牌黎曼度量,从数学层面应对这一结构性缺陷。贡献有三:(1) 证明具有异质度量的黎曼注意力得分非格拉姆矩阵——无法表示为QK^T形式,且因子分解维度仅为O(d),这是结构性观察,而非秩保持的证明;(2) 建立低秩度量因子可使所有几何操作可计算:测地距离计算为O(d*r)、度量逆运算为O(d*r²),远低于一般矩阵的O(d³),使黎曼注意力在百亿参数规模下可行且开销极小;(3) 提出纤维丛变换器架构,其中每个词元位置携带自身黎曼度量,注意力为测地距离计算,前馈更新采用度量预处理步,连接显式包含曲率与扭率代理。本文推导了正确实现几何架构的形式预测,并指出核心开放问题:是否能证明或证伪异质黎曼度量可阻止行随机注意力矩阵引发的秩坍缩。本工作聚焦理论分析与架构设计,实证验证留待后续研究。

原文摘要 · Abstract (English)

All Transformer-based large language models compute attention via the Euclidean inner product, an architectural choice that Dong et al. (2021) proved causes representational rank to decay doubly exponentially with depth in pure self-attention stacks. We develop a theoretical framework that targets this structural limitation at the mathematical level by replacing the flat Euclidean metric with learned per-token Riemannian metrics. Our contributions are threefold. (1) We prove that Riemannian attention scores with heterogeneous per-token metrics are non-Gram---they cannot be factorized as QK^T with factorization dimension O(d). We are explicit that this is a structural observation, not a proof of rank preservation. (2) We establish that low-rank metric factors render all geometric operations tractable: geodesic distance in O(d*r) per token and metric inversion in O(d*r^2) via the Woodbury identity---both far below the O(d^3) cost of a general matrix---making Riemannian attention feasible at billion-parameter scale with negligible overhead. (3) We present the Fiber Bundle Transformer, a complete architecture specification in which each token position carries its own Riemannian metric, attention is geodesic distance computation, feed-forward updates use metric-preconditioned steps, and the connection carries explicit curvature and torsion proxies. We derive formal predictions about correctly implemented geometric architectures and identify the central open problem: proving or disproving that heterogeneous Riemannian metrics prevent the rank collapse that row-stochastic attention matrices otherwise cause. This paper presents theoretical analysis and architectural design; empirical validation is the subject of future work.

Transformer黎曼几何注意力机制

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