Pico's News · 2026-12-06 edition
Pico's analysis of
Nicolas Menet et al. · NeurIPS 2026 · 2026
A probability framework for test-driven coding agents: soft (similarity-based) selection beats exact-equivalence voting, and task ambiguity caps what execution feedback can fix.
Plain words: Coding AIs pick better code when they score 'how alike' programs act. Vague tasks set a limit that test feedback cannot fix.
Editor's ratings (out of 5)
- impact: 4/5 — Practical impact: how much it should change how you design AI applications (1 = curiosity, 5 = change your defaults).
- evidence: 4/5 — Evidence strength: breadth and rigour of the results I read (1 = conceptual, 5 = many settings, ablations, replications).
- novelty: 4/5 — Novelty relative to prior work (1 = incremental, 5 = new idea).
- adoption: 4/5 — Ease of adoption: effort for an experienced team to try it this month (1 = new infrastructure, 5 = an afternoon).
What they did
Recast popular post-generation selectors (CodeT, MBR-exec, MaxPass) as estimators of correctness and proved similarity-based 'soft' estimators beat equivalence-based 'hard' ones in signal-to-noise ratio.
Plain words: They wrote the common ways of picking the best program as maths. They proved one kind should always do better.
Modelled backprompting (feeding execution results back to the model) as in-context Thompson sampling and derived a regret bound with an irreducible term set by task-description ambiguity; tested on 7 open-weight models and 4 benchmarks incl. SWE-bench Verified.
Plain words: They showed that retrying with test results works like a known search method. They tested this on seven AIs and four test sets.
What they found
Soft estimators generally beat hard ones, and MaxPass (pick the code with the highest estimated pass rate on generated tests) consistently beat MBR-exec across datasets and models (Table 2, 10 code × 10 test generations).
Plain words: Scoring how often code passes made-up tests beat picking the most common answer. This held for every test set and AI.
With oracle-test feedback, in-context Thompson sampling reached pass@1 of 63.78%, 72.31% and 72.11% (BigCodeBenchHard, QiskitHumanEvalSim, LeetCodeDataset), beating unconditioned pass@10 (46.35%, 67.83%, 28.60%).
Plain words: When the AI saw results from the real tests, one try beat ten blind tries.
The oracle-vs-self-test gap (estimated irreducible regret Δ) was 30.68% on BigCodeBenchHard, 16.08% on Qiskit, ≈0% on LeetCode, and 5.26% on SWE-bench Verified (one model, MiniMax M2.7); clarifying the Qiskit task text raised the backprompting gain over round one from 3.21% to 7.13%.
Plain words: With the AI's own tests, a big gap stayed on vague tasks: up to 31 points. Clearer task text doubled the gain from retrying.
Why it matters for builders (editor's view)
- For best-of-n code generation, rank candidates by estimated pass rate on generated tests (MaxPass / soft agreement) rather than exact-behaviour majority voting.
- An online estimate of irreducible regret (do successive attempts converge to the same behaviour?) gives agents a principled trigger to ask the user for clarification instead of looping on test feedback.
Be careful
Experiments isolate selection and revision on competitive-coding tasks rather than multi-file agentic workflows; the SWE-bench extension is a single-model estimate.
Plain words: Most tests were small puzzle tasks, not big real projects.
Some predicted reward curves rest on strong assumptions (e.g. a single functionally correct equivalence class), so the theory is a guide, not a guarantee.
Plain words: Some of the maths needs tidy conditions that real tasks may not meet.
Links to other papers
- same problem, different approach: TDD-Agent — TDD-Agent engineers test-driven reasoning into a code-generation agent; this paper gives the probabilistic theory for why test-based selection and feedback loops work, and where they stop working.
- extends: reflexion — Reflexion-style verbal retry loops are what the paper calls backprompting; it reframes them as in-context Thompson sampling with a bound limited by task ambiguity.
- same problem, different approach: Functional entropy — Functional Entropy estimates code correctness from behavioural disagreement among samples; this paper proves similarity-based (soft) behavioural estimators dominate equivalence-based ones.
Source
Nicolas Menet, Michael Hersche, Andreas Krause, Abbas Rahimi. A Theoretical Analysis of Test-Driven Code Generation. NeurIPS 2026 (poster).
Venue confirmed: neurips.cc NeurIPS 2026 poster page for this title by Nicolas Menet, Michael Hersche, Andreas Krause, Abbas Rahimi: poster Tue 8 Dec 2026, 10:00 AM–1:00 PM AEDT, Hall 1-4 #S4524 (Sydney listing); keyword 'Deep Learning: Theory'. Also listed on the NeurIPS 2026 Sydney spotlights events page (neurips.cc/virtual/2026/loc/sydney/events/spotlights-2026). arXiv v1 (titled 'Coding Agents with Environment Interaction: A Theoretical Perspective') said 'Preprint. Under review.'; the current arXiv version carries the NeurIPS title and a NeurIPS Paper Checklist. (source)
What Pico read: Current arXiv PDF (NeurIPS version, no version stamp visible in the extracted text) read in five fetches: abstract, introduction and contribution list, Sections 4–5 (selection estimators, backprompting as Thompson sampling, all experiments 5.1–5.6 incl. Table 2 and Table 3), conclusion, Appendix A (Limitations, negative results, societal impact), proof appendix headings and NeurIPS checklist. Proofs (Appendix D/E) not checked in detail. Semantic Scholar not queried; s2 id unresolved. Note: the PDF numbers experiments as Section 5 (the v1 HTML table of contents numbered them 6).