BACE: LLM-based Code Generation through Bayesian Anchored Co-Evolution of Code and Test Populations

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Silva, Kaushitha, Perera, Srinath
Format: Preprint
Veröffentlicht: 2026
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866910124311838720
author Silva, Kaushitha
Perera, Srinath
author_facet Silva, Kaushitha
Perera, Srinath
contents Large Language Models (LLMs) have demonstrated impressive capabilities in code generation. While an interactive feedback loop can improve performance, writing effective tests is a non-trivial task. Early multi-agent frameworks, such as AgentCoder, automated this process but relied on generated tests as absolute ground truth. This approach is fragile: incorrect code frequently passes faulty or trivial tests, while valid solutions are often degraded to satisfy incorrect assertions. Addressing this limitation, newer methods have largely abandoned test generation in favor of planning and reasoning based on examples. We argue, however, that generated tests remain a valuable signal if we model them as noisy sensors guided by bayesian updates. To this end, we introduce BACE (Bayesian Anchored Co-Evolution), a framework that reformulates synthesis as a Bayesian co-evolutionary process where code and test populations are evolved, guided by belief distributions that are reciprocally updated based on noisy interaction evidence. By anchoring this search on minimal public examples, BACE prevents the co-evolutionary drift typical of self-validating loops. Extensive evaluations on LiveCodeBench v6 (post-March 2025) reveal that BACE achieves superior performance across both proprietary models and open-weight small language models.
format Preprint
id arxiv_https___arxiv_org_abs_2603_28653
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle BACE: LLM-based Code Generation through Bayesian Anchored Co-Evolution of Code and Test Populations
Silva, Kaushitha
Perera, Srinath
Neural and Evolutionary Computing
Software Engineering
I.2.11; I.2.m; D.2.4; D.2.m; I.2.8
Large Language Models (LLMs) have demonstrated impressive capabilities in code generation. While an interactive feedback loop can improve performance, writing effective tests is a non-trivial task. Early multi-agent frameworks, such as AgentCoder, automated this process but relied on generated tests as absolute ground truth. This approach is fragile: incorrect code frequently passes faulty or trivial tests, while valid solutions are often degraded to satisfy incorrect assertions. Addressing this limitation, newer methods have largely abandoned test generation in favor of planning and reasoning based on examples. We argue, however, that generated tests remain a valuable signal if we model them as noisy sensors guided by bayesian updates. To this end, we introduce BACE (Bayesian Anchored Co-Evolution), a framework that reformulates synthesis as a Bayesian co-evolutionary process where code and test populations are evolved, guided by belief distributions that are reciprocally updated based on noisy interaction evidence. By anchoring this search on minimal public examples, BACE prevents the co-evolutionary drift typical of self-validating loops. Extensive evaluations on LiveCodeBench v6 (post-March 2025) reveal that BACE achieves superior performance across both proprietary models and open-weight small language models.
title BACE: LLM-based Code Generation through Bayesian Anchored Co-Evolution of Code and Test Populations
topic Neural and Evolutionary Computing
Software Engineering
I.2.11; I.2.m; D.2.4; D.2.m; I.2.8
url https://arxiv.org/abs/2603.28653