TL;DR
By tracking how sparse autoencoder (SAE) features activate together across layers, researchers have discovered that large language models (LLMs) organize knowledge into modular, semantically coherent networks. Manipulating these multi-layer "modules" allows for precise control over model outputs, revealing a clear hierarchy where concrete concepts emerge in early layers and abstract relations form later.
What Problem Does This Paper Address?
While large language models (LLMs) excel at relational reasoning (e.g., knowing that the capital of China is Beijing), understanding how they store and retrieve this knowledge remains a major challenge in mechanistic interpretability. Prior work has relied on layer-wise linear transformations or vector arithmetic, which lack fine-grained feature-level resolution.
Recently, Sparse Autoencoders (SAEs) have emerged as a powerful tool to extract thousands of interpretable, "monosemantic" features from dense LLM activations. However, we still don't know how these isolated features coordinate across different layers to produce a final response. While some methods trace information flow using complex computation graphs, these graphs often contain hundreds of densely connected nodes that require tedious manual interpretation. This paper introduces an automated, lightweight approach to discover and manipulate functional, multi-layer semantic modules using feature coactivation.
Methods
The authors propose a simple pipeline to automatically extract and validate semantic modules from an LLM (specifically evaluated on Gemma 2 2B and 9B):
- Activation Collection: Input prompts are run through the LLM integrated with pre-trained SAEs to extract sparse feature activations across all layers.
- Feature Selection: To keep the graph computationally tractable, only the top $k=5$ activated features at any token position per layer are selected.
- Graph Construction: A directed graph is built where nodes represent SAE features. Edges are drawn between features in adjacent layers if their activation patterns across tokens are highly correlated (Pearson correlation $\rho > 0.9$).
- Pruning & Component Identification: Generic, frequently activating features are pruned using Neuronpedia density scores (retaining only features with a density $\le 0.01$). A standard Breadth-First Search (BFS) then identifies weakly connected components—the distinct "modules" representing concepts or relations.
- Causal Validation (Steering): To prove these modules actually cause the model's behavior, the authors perform targeted interventions: ablating (zeroing out) or amplifying specific modules during the forward pass to predictably steer the model's output.
Datasets
The method was evaluated across three multi-relational prediction tasks where the model must compose a concept and a relation to answer:
- Country Facts: 10 countries (concepts) paired with 3 relations (capital city, currency, language).
- Word Translation: 11 English words (concepts) translated into 3 target languages (Spanish, French, German).
- Verb Transformation: 8 English verbs (concepts) subjected to 5 grammatical or lexical relations (synonym, antonym, past tense, capitalization, first letter).
Evaluation was performed using zero-shot prompt templates entirely distinct from the few-shot prompts used during initial activation collection to ensure the modules generalize across contexts.
Key Insights and Ideas
- Modular Knowledge Architecture: Knowledge inside LLMs is not just scattered across independent features; it organizes into stable, context-consistent connected components that represent distinct concepts (e.g., "China") and relations (e.g., "capital city").
- Hierarchical Layer Organization: Concept modules representing concrete entities or words consistently emerge from the very first network layer. In contrast, abstract relational modules (like translation languages or country properties) are concentrated in later layers. This mirrors biological visual processing hierarchies where abstractions form at later stages.
- High Composability: Concept and relation modules can be manipulated simultaneously. For instance, by ablating the "China" and "capital" modules while amplifying the "Nigeria" and "language" modules, a prompt asking for China's capital can be cleanly steered to output "English" (Nigeria's language).
- Distributed vs. Single-Feature Representation: Steering the model using an entire multi-feature module significantly outperforms steering via a single, most-impactful feature. This confirms that semantic knowledge is represented distributively across populations of features.
Key Results
- High Steering Success: For individual concept steering, the model was successfully redirected to counterfactual answers in up to 98% of cases for country facts and 75% for word translation. Relation steering achieved up to 100% success for translation and 95% for country facts.
- Composite Steering: Simultaneously manipulating both concept and relation modules steered the model successfully in up to 90% of cases for country facts and 64% for word translation.
- High Specificity: Ablating a specific module rarely degraded the model's performance on unrelated tasks. For example, removing country fact modules left the model's accuracy on word translation and verb transformation at 100%.
Limitations and Future Work
- Task Complexity Scaling: The method was restricted to simple, multi-relational tasks with small datasets. Gemma 2 2B struggled to perform more complex tasks off-the-shelf (like Spanish verb conjugation or detailed animal taxonomy), meaning modules could not be extracted for tasks the model hasn't fully mastered.
- Heuristic Dependency: Representing complex concepts required manually combining multiple components based on task-dependent heuristics, though the authors outline a simple algorithm to fully automate this sorting in the future.
- Exclusion of High-Density Features: The pipeline intentionally pruned out frequently activating features to reduce noise. However, preliminary tests showed that ablating these dense features caused complete syntactic and semantic incoherence, indicating they perform critical structural functions that warrant future study.
Summary updated