用电路追踪法揭示解码器型Transformer的图推理机制。
Uncovering Graph Reasoning in Decoder-only Transformers with Circuit Tracing
- 通过电路追踪框架可视化模型推理过程,发现核心机制。
- 识别出路径推理与子结构提取共有的两种关键行为。
- 适用于研究大模型结构推理能力的学者和开发者。
基于Transformer的大型语言模型在图推理任务中表现优异,但其内部机制仍不明确。为从基础层面统一理解这些推理机制,我们采用基础解码器仅结构的Transformer,并利用电路追踪框架进行解释。通过该方法,我们可视化了推理轨迹,识别出图推理中的两个核心机制:令牌合并与结构记忆,它们支撑着路径推理和子结构提取任务。我们进一步量化了这些行为,并分析了图密度与模型规模对其的影响。本研究为理解解码器型Transformer的结构化推理提供了统一的可解释性框架。
原文摘要 · Abstract (English)
Transformer-based LLMs demonstrate strong performance on graph reasoning tasks, yet their internal mechanisms remain underexplored. To uncover these reasoning process mechanisms in a fundamental and unified view, we set the basic decoder-only transformers and explain them using the circuit-tracer framework. Through this lens, we visualize reasoning traces and identify two core mechanisms in graph reasoning: token merging and structural memorization, which underlie both path reasoning and substructure extraction tasks. We further quantify these behaviors and analyze how they are influenced by graph density and model size. Our study provides a unified interpretability framework for understanding structural reasoning in decoder-only Transformers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。