Search for Truth from Reasoning: A Dynamic Representation Editing Framework for Steering LLM Trajectories
Abstract
Current approaches to enhance Large Language Model (LLM) reasoning, such as Chain-of-Thought and "Wait" prompts, primarily encourage models to think more, yet often fail to guide them toward Truth. While Representation Editing (RepE) offers a intrinsic control, its application to dynamic reasoning trajectories remains underexplored. In this work, we bridge this gap by investigating the geometry of truth within unfolding reasoning chains. We uncover three critical insights: (1) Truth is encoded at the sentence level and is entangled with latent reasoning patterns; (2) Effective intervention follows an Uncertainty Principle and a Decay Effect, requiring localization to early, high-entropy forks; (3) Naive steering vectors suffer from noise, risking collateral damage to correct trajectories. Based on these findings, we propose DynaSteer, a dynamic RepE framework. DynaSteer employs pattern clustering to disentangle reasoning manifolds and utilizes Fisher-LDA to project purified truth. By dynamically monitoring lookahead entropy, it selectively steers and rolls back trajectories only when necessary. Comprehensive experimental results on several MATH benchmark verify the effectiveness of DynaSteer, and experiments on out-of-domain coding tasks further confirm its generalization ability. Our code is publicly available at https://github.com/tianlwang/DynaSteer.
Lay Summary
While current methods try to make AI smarter by simply asking it to "think step-by-step," they often fail to ensure those steps are actually correct. To solve this, we created DynaSteer, a system that acts like a real-time GPS for an AI's internal thought process. By studying how AI models represent "truth" while reasoning, we found that correcting an AI works best if we intervene early—right when the model starts to hesitate or get confused—because heavy-handed, constant corrections can actually derail already-correct thoughts. DynaSteer constantly monitors the AI's certainty as it generates answers, filtering out mental "noise" and gently nudging its internal calculations back on track only when it is about to make a mistake. Tests show this "smart steering" significantly improves the AI's ability to solve complex math problems and write code, ensuring it doesn't just think more, but thinks accurately.