Curved Inference: Concern-Sensitive Geometry in Large Language Model Residual Streams
作者: Rob Manson
分类: cs.CL, cs.AI
发布日期: 2025-07-08
备注: 29 pages, 22 figures
💡 一句话要点
提出曲线推理框架以解决大语言模型的几何可解释性问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 几何可解释性 大语言模型 曲线推理 内部激活 语义关注 模型对齐 情感分析
📋 核心要点
- 现有方法在解释大语言模型的内部机制时缺乏有效的几何视角,难以揭示模型如何响应语义变化。
- 本文提出的曲线推理框架通过分析残差流的几何特性,提供了一种新的可解释性工具,能够追踪模型在不同语义关注下的反应。
- 实验结果显示,LLaMA模型在关注强度增加时,曲率和显著性均有显著提升,而Gemma模型的反应则相对较弱,揭示了模型内部结构的差异。
📝 摘要(中文)
本文提出了曲线推理(Curved Inference)这一几何可解释性框架,旨在追踪大语言模型的残差流在语义关注变化下的轨迹弯曲情况。通过对20个匹配提示的分析,涵盖情感、道德、视角、逻辑、身份、环境和无意义领域,研究了Gemma3-1b和LLaMA3.2-3b模型。重点关注曲率和显著性等五个原生空间度量,结果表明,关注变化的提示可靠地改变了两个模型的内部激活轨迹,LLaMA在关注强度增加时表现出一致且显著的曲率和显著性缩放,而Gemma的反应则较弱。该研究为理解模型的语义抽象和对齐提供了新的视角。
🔬 方法详解
问题定义:本文旨在解决大语言模型在面对语义关注变化时的可解释性问题。现有方法往往无法有效捕捉模型内部激活的几何变化,导致对模型行为的理解不足。
核心思路:曲线推理框架通过分析残差流的几何特性,尤其是曲率和显著性,来揭示模型如何在不同语义关注下调整其内部激活轨迹。这种方法确保了测量结果与语义相关,而非仅仅依赖原始坐标结构。
技术框架:该框架包括数据预处理、模型选择、度量计算和结果分析四个主要模块。首先,通过匹配提示生成数据集,然后对Gemma3-1b和LLaMA3.2-3b模型进行分析,计算曲率和显著性等度量,最后对结果进行统计分析。
关键创新:最重要的技术创新在于引入了基于拉回语义度量的曲率和显著性计算方法,使得所有测量反映的是与标记对齐的几何特性。这与传统方法的原始坐标计算有本质区别。
关键设计:在参数设置上,使用了从解嵌入矩阵导出的拉回语义度量,确保了度量的准确性。此外,采用了多种统计方法来验证结果的显著性,增强了研究的可靠性。
🖼️ 关键图片
📊 实验亮点
实验结果表明,LLaMA模型在关注强度增加时,曲率和显著性均显著提升,且具有统计学意义。这一发现揭示了模型在不同语义关注下的内部激活轨迹变化,为理解模型的行为提供了新的视角。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理中的模型可解释性、情感分析、道德判断等。通过提供对模型内部机制的深入理解,曲线推理框架可以帮助研究人员更好地调整和优化模型,提升其在特定任务中的表现和可靠性。
📄 摘要(原文)
We propose Curved Inference - a geometric Interpretability framework that tracks how the residual stream trajectory of a large language model bends in response to shifts in semantic concern. Across 20 matched prompts spanning emotional, moral, perspective, logical, identity, environmental, and nonsense domains, we analyse Gemma3-1b and LLaMA3.2-3b using five native-space metrics, with a primary focus on curvature (\k{appa}_i) and salience (S(t)). These metrics are computed under a pullback semantic metric derived from the unembedding matrix, ensuring that all measurements reflect token-aligned geometry rather than raw coordinate structure. We find that concern-shifted prompts reliably alter internal activation trajectories in both models - with LLaMA exhibiting consistent, statistically significant scaling in both curvature and salience as concern intensity increases. Gemma also responds to concern but shows weaker differentiation between moderate and strong variants. Our results support a two-layer view of LLM geometry - a latent conceptual structure encoded in the embedding space, and a contextual trajectory shaped by prompt-specific inference. Curved Inference reveals how models navigate, reorient, or reinforce semantic meaning over depth, offering a principled method for diagnosing alignment, abstraction, and emergent inference dynamics. These findings offer fresh insight into semantic abstraction and model alignment through the lens of Curved Inference.