When Exact Inference Changes Code Selection: A Decision-Theoretic Analysis of B4
Yanliang Cai (Independent Researcher)
Key points
From the paper's conclusion- The results do not recommend a tuned prior or a new performance method.
Abstract
When generated programs are ranked using generated tests, a more exact posterior computation need not improve the selected program. We characterize this distinction in the published B4 code--test model. Identical execution signatures reduce exact candidate marginalization to N summands and nonempty joint maximum a posteriori (MAP) inference to two weights per group. A prior--budget condition guarantees that B4's whole-group rule already attains MAP; a sharp finite correction bound certifies when candidate marginals must select the same group. All 2,421 default-setting comparisons on 807 development matrices select the same candidates. A prospectively specified validation on 1,345 execution snapshots from a separate public archive also finds no changes in 4,035 default-setting comparisons. Across 80 literature-derived priors, this new archive yields 85 changed top sets in 107,600 comparisons; only six coincide with failure of whole-group MAP. Under finite-test proxy labels, four changes increase and five decrease expected success. These descriptive changes span seven snapshots; per-prior mean differences range from -0.074 to +0.045 percentage points. The results do not recommend a tuned prior or a new performance method. Exact enumeration and independent high-precision checks support the formulas and decision diagnostics. A supplementary fixed-test analysis separates asymptotic failure from observational ambiguity. The contribution is a model-specific account of when an inference intervention can change a software-testing decision, and when its effect must be sought in the priors or evidence instead.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- JevBench: Metamorphic Coherence Testing for Typed Probabilistic Decision ModelsarXiv · 2026
- Same Executions, Different Gaps: Judgment Rules in Web-Agent EvaluationarXiv · 2026
- Decided or Open? Comparing Program Repair Techniques When Patch Correctness Is UnknownarXiv · 2026
- Patch correctness in automated program repair: A five-dimensional evidence framework and cross-benchmark audit from classical repair to coding agentsarXiv · 2026
- Prosecutor: Bayesian Counterfactual Fault LocalizationProceedings of the ACM on Programming Languages · 2026
- Fast Bayesian Methods for Uncertainty Quantification in Sparse AI EvaluationarXiv · 2026