ablate 0 0 0

B2J/latent-state-tracking-minicpm5

published by @B2J

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
193
Last 30 days
100
Likes
-
Size
487 KB
Created on HF
2026-09-17
Age
1 months ago

Description

Tracking and Intervening on Latent State Dynamics in a Small Language Agent (MiniCPM5-2B)

Date: 2026-09-17

Model studied: openbmb/MiniCPM5-2B (2.52B params, 42 layers, hidden dim 2048)

Hardware: single RTX 3070 Ti (8GB) — all experiments run on consumer-grade hardware

Summary

We ask whether a small (2.5B-parameter) language model's hidden-state trajectory during generation contains a stable, low-dimensional structure that (a) is linearly decodable into task type… See the full description on the dataset page: https://huggingface.co/datasets/B2J/latent-state-tracking-minicpm5.

Tags

license:mitarxiv:2310.01405arxiv:2312.06681arxiv:2406.11717arxiv:2605.01853arxiv:2606.29164region:usinterpretabilityactivation-patchingrepresentation-engineeringmechanistic-interpretabilityminicpm5

README current version from Hugging Face


license: mit
tags:

  • interpretability
  • activation-patching
  • representation-engineering
  • mechanistic-interpretability
  • minicpm5
    pretty_name: "Tracking and Intervening on Latent State Dynamics in a Small Language Agent (MiniCPM5-2B)"

Tracking and Intervening on Latent State Dynamics in a Small Language Agent (MiniCPM5-2B)

Date: 2026-09-17
Model studied: openbmb/MiniCPM5-2B (2.52B params, 42 layers, hidden dim 2048)
Hardware: single RTX 3070 Ti (8GB) — all experiments run on consumer-grade hardware

Summary

We ask whether a small (2.5B-parameter) language model's hidden-state trajectory during generation contains a stable, low-dimensional structure that (a) is linearly decodable into task type and answer correctness, (b) is causally sufficient to flip the model's output when patched, and (c) changes measurably across pretraining → mid-training → SFT → final post-training stages.

Using MiniCPM5-2B's full four-checkpoint lineage (uniquely public for a model this size) and 1,000 controlled paired prompts across five task families (arithmetic, spatial reasoning, multi-step chaining, contradiction, and distractor memory), we find:

  1. A single principal component explains only 17.95% of last-layer hidden-state variance at n=1000 (top-10 components: 54.1% cumulative) — structure exists but is not low-rank-dominant.
  2. A linear probe recovers answer correctness at 100% accuracy / AUROC 1.0, including on a class-balanced variant that rules out imbalance as the driver.
  3. A single concept direction (v = mean(H_right) − mean(H_left)) patched into the last transformer layer causally flips left→right answers at 100% clean-flip-rate for α∈[2.5, 3.0], degrading to output collapse above α=4.0, while random and orthogonal control directions produce 0% flips at the same magnitude.
  4. Across the four checkpoints, PCA concentration and mean token-to-token hidden-state distance decrease monotonically with training progress, while causal intervention sensitivity (flip rate) is non-monotonic — it peaks at Midtrain (100%), dips at SFT (70%), and recovers at the final checkpoint (100%). This SFT dip is, to our knowledge, not reported in prior single-checkpoint latent-intervention work.
  5. (New, 2026-09-23) Cross-model generalization check: a confidence-gated early-exit mechanism calibrated on MiniCPM5-2B (15.17% of layers skippable at 91.0% exit accuracy) does not transfer its profile to Qwen2.5-1.5B-Instruct (9.80% skippable, 79.83% accuracy under the identical gate) — reported as an open, unexplained cross-model discrepancy, not a resolved finding. See paper.md §3.6.

Full paper writeup: see paper.md in this repository (includes Method, Related Work, and Limitations).

Contents

  • paper.md — full research writeup (Abstract through Conclusion, with Related Work and Limitations)
  • figures/ — 5 result figures (PCA scatter/scree, distance histogram, alpha sweep, negative controls)
  • results/h3_alpha_sweep.json — full alpha-sweep flip-rate data (raw + clean, per alpha value)
  • results/h3_results.json — H3 causal intervention baseline results
  • results/h3_examples.json — example generations under intervention
  • results/h6_minicpm5_early_exit.json — H6 confidence-gated early-exit results, MiniCPM5-2B
  • results/h6_qwen25_early_exit.json — H6 confidence-gated early-exit results, Qwen2.5-1.5B-Instruct (cross-model comparison)
  • code/ — analysis and intervention scripts (dataset generation, hidden-state extraction, trajectory analysis, causal intervention, alpha sweep, checkpoint comparison, figure generation)

Method (brief)

Concept direction v = mean(H_right) − mean(H_left), computed from the B (spatial) task family's paired train split (76 left / 84 right). Patched at generation time as a forward hook on the last transformer layer, adding α·v to the residual stream. Evaluated on a held-out set of LEFT-labeled prompts (n=19).

Negative controls: random direction and orthogonal direction, tested at α=4.0 alongside the semantic direction.

Related work

Limitations (honest, see paper.md for full list)

  • Checkpoint comparison uses a smaller N (100 paired samples) than Phase 1 (n=1000) due to hardware constraints.
  • Negative controls tested at a single α value (4.0), not swept across the full range.
  • The SFT-dip mechanism is observed but not yet mechanistically explained (cosine similarity between per-checkpoint concept vectors not yet computed).
  • Single model family (MiniCPM5-2B) — findings, especially the checkpoint comparison, are not yet shown to generalize.
  • A companion task-family probe (99.5% accuracy) is confounded by surface lexical markers and is not treated as evidence that the latent state encodes task identity — see paper.md §3.4 for full disclosure.
  • The H6 cross-model early-exit gap (MiniCPM5-2B vs Qwen2.5-1.5B-Instruct) is confirmed but its root cause is not yet identified — see paper.md §3.6/Limitations item 7.

Citation

No formal citation identifier (arXiv ID) yet available — this is an independent research project shared directly via Hugging Face while arXiv endorsement is pending. If you build on this work, please link back to this dataset repository.

Contact

Questions or interested in endorsing this work for arXiv submission (cs.LG/cs.CL)? Open a discussion on this repository.

README history 9 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2026-09-23Add H6 Qwen2.5-1.5B early-exit results (cross-model comparison)cdff2436.1 KB
    Loading...
  2. 2026-09-23Add H6 MiniCPM5-2B early-exit resultsec78e366.1 KB
    Loading...
  3. 2026-09-23Add H6 summary to READMEe9629046.1 KB
    Loading...
  4. 2026-09-23Add H6: cross-model early-exit generalization check (MiniCPM5-2B vs Qwen2.5-1...3d917dc5.3 KB
    Loading...
  5. 2026-09-17Upload code/h3_ablation.py with huggingface_hub5ea9cc05.3 KB
    Loading...
  6. 2026-09-17Upload results/h3_ablation_examples.json with huggingface_hubb6cb53b5.3 KB
    Loading...
  7. 2026-09-17Upload results/h3_ablation_results.json with huggingface_hub5de5ac35.3 KB
    Loading...
  8. 2026-09-17Upload folder using huggingface_hub95211045.3 KB
    Loading...
  9. 2026-09-17initial commit35781650 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Related datasets same stage · ablate

Read further

Metadata

License
mit

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("B2J/latent-state-tracking-minicpm5")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="B2J/latent-state-tracking-minicpm5", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/B2J/latent-state-tracking-minicpm5
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration