From I/O to Code with Discovery Agent

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Dong, Yihong, Qian, Jiaru, Zhang, Haoran, Wang, Peixu, Li, Binhua, Jin, Zhi, Li, Yongbin, Li, Ge, Yang, Xiaokang, Jiang, Xue
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917497081430016
author Dong, Yihong
Qian, Jiaru
Zhang, Haoran
Wang, Peixu
Li, Binhua
Jin, Zhi
Li, Yongbin
Li, Ge
Yang, Xiaokang
Jiang, Xue
author_facet Dong, Yihong
Qian, Jiaru
Zhang, Haoran
Wang, Peixu
Li, Binhua
Jin, Zhi
Li, Yongbin
Li, Ge
Yang, Xiaokang
Jiang, Xue
contents The automatic synthesis of a program from any form of specification is regarded as a holy grail of computer science. Fueled by LLMs, NL2Code has achieved tremendous success, yet the fundamentally more challenging task of synthesizing programs from input-output behavior, which we refer to as IO2Code, remains largely unsolved. Whereas NL2Code can exploit the semantic alignment between natural language and code acquired during pretraining, IO2Code requires recovering underlying principles from concrete computational behavior, navigating a vast and underspecified hypothesis space. To address this, we propose DIO-Agent, a discovery agent for IO2Code. Our method frames IO2Code as an evolutionary search over discrete program space, in which an LLM serves as the mutation operator and concrete error signals from execution guide each mutation. To prevent the search from wandering into structurally complex yet incorrect dead ends, we introduce the Transformation Priority Premise as a mutation prior that biases the LLM toward the simplest hypothesis consistent with current evidence, progressively escalating from constants to conditionals to iteration only when simpler constructs are insufficient. To facilitate systematic study, we further construct an IO2CodeBench spanning multiple difficulty levels. Extensive experiments show that DIO-Agent consistently outperforms both traditional program-by-example method and SOTA evolution-agent baselines across all difficulty levels and various LLMs, while substantially surpassing test-time scaling strategies with equivalent sampling budgets.
format Preprint
id arxiv_https___arxiv_org_abs_2605_15334
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle From I/O to Code with Discovery Agent
Dong, Yihong
Qian, Jiaru
Zhang, Haoran
Wang, Peixu
Li, Binhua
Jin, Zhi
Li, Yongbin
Li, Ge
Yang, Xiaokang
Jiang, Xue
Machine Learning
Artificial Intelligence
Computation and Language
Software Engineering
The automatic synthesis of a program from any form of specification is regarded as a holy grail of computer science. Fueled by LLMs, NL2Code has achieved tremendous success, yet the fundamentally more challenging task of synthesizing programs from input-output behavior, which we refer to as IO2Code, remains largely unsolved. Whereas NL2Code can exploit the semantic alignment between natural language and code acquired during pretraining, IO2Code requires recovering underlying principles from concrete computational behavior, navigating a vast and underspecified hypothesis space. To address this, we propose DIO-Agent, a discovery agent for IO2Code. Our method frames IO2Code as an evolutionary search over discrete program space, in which an LLM serves as the mutation operator and concrete error signals from execution guide each mutation. To prevent the search from wandering into structurally complex yet incorrect dead ends, we introduce the Transformation Priority Premise as a mutation prior that biases the LLM toward the simplest hypothesis consistent with current evidence, progressively escalating from constants to conditionals to iteration only when simpler constructs are insufficient. To facilitate systematic study, we further construct an IO2CodeBench spanning multiple difficulty levels. Extensive experiments show that DIO-Agent consistently outperforms both traditional program-by-example method and SOTA evolution-agent baselines across all difficulty levels and various LLMs, while substantially surpassing test-time scaling strategies with equivalent sampling budgets.
title From I/O to Code with Discovery Agent
topic Machine Learning
Artificial Intelligence
Computation and Language
Software Engineering
url https://arxiv.org/abs/2605.15334