RL against the fabrication probe: frozen-reward GRPO on Qwen3-4B

Summary

Turn the fabrication probe into a training signal: run GRPO on Qwen3-4B with a reward that scores its own generations for fabrication using the covariance probe from experiment #5. The policy's text is scored through a frozen Qwen3-4B, so the policy can't game the probe by drifting its internal representations off the distribution the probe was trained on. Reward = per-sentence probe factuality + KL leash to base (the minimal recipe). The experiment is decided not by the reward but by an independent held-out web-search judge: actual fabrication must fall while the model keeps making claims (no collapse to vagueness), and the gap between probe-measured and judge-measured improvement quantifies any residual reward hacking.

Method
GRPO (FireRL)
Reward model
#5 covariance probe
Probe host
Frozen Qwen3-4B
Compute
1 node × 8 GPU
Wall-clock
~14 h
Verdict by
Held-out web judge

~14 h = torch_dist conversion (~0.3 h) + smoke (~0.5 h) + GRPO run (~10 h, dominated by the frozen-model forward pass inside the reward) + held-out generation & judge eval (~2 h). Wide-ish; the worker re-anchors off the first measured rollout-step time.

Hypothesis

Claim: Optimizing Qwen3-4B against the frozen-probe factuality reward reduces its real (web-judged) fabrication rate on held-out questions, without the probe reward being hacked and without collapsing informativeness.

Why this matters

This is the payoff of the whole thread: does an interpretability artifact (a probe) actually make the model better, not just diagnose it? A win is a cheap, self-contained way to reduce hallucination without a web-search judge in the training loop. A hack is just as valuable: it tells you the probe is a measurement instrument, not a safe optimization target, before anyone ships it as one. The frozen-host design is the specific anti-hacking hypothesis under test.

Deliverable

Artifact + findings. The RL'd Qwen3-4B checkpoint (HF-exported), and the base-vs-trained comparison on judged fabrication, coverage, the probe-vs-judge gap, and a general-capability sanity eval.

Stack & existing code

Input artifacts (prior experiments)

Reward design

def custom_rm(args, sample) -> float, per rollout sample:

  1. Take the policy's generated answer; segment into sentences (cheap regex/nltk, no web judge at train time).
  2. Run the frozen Qwen3-4B over the rendered prompt+answer once; capture per-token layer-20 residual activations.
  3. Apply #5's covariance probe to each sentence span → fabrication probability pᵢ.
  4. Reward = factuality score = 1 − mean(pᵢ) ∈ [0,1] (mean, not sum, so length isn't rewarded).
  5. No-claim case (zero sentences detected) → reward = 0.5 (neutral, not the maximum). This is the explicit abstention lever; with the minimal reward it's the most likely hack, so coverage is tracked as a primary metric (below).

KL to base is the framework's term (--use-kl-loss --kl-loss-coef), not part of custom_rm. The frozen model + probe load once as module-level singletons on a dedicated GPU and are reused across reward calls.

Known approximation: the probe was trained on atomic-claim spans; at train time we score whole sentences (cheaper). The smoke gate re-validates probe discrimination at sentence granularity, and falls back to lightweight per-claim decomposition if sentence-level AUROC degrades materially.

Data

Training config (GRPO, to confirm at the approval gate)

Anti-hacking evaluation (the actual result)

Steps

  1. Preflight: FireRL/MegaFire on expected branches, image present, #5 probe + #1 prompts load, Qwen3-4B loads (ungated), W&B verified.
  2. Convert weights HF → torch_dist (one SLURM job).
    Precondition. The converted checkpoint loads as --ref-load. Protects: the whole run can't start otherwise.
  3. Build & validate the reward harness (frozen host + covariance probe).
    Precondition. On a labeled held-out batch from #5, the reward harness reproduces probe discrimination (AUROC ≈ 0.816 at claim granularity; report sentence-granularity AUROC too). Protects: the entire run, a miswired probe (wrong layer/pooling/tokenization) would optimize noise. Fall back to per-claim scoring if sentence-level AUROC degrades materially.
  4. Smoke test (2–3 rollout steps, 1 node), job name slco-smoke-.
    Precondition. Rollout completes, custom_rm returns finite rewards, and reward varies across samples (variance > 0). Protects: a constant/degenerate reward gives no learning signal and is a common reward-wiring bug.
  5. GRPO run with periodic held-out judged-fabrication + coverage eval logged to W&B.
  6. Final eval (anti-hacking section): base vs trained on held-out prompts; export best checkpoint to HF.
  7. Publish the comparison results page + the trained checkpoint.

Resource plan

Visualizations

Preflight

Note: the FireRL approval gate (full config + compute plan sign-off) still applies, the worker will confirm node count, account/QoS, and the GRPO hyperparameters against live cluster availability before submitting.