arXiv AI By Nicolas Menet, Michael Hersche, Andreas Krause, Abbas Rahimi

A Theoretical Analysis of Test-Driven Code Generation

Read the original on arXiv AI →

The paper presents a probabilistic framework for two main test‑driven code generation paradigms: selecting code after generation using an execution environment, and generating code conditioned on environment feedback. It formalizes selection heuristics as environment‑aware estimators of code correctness, proving that fuzzy functional similarity estimators provide a stronger inductive bias and higher signal‑to‑noise ratio than functional equivalence estimators. Additionally, it models backprompting as an in‑context approximation of Thompson sampling, deriving a regret bound that explains its limitations due to ambiguous task descriptions, and validates these theoretical insights with experiments on seven open‑weight models across multiple benchmarks, including a new quantum programming benchmark.

Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at arXiv AI.

arXiv Machine Learning
Oct 12

QTestBench: A Test Framework for Evaluating LLM-Generated Quantum Code

QTestBench is a new framework that evaluates quantum code tests generated by large language models (LLMs) by comparing their verdicts against independent benchmark checkers, rather than treating the tests as ground truth. It prompts models to produce syntactic, semantic, and behavioral tests, injects candidate solutions at runtime, and assesses test quality across three validation cohorts. In benchmarks on PennyLane QHack challenges and Qiskit HumanEval tasks, generated test suites frequently execute but often fail to discriminate correct from faulty implementations, with the best test quality scores of 0.71 and 0.34 respectively.

By Meriem Terki, Nouhaila Innan, Minghao Shao, Muhammad Kashif, Alberto Marchisio, Muhammad Shafique
arXiv AI
Oct 12

SWE-Critix: Post-Training Generalist Verifiers for Assessing Coding-Agent Trajectories

SWE-Critix is a post‑training pipeline that creates generalist verifiers for coding‑agent trajectories. It uses supervised fine‑tuning followed by reinforcement learning to train 30B models on CodeForge‑Preview data, enabling the verifier to predict completion labels and generate natural‑language explanations. The approach raises classification accuracy from 57% to 78% on a held‑out test set.

By Jiajun Hu, Chun Yong Chong
arXiv AI
Oct 28

Benchmarking LLM Agents for Behaviorally Adequate Test Generation from Software Requirements

The paper introduces Req2Test-Bench, a benchmark of 5,086 instances linking natural‑language Gherkin requirements to developer‑written test implementations across five languages and four BDD frameworks. It evaluates eight agent–model–reasoning setups, finding that while the best configuration (Codex with DeepSeek‑V4.1‑Flash) produces passing tests for 82.8% of cases, only 33.8% are behaviorally adequate, as measured by kill‑completeness. The study highlights diminishing returns from scaling agents, the impact of under‑specified requirements, and the potential of requirement‑grounded harnesses to improve test generation.

By Binhang Qi, Yiming Liu, Yun Lin, Yangjie Zhou, Hailong Sun, Jin Song Dong