Research log Small Model Experimentation
GitHub

Qwen3.5-4B OPSD Pressure Locality Audit

Helpful hints teach copying, not correctness

The one idea you need

Picture an open-book coding exam where the same reference page is handed to the grader checking each keystroke. The page lifts the grader's confidence only where the code copies its exact words, and stays silent at the one keystroke that separates a right answer from a plausible wrong one.

The question

Before training a small model to copy its own best code, does handing the grader a helpful reference sharpen its judgment right where correct and near-miss wrong code split apart?

What we found

No. At the exact spots where correct code diverges from code that passes surface tests but is secretly wrong, the reference hint adds essentially nothing — scoring no better than a scrambled, meaningless hint. The hint only boosts the grader where the code echoes its own wording, or where it leaks the full answer outright. Neither teaches real correctness, so the planned training run was cancelled before it burned any compute.

Why it matters

Before spending compute to train a model on its own best answers, verify the grader's edge lands on the real right-versus-wrong decisions, not surface word overlap. This cheap check, run before training, catches a hint that would teach mimicry.

How often the un-hinted model already chose the correct code100%at all 14 forks where correct and near-miss wrong code split, leaving the hint almost no room to help
Extra help the hint added at those 14 decisive forksabout nonescored no better than a scrambled, meaningless hint
Extra help where the hint's own words appeared in the codebig jumppure surface word-matching, not correctness
Extra help only when the hint spelled out the full answersmallreal signal, but it leaks the solution — that counts as cheating
On this page
  1. Results at a glance
  2. Overview
  3. Report
    1. Motivation
    2. Data
    3. Gate Result
    4. Fork Summary
    5. Token Pressure Buckets
    6. Example Forks
    7. Interpretation
    8. Decision
    9. Artifacts
  4. Experiment log
  5. Figures
  6. Data files
  7. Reproduce
  8. Related

Results at a glance 3

Extra help the hint adds where correct and wrong code split

How to read

Bars show how much each hint shifts the grader toward the correct branch beyond giving no hint at all; the zero line means no added help, and taller is better. Left to right: the real reference hint at decision points, a scrambled fake hint, an answer-leaking hint, and forks where the hint's words appeared in the code.

-0.500.511.5weak hint, task-specific forksweak hint, task-specific forks-0.008shuffled hint, task-specific forksshuffled hint, task-specific forks-0.028full reference, task-specific forksfull reference, task-specific for…0.213weak hint, hint-overlap forksweak hint, hint-overlap forks1.36

Takeaway → The real-hint bar sits at zero, level with the scrambled fake; only the word-overlap bar towers up, so the hint helps by matching surface text, not by teaching correctness.

Data table
hint condition / fork stratumdelta over student
weak hint, task-specific forks-0.008
shuffled hint, task-specific forks-0.028
full reference, task-specific forks0.213
weak hint, hint-overlap forks1.36

Numbers from reports/report_summary.json (also final_report.md fork summary table)

Technical framing

Does the hint add correct-branch preference beyond the student? (delta over no-hint student, nats/token) — Gate FAIL: weak hints add ~zero signal on task-specific forks (like shuffled control); their big gain is only on hint-overlap forks.

How strongly each grader already favors the correct code

How to read

Bars show how strongly each grader leans toward the correct branch over the wrong one at the decision points; taller means a more confident preference. Left to right: no hint at all, the real reference hint, a scrambled hint, and an answer-leaking hint.

0246no-hint studentno-hint student4.45weak retrieved hintweak retrieved hint4.44shuffled hintshuffled hint4.42full reference (leakage ceiling)full reference (leakage ceiling)4.66

Takeaway → All four bars stand at nearly the same height, meaning the grader already favored the correct branch on its own, so the reference hint changes almost nothing.

Data table
scoring conditionmean preference for correct branch
no-hint student4.45
weak retrieved hint4.44
shuffled hint4.42
full reference (leakage ceiling)4.66

Numbers from reports/report_summary.json (also final_report.md gate table)

Technical framing

Absolute correct-branch preference on task-specific forks — The student already prefers the correct branch by 4.45 nats/token; only the answer-leaking full-reference hint raises it.

Broad extra weight the hint puts on individual code pieces

How to read

Bars show how much extra weight the hinted grader adds to individual pieces of code; taller means more upweighting. Left to right: the real hint on correct pieces, the real hint on wrong pieces, a scrambled hint on correct pieces, and an answer-leaking hint on correct pieces.

00.20.40.60.8weak hint, correct tokensweak hint, correct tokens0.745weak hint, wrong tokensweak hint, wrong tokens0.068shuffled hint, correct tokensshuffled hint, correct tokens0.05full reference, correct tokensfull reference, correct tokens0.544

Takeaway → The real-hint-on-correct-pieces bar is tallest, hinting at broad help, but that optimistic view collapses at the exact forks that actually separate right code from wrong.

Data table
hint condition / token bucketmean positive teacher-student gap
weak hint, correct tokens0.745
weak hint, wrong tokens0.068
shuffled hint, correct tokens0.05
full reference, correct tokens0.544

Numbers from final_report.md token pressure buckets table

Technical framing

Rollout-level token pressure on discriminating tokens — Broad token view looks optimistic (weak hints upweight correct tokens), but the fork gate shows this is not localized at the correctness bits.

In the author’s words from the Report · “Interpretation”

This audit kills the immediate positive-only OPSD training run under the weak retrieved-hint setup. The hinted teacher is not useless: it strongly moves probability on hint-overlap forks and broad correct-rollout discriminating tokens. But it does not add incremental task-specific branch knowledge beyond what the base student already assigns. That is the near-fatal failure mode for OPSD here: dense credit exists, but it is not localized at the hidden-correct bits that distinguish correct code from visible-pass hidden-wrong near-misses. Full-reference hints do add task-specific signal, but that is a leakage ceiling. … Read the full result →

Overview

Standalone no-training audit for positive-only on-policy self-distillation.

The audit asks whether a privileged hinted teacher provides dense token-level signal at the exact places where hidden-correct code diverges from visible-pass hidden-wrong near-misses. It is a gate before any OPSD/OPD training.

Primary Gate

For matched hidden-correct and visible-pass hidden-wrong candidates on the same task, find same-prefix code forks. At each fork, score:

log p_teacher(correct_branch | shared_prefix, weak_hint) - log p_teacher(wrong_branch | shared_prefix, weak_hint)

The weak hint is the retrieved verified algorithm associated with the hidden-correct adaptation. Full reference-code hints are included only as a leakage ceiling, not as success evidence.

Supporting Analysis

The package also reports token-level student/teacher gaps for full correct and wrong rollouts:

gap_t = log p_teacher(token_t | prefix, hint) - log p_student(token_t | prefix)

Token buckets split shared boilerplate, discriminating correct chunks, discriminating wrong chunks, parse/format tokens, and other tokens. Discriminating forks are further stratified by whether their branch text overlaps with the retrieved hint.

Decision Rule

Run training only if weak-hint teacher preference is positive on task-specific forks, above shuffled-hint control, and not merely a full-reference leakage effect. If weak hints only upweight shared or hint-overlap tokens, this audit kills the OPSD training run.

Report

Rendered from reports/final_report.md

Motivation

This no-training audit tests whether positive-only on-policy self-distillation has the right token-localized signal before any adapter training is attempted. The target case is hidden-correct code versus visible-pass hidden-wrong near-misses for the same task.

The primary gate is same-prefix counterfactual branch preference: at executable code forks, does a weak hinted teacher prefer the hidden-correct branch over the hidden-wrong branch, and does that hint add preference beyond the no-hint student and shuffled-hint control?

Data

  • Matched correct/wrong pairs: 14
  • Tasks represented: [35, 44, 87]
  • Executable code forks scored: 50
  • Task-specific forks: 14
  • Hint-overlap forks: 36
  • Estimated scoring cost: 136060 forward tokens across 512 scored sequences.

Gate Result

Gate: FAIL

weak retrieved hint does not add task-specific correct-branch preference beyond student and shuffled control.

statisticvalue
weak task-specific absolute preference4.441
weak task-specific delta over student-0.008
weak task-specific fraction prefers correct1.000
shuffled task-specific absolute preference4.421
shuffled task-specific delta over student-0.028
full-reference task-specific absolute preference4.662
full-reference task-specific delta over student0.213

The important distinction is absolute preference versus incremental signal. The no-hint student already prefers the correct task-specific branches by 4.449 nats/token on average. The weak retrieved hint scores those branches at 4.441, which is a slight decrease (-0.008) rather than an added signal.

Fork delta over student

Absolute fork preference

Fork Summary

context / stratumnmean preferencemean student preferencedelta over studentfrac delta positive
weak / task-specific144.4414.449-0.0080.357
weak / hint-overlap364.7453.3881.3570.667
shuffled / task-specific144.4214.449-0.0280.429
full-reference / task-specific144.6624.4490.2130.786

The weak hint does add large signal on hint-overlap forks: 1.357. That is exactly the retrieval-surface effect the audit was designed to catch. The effect does not transfer to task-specific forks.

Weak delta distribution

Token Pressure Buckets

bucketmean positive gappositive raten
weak correct discriminating0.7450.749491
weak wrong discriminating0.0680.376596
weak correct parse/format0.2200.883111
weak wrong parse/format0.2260.670112
shuffled correct discriminating0.0500.470491
full-reference correct discriminating0.5440.656491

The rollout-level bucket view is more optimistic than the fork gate: weak hints give positive pressure to correct discriminating tokens overall. But the fork gate shows the crucial caveat: at task-specific same-prefix branches, the weak hint does not improve the student's preference. This means the broad token pressure is likely dominated by trajectory or retrieval-surface effects, not the local correctness bit needed for training.

Token positive pressure

Example Forks

Worst weak-hint task-specific deltas:

taskcorrect branchwrong branchweak delta over studentweak preferencestudent preference
44r'^\w+''ab{3}?'-0.1805.7535.933
44r'^\w+''\Bz\B'-0.1714.2404.411
87): if key in merged: merged[-0.1453.4913.636

Best weak-hint task-specific deltas:

taskcorrect branchwrong branchweak delta over studentweak preferencestudent preference
35n +x): count = 0 i =0.1422.6062.465
87,) merged.update(0.2255.6185.394
87,merged.update(0.4917.8917.400

Interpretation

This audit kills the immediate positive-only OPSD training run under the weak retrieved-hint setup.

The hinted teacher is not useless: it strongly moves probability on hint-overlap forks and broad correct-rollout discriminating tokens. But it does not add incremental task-specific branch knowledge beyond what the base student already assigns. That is the near-fatal failure mode for OPSD here: dense credit exists, but it is not localized at the hidden-correct bits that distinguish correct code from visible-pass hidden-wrong near-misses.

Full-reference hints do add task-specific signal, but that is a leakage ceiling. It does not justify deployable OPSD because the hint contains the answer and resembles gold/reference distillation rather than weak privileged guidance.

Decision

Do not proceed to Stage-2 OPSD training on this weak-hint formulation.

The next experiment should either:

  1. create stronger deployable evidence before distillation, such as independent retrieval-consensus or mined counterexample observations, then rerun this locality audit; or
  2. change the teacher hint so it contains task-specific discriminating evidence without leaking the reference solution.

Until the static locality gate passes, training would likely amplify retrieved surface form and shared structure rather than teach the missing correctness bits.

Artifacts

  • data/matched_pairs.jsonl
  • data/fork_pressure_scores.jsonl
  • data/token_pressure_scores.jsonl
  • reports/pair_summary.json
  • reports/pressure_summary.json
  • reports/report_summary.json
  • reports/figures/

Experiment log 1

Show the running log (1 entry, 2026-06-26)

2026-06-26

  • Created standalone no-training OPSD pressure-locality audit package.
  • Copied generated retrieval-adaptation candidate pools, retrieval plan, verified library, and generic evaluator/model utilities into the package.
  • Localized the experiment identity to qwen35_4b_opsd_pressure_locality_audit.
  • Pre-registered primary gate as same-prefix counterfactual teacher preference at code forks.
  • Built 14 hidden-correct versus visible-pass hidden-wrong matched pairs across tasks 35, 44, and 87.
  • Extracted 50 executable code forks: 14 task-specific and 36 hint-overlap.
  • Ran one-pair model-scoring smoke test, then full scoring over 512 sequences.
  • Corrected the gate to include delta over the no-hint student; absolute teacher preference alone was confounded because the no-hint student already strongly preferred the correct task-specific branch.
  • Final gate result: fail.

    • Weak retrieved hint task-specific absolute preference: 4.441.
    • No-hint student task-specific preference: 4.449.
    • Weak retrieved hint delta over student: -0.008.
    • Shuffled hint delta over student: -0.028.
    • Full-reference leakage ceiling delta over student: +0.213.
    • Weak retrieved hint-overlap delta over student: +1.357.
  • Generated final report, machine-readable summary, and four figures under reports/.

Figures 4

fork absolute preference
fork absolute preference · reports/figures/
fork delta over student
fork delta over student · reports/figures/
token positive pressure
token positive pressure · reports/figures/
weak delta distribution
weak delta distribution · reports/figures/

Data files 3

Result tables and metrics copied from the experiment folder — preview inline or open the raw file.

Reproduce

Runnable scripts exist in the experiment folder, but the exact invocation was not written down.

Browse the experiment folder on GitHub ↗