Abstract
Large Language Models (LLMs) have demonstrated significant capabilities in multi-step reasoning through Chain-of-Thought (CoT) prompting. However, these reasoning chains are often fragile, where a single logical hallucination can invalidate the entire result. We present Circuit-based Reasoning Verification (CRV), a "white-box" methodology that identifies errors by analyzing the model's internal computational graph. By extracting structural "fingerprints" from these graphs, CRV not only predicts reasoning failures with high accuracy but also enables surgical interventions to correct the model's logic.
Introduction
While LLMs excel at complex derivations, the underlying mechanisms of their failures remain opaque. Existing verification methods typically rely on black-box analysis of generated text or gray-box probing of internal activations. These methods can often identify that a model is likely incorrect but fail to explain why the computation failed. CRV treats a reasoning step as an execution trace in traditional software, seeking the specific "bug" within the model's internal circuit to provide a more interpretable and robust verification signal.
Methodology
The CRV pipeline consists of four distinct stages designed to transform dense model activations into interpretable structural data:
- Interpretable Replacement: Standard MLP modules are replaced with transcoders—sparse autoencoders trained to decompose dense activations into thousands of sparse, human-understandable features.
- Attribution Graph Construction: For any given reasoning step, the causal flow of information is traced from input tokens through these features to the final output, creating a directed graph of the active "circuit."
- Feature Extraction: A "structural fingerprint" is extracted from the graph, including global node counts, activation intensities, and topological features such as graph density and centrality.
- Diagnostic Classification: A Gradient Boosting Classifier is trained on these fingerprints to distinguish between correct and incorrect reasoning steps.
Experimental Setup
The study utilized three primary datasets with high-fidelity, step-level correctness labels: Synthetic Boolean logic, Synthetic Arithmetic (PEMDAS), and GSM8K. Computational traces were generated by running these problems through a Llama 3.1 8B model modified with the aforementioned transcoders.
Results and Key Insights
CRV demonstrates a significant performance advantage over traditional verification baselines. On arithmetic tasks, CRV achieved an AUROC of 92.47, compared to 76.45 for the best baseline (Energy-based verification). It also substantially reduced the False Positive Rate at 95% recall (FPR@95) to 37.09%, down from the baseline's 63.33%.
Key findings include:
- Structural Signatures of Error: Reasoning failures leave distinct marks on the computational graph, such as diffuse activation patterns or poor connectivity to key operator features.
- Domain Specificity: Error signatures are task-specific; a classifier trained on arithmetic struggles with boolean logic, suggesting LLMs employ different internal algorithms for different domains.
- Causal Interventions: By identifying specific faulty features, researchers successfully performed interventions—clamping or amplifying features—to steer the model from incorrect to correct logical conclusions.
Discussion and Future Work
While CRV provides a powerful tool for debugging LLM logic, it is computationally intensive, requiring transcoder passes and graph construction for every step. This currently positions it as a scientific diagnostic tool rather than a real-time production filter. Future research will focus on scaling this approach to larger models (e.g., 70B parameters) and more deeply exploring the semantic meaning of the individual features within the attribution graphs.
Summary updated