Introduction
Large Language Models (LLMs) have demonstrated remarkable proficiency in fact-checking and claim verification. However, they are often criticized as "black boxes" because the internal mechanics of their reasoning remain opaque. While we know LLMs can recall facts, understanding how they resolve a complex claim—and where they might fail—is a significant challenge in interpretability research. This paper introduces a framework to decode these internal thought processes into human-readable knowledge graphs, revealing the layer-by-layer evolution of a model's factual representations.
Methodology
The researchers developed an end-to-end framework that translates abstract vector representations (latent states) into structured logic. The core of this approach is activation patching, a technique used to probe the model's internal state.
The process begins with a "source" inference where the LLM evaluates a claim (e.g., "Charlemagne was crowned emperor on Christmas Day"). The hidden states from specific layers are extracted and "patched" into a "target" prompt designed to elicit factual predicates. To handle the complexity of sentence-level claims, the authors use a Matrix-to-Vector Mapping function. This function creates a "summary vector" of the claim by focusing on the end-tokens of nouns and verbs, where entity information is typically concentrated. The resulting output is a Dynamic Knowledge Graph (DKG), where each layer of the model contributes to a temporal snapshot of the model's "understanding."
The Layer-wise Evolution of Thought
By applying this framework to models like LLaMA 2 (7B), the researchers identified a distinct "Store-and-Seek" pattern in how information evolves through the network. The reasoning process typically unfolds in three distinct phases as it moves through the model's layers.
- Early Layers (Syntax and Entity Resolution): The model focuses on identifying the primary subjects of the claim. For example, it resolves who "Charlemagne" is and retrieves basic biographical data like birth and death dates.
- Middle Layers (Factual Recall and Multi-hop Reasoning): This is the "aha" moment (roughly layers 5 to 21 in LLaMA 2) where the model connects entities to specific facts and performs logical jumps, such as linking the coronation event to a specific date.
- Late Layers (Attention Shift): In the final layers, the model shifts focus from the input facts toward the final output format, often influenced by in-context examples in the prompt rather than the specific claim logic.
Results and Insights
The framework was evaluated using the FEVER and CLIMATE-FEVER benchmarks. The model achieved a ROC AUC of 0.68 on FEVER and 0.74 on CLIMATE-FEVER, validating that the decoded graphs reflect the model's actual fact-checking performance.
A key finding is the role of Entity Centrality. If a model misidentifies an entity in the early layers—such as confusing Charlemagne with Charles V—this error propagates, leading to a "hallucination" or reasoning failure. Furthermore, the study revealed a "consistency dichotomy": when a model predicts a claim is True, its internal layers show relatively high agreement (~50%). Conversely, for False claims, internal consistency drops significantly to ~10-14%, suggesting that debunking a claim is a more fragmented and difficult internal process for the model than confirming one.
Conclusion
This research provides a powerful tool for visualizing the "evolution of thought" within LLMs. By mapping latent states to knowledge graphs, we can pinpoint exactly where a model's logic breaks down, whether due to representation errors or multi-hop reasoning failures. While the current evaluation is largely qualitative and constrained by summary vector methods, future work aims to explore information flow between tokens and develop quantitative metrics for the relevance of decoded facts.
Summary updated