Do Coding Agents Report Honest Error Bars? Evaluating and Training Uncertainty Propagation with pullgym
Code-writing language agents are increasingly used to analyze experimental data, where an underestimated uncertainty interval is harder to catch than an inaccurate central estimate. Existing benchmarks evaluate scalar verbalized confidence on discrete question answering, subjective priors without data, or code execution for point predictions, leaving procedural propagation of experimental uncertainties untested. We introduce pullgym, an evaluation and reinforcement learning environment comprising 12 procedural physics experiment families across four difficulty tiers: clean Gaussian and Poisson statistics, background nuisance parameters, instrument systematics from calibration certificates, and low-count physical boundaries. Given simulated measurements and an apparatus logbook, an agent writes Python code to report five quantiles (2.5%, 16%, 50%, 84%, 97.5%) of the target quantity, which a separate sandbox scores against exact ground truth using a strictly proper clipped log-density rule without an LLM judge. Multi-turn frontier agents (deepseek-flash, kimi-k3.1-pro) reach 66.2%-70.4% empirical coverage at the nominal 68% level with unit sharpness on valid episodes, failing mainly by exhausting turn budgets on multi-parameter fits. By contrast, single-turn Qwen3-8B drops to 38.1% coverage. In controlled Group Relative Policy Optimization (GRPO) experiments across 1,600 evaluated episodes, standard binary point-accuracy rewards leave 10x unit errors and unmodeled gain uncertainties intact while reaching 80% zero-variance rollout starvation. Optimizing the clipped log score achieves 100% in-distribution validity (-0.528 vs. -1.738 mean reward), maintains 1.00 clean-tier sharpness without global width inflation, and raises paired out-of-distribution 68% coverage from 23.5% to 35.3%. Code and benchmark tasks are available at https://github.com/kekeandzeyu/pullgym.
Authors
- Zeyu Li (ORCID: https://orcid.org/0009-0008-4381-0544)
Institutions
- Peking University (CN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-27
- DOI
- https://doi.org/10.5281/zenodo.24565541
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- preprint