ablate 0 0 0

amildravid4292/reason-math-correctness

published by @amildravid4292

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
727
Last 30 days
519
Likes
-
Size
61.0 GB
Created on HF
2026-07-31
Age
2 months ago

Description

Correctness as a causal weight-space direction — MATH

Artifacts for the experiment: is "being correct" a single, causal direction in a language model's

weights? We train 12,976 rank-1 LoRA adapters on correct vs. wrong solutions to MATH problems with

Qwen/Qwen3-4B-Base, extract a direction from them, and show that steering the model's weights

along it causally controls accuracy on held-out MATH-500 — ablation collapses accuracy 62%→5%,

amplification lifts it to 77%, and a… See the full description on the dataset page: https://huggingface.co/datasets/amildravid4292/reason-math-correctness.

Tags

language:enlicense:apache-2.0size_categories:10K<n<100Kformat:jsonmodality:tabularmodality:textlibrary:datasetslibrary:dasklibrary:mlcroissantregion:usinterpretabilityactivation-steeringweight-spacemathematical-reasoningloraqwen

README current version from Hugging Face


license: apache-2.0
language:

  • en
    tags:
  • interpretability
  • activation-steering
  • weight-space
  • mathematical-reasoning
  • lora
  • qwen
    pretty_name: Correctness as a Causal Weight-Space Direction (MATH)
    size_categories:
  • 1M<n<10M

Correctness as a causal weight-space direction — MATH

Artifacts for the experiment: is "being correct" a single, causal direction in a language model's
weights?
We train 12,976 rank-1 LoRA adapters on correct vs. wrong solutions to MATH problems with
Qwen/Qwen3-4B-Base, extract a direction from them, and show that steering the model's weights
along it causally controls accuracy on held-out MATH-500
— ablation collapses accuracy 62%→5%,
amplification lifts it to 77%, and a matched-KL null control confirms the effect is
correctness-specific.

Headline results (held-out MATH-500, never seen when building the direction)

ablate (−8) baseline amplify (+8)
pass@1 5.0% 62.4% 77.1% (+14.7, p≈5e-51)
  • Necessary & sufficient. Forward−backward swing +63 pts (p≈9e-126). Full dose-response peaks at
    +8 then over-steering collapses the model (see math_steering.png).
  • Correctness-specific. A same-construction null direction (split axis, orthogonal, no
    correctness label) steered at matched KL reproduces neither the gain nor the collapse.
  • Construction-robust. PC1, the mean, and plain difference-of-means are the same vector
    (cos 0.99+); all steer identically.
  • Cross-benchmark. The direction is cos +0.52 with the independently-built direction from a
    different math benchmark (MathNet) — shared A0 gate puts them in the same 1,105,920-dim space.

Method (1 paragraph)

Rank-1 LoRA on 252 modules with a frozen shared random gate A0 (seed 20260709, checksum
145.648114), so every adapter is one point in the same weight-space and only the trained B varies.
Per problem, a 2×2 design (class {correct,wrong} × split {1,2}, 5 traces/cell) → 4 adapters;
d_p = mean(correct) − mean(wrong), averaged/PCA'd over 3,244 held-out-from-test train problems →
the global direction. Loss masks the answer span (so the direction can't just encode the answer
token). Steering builds an adapter B = coef·d, runs it in vLLM, and grades with math_verify. All
steering comparisons are KL-matched.

Repository structure

  • directions/d_bar_math_pc1.npy — the direction to steer with (also _lora, _pc2, _diffmean,
    _null). Each is a float32 vector of length 1,105,920 in the lora_B space.
  • pca/ — top-20 principal components of the per-problem correctness contrast, in the same
    weight space: pca_basis.npy (20 × 1,105,920), per-problem loadings + keys, eigenvalues,
    split-half reliability, KL-per-coefficient calibration, and the module layout that splits a vector
    into lora_B blocks. PC1–PC4 clear a permutation null; PC7+ do not. Mind the sign convention in
    pca/README.md
    — raw pca_basis[0] is the negative of the correctness direction.
  • loras_math/ — the 12,976 trained adapters (B_shard_*.npy + meta_shard_*.json), 8 shards.
  • gen_all/ — the graded rollout corpus: 12,340 MATH train+test problems × 100 rollouts.
  • steer_eval/{pc1,pc1_high,diffmean,null}/ — steering sweeps (per-coef pass@1/commit on MATH-500).
  • steer_adapters/ — reshaped steering adapters at each coefficient.
  • data/ — problem manifests (problems_math_all.jsonl w/ split+level+in_math500), the 2×2 trace
    set, counts_math.json (per-problem correct/wrong base rates), usable sets.
  • code/ — full pipeline (prep → grade → build 2×2 → train adapters → build direction → steer →
    analyze → figures). code/PIPELINE.md documents it.
  • FINDINGS.md — the complete writeup; math_steering.png — the dose-response + null-control figure;
    steer_examples.md — qualitative steered traces.

Reproduce / use the direction

import numpy as np
d = np.load("directions/d_bar_math_pc1.npy")   # (1105920,), reshape to per-module [d_out] blocks
# steer: LoRA with frozen gate A0 (seed 20260709) and lora_B = coef * d ; see code/steer_build_math.py

Attribution & licenses

  • Problems from MATH (Hendrycks et al., 2021), MIT-licensed; MATH-500 held-out subset via
    HuggingFaceH4/MATH-500.
  • Base model Qwen/Qwen3-4B-Base, Apache-2.0. Adapters and directions are derivatives of it.
  • Grading via math_verify. Traces are model-generated; no human/PII content.

This is scientific-artifact release: the value is a locatable, causal geometry of correctness, not a
training recipe (as a method it is a weak open-loop cousin of GRPO).

README history 6 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-08-11add pca/: top-20 PC weight directions of the correctness contrast (+ scores, ...e49094e4.6 KB
    Loading...
  2. 2026-07-31Add files using upload-large-folder tool9b55a0c4.1 KB
    Loading...
  3. 2026-07-31Add files using upload-large-folder tool44b63124.1 KB
    Loading...
  4. 2026-07-31Add files using upload-large-folder tool0795ba34.1 KB
    Loading...
  5. 2026-07-31docs, directions, code, data manifestsa3397b14.1 KB
    Loading...
  6. 2026-07-31initial commitb46372d0 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.

Community discussions 1 thread · 1 open · 1 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2026-08-01[bot] Conversion to Parquetopen1 💬#1
    Loading...

Related datasets same stage · ablate

Read further

Metadata

License
apache-2.0

Repository

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("amildravid4292/reason-math-correctness")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="amildravid4292/reason-math-correctness", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/amildravid4292/reason-math-correctness
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