[Submitted on 27 May 2026 (v1), last revised 28 Nov 2026 (this version, v2)]
Abstract:Large Language Models (LLMs) achieve strong logical reasoning performance in few-shot settings when prompted with symbolic representations that abstractly describe step-by-step reasoning and graph traversal procedures. However, it remains unclear how LLMs internally carry out these reasoning steps and the overall procedure learned from only a few demonstrations. This work localizes the attention heads that are causally involved in individual reasoning steps under a family of symbolic-aided prompts and characterizes the information transferred among them. We first observe that the model is least confident at the tokens that steer the reasoning process. These tokens correspond to three decisions in each inference step: which premise to select, whether to stop selecting premises, and which rule to apply. For each decision, a small set of attention heads acting at the decision position (approximately 3% of all heads) restores most of the model’s clean behavior when patched into a corrupted run and largely removes it when corrupted in a clean run. In contrast, the heads that read the relevant facts and rules from the context reside in earlier layers and contribute in a more distributed manner. We also identify heads that are sensitive to the order of reasoning steps in the demonstrations, which reflects the global reasoning strategy (e.g., graph traversal algorithm), although this effect is weaker and less consistent across models and prompt templates. Our code is available at this https URL
Submission history
From: Phuong Nguyen Minh [view email]
[v1] Wed, 27 May 2026 01:30:09 UTC (2,256 KB)
[v2] Sat, 28 Nov 2026 03:55:03 UTC (3,696 KB)
