Interpreting and Controlling LLM Reasoning through Integrated Policy Gradient
Changming Li, Kaixing Zhang, Haoyun Xu, Yingdong Shi, Zheng Zhang, Kaitao Song, Kan Ren
TL;DR
This paper tackles the opacity of multi-step LLM reasoning by introducing Integrated Policy Gradient (IPG), a training-free, outcome-oriented attribution method that extends gradient-based analysis from parameter space to representation space and propagates long-horizon signals through inference trajectories via path-integrated gradients. IPG supports both neuron-level states and k-Sparse Autoencoder (k-SAE) feature representations, enabling robust identification of reasoning components and subsequent causal interventions by scaling selected activations with a factor $\gamma$. Empirically, IPG identifies sequentially influential components, shows strong cross-dataset transferability, and demonstrates precise control of reasoning capabilities and reasoning length across open-source models and reasoning benchmarks. The work also shows that IPG components transfer robustly to distilled models, supporting mechanisms that persist under model compression, and provides fine-grained interpretability by linking components to distinct reasoning aspects. Overall, IPG offers a scalable, interpretable, and transferable framework for understanding and steering LLM reasoning in practical settings, with potential extensions to broader behavioral domains.
Abstract
Large language models (LLMs) demonstrate strong reasoning abilities in solving complex real-world problems. Yet, the internal mechanisms driving these complex reasoning behaviors remain opaque. Existing interpretability approaches targeting reasoning either identify components (e.g., neurons) correlated with special textual patterns, or rely on human-annotated contrastive pairs to derive control vectors. Consequently, current methods struggle to precisely localize complex reasoning mechanisms or capture sequential influence from model internal workings to the reasoning outputs. In this paper, built on outcome-oriented and sequential-influence-aware principles, we focus on identifying components that have sequential contribution to reasoning behavior where outcomes are cumulated by long-range effects. We propose Integrated Policy Gradient (IPG), a novel framework that attributes reasoning behaviors to model's inner components by propagating compound outcome-based signals such as post reasoning accuracy backward through model inference trajectories. Empirical evaluations demonstrate that our approach achieves more precise localization and enables reliable modulation of reasoning behaviors (e.g., reasoning capability, reasoning strength) across diverse reasoning models.
