mlsanityData to 14 Oct 2026

Calibration, Not Compilation: Detecting and Repairing Misspecified Probabilistic Programs Written by Language Models

arXiv 2606.31630 ↗First posted 30 Jun 2026cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Language models increasingly write probabilistic programs (in NumPyro, Stan, or Pyro), but a program that compiles, runs, and passes every unit test can still be statistically wrong -- a Gaussian likelihood for heavy-tailed data, a Poisson for over-dispersed counts, an invalid prior support, or a pathological parameterization. The right verifier is therefore not a test suite but the Bayesian workflow itself: posterior predictive checks, simulation-based calibration, sampler diagnostics (hat R, divergences, ESS), and held-out predictive density. We study this calibration oracle along three axes. Detection: on a benchmark of 14 misspecification types across 10 model families (200 instances), it flags the bug with AUC 0.97 (88% at 2% FPR when handed the correct reference program, an upper bound) -- and a fully reference-free version that uses no correct program reaches 62--78% (the upper figure from a small automated model search), versus 0% for a unit-test oracle. Repair: used as feedback in an LLM repair loop across fifteen models, calibration significantly outperforms unit-test feedback -- which is itself significantly worse than no feedback at all, a passing test inducing false confidence that suppresses repair -- and improves over no feedback on strong-but-unsaturated models (GPT-5.1 33→92%, Claude 75→100%; paired McNemar, n=228). Reality: on programs LLMs write from scratch for neutral briefs, 15--47% of runnable ones are statistically misspecified (unit tests catch none), and calibration-guided repair significantly beats LLM-as-judge review, a Bayesian-workflow checklist, and data-summary self-debug. Across all three, the lesson is the same: for probabilistic programs, correctness is calibration, not compilation.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 8 of its 16 references that are in the map. First posted on arXiv 30 Jun 2026.

Builds on

8 of 16 references.

References · 8

  1. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
  2. 2018Pyro: Deep Universal Probabilistic Programmingcited by 380
  3. 2017A Conceptual Introduction to Hamiltonian Monte Carlocited by 209
  4. 2019Composable Effects for Flexible and Accelerated Probabilistic Programming in NumPyrocited by 191
  5. 2018Validating Bayesian Inference Algorithms with Simulation-Based Calibrationcited by 124
  6. 2019Rank-normalization, folding, and localization: An improved widehatR for assessing convergence of MCMCcited by 93
  7. 2020Bayesian Workflowcited by 49
  8. 2025LLM-Prior: A Framework for Knowledge-Driven Prior Elicitation and Aggregationcited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.