让语言模型在句子层面进行抽象推理,提升效率与可解释性。
Latent Reasoning via Sentence Embedding Prediction
- 用连续句向量替代逐词生成,实现高层语义推理。
- 连续推理下推理计算量减半,性能媲美思维链方法。
- 适用于数学、逻辑等需要结构化推理的任务。
自回归语言模型一次生成一个词,但人类推理基于更高层次的抽象——句子、命题和概念。这引发核心问题:语言模型能否也学会在结构化语义单元上推理,而非仅处理原始词元序列?本文提出一种框架,通过利用预训练模型的表示能力,将语言模型迁移到句子空间中进行推理。该框架以自回归方式预测下一句子的连续嵌入表示,探索两种嵌入范式:1)语义嵌入,通过自编码学习保留表面语义;2)上下文嵌入,通过下一句预测任务捕捉前瞻结构。在离散化(每步解码后重编码)与连续化(完全在嵌入空间推理)两种推理模式下评估。在数学、逻辑、常识和规划四个领域,上下文嵌入结合连续推理展现出与思维链(CoT)相当的性能,平均降低一半的推理时浮点运算量(FLOPs)。还发现初步的可扩展性与模块化适应潜力。最后,提出SentenceLens工具,将中间模型状态解码为可读句子,用于可视化潜在推理轨迹。结果表明,预训练语言模型可在潜空间中有效实现抽象结构化推理。
原文摘要 · Abstract (English)
Autoregressive language models (LMs) generate one token at a time, yet human reasoning operates over higher-level abstractions - sentences, propositions, and concepts. This contrast raises a central question- Can LMs likewise learn to reason over structured semantic units rather than raw token sequences? In this work, we investigate whether pretrained LMs can be lifted into such abstract reasoning spaces by building on their learned representations. We present a framework that adapts a pretrained token-level LM to operate in sentence space by autoregressively predicting continuous embeddings of next sentences. We explore two embedding paradigms inspired by classical representation learning: 1) semantic embeddings, learned via autoencoding to preserve surface meaning; and 2) contextual embeddings, trained via next-sentence prediction to encode anticipatory structure. We evaluate both under two inference regimes: Discretized, which decodes each predicted embedding into text before re-encoding; and Continuous, which reasons entirely in embedding space for improved efficiency. Across four domains - mathematics, logic, commonsense, and planning - contextual embeddings under continuous inference show competitive performance with Chain-of-Thought (CoT) while reducing inference-time FLOPs on average by half. We also present early signs of scalability and modular adaptation. Finally, to visualize latent trajectories, we introduce SentenceLens, a diagnostic tool that decodes intermediate model states into interpretable sentences. Together, our results indicate that pretrained LMs can effectively transition to abstract, structured reasoning within latent embedding spaces.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。