arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.19944cs.LGcs.AIcs.CCcs.CL
收藏

关于推理的测度论分析:结构泛化与近似限制

A Measure-Theoretic Analysis of Reasoning in Transformers: Structural Generalization and Approximation Limits

McGill University(麦吉尔大学);Mila - Quebec AI Institute(魁北克AI研究所);Université de Montréal(蒙特利尔大学)

Yuyang Zhang, Yifu Zhang, Xuehai Zhou, Xiaoyin Chen

AI总结:

本文通过最优传输理论分析推理过程,揭示了结构泛化和近似限制的理论机制,发现位置依赖注意力机制和Transformer电路深度对推理性能有显著影响。

摘要:

尽管大型语言模型推理的经验缩放定律已得到充分文档,但支配分布外泛化的理论机制仍不明确。我们通过最优传输形式化推理,将离散轨迹投影到连续度量空间,利用Wasserstein-1距离量化领域偏移。借助Kantorovich对偶性,我们通过架构Lipschitz连续性和函数近似限制来界定分布外泛化。这揭示了两个主要约束。首先,位置依赖注意力(例如绝对位置编码)无法保持偏移不变性,导致Ω(1)的Lipschitz常数和预期风险,而偏移不变机制(例如旋转嵌入)保持等价性并限制误差。其次,通过将顺序回溯映射到Dyck-k语言,我们为TC⁰变换器建立了严格的电路深度下界。物理层深度的扩展是必要的,以避免表示崩溃——这一约束无法通过扩展表示宽度来绕过,因为Barron空间中存在不可约的近似界限。在54种Transformer配置上对组合搜索的评估证实了这些界限,证明泛化风险随Wasserstein领域偏移单调下降。

英文摘要:

Scaling laws for reasoning in large language models (LLMs) are well documented, but little theory explains their out-of-distribution (OOD) generalization. We formalize reasoning with optimal transport: each search trajectory is mapped to twelve structural coordinates, such as tree depth and backtracking rate, and dataset shift is measured by the Wasserstein-1 distance. Kantorovich duality bounds the OOD risk through this distance, the architecture's Lipschitz constant and approximation limits. First, under absolute positional encoding (APE), shifting part of a trajectory to later positions almost surely changes the attention scores within that part; if this misroutes exact-match search, the Lipschitz constant and risk are $Ω(1)$. Shift-invariant encodings such as rotary position embedding (RoPE) leave the scores unchanged and bound the error. Second, we map backtracking to a Dyck-$k$ language and, under an implicit-depth assumption, derive a risk floor for search trees deeper than a multiple of the number of layers. Enough layers remove this floor; more width only shrinks a separate Barron-space approximation term. Experiments with 54 trained Transformers on combinatorial search (Countdown) support these bounds. Appendix experiments measure structural shifts in public agent, embodied and robot trajectories, shift all position indices of 33 public language models, and split deeply nested tasks into separate model calls.

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

↑