Abstract
Large Language Models (LLMs) are dynamic repositories of knowledge, yet the mechanistic process of how new facts are integrated into their weights remains poorly understood. This study, presented at ACL 2025, investigates the evolution of "knowledge circuits"—specific computational subgraphs—during continual pre-training. By tracking these circuits across multiple models (GPT-2, TinyLlama, Phi-1.5), we identify a distinct biphasic process: an initial formation phase characterized by rapid structural stabilization, followed by an optimization phase where performance improves within a fixed topology. Our findings reveal that knowledge acquisition follows a "deep-to-shallow" pattern and is significantly more efficient when new information relates to existing internal representations.
Introduction: The Mechanistic Challenge
While LLMs demonstrate impressive factual recall, the internal structural changes that facilitate learning new information have largely remained a "black box." Traditional research often treats knowledge as isolated blocks or individual neurons. However, factual recall is a collaborative effort involving various components—attention heads and MLP layers—working in a specific sequence. This paper addresses this gap by mapping the evolution of these knowledge circuits during continual pre-training, providing a mechanistic view of how a model "wires" new facts into its neural network.
Methodology: Dissecting the Learning Process
The researchers employed Mechanistic Interpretability techniques to observe models (GPT-2, TinyLlama, Phi-1.5) during training on synthetic factual data. The core of the analysis relies on Edge Attribution Patching with Integrated Gradients (EAP-IG), which identifies the most critical connections (edges) for predicting specific facts. The study tracks evolution across three levels:
- Performance: Measured via Hit@10.
- Topology: Analyzed through Jaccard Similarity (structural change) and Circuit Entropy (information concentration).
- Components: Monitoring specialized components like Mover Heads and Relation Heads.
The training data distinguished between Relevant New Knowledge ($K_{rel}$)—facts about known entities—and Completely New Knowledge ($K_{compl}$), allowing the team to test the "Knowledge Relevance Principle."
Key Insights: Biphasic Evolution and Relevance
The study reveals that knowledge acquisition is not a uniform process but a biphasic evolution.
- The Knowledge Relevance Principle: LLMs are associative learners. They integrate $K_{rel}$ significantly more efficiently than $K_{compl}$. Having an existing "hook" for a subject allows the model to wire in new attributes much faster.
- Biphasic Evolution: In the Formation Phase, the circuit's topology changes rapidly as the model "scouts" for the optimal path. In the subsequent Optimization Phase, the wiring stabilizes, and the model fine-tunes weights within that path to boost accuracy.
- Deep-to-Shallow Pattern: Extraction logic (finding the answer) develops first in middle and deeper layers, while lower layers later enrich subject representations.
Key Results: Structural Convergence
Empirical data confirms that across all tested models, circuit structures eventually converge.
As shown in the analysis of structural convergence, the Jaccard similarity of circuits increases monotonically, indicating that models settle on a "final" internal map for a piece of knowledge. The shift from formation to optimization happens earlier in larger models; for instance, Phi-1.5 reached its structural turning point faster than GPT-2 Small. Furthermore, topologies formed after this phase shift performed 54% better on average than those from the early formation phase when tested on the same facts.
Conclusion
This research provides a foundational map of how LLMs acquire knowledge. The discovery of the biphasic "inside-out" evolution and the importance of knowledge relevance offers practical pathways for improving data curriculums and mitigating catastrophic forgetting. Future work will explore whether these patterns hold for larger models (70B+) and different training objectives like instruction tuning.
Summary updated