# From I/O to Code with Discovery Agent

*Yihong Dong, Jiaru Qian, Haoran Zhang, Peixu Wang, Binhua Li, Zhi Jin, Yongbin Li, Ge Li, Xiaokang Yang, Xue Jiang*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/154711) · [OpenReview](https://openreview.net/forum?id=BZxrI7kEUy) · [alphaXiv](https://www.alphaxiv.org/abs/2605.15334) · [Open on the map](../papers.html#p154711)

Category: [LLM Agents, Evals & Benchmarks](../pcat/17.md) › [LLM-Driven Code Synthesis and Verification](../pgroup/32.md) · Type: new method · Keywords: program synthesis, input-output program generation, evolutionary search, LLM mutation operator, Transformation Priority Premise, benchmark

Areas: [Code & Coding Agents](../areas/codegen.md) › Code Generation and Optimization › Evolutionary Search and Self-Evolution; [AI Agents](../areas/agents.md) › Agent Benchmarking › Agentic code and proof generation; [Evaluation & Benchmarks](../areas/evaluation.md) › Language Model and Agent Benchmarks › Coding Agent Evaluation

## Summary
DIO-Agent is a discovery agent that frames program synthesis from input-output behavior as an evolutionary search, using an LLM as a mutation operator guided by execution errors and a Transformation Priority Premise to bias toward simpler programs.

## Explained to a 5-year-old
We have a robot that looks at examples of what a program should do (input and output) and tries to guess the program. It uses a simple trial-and-error process, changing little pieces at a time, and always tries the simplest guess first. It learns to make the program step-by-step, starting with simple rules and adding loops only when needed. This helps create code automatically without needing to write it by hand. It makes programming easier for people.

## Explained to a 5-year-old, longer
Imagine you have a puzzle where you see some input and the correct output, and you need to figure out the steps to get from input to output. The paper creates a helper that tries many possible steps, like a game of guess-and-check. It uses a big language model to suggest small changes to the steps, and then runs the steps to see if they work. If they don’t, it learns from the mistake and tries something else. To avoid getting lost in complicated ideas, it always starts with the simplest possible steps, like just adding numbers. Only when the simple steps aren’t enough does it add more complex ideas, like loops that repeat. This way it builds programs that are easy to understand and correct. The helper also creates a collection of puzzles at different difficulty levels so we can test how well it works. By comparing it to other methods, we see it works better on many puzzles. It also works well with different language models, making it flexible. This approach could help people write code faster and with fewer errors. Overall, it makes automatic programming more reliable and easier to use.

## For a technical reader
The system treats program synthesis as an evolutionary search, using an LLM to propose small program mutations that are evaluated by executing them against input-output pairs. Execution errors guide the search, and a priority rule encourages the simplest constructs first, gradually introducing conditionals and loops only when necessary. This approach is benchmarked on a multi-difficulty IO2Code suite and shows superior performance compared to both traditional program-by-example techniques and evolutionary baselines, as well as test-time scaling methods.

## Problem
Automatically generating programs from input-output behavior is challenging because the hypothesis space is vast and underspecified, making it difficult to infer the correct computational principles without additional semantic cues.

## Method
The approach frames program synthesis as an evolutionary search over discrete program space, uses an LLM as a mutation operator guided by execution error signals, and biases mutations toward simpler constructs via the Transformation Priority Premise, escalating from constants to conditionals to iteration only when needed.

## Results
The approach consistently outperforms traditional program-by-example methods and evolutionary baselines across difficulty levels and LLMs, and exceeds test-time scaling strategies given equivalent sampling budgets.

## Contributions
The paper introduces a discovery agent for IO2Code that employs evolutionary search with an LLM mutation operator and a Transformation Priority Premise to favor simpler programs, and provides a multi-difficulty IO2Code benchmark for systematic evaluation.

## Research questions this paper is counted under

- [How can we automatically generate correct programs from ambiguous or incomplete specifications?](../q/876.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/154711)
