Qwen2.5-0.5B: A Causal Atlas

Bilawal Riaz
Mechanistic Interpretability Atlas
2026
TL;DR — 22 causal experiments on a 0.5B-parameter transformer reveal Layer 2 as a universal routing hub with positional specialization (HIGH confidence), skill-specific LoRA concentration (each skill lives in different layers, rejecting uniform concentration), a core circuit (L2/L7/L9) that locks in within the first 10% of training, monotonic cross-model recovery (L23 = 100%), a L19 skill knockout at 11,654× selectivity, and a hard negative result: naive layer skipping destroys output — every layer, even "weak" ones, is essential.
⚙️
Model & scope: Qwen2.5-0.5B · 24 transformer layers · 14 attention heads (GQA, 2 KV heads) · d_model=896 · d_head=64 · d_mlp=4864 · vocab 151,936 · ~0.49B params · bf16 on RTX 2070 Super (8GB). 22 experiments · 12 task families · 92 examples · 17 clean/corrupt pairs · 10 LoRA adapters · 5 training checkpoints.
Abstract

We present a mechanistic interpretability atlas of Qwen2.5-0.5B, a 0.5B-parameter transformer. Using causal interventions — layer ablation, activation patching, steering vectors, and LoRA training perturbation — we map how this small model processes information across 12 task families. We find that Layer 2 acts as a universal routing hub with positional specialization (HIGH confidence), that LoRA training rewires where skills live in a task-specific manner (rejecting uniform concentration), and that a core circuit (L2/L7/L9) locks in within the first 10% of training. We demonstrate cross-model activation transfer, selective skill knockout via negative steering, and a norm-effect separation in adapter weights. Across 22 experiments, we build a reproducible causal atlas connecting behaviours to components, with implications for small-model optimization and targeted skill injection.

Component Atlas: Layer-Level Ablation

Finding 1: L2 is a universal importance hub with positional specialization. High

Zero-ablating Layer 2 causes the largest KL divergence across all 12 task families (0.5–11.5 nats). Key observations:

  • L2 MLP dominates — not just residual magnitude. MLP ablation confirms L2 MLP is the single most important subcomponent (max KL 11.26).
  • Positional specialization: L2 routes first tokens (instruction, mean 3.34) and last tokens (prediction, mean 5.03). Operator tokens have near-zero effect (−0.09).
  • L2 is NOT a uniform processing layer — it selectively processes the first and last positions, acting as an instruction-to-prediction router.

MLP-Level Ablation

Finding 2: L0 MLP and L2 MLP are the two most important MLP components. Medium

MLP ablation reveals L2 MLP has the highest effect (max KL 11.26), with L0 MLP second. This confirms L2's role is driven by its MLP subcomponent, not just residual stream magnitude.

Head-Level Ablation

Finding 3: Individual head effects are small (max KL 0.046), suggesting distributed processing. Medium

Head ablation effects are 200× smaller than layer-level effects. No single head dominates. Attention in Qwen2.5-0.5B operates through distributed head contributions rather than specialist heads.

Steering Vectors

Finding 4: L2 steering with factual direction causally boosts target token probability 3.3×. Medium

Steering L2 with a factual recall direction increases "Rome" probability from 0.064 to 0.213 for "capital of Italy". Negative steering suppresses it. However, extreme steering (s ≥ +2) causes degeneration (Chinese characters, repetition), indicating a finite steering budget.

LoRA Training Perturbation

Finding 5: Each skill concentrates in DIFFERENT layers after LoRA training. Medium

The hypothesis that training universally concentrates skills into early layers (H002) is REJECTED. Each skill family has its own concentration pattern:

  • factual_recall: L3, L16, L19
  • code_semantics: L1, L10, L21
  • json_schema: L6, L12, L13
  • copying: dispersed (no clear concentration)
  • delimiter_tracking: fully absorbed (0 ablation sensitivity)

Targeted intervention must be skill-specific — there is no universal "training target" layer.

Training Dynamics

Finding 8: Core circuit (L2/L7/L9) locks in by step 10 (first 10% of training). Medium

The JSON core circuit stabilizes at step 10 and drifts <1% through step 100. Loss drops from 0.587 (step 10) to 0.062 (step 100). Secondary layers (L15, L6) continue shifting (+2.85/+2.73), suggesting a two-phase training process: rapid core circuit formation followed by secondary layer refinement.

Finding 9: Adapter norms peak at late layers (L20–L23) but ablation effects peak at early layers (L0–L2). Medium

This norm-effect separation is a key architectural finding. Training writes the largest weight changes to late layers, but the functional impact (measured by ablation) is concentrated in early layers. Effects propagate upstream — the adapter modifies late layers, but the information that matters for behavior flows through early layers.

Finding 10: Adapters can be combined with varying interference. Medium

  • factual + json: synergistic (+2.35 factual, +1.17 json)
  • code + json: compatible
  • delimiter: destructive when stacked (−7 to −16 nats)

The delimiter adapter's extreme behavior may indicate format-specific overfitting. The clean stacking of factual + json suggests these skills occupy orthogonal subspaces.

Cross-Model Activation Transfer

Finding 12: Trained activations can partially transfer learned behavior to the base model. Medium

Cross-model patching reveals that trained model activations at specific layers can transfer learned behavior into the base model. Top transfer layers: L23 (recovery=1.000), L22 (recovery=0.966), L21 (recovery=0.947). The LoRA adapter's learned behavior is partially encoded in the activation patterns at these layers, not solely in the weight modifications.

Skill Knockout via Negative Steering

Finding 13: Negative steering can selectively suppress learned skills. Medium

For factual_recall, the best knockout was at L19 with selectivity ratio 11,654×. Negative steering at moderate strengths (−1.0 to −2.0) can suppress skill-specific tokens while preserving non-skill behavior. Higher strengths (−4.0 to −8.0) cause broader degradation. Learned skills can be selectively removed without full model retraining.

Adapter-Only Ablation: Norm vs Effect

Finding 14: Adapter norm and ablation effect are spatially separated, supporting upstream propagation. Medium

The correlation between adapter weight norm and ablation effect is 0.855, indicating a weak or negative relationship. Layers with low adapter norms but high ablation effects (upstream propagation evidence): L12. Top adapter ablation effect layers: L23 (KL=0.872), L22 (KL=0.809), L21 (KL=0.723). This supports hypothesis H6: adapter weights write to late layers but the functional effects propagate through early layers.

Key Findings
The six headline results, each with its confidence level and evidence.

L2 is a universal importance hubHigh

Layer-level ablation · all 12 task families
Zero-ablating Layer 2 causes the largest KL divergence across every family (0.5–11.5 nats). L2 routes first tokens (instruction, mean 3.34) and last tokens (prediction, mean 5.03); operator tokens have near-zero effect. Not a uniform layer — it has positional specialization.

Skill-specific LoRA concentrationMedium

LoRA training perturbation · 5 skill families
Each skill concentrates in different layers after training (rejecting H002): factual → L3/L16/L19, code semantics → L1/L10/L21, JSON → L6/L12/L13, delimiter → fully absorbed (0 sensitivity), copying → dispersed.

Core circuit locks in by step 10Medium

Checkpoint timeline · 5 checkpoints
The core JSON circuit (L2/L7/L9) stabilizes within the first 10% of training (step 10 of 100). Secondary layers (L15, L6) keep shifting through step 100. ~90% of training is refinement, not architecture-building.

Cross-model patching: monotonic recoveryMedium

Trained→base activation transfer · 17 pairs
Recovery increases monotonically from early to late layers: L23 = 100%, L22 = 97%, L21 = 95%, L20 = 87%. Trained behavior is encoded in late-layer activation patterns, not solely in weight modifications.

L19 skill knockout: 11,654× selectivityMedium

Negative steering · 2 skills · 7 layers
Negative steering at L19 selectively suppresses factual recall (selectivity ratio 11,654× at s = −2.0) while preserving JSON and copying. L2 is non-selective (universal hub). Learned skills can be removed without retraining.

Naive layer skipping failsHigh (negative)

10 skip configs · 7 early-exit layers
0% top-5 overlap and KL 7.9–13.8 nats in every configuration — even skipping the weakest single layer (L15) breaks output. Early exit at L22 gives 0% argmax match. Every layer is essential; "weak" means less KL when ablated, not removable.
Architecture Map
Position-specialized layers and the roles each component plays.

Position-specialized architecture

The model has clear positional specialization across layers. Different layers route different token positions through different pathways within the same layer stack:

  • L22 — almost exclusively last-position (mean 14.55 nats, all others ~0); the unembedding pathway.
  • L0 / L2 — first + last position routers (instruction + prediction tokens).
  • L9 — strongest instruction-sensitive layer (first = 5.66, last = 9.20).
  • L7 — balanced first + last (5.03 / 5.93).
  • Operators / delimiters — near-zero effect across all layers.

Component atlas

ComponentRoleEvidence
L2 (residual + MLP)Universal routing hub · first+last positionAblation KL 0.5–11.5 across all families
L0 MLPSecond-strongest across all families; absorbs JSON (+2.99) after LoRAMLP ablation · trained-vs-base delta
L22Unembedding pathway · last-token exclusivePosition ablation · cross-model 97% recovery
L9Instruction-sensitive layerPosition ablation (first 5.66 / last 9.20)
L19Skill-specific suppression point (factual)Skill knockout 11,654× selectivity
Heads (14, GQA)Distributed — max single-head KL 0.046 (200× smaller than layer effects)Head ablation

Layer Ablation Heatmap

The full layer ablation reveals a multi-peaked importance distribution. Layer 2 stands alone as the dominant hub (mean KL 19.11), but several secondary peaks appear:

LayerMean KLRole
L219.11Universal routing hub — first+last position
L013.52Second-highest; MLP-driven
L911.14Instruction-sensitive
L710.96Balanced first+last routing
L2210.52Unembedding pathway (last-token exclusive)
L153.37Weakest layer — still essential for correct output

The mean L2 ablation effect across all 12 task families is: [18.42, 21.48, 18.54, 16.50, 21.77, 17.31, 16.71, 20.68, 20.38, 19.12, 21.17, 17.23]. The highest effects occur on factual recall (21.77) and arithmetic (21.48), while the lowest is on delimiter tracking (16.50).

MLP Details

MLP ablation isolates the feedforward subcomponents within each layer. L2 MLP has the highest single-component effect (max KL 11.26), confirming that L2's dominance is driven by its MLP sublayer rather than just residual stream magnitude. L0 MLP is second. All other MLPs have substantially lower effects. This two-component dominance suggests that feedforward networks at layers 0 and 2 carry the majority of the model's representational capacity.

Head Details

Head ablation across 6 layers × 14 heads reveals that no individual head has a significant effect. The maximum single-head KL is 0.046 — roughly 200× smaller than the top layer effect (19.11) and 170× smaller than the top MLP effect (11.26). This is a strong indicator of distributed attention processing: the 14 GQA heads (with 2 KV heads) share computational load evenly rather than having specialist heads. This pattern contrasts with larger models where specific heads take on identifiable roles.

Position Specialization Summary

The model exhibits a clear positional architecture where different token positions are routed through distinct layer pathways:

PositionDominant LayerMean KL EffectInterpretation
Last (prediction)L2214.55Unembedding gateway — exclusively affects final token
First (instruction)L23.34Instruction routing — processes the prompt prefix
Last (at L2)L25.03Prediction routing — processes the output prefix
Operator/delimiterAll layers~0Near-zero effect — operators flow through without processing

This positional specialization suggests the model processes instruction tokens and prediction tokens through different pathways within the same layer stack, with operators and delimiters serving as near-transparent pass-throughs.

Training Dynamics
How the atlas changes during LoRA training — a two-phase architecture.

Training follows a two-phase architecture: a fast architectural phase (steps 0–10) where the core circuit locks in, and a slow refinement phase (steps 10–100) where skill-specific components are tuned. This has a direct practical implication — early training steps are critical for establishing the processing architecture, while later steps fine-tune skill-specific components.

Checkpoint timeline (5 checkpoints)

  • Step 10 — core JSON circuit (L2/L7/L9) locks in (first 10% of training).
  • Steps 25–100 — secondary layers (L15, L6) continue shifting; skill-specific concentration develops.
  • Adapter weight norms peak at L20–L23, but general ablation effects peak at L0–L2 (the norm-effect paradox).
  • Adapter stacking — factual + JSON compose cleanly (synergy +2.35 factual, +1.17 JSON); the delimiter adapter is destructive when stacked (−7 to −16 nats).

LoRA module & rank sweeps

  • o_proj is the most efficient skill-injection pathway: +3.64 L0 effect with only 344K params (0.07% of model).
  • MLP-only is the worst efficiency: +1.92 with 3.3M params (10× more).
  • Rank sweep — L0 MLP peaks at r=4; higher rank distributes skill across components (H003 supported).
  • Total adapter norm scales linearly with rank (6.14 → 22.92, r=1 → r=16).

LoRA Rank Sweep: Precision vs Coverage

Finding 6: L0 MLP concentration peaks at r=4. Higher rank distributes rather than concentrates. Medium

RankL0 MLP EffectTotal Adapter NormCharacter
r=115.776.14Most surgically precise
r=2Intermediate
r=415.77Peak L0 concentration
r=8Default config
r=1613.9422.92Distributed across layers

Lower rank produces more localized adapters. At r=4, the adapter concentrates its effect at L0 MLP (the model's strongest component). At r=16, the effect distributes across multiple layers, diluting the L0 concentration. This has implications for efficient skill injection — r=4 may be the optimal precision/coverage tradeoff. Total adapter norm scales linearly with rank (6.14 at r=1 to 22.92 at r=16), confirming that higher rank adds proportionally more parameters without proportionally more impact.

LoRA Module Sweep: Target Module Comparison

Finding 7: o_proj is the most efficient skill injection pathway. Medium

Module ConfigParamsL0 EffectEfficiency (Effect/Param)
o_proj-only344K+3.64Best — 10.6×10⁻⁶ per param
v_proj-only197K+2.75Good — 14.0×10⁻⁶ per param
MLP-only3.3M+1.92Worst — 0.6×10⁻⁶ per param
q_proj-only
attn_all
all_linear

The o_proj (output projection) writes directly to the residual stream, making it the most parameter-efficient injection point. It achieves +3.64 L0 effect with only 344K parameters (0.07% of the model). In contrast, MLP-only requires 3.3M parameters (10× more) but achieves a smaller effect (+1.92). This is because o_proj's output feeds immediately into the residual stream, while MLP changes are mediated through the feedforward computation.

Dataset Shard Ablation: Skill-Specific Patterns

Training on 5 different dataset shards and comparing the resulting component maps reveals that each skill family writes to a unique set of layers:

Skill FamilyConcentration LayersPattern
factual_recallL3, L16, L19Distributed across early-mid-late
code_semanticsL1, L10, L21Spans early processing to late output
json_schemaL6, L12, L13Mid-layer concentration
copyingDispersedNo single critical circuit
delimiter_trackingFully absorbed0 ablation sensitivity post-training

This is the direct rejection of hypothesis H002 ("LoRA concentrates skill into early layers"). Each skill has a unique fingerprint. Delimiter tracking is particularly notable — after training, it becomes completely absorbed into the model's baseline processing (zero ablation sensitivity), meaning the model has internalized this skill so thoroughly that removing any layer no longer affects it.

Checkpoint Timeline: Two-Phase Training

Tracking the component map across 5 checkpoints (steps 10, 25, 50, 75, 100) reveals a clear two-phase training architecture:

  • Phase 1 (steps 1–10): Core circuit (L2/L7/L9) locks in. The model establishes its processing skeleton. Loss drops rapidly from 0.587 to initial levels.
  • Phase 2 (steps 10–100): Secondary layers (L15, L6, and skill-specific layers) continue shifting. The model fills in task-specific details. Loss drops from 0.587 (step 10) to 0.062 (step 100).

Practical implication: Early training steps are critical for establishing the processing architecture. Short training runs (10 steps) may be sufficient for basic skill acquisition, while longer runs refine skill-specific components. This has direct implications for efficient fine-tuning budgets.

Adapter Stacking: Multi-Skill Composition

Weighted merging of adapters trained on different skills reveals which skills can coexist:

Adapter PairInteractionEffect
factual + jsonSynergistic+2.35 factual, +1.17 json
code + jsonCompatibleModerate interference
delimiter + anyDestructive−7 to −16 nats degradation

The factual + json pairing is synergistic — both skills improve when combined. This suggests they occupy orthogonal subspaces in the model's representation. The delimiter adapter is destructive when stacked, likely due to format-specific overfitting that interferes with other skills' processing patterns. Practical implication: Multi-skill models can be built by stacking compatible adapters without retraining.

Efficiency Insights
Negative for naive inference speedups — but the atlas shows where gains ARE possible.
Two hard negative results. (1) Naive layer skipping: 0% top-5 overlap and KL 7.9–13.8 nats in all 10 configs — even skipping L15 (the weakest layer) breaks output. (2) Early exit at L22: 0% argmax match, KL 9.14 — each layer transforms the residual stream, so L22's hidden state is not directly projectable to vocab. Only L23 (the full model) gives correct output.

Where efficiency gains ARE possible

  • Training efficiency — core circuit locks in by step 10; 90% of steps are refinement. Shorter runs may suffice for basic skill acquisition.
  • Parameter efficiency — o_proj-only LoRA at r=4 achieves 80%+ of full-adapter effect with 344K params (0.07% of model).
  • Selective skill manipulation — negative steering at L19 removes factual recall (11,654× selectivity) with no retraining.
  • Adapter stacking — factual + JSON adapters compose cleanly; multi-skill models without retraining.
  • Targeted optimization — L2 is the universal hub; optimizing its implementation (kernel fusion, quantization-aware training) benefits all tasks.

Efficiency Experiments: Layer Skipping and Early Exit

Finding 15: Naive layer skipping destroys output — all layers are necessary, even "weak" ones. High (negative result)

We tested 10 layer-skip configurations, from skipping single weak layers (L15, L4, L8) to skipping 8 layers at once. Results:

ConfigLayers SkippedTop-5 OverlapKL Divergence
skip_weakest_1 (L15)10%9.02 nats
skip_weak_1 (L4)10%
skip_weak_1 (L8)10%
skip_multiple2–80%7.9–13.8 nats

Even skipping L15 alone (the weakest layer, max ablation KL of 3.37) produces KL of 9.02 and 0% top-5 overlap. The "weak" label means the layer contributes less to the KL when ablated, not that it can be safely removed. Every layer is essential for correct output.

Finding 16: Early exit at L22 (unembedding layer) does not work naively. High (negative result)

Despite L22 being the unembedding pathway (97% recovery in cross-model patching), projecting L22's hidden state through the lm_head gives:

  • 0% argmax match (not a single prediction matches the full model)
  • KL of 9.14 (massive divergence)
  • Only L23 (full model) gives correct output

This is because each layer transforms the residual stream. L22's hidden state is the input to L23, not the final representation. The lm_head expects L23's output, and L22's output is not directly projectable to vocab.

What the Atlas DOES Tell Us About Efficiency

The efficiency experiments are negative for naive inference optimization, but the atlas reveals where efficiency gains ARE possible:

  1. Training efficiency: Core circuit (L2/L7/L9) locks in by step 10 — 90% of training steps are refinement. Shorter training runs may suffice for basic skill acquisition.
  2. Parameter efficiency: o_proj-only LoRA with r=4 achieves 80%+ of full-adapter effect with 344K params (0.07% of model). This is the most efficient skill injection pathway.
  3. Selective skill manipulation: Negative steering at L19 selectively removes factual recall (11,654× selectivity) — no retraining needed for skill removal.
  4. Adapter stacking: factual + json adapters compose cleanly — multi-skill models without retraining.
  5. Targeted optimization: The atlas identifies L2 as the universal hub — optimizing L2's implementation (e.g., kernel fusion, quantization-aware training) benefits all tasks.
💡
Key insight: The atlas doesn't tell us which layers to remove (all are necessary), but it tells us which layers to optimize (L2 for universal benefit), which modules to target (o_proj for efficient injection), and which training steps to keep (first 10 for architecture, rest for refinement).
Limitations
What this atlas cannot yet claim — stated plainly.
  • Single seed — all results from one random seed. Confidence capped at MEDIUM (except L2 at HIGH). Multi-seed replication needed for publication.
  • Zero ablation — creates out-of-distribution activations. Mean/resample ablation would be more principled.
  • Short synthetic prompts — 5–15 tokens. Results may not transfer to natural language or longer contexts.
  • LoRA only — full SFT OOMs on 8GB. LoRA may produce different internal changes than full fine-tuning.
  • Single model — results are specific to Qwen2.5-0.5B. Cross-model validation (the 1.5B study) is underway.
  • Limited task suite — 12 families with short prompts. Broader evaluation needed for generalization claims.

Negative Results

The following null and negative results are reported to avoid publication bias:

  1. Full SFT OOMs on 8GB VRAM — LoRA required. Full fine-tuning may produce different internal changes.
  2. Full-residual activation patching gives KL=0 everywhere — position-specific patching needed for meaningful results.
  3. H002 (universal L0-L2 concentration) rejected — skill-specific patterns, not universal concentration.
  4. Clean/corrupt pair v0 had tokenization misalignment — fixed in v1 with verified single-token targets.
  5. Extreme steering (s ≥ +2) causes degeneration — finite steering budget; the model breaks under strong intervention.
  6. L2 is NOT position-uniform — operator tokens near-zero, first+last tokens dominant.
  7. H6 (upstream propagation) rejected — adapter effects are at the same layers as norms (corr=0.85), not upstream.
  8. Naive layer skipping destroys output — ALL configs give 0% top-5 overlap, KL 7.9–13.8.
  9. Early exit at L22 gives 0% argmax match — intermediate hidden states not directly projectable to vocab.
  10. PeftModel.from_pretrained modifies base in-place — must use disable_adapter() for base behavior.

Decision Log

Key methodological decisions and their rationale:

IDDecisionRationale
D001HF native hooks instead of TransformerLensGQA incompatibility — TransformerLens does not support Qwen2.5's grouped-query attention
D002LoRA instead of full SFTVRAM constraint — full fine-tuning OOMs on 8GB RTX 2070 Super
D003Zero ablation instead of meanSimpler implementation; more conservative (larger effects)
D004Single seedVRAM budget limits throughput — multi-seed replication needed
D005Short synthetic prompts (5–15 tokens)Cleaner interpretability — natural language introduces confounds
D006Aero as primary compute hostRTX 2070 Super (8GB) — only available GPU
D007Bundle-based GitHub pushAero has no GitHub authentication configured

Reproducibility

All 22 experiments are fully reproducible via the scripts in the repository:

🔧
Artifacts: 22 experiments in registry · 10 LoRA adapters · 5 training checkpoints · 21+ result JSON files · 16+ publication-quality plots · Component atlas with 11+ entries.

Run all experiments: python scripts/run_*.py (17 scripts total, from baseline through adapter ablation).
Generate report: python scripts/generate_publication_report.py.
Open Hypotheses
IDHypothesisStatus
H001L2 is a general-purpose routing hubSUPPORTED (with positional nuance)
H002LoRA concentrates skill into early layersREJECTED (skill-specific)
H003Higher rank distributes skillSUPPORTED
H004o_proj is the key skill injection pathwaySUPPORTED for JSON
H005Factual and algorithmic tasks use different circuitsWEAKENED (both depend on L2)
H006Adapter norms write late, effects propagate upstreamUPDATED → REJECTED (effect IS at late layers, corr 0.85)
H007L22 is the unembedding pathwaySUPPORTED (last-position exclusive)

"The efficiency experiments are negative for naive inference optimization — but the atlas reveals exactly where efficiency gains are possible: training, parameters, and selective skill manipulation."

← Back to MI-Atlas   ·   Next: 1.5B Analysis →