# pullgym **Do AI agents report honest error bars?** pullgym is an evaluation and RL environment. An agent gets data from a simulated physics experiment, analyses it with a shell and Python, and reports a measured value with its uncertainty. The environment knows the true value. It scores the agent on whether its error bars are honest: not too small (overconfident) and not too large (uselessly safe). The question it answers: > When an agent reports a 68% interval on a measured quantity, how often does the true value fall inside it? A calibrated analyst is right 68% of the time. > **Status: v0.2.0.** The components below all work: 16 experiment families across five tiers, the scorer, the Harbor exporter, the fast runner, the reporting tool, and the multi-turn RLVR pipeline (rollouts, Dr. GRPO trainer, evaluation, analysis). Every family's reference analysis is verified calibrated. The headline result is a controlled comparison of proper-score and binary RLVR on Qwen3-8B (see [Results](#results)). v0.1 runs (harness `0.1.0`) and v0.2 runs must not be mixed in one table; `pullgym report` warns when they are. ## Why Agents are increasingly asked to analyse data, not only write code. A wrong central value is easy to catch. A correct central value with an error bar three times too small is not, and it is the failure that matters most in experimental science. Existing work measures nearby things: - **Confidence in task success & calibration RL (`RLCR`, `CAPO`).** Agent uncertainty-quantification and recent calibration-aware GRPO papers use proper scoring rules (such as Brier scores) to calibrate a model's scalar verbalized confidence (*"80% sure my final answer is right"*) on discrete QA or math correctness. They do not test whether a code-writing agent propagates instrument systematics, nuisance parameters and physical boundaries into a continuous error bar on a measured quantity. - **Distributional estimates without data.** [OpenEstimate](https://arxiv.org/abs/2510.15096) asks models for priors on real-world statistics and finds them often overconfident. The model gets no data and no tools. - **Statistics question answering.** [StatABench](https://arxiv.org/abs/2606.22977) scores answers to statistics questions and modelling tasks. - **Physics with simulators.** [PhysGym](https://arxiv.org/abs/2507.15550), PhysAgentGym and WorldSolver test law discovery or simulation code. [Collider-Bench](https://arxiv.org/abs/2605.13950) tests reproduction of LHC analyses. pullgym scores the uncertainty itself, against a known truth, over many independent episodes. All scoring is computed from numbers, with no LLM judge. ## Quickstart ```bash git clone pullgym && cd pullgym # this repository's URL uv sync uv run pullgym list # the experiment families uv run pullgym calibrate --n 2000 # check every reference analysis is calibrated uv run pullgym probe --n 500 # degenerate answering strategies vs the reference uv run pullgym export --n 100 --out tasks # Harbor task folders, dev split ``` Then run an agent on the tasks with [Harbor](https://www.harborframework.com/) and tabulate the results: ```bash harbor run -p tasks -a -m -o jobs uv run pullgym report jobs # coverage, pull and sharpness per model and family ``` `pullgym report` accepts several job directories and these options: - `--by model,tier,variant`: grouping keys (`model`, `agent`, `family`, `tier`, `variant`, `split`, `harness_version`). - `--paired`: restrict the table to tasks that every model answered validly. - `--baseline `: add seed-paired differences of every other model against ``. The table shows paired bootstrap 95% CIs on reward, McNemar tests on coverage, and pinball skill. - `--format text|md|latex|json`: output format. Because every model sees the same seeds, paired differences are much tighter than comparing two unpaired means. Use them for any claim that one model beats another. ## How an episode works 1. A **generator** draws hidden parameters θ from a prior, using a seed. 2. It simulates the experiment and writes the data files and an **apparatus note** to `/app/data`. The note gives the instrument resolution, calibration information and known quirks, as a lab logbook would. 3. The **agent** analyses the data however it likes, with Python, numpy, scipy, pandas and matplotlib available. 4. The agent writes its result to `/logs/artifacts/answer.json`. 5. The **verifier** runs in a separate, fresh sandbox, receives only that file, compares it with θ and writes a reward. The physics is undergraduate lab level. The difficulty is the statistics: nuisance parameters, systematics, correlated errors, low counts and the cases where the honest answer is "not measured". ## Answer format For each quantity, the agent reports five quantiles of its belief, at 2.5%, 16%, 50%, 84% and 97.5%: ```json { "lifetime": {"q025": 21.3, "q16": 22.4, "q50": 23.0, "q84": 23.6, "q975": 24.7} } ``` A Gaussian result `x ± σ` is close enough to `x − 2σ, x − σ, x, x + σ, x + 2σ`. Asymmetric low-count intervals and upper limits fit the same format. Quantiles must be finite numbers in strictly increasing order. An answer that is missing or malformed is scored as if the agent had reported the prior (the quantiles an analyst who never looked at the data could honestly give), minus a penalty of 1. Giving up is therefore never better than an honest, uninformative answer. ## Scoring | Level | Metric | What it tells you | |---|---|---| | Per episode (the reward) | A clipped log score: the log density of the reported distribution at the true value, in units of the reference analysis's σ, shifted so that a calibrated Gaussian as sharp as the reference averages 0, and clipped to [−20, +5] | Proper on the distributions that five quantiles can represent: among those, the expected reward is highest for the one that matches the agent's belief, and for any other belief it is highest for the closest one in KL divergence (see the clipping note below the table). An overconfident miss costs about pull²/2, so error bars 10× too small average about −12, while error bars 10× too large average about −1.8. | | Per episode (secondary) | `pinball_skill`: `1 − L / L₀`, with `L` the mean quantile (pinball) loss in reference-σ units and `L₀ ≈ 0.200` its expected value for a calibrated Gaussian as sharp as the reference | Also proper, but lenient on overconfidence, because its penalty grows only linearly with the miss. Reported for comparison, not used as the reward. | | Per family | Coverage of the 68% (`q16`–`q84`) and 95% (`q025`–`q975`) intervals | The headline numbers: 68% and 95% when calibrated. | | Per family | Pull = (`q50` − truth) / σ, with σ taken from the half-interval on the truth's side. Reported: mean, RMS and a robust width (half the 16–84 percentile range of the pulls) | The numbers physicists read: mean 0 and width 1 when calibrated. The robust width is reported alongside the RMS because a single wildly overconfident episode dominates the RMS. | | Per family | Sharpness: the agent's σ divided by the reference analysis's σ | Separates "honest but sloppy" from "honest and efficient". | To score the log density, the five quantiles are read as a full distribution: the quantile function is interpolated linearly in Gaussian z-space and extended past `q025` and `q975` with the outer slopes. A Gaussian answer becomes exactly that Gaussian, and an asymmetric answer becomes a piecewise-scaled Gaussian. The clip at −20 is reached at a pull of about 6.3. For a Gaussian belief it does not move the best answer away from the honest width. For a strongly heavy-tailed belief that the agent reports as a Gaussian, the best width shrinks by about 10%. An agent can avoid that by widening its outer quantiles. `pullgym report` also shows 68% coverage in equal-count bins of the true value, so an analysis that is calibrated on average but fails near a physical boundary still shows up. `reward.json` holds the per-episode numbers that Harbor aggregates. `details.json` holds the truth, the answer and any validation error, and is what `pullgym report` reads. ## Task families | Tier | What makes it hard | Family | The experiment | |---|---|---|---| | 1. Clean statistics | Nothing; a sanity check | `line_fit` | A cart's velocity from positions with known Gaussian errors | | | | `weighted_mean` | The speed of sound from several groups with very different stated errors | | | | `counting_rate` | A Poisson count rate from repeated fixed-time counts | | 2. Nuisance parameters | Something must be fitted or subtracted | `decay_background` | A lifetime from a binned decay curve over a flat background of unknown rate | | | | `peak_background` | A gamma-ray line's energy on a sloped background, with the line width unknown | | | | `low_count_rate` | A weak source's rate from a handful of counts, on and off source | | 3. Systematics | The statistical error alone is wrong | `voltmeter_gain` | A voltage on a meter whose gain has a certified uncertainty | | | | `underestimated_errors` | A resistance from a V–I curve whose stated error bars are too small by an unknown factor | | | | `errors_xy` | A spring constant when the extension readings have errors as large as the force readings | | | | `correlated_norm` | A density from runs over several days, each day sharing its own calibration error | | | | `dead_time` | A true count rate behind a counter whose dead time is uncertain, giving an asymmetric interval | | 4. Traps | The honest answer is a limit | `no_signal` | The strength of a faint line that is often indistinguishable from zero | | 5. Implicit metrology | Nothing in the note points at the problem | `outliers` | Local g from automated free-fall drops, some silently corrupted by trigger glitches | | | | `unmodeled_drift` | A frequency shift from unevenly interleaved sample and reference runs on a drifting baseline | | | | `look_elsewhere` | The strength of a resonance whose energy is unknown, so noise bumps elsewhere mimic it | | | | `datasheet_metrology` | A resistance from a voltmeter specified by a GUM datasheet (`k = 2` gain, rectangular offset limit, small-N scatter), with readings in mV, current in µA and the answer in Ω | Tier 5 exists because frontier agents reproduce the reference task by task on Tiers 1–4, where the apparatus note states every systematic. In `outliers` and `unmodeled_drift` the note says nothing about glitches or drift (a test enforces this), so they must be found from the residuals. `datasheet_metrology` gives the systematics, but only in the conventions of a real datasheet, which subsumes the earlier `unit_mismatch` idea. Hidden nuisance hyperparameters are kept from becoming a secret advantage for the reference: a reasonable analysis that does not know them must come close to the reference (`tests/test_tier5.py`). Two examples: - On `outliers`, a contamination mixture with deliberately different priors scores −0.08 against the reference's −0.04 (300 seeds). - On `unmodeled_drift`, a baseline polynomial whose degree is chosen by BIC scores −0.08 against −0.04. ### What the traps catch Each family is built so that a common shortcut gives the wrong error bar. The table below scores those shortcuts with the same scorer the agents face, on 300 seeds per family. | Family | Shortcut | Coverage 68% | Coverage 95% | Robust pull width | Sharpness | Reward | |---|---|---|---|---|---|---| | `voltmeter_gain` | Statistical error only, ignoring the gain certificate | 9% | 16% | 12.3 | 0.08 | −12.6 | | `underestimated_errors` | Trust the stated error bars | 38% | 70% | 1.90 | 0.50 | −1.06 | | `errors_xy` | Ignore the errors in x | 25% | 46% | 4.01 | 0.27 | −5.48 | | `correlated_norm` | Treat all runs as independent | 11% | 23% | 5.98 | 0.17 | −8.33 | | `correlated_norm` | Add the calibration error once, as if all days shared it | 88% | 100% | 0.59 | 1.71 | −0.22 | | `dead_time` | Correct for dead time but ignore its uncertainty | 6% | 12% | 15.8 | 0.06 | −13.4 | | `low_count_rate` | √N Gaussian errors | 67% | 94% | 0.97 | 1.29 | −0.48 | | `no_signal` | Sideband-subtracted counts with √N Gaussian errors | 65% | 92% | 1.08 | 1.53 | −0.57 | | `outliers` | Weighted mean with its formal error | 34% | 60% | 2.48 | 0.91 | −2.77 | | `outliers` | 3σ clipping, then weighted mean | 62% | 91% | 1.13 | 0.95 | −0.12 | | `unmodeled_drift` | Difference of the two means (no detrending) | 7% | 13% | 13.1 | 0.79 | −14.5 | | `unmodeled_drift` | Linear detrending only | 12% | 26% | 6.77 | 0.90 | −10.6 | | `look_elsewhere` | Fit the largest bump; Gaussian error | 45% | 80% | 1.07 | 1.01 | −0.55 | | `datasheet_metrology` | Statistical error only, ignoring the datasheet | 19% | 41% | 5.01 | 0.23 | −5.47 | | `datasheet_metrology` | Zero offset ignored | 46% | 78% | 1.48 | 0.69 | −0.51 | | `datasheet_metrology` | The `k = 2` gain spec read as 1σ | 81% | 99% | 0.73 | 1.42 | −0.15 | The reference analyses average a reward of about 0. In `low_count_rate` and `no_signal`, the Gaussian shortcut keeps roughly nominal coverage. It loses on sharpness and reward instead, because its interval is wider than the data support and runs into negative rates. Those two families test efficiency and respect for the physical boundary more than coverage. Some Tier-5 mistakes are cheap in reward, and that is expected: - **Sigma clipping on `outliers`** is a legitimate way of noticing the glitches, so it loses little. The trap is the unexamined weighted mean. - **Reading `datasheet_metrology`'s conventions too cautiously** (the `k = 2` spec as 1σ, or the offset limit as 1σ) over-covers (81% / 99%), but a proper score charges little for caution. It shows up in coverage and sharpness rather than in reward. ### Reference analyses are calibrated Every family ships a reference analysis written by a human. Before any model is run, it must reach nominal coverage on the family's own generator. Numbers below come from `pullgym calibrate --n 2000`; the standard error is 1.0 point on 68% coverage and 0.5 points on 95%. | Family | Coverage 68% | Coverage 95% | Pull mean | Pull RMS | Pull robust width | |---|---|---|---|---|---| | `line_fit` | 66.9% | 94.9% | +0.01 | 1.01 | 1.01 | | `weighted_mean` | 68.3% | 95.3% | +0.01 | 1.00 | 0.99 | | `counting_rate` | 64.3%\* | 95.1% | +0.02 | 1.04 | 1.07 | | `decay_background` | 67.3% | 94.3% | +0.01 | 1.03 | 1.01 | | `peak_background` | 68.0% | 94.5% | +0.01 | 1.02 | 1.00 | | `low_count_rate` | 67.2% | 94.6% | −0.01 | 0.96 | 1.00 | | `voltmeter_gain` | 69.3% | 94.8% | −0.02 | 1.00 | 0.97 | | `underestimated_errors` | 67.4% | 95.0% | −0.01 | 1.06 | 1.01 | | `errors_xy` | 66.7% | 94.2% | −0.02 | 1.02 | 1.01 | | `correlated_norm` | 66.8% | 95.2% | −0.01 | 1.00 | 1.01 | | `dead_time` | 68.9% | 94.8% | +0.03 | 1.00 | 0.97 | | `no_signal` | 68.0% | 94.2% | +0.00 | 0.95 | 0.99 | | `outliers` | 67.3% | 95.2% | +0.02 | 1.00 | 1.01 | | `unmodeled_drift` | 68.0% | 94.9% | −0.01 | 1.00 | 0.99 | | `look_elsewhere` | 67.7% | 94.2% | −0.06 | 0.97 | 1.01 | | `datasheet_metrology` | 66.1% | 94.0% | +0.01 | 1.00 | 1.03 | \* A fluctuation in this seed range: on 20,000 seeds (1,000,000–1,019,999), `counting_rate` gives 67.6% ± 0.3% and 94.8% ± 0.2%, with a robust pull width of 1.00. Its reference is a Bayesian posterior whose coverage is essentially exact by construction. The slow test suite (`pytest -m slow`) repeats this check with 400 seeds per family. `pullgym probe` confirms that in every family the reference analysis has a higher mean reward than any of these degenerate strategies: - its own quantiles scaled to 0.1×, 0.5×, 2× or 10× their width about the median, which keeps any asymmetry; - its quantiles shifted by 1σ; - the prior alone. The probe also reports a `gaussian approx` diagnostic: a symmetric Gaussian with the reference's centre and 68% width. It measures how much a Gaussian summary loses. On `low_count_rate` and `no_signal`, where the exact posterior is skewed by the physical boundary, it costs 0.08–0.10 reward. Elsewhere it ties with the reference. **Small samples.** At 15 seeds per family, the calibrated reference itself ranges from 53% to 87% 68%-coverage across families, and reaches 90.6% 95%-coverage over all 180 episodes of dev seeds 0–14. Per-family coverage at that size is mostly seed noise. Compare models with `pullgym report --baseline`, not by reading off per-family coverage. ### Adding a family A family is one Python class in `src/pullgym/families/`: ```python class MyExperiment(Family): name = "my_experiment" tier = 2 title = "..." quantities = {"g": Quantity("m/s^2", "local gravitational acceleration")} task = "One paragraph telling the agent what to determine." def sample_theta(self, rng) -> dict: ... # hidden parameters, from a prior def truth(self, theta) -> dict: ... # requested quantities from theta def simulate(self, theta, rng) -> dict[str, str]: ... # data files the agent sees def apparatus_note(self, theta) -> str: ... # the lab logbook; must not leak theta def reference_analysis(self, files) -> dict: ... # five quantiles per quantity ``` Register it in `src/pullgym/families/__init__.py`. The test suite then checks it automatically: that it is deterministic, that the reference analysis is calibrated, that degenerate strategies score below the reference, and that the truth does not appear in visible files. ## Splits and hack resistance The generator is the source of truth. Task folders are built from it for a chosen list of seeds. - **Dev split:** seeds 0, 1, 2, … are public. Use it to develop agents and to reproduce published numbers. - **Test split:** seeds derived from a private secret (`pullgym export --split test --secret-file ...`), with opaque task names, regenerated for each release. Published results use this split. Because the generator is procedural, a public answer key for the dev split does not reveal the test split. - Verification runs in Harbor's separate mode: a fresh sandbox that does not inherit the agent's filesystem. The only thing passed across is `/logs/artifacts/answer.json`. The true values and the reference analysis exist only in the verifier image. - The verifier is standard-library Python. It rejects symlinks, files over 1 MB, NaN and infinity, non-numeric values, values with magnitude above 10³⁰, and unordered quantiles, and it always writes finite rewards. - `pullgym probe` checks that the reference beats degenerate strategies: intervals too narrow or too wide, a shifted centre, and ignoring the data. The full probe results are published with each release. ## Instruction variants Task instructions come in two variants, chosen at export (`--variant`): - `calibrated`: says that the answer is scored on calibration and explains what that means. - `neutral`: asks for the result and its uncertainty as quantiles, with no mention of scoring. How the question is asked changes the answers, so results are always reported per variant. ## Results All v0.2 results use harness `0.2.0.dev0`. The agent-visible harness of the `0.2.0` release is identical: prompts, observations, the status footer, the families and the scorer have not changed since, and `pullgym report` treats the two versions as one harness. Full write-ups: [docs/RLVR_RESULTS.md](docs/RLVR_RESULTS.md) (training) and [docs/FRONTIER_RESULTS.md](docs/FRONTIER_RESULTS.md) (frontier models). ### Proper-score RLVR vs binary RLVR (Qwen3-8B, multi-turn, 3 training seeds per arm) **Setup:** * **Model and training:** Qwen3-8B (4-bit, LoRA rank 32), 150 Dr. GRPO steps on the 8 training families. * **Harness:** rollouts use the exact `run-fast --tool-mode code` loop that evaluation uses: 4 turns, a schema-only `answer_status` after each turn, and observations cut to 1,200 characters. * **The two arms** differ only in the reward: * `binary`: +1 if the median is within σ_ref of the truth, else 0, and −1 if invalid. * `log_score`: the clipped log score, with floor −10, and −12 if invalid. * **Evaluation:** * The 8 training families (ID): 15 tasks each, 2 draws. * The 8 held-out families: the 4 v0.1 OOD families, plus Tier 5. 25 tasks each, 4 draws, under both prompts. * 12,880 scored episodes in total. * **Statistics:** each arm's score on a task is its mean over seeds and draws, and the bootstrap resamples tasks. ![Training dynamics](docs/assets/phase5_training.png) | Set (calibrated prompt) | base: valid / cov68 / `rew_all` | binary | log_score | |---|---|---|---| | ID (8 training families) | 29% / 4% / −8.34 | 99% / 27% / −11.48 | 97% / 52% / **−3.67** | | Held-out v0.1 (4 families) | 41% / 35% / −6.45 | 95% / 10% / −15.30 | 92% / 25% / −9.85 | | Held-out Tier 5 (4 families) | 23% / 20% / −5.42 | 93% / 33% / −10.05 | 92% / 45% / −6.13 | ![Task-paired differences](docs/assets/phase5_deltas.png) Findings: 1. **`log_score` beats `binary` on every set, held-out families included.** * Task-paired `rew_all`: +7.8 [+6.9, +8.8] ID, +5.4 [+4.7, +6.2] held-out v0.1, +3.9 [+3.1, +4.7] Tier 5. The neutral prompt agrees (+4.8 and +4.4). * The 10% trimmed differences agree, so a few −20 episodes don't drive the result. * Across training seeds, an exact one-sided permutation test gives p = 0.05 (ID, Tier 5) and 0.10 (v0.1); 0.05 is the smallest possible with 3 vs 3 runs (0.10 two-sided). 2. **Binary RLVR teaches validity and point accuracy, and breaks the intervals.** * Its 68% coverage falls to 27% ID and 10% on held-out v0.1. * In the last 50 steps, 46–71% of its groups have zero reward spread, which leaves no gradient. 3. **Binary RLVR keeps the base model's habit of fabricating data; the log score removes it.** * In 46% of `binary`'s valid ID answers and 54% of held-out ones, the answer code says it simulates or invents the data. The typical sequence: a guessed filename raises `FileNotFoundError`, then the model simulates the data and writes quantiles. * For comparison: `log_score` 3% / 12%, base 26% / 34%. The base model already fabricates; binary training raises the rate on the training families and v0.1 and lowers it on Tier 5 (57% → 49%), while log-score training cuts it everywhere. Hand-checked hits were all real fabrications. The regex only catches commented cases, so these are lower bounds. * Under the binary reward, an answer built on invented data earns the same as an honest analysis whose median misses, and both beat a crash. Under the log score, an invented narrow answer that misses by many σ earns far less than an honest wide one. The scorer can't see fabrication; only the code shows it (`scripts/phase5_code_audit.py`). 4. **One of the three `log_score` seeds gave up on the analysis.** Its wide, data-independent answers are calibrated but uninformative, which a proper score charges little for; we count them separately because they show no analysis skill. * Seed 1 gives the same answer on 3 or more different tasks of a family in 49–84% of its valid answers. For example, `[8.5, 9.0, 9.81, 10.6, 12.0]` on every `outliers` task: the textbook g with a wide guessed interval. * It also inflates `line_fit` widths about 58×. * Seeds 0 and 2 do this in under 10% of answers. * Scoring every fabricated or constant answer as invalid (−12), `log_score` still beats `binary` task-paired on every set (+3.6 ID, +2.1 v0.1, +1.9 Tier 5, all CIs excluding 0). The seed-level p rises to 0.10–0.20, so the seed-level evidence is weaker than the task-level evidence. 5. **Against the untrained base model, the answer depends on how a missing answer is scored.** * Base fails to answer 59–77% of held-out tasks. * Under the training reward (invalid = −12), `log_score` is better everywhere: +8.3 ID, +2.9 v0.1, +5.9 Tier 5. * Under the leaderboard score, a missing answer gets the prior fallback (≈ −3.5), and base wins on held-out v0.1 (−3.4 [−4.3, −2.5]) and ties on Tier 5. * Training does not make answers worse; it makes the model attempt hard tasks it used to skip. Read the three metrics together. 6. **Tier 5 is only partly learned.** * `log_score`'s Tier-5 coverage (45%) includes the seed-1 guesses. * Without fabricated or constant answers, its 68% coverage is 54% on `outliers`, 35% on `datasheet_metrology`, 37% on `unmodeled_drift` and 32% on `look_elsewhere`. Frontier agents and the reference sit near 68%. * On `datasheet_metrology` it almost never applies the rectangular-limit convention (÷√3 appears in under 1% of answers). Its coverage there comes from using the sample SD as the error bar. 7. **The secret `test` split reproduces the main comparisons, with one exception.** * Setup: the 8 held-out families × 25 secret-hashed tasks × 2 draws, calibrated prompt, all 7 models, 2,800 episodes. * Task-paired `log_score` − `binary`: +6.2 [+5.3, +7.1] on v0.1 and +4.4 [+3.5, +5.4] on Tier 5. Seed-level p = 0.10 and 0.05, the same as on dev. * Against base, `rew_all` is again −4.2 on v0.1 and a tie on Tier 5 (−0.2 [−1.2, +0.7]). * The strict re-test still has `log_score` ahead of `binary` (+2.3, +2.7) and of base (+1.9, +4.7), all CIs excluding 0. * The code audit shows the same seed pattern as on dev. * The exception: on tasks both models answered, `log_score`'s lead over base on v0.1 shrinks from +3.7 on dev to +0.2 [−1.5, +1.8]. On Tier 5 it stays clear (+9.0). 8. **The trained model still scores below an answer that ignores the data.** * The generator-prior answer (the prior quantiles of the target, which the leaderboard also uses as its fallback before the −1 penalty) scores −3.37 on ID, −2.36 on v0.1 and −2.21 on Tier 5. It ignores the data but knows the generator's prior, which agents are not shown, so it is a reference point, not an agent baseline. * `log_score` ties it on the training families (−0.30 [−0.94, +0.30]) and falls below it on held-out v0.1 (−7.5 [−8.4, −6.6]) and Tier 5 (−3.9 [−4.6, −3.2]); every seed's CI excludes 0, and the test split agrees (−7.3, −3.2). * Widening every valid answer about its median does not close the gap (even 10× leaves −6.3 and −4.2), so many held-out medians are wrong, not just overconfident. * Training was short: every `log_score` seed's training reward was still rising at step 150 (+0.3 to +0.6 between steps 101–125 and 126–150), while `binary` had flattened. * So the proper score is necessary but not yet sufficient. Reproduce with `python scripts/phase5_reference_ladder.py`. Limitations: * One base model (Qwen3-8B, 4-bit), 150 steps per run, 3 seeds per arm. * **KL spikes:** 4 of the 900 logged training steps had a k3-KL spike (up to 10¹³), from a single token whose log-probability fell far below the reference's. Gradient clipping bounded those updates, and reward and validity show no effect. * **The test split ran in a rebuilt environment** (same vLLM 0.34, a different VM). * **Parity check:** a re-run of one stored dev draw for base, `binary` s0 and `log_score` s0 under both prompts matches the stored results. In 5 of 6 cells the paired `rew_all` CI includes 0, but the re-run averages about 0.6 nats better, in the same direction for all three models. Between-arm comparisons are unaffected; absolute test numbers may read slightly better than dev. * **Tool timeouts:** a few remain (at most 3.5% of episodes). Dropping every task with any timeout leaves the results unchanged. * The frontier numbers below use a different harness (tools mode, 20 turns) and are a ceiling, not a head-to-head comparison. Reproduce: * Tables: `python scripts/phase5_analysis.py` * Figures: `python scripts/phase5_figure.py` * Code audit: `python scripts/phase5_code_audit.py` * Generator-prior gap, widening and Tier-5 ladder: `python scripts/phase5_reference_ladder.py` * Runbook: [docs/PHASE5_RUNBOOK.md](docs/PHASE5_RUNBOOK.md) ### Frontier ceiling: Tier 5, `tools` mode, 20 turns, dev seeds 0–24 All models ran under one harness, on the same seeds, seed-paired against the exact reference analysis. | Model | n | Valid | cov68 [Wilson 95%] | cov95 | Δrew_v vs oracle [95% CI] | rew_all | |---|---:|---:|---|---:|---|---:| | Claude Sonnet 5.5 | 100 | 100% | 71% [61, 79] | 98% | −0.08 [−0.14, −0.01] | −0.107 | | Claude Haiku 5.5 | 100 | 100% | 72% [63, 80] | 97% | −0.05 [−0.11, +0.01] | −0.079 | | GPT-6.2 Sol | 100 | 100% | 67% [57, 75] | 96% | −0.03 [−0.08, +0.01] | −0.063 | | GPT-6 Luna | 100 | 100% | 66% [56, 75] | 96% | −0.06 [−0.11, −0.00] | −0.086 | | Kimi-K3.1-Pro | 48 | 100% | 67% [53, 78] | 96% | −0.02 [−0.09, +0.05] | −0.001 | | Gemini 3.8 Flash | 34 | 94% | 72% [55, 84] | 94% | −0.02 [−0.12, +0.07] | +0.021 | | DeepSeek-V4.1-Flash | 100 | 96% | 71% [61, 79] | 96% | −0.05 [−0.10, +0.00] | −0.178 | | DeepSeek-V4-Pro | 51 | 69% | 74% [58, 86] | 94% | −0.01 [−0.05, +0.03] | −1.020 | | GLM-5.3-Flash | 100 | 56% | 73% [60, 83] | 96% | +0.01 [−0.07, +0.11] | −1.365 | | *oracle* | 100 | 100% | 67% [57, 75] | 95% | — | −0.029 | * **Frontier tool-using agents are calibrated on Tier 5 when they answer.** * Every valid-answer reward is within 0.08 nats of the oracle. * No 68%-coverage difference from the oracle is significant (McNemar p ≥ 0.18). * Sharpness is about 1.0. * Removing the calibration hint (`neutral`) changes 68% coverage by at most 3 points. * **They lose by not answering.** DeepSeek-V4-Pro and GLM-5.3-Flash explore until the 20-turn budget runs out. Of about 1,700 frontier episodes, 116 had no valid answer, and 113 of those never wrote an answer file. * **Tiers 1–4 are saturated too** (5 seeds × 12 families). The held-out `test` split reproduces the dev results. * **So Tier 5 separates small models, not frontier models.** That is why pullgym's main use is as an RLVR environment for smaller models. Traps that could separate frontier models are v0.3 work. ### History: v0.1 results * **Frontier, harness `0.1.0`.** Multi-turn frontier agents matched the reference task by task on v0.1's explicit systematics: `deepseek-flash` gave Δrew_v = +0.01 [−0.01, +0.03] over 151 paired tasks. Their whole gap was answer validity. This motivated Tier 5. * **Single-turn GRPO (Round 2, one seed per arm).** * `log_score` beat `binary` on the training families (Δreward = +1.21 [+0.53, +2.02], Δpinball skill = +0.58). * Held-out transfer was not established: +1.55 [−0.33, +3.41] at one evaluation draw. * A re-draw showed that 15–37% of held-out tasks flip validity between draws at temperature 0.7. * Adapters trained with CSV previews in the prompt collapsed under the zero-preview `run-fast` harness. These findings set Phase 5's design: training in the evaluation harness, 3 seeds per arm and 4 draws per task. Details and tables: [docs/RLVR_RESULTS.md](docs/RLVR_RESULTS.md) §1–6. ### Next: v0.3 Frontier agents run the textbook residual checks unprompted, so a frontier-separating trap has to defeat the textbook check itself. The candidates: * autocorrelated noise; * unannounced trigger thresholds (selection bias); * mutually inconsistent instruments (Birge ratio); * unit conventions split across files; * physical heavy tails where outlier rejection is wrong. Each candidate has to pass a cheap two-model frontier pilot before it is built out. See [docs/ROADMAP.md](docs/ROADMAP.md). ### Known limitations and RL audit warnings * **Lazy width inflation.** * Under the log score, error bars 10× too small cost about −12, while 10× too wide cost only about −1.8. * Report Tier-1 sharpness (`line_fit`, `weighted_mean`, `counting_rate`) per training seed, with the geometric mean as well as the median. A median of 1.00 is a weak audit. * Phase 5 has one seed that inflates. * **Answers that ignore the data.** The scorer sees only the quantiles. Audit the answer code for fabricated data and for answers that don't change across tasks (`scripts/phase5_code_audit.py`), and re-test claims with those answers scored as invalid. * **Scoring a missing answer.** * In training, an invalid answer gets −12, below the −10 floor, so crashing never beats answering. * On the leaderboard it gets the prior fallback minus 1 (≈ −3.5), which beats a confident miss. * Always report `valid%`, the training reward, the leaderboard reward and the reward on tasks that both arms answered. * **Sample size.** * At 15 seeds per family, a calibrated analysis shows per-family 68% coverage anywhere from 53% to 87%. Compare models seed-paired (`pullgym report --baseline`). * At temperature 0.7, average several evaluation draws per task. ## Development ```bash uv sync uv run pytest # fast checks, under a minute uv run pytest -m slow # many-seed calibration and probe checks for every family ``` ## Contributing New experiment families are the most useful contribution, especially systematics that real labs run into. Open an issue that describes the experiment, what makes its uncertainty hard and how you would analyse it, or send a pull request with a family class that passes the test suite. ## License [MIT](LICENSE)