用几何流动视角揭示大模型如何在表征空间中进行逻辑推理。
The Geometry of Reasoning: Flowing Logics in Representation Space
- 将推理建模为表征空间中的平滑轨迹流动,逻辑作为局部速度控制器。
- 实验证明仅通过预测下一个词训练,模型仍能内化逻辑不变性。
- 适用于研究模型可解释性与形式化分析,对理解通用认知规律有启发。
我们研究大语言模型(LLMs)在其表征空间中的'思考'方式。提出一种新颖的几何框架,将LLM的推理视为流动——嵌入轨迹随逻辑演进。通过使用相同自然演绎命题但不同语义载体,分离逻辑结构与语义,检验模型是否超越表面形式内化逻辑。该视角将推理与位置、速度、曲率等几何量关联,实现对表征空间和概念空间的形式化分析。理论确立:(1) LLM推理对应表征空间中的平滑流动;(2) 逻辑命题作为流动速度的局部控制者。利用学习到的表征代理,设计受控实验以可视化并量化推理流动,实证验证了理论框架。结果表明,仅通过下一个词预测训练,模型即可在表征空间中内化逻辑不变性,挑战了‘随机鹦鹉’论点。在Qwen与LLaMA系列模型上的实验进一步暗示存在普遍且可能普适的表征规律,支撑机器理解与人类语言规律,基本独立于具体训练方法或模型架构。本工作为研究推理现象提供了概念基础与实用工具,开辟了理解模型行为的新视角。
原文摘要 · Abstract (English)
We study how large language models (LLMs) ``think'' through their representation space. We propose a novel geometric framework that models an LLM's reasoning as flows -- embedding trajectories evolving where logic goes. We disentangle logical structure from semantics by employing the same natural deduction propositions with varied semantic carriers, allowing us to test whether LLMs internalize logic beyond surface form. This perspective connects reasoning with geometric quantities such as position, velocity, and curvature, enabling formal analysis in representation and concept spaces. Our theory establishes: (1) LLM reasoning corresponds to smooth flows in representation space, and (2) logical statements act as local controllers of these flows' velocities. Using learned representation proxies, we design controlled experiments to visualize and quantify reasoning flows, providing empirical validation of our theoretical framework. Our findings indicate that training solely via next-token prediction can lead LLMs to internalize logical invariants as higher-order geometry in representation space, challenging the ``stochastic parrot'' argument. Experiments across Qwen and LLaMA model families further suggest the presence of a general, possibly universal, representational law underlying machine understanding and human linguistic regularities, largely independent of specific training recipes or model architectures. Our work serves as both a conceptual foundation and practical tools for studying reasoning phenomena, offering a new lens for interpretability and formal analysis of LLMs' behavior.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。