Knowledge Localization and Editability in Small Language Models: A Multi-Stage Experimental Study
Summary
A systematic, multi-stage empirical study investigated knowledge localization, compression effects, and editability across four small language models (SLMs) in the 2–3 billion parameter range: Gemma-2B, Llama-3.2-3B-Instruct, Qwen-2.5-3B-Instruct, and Phi-2, using Meta-Llama-3-8B as a baseline. Stage 1 employed causal tracing with activation patching on the CounterFact dataset (~450–500 validated facts per model) to pinpoint layers responsible for factual recall. Stage 2 quantified knowledge density, layer concentration, and redundancy, comparing 2–3B models to the 8B baseline. Stage 3 applied the Rank-One Model Editing (ROME) algorithm to assess localized knowledge overwriting. Results showed factual knowledge in SLMs concentrates in upper-to-final transformer layers, with Llama-3B exhibiting extreme concentration in layer 28. Compressed models stored knowledge more densely but with lower redundancy (Llama-3B: 0.047 vs. Llama-8B: 0.468). Editing success correlated with architectural concentration, not model size, with Llama-3B achieving 85.7% success versus 33% for Gemma-2B.
Key takeaway
For machine learning engineers designing or fine-tuning small language models, understanding knowledge localization is crucial. Your model's architectural concentration, not just its size, dictates how effectively you can edit factual knowledge. Prioritize architectures that promote concentrated knowledge storage, like Llama-3B's layer 28, to achieve higher editing success rates (e.g., 85.7% vs. 33%). This insight can guide your choices for more interpretable and adaptable SLM deployments.
Key insights
Factual knowledge in SLMs localizes to upper layers, impacting editability based on architectural concentration.
Principles
- SLM knowledge concentrates in upper layers.
- Compressed models store knowledge densely.
- Editability links to knowledge concentration.
Method
The study used causal tracing with activation patching, compared knowledge density and redundancy, then applied the Rank-One Model Editing (ROME) algorithm at identified layers.
In practice
- Target upper layers for SLM knowledge editing.
- Consider knowledge density in SLM design.
Topics
- Small Language Models
- Knowledge Localization
- Model Editing
- Transformer Architectures
- Causal Tracing
- ROME Algorithm
Best for: Research Scientist, AI Scientist, Machine Learning Engineer, NLP Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Paper Index on ACL Anthology.