Steerable Instruction Following Coding Data Synthesis with Actor-Parametric Schema Co-Evolution

TL;DR

Proposes IFCodeEvolve, a co-evolution framework using actor-schema interaction and MCTS to generate instruction-code data, boosting model performance.

cs.SE 🔴 Advanced 2026-02-28 48 views
Tinglin Huang Bo Chen Xiao Zhang Kai Shen Rex Ying
instruction following code synthesis evolutionary algorithms Monte Carlo Tree Search large language models

Key Findings

Methodology

This paper introduces a framework combining actor models and parametric instruction schemas, leveraging Monte Carlo Tree Search (MCTS) to explore vast instruction spaces. The actor model provides real-time feedback during code generation, guiding dynamic termination. Simultaneously, the instruction schema library evolves through composition and mutation, driven by sampler statistics, to generate increasingly challenging data. The approach integrates proof-by-construction validation, AST-based verification, and execution feedback to ensure logical correctness. Experiments across models from 1.3B to 32B parameters demonstrate consistent performance improvements, with the 32B model reaching state-of-the-art levels on multiple benchmarks, outperforming static sampling methods.

Key Results

  • Models trained with IFCodeEvolve show over 20% improvement in instruction compliance and task success rates on benchmarks like IFEvalCode, with instruction satisfaction rising from 0.68 to 0.87 and success rate from 0.58 to 0.85. Larger models benefit most, with performance approaching proprietary SOTA models. The iterative evolution process enhances data diversity and difficulty, leading to better generalization, especially on complex instructions.
  • Comparative analysis indicates that the evolutionary sampling strategy outperforms static methods by 15% in out-of-distribution scenarios. Ablation studies confirm that actor feedback, schema mutation, and pattern composition are critical for performance gains. The framework's ability to generate logically valid, challenging data significantly advances automatic code data synthesis.
  • Across multiple datasets and model sizes, the approach consistently improves AST verification scores and logical consistency, validating the effectiveness of the co-evolution paradigm. The generated data not only boosts model accuracy but also enhances robustness against complex reasoning tasks.

Significance

This work addresses the longstanding bottleneck of large-scale instruction-code data generation by introducing a dynamic, self-adapting mechanism. It reduces reliance on manual annotation, enhances data diversity, and systematically increases problem complexity. The framework's ability to generate logically valid yet challenging data pushes the boundaries of model reasoning and generalization, impacting fields like automated programming, AI self-improvement, and scientific discovery. Its modular design and验证机制 also open avenues for broader applications in reasoning-intensive domains, fostering more autonomous and adaptable AI systems.

Technical Contribution

The paper's key technical innovation lies in integrating parametric instruction schemas with Monte Carlo Tree Search within an actor-schema co-evolution loop. This allows efficient exploration of a combinatorial instruction space, guided by feedback from the actor model and validation via AST and execution. The schema library evolves through pattern composition and mutation, driven by sampler statistics, enabling continuous difficulty escalation. The framework's proof-by-construction approach guarantees logical validity, while the co-evolution mechanism ensures data diversity and complexity. This combination offers a novel paradigm for automated, steerable data synthesis that surpasses static or adversarial methods.

Novelty

This is the first work to embed actor-schema co-evolution into instruction data generation for code synthesis, leveraging parametric schemas and MCTS for guided exploration. Unlike prior static or adversarial approaches, it dynamically adapts both the instruction set and the actor's capabilities, creating a self-improving cycle. The explicit integration of proof-by-construction, AST verification, and feedback routing constitutes a new methodological framework, significantly advancing the state-of-the-art in automated data synthesis for reasoning tasks.

Limitations

  • The method relies on a predefined schema library, which may limit the diversity of instructions unless continuously expanded. Handling more complex, multi-modal instructions remains challenging.
  • Computational overhead is significant due to iterative sampling, validation, and schema mutation, especially for large models and datasets.
  • The framework's effectiveness on tasks beyond code, such as scientific reasoning or multi-modal data, needs further validation and adaptation.

Future Work

Future directions include expanding the schema library with more expressive templates, integrating multi-modal data, and optimizing the sampling and validation processes for efficiency. Extending the framework to scientific reasoning, mathematical problem solving, and multi-modal tasks could broaden its applicability. Additionally, developing adaptive mechanisms for schema mutation and pattern discovery will further enhance data diversity and difficulty control, fostering more autonomous AI systems capable of self-improvement in complex reasoning domains.

AI Executive Summary

In recent years, large language models (LLMs) have revolutionized automatic programming and code understanding, yet their training heavily depends on high-quality instruction-code datasets. Manual annotation is costly, and static data synthesis methods often lack diversity and logical consistency. This paper introduces IFCodeEvolve, a novel framework that employs actor-schema co-evolution to generate challenging, logically valid instruction-code pairs. The core idea involves representing instructions as parametric schemas, which are sampled via Monte Carlo Tree Search (MCTS). During generation, an actor model provides real-time feedback, guiding dynamic termination and difficulty adjustment. Simultaneously, the instruction schema library evolves through pattern composition and mutation, driven by sampler statistics, to continually increase problem complexity. This iterative process results in highly diverse, challenging datasets that significantly improve model performance.

Experiments across models from 1.3B to 32B parameters demonstrate that models trained with data generated by IFCodeEvolve outperform baseline methods, achieving parity with proprietary state-of-the-art models on benchmarks like IFEvalCode and CodeIF. The framework's ability to generate logically consistent yet difficult problems enhances the reasoning and generalization capabilities of large models. The authors also introduce IFCodeBench, a human-verified benchmark with executable tests and AST-based verification, to evaluate instruction adherence and logical correctness.

This work advances the field by providing a scalable, self-adapting data synthesis paradigm that reduces manual effort and addresses the limitations of static sampling. Its modular design and feedback-driven evolution mechanism open new avenues for autonomous AI systems capable of continuous self-improvement. Future work will focus on expanding schema expressiveness, integrating multi-modal data, and applying the framework to broader reasoning tasks, including scientific discovery and mathematical reasoning. Overall, IFCodeEvolve represents a significant step towards more intelligent, adaptable, and reasoning-capable AI systems.

Deep Analysis

Background

The evolution of large language models (LLMs) like GPT-3, Codex, and AlphaCode has demonstrated remarkable progress in code synthesis and reasoning tasks. These models rely heavily on large-scale instruction-annotated datasets, which are expensive and labor-intensive to produce manually. Recent efforts have explored automatic data augmentation, including static brute-force sampling and adversarial generation, but these approaches often suffer from logical inconsistency, limited diversity, and difficulty in verification. As models grow larger and more capable, the need for high-quality, diverse, and challenging training data becomes critical. Addressing this gap, researchers seek dynamic, scalable methods that can generate data with controllable complexity and validity, fostering models that can reason, generalize, and adapt more effectively.

Core Problem

The core challenge is how to automatically generate vast amounts of instruction-code pairs that are both logically valid and sufficiently challenging to improve model reasoning. Static sampling methods tend to produce repetitive, low-diversity data, while adversarial approaches risk generating unsolvable or ill-defined problems. Ensuring logical consistency and verifiability, especially when scaling up, remains a significant obstacle. Moreover, balancing difficulty and validity is non-trivial, as overly hard or invalid samples can hinder training. Developing a method that can adaptively control data complexity, ensure correctness, and promote diversity is essential for advancing automatic programming systems.

Innovation

This paper introduces a pioneering framework combining actor models with parametric instruction schemas, guided by Monte Carlo Tree Search (MCTS). Key innovations include:

  • �� Parametric instruction schemas that encode diverse constraints with configurable parameters, enabling flexible and expansive instruction representation.
  • �� MCTS-driven exploration of instruction combinations, efficiently navigating the combinatorial space to generate challenging yet valid problems.
  • �� Feedback-driven, proof-by-construction validation, ensuring logical correctness through AST analysis and execution verification.
  • �� Co-evolution of the instruction schema library via pattern composition and mutation, driven by sampler success statistics, fostering continuous difficulty escalation.
  • �� An iterative, self-improving cycle where the actor model is post-trained on generated data, progressively increasing problem complexity.

This integrated approach surpasses static or adversarial methods by providing a controllable, scalable, and logically sound data synthesis pipeline that adapts to model capabilities.

Methodology

  • �� Construct a diverse instruction schema library with variable slots and parameter ranges.
  • �� Use MCTS to sample instruction combinations, guided by estimated difficulty and success metrics.
  • �� Generate code via an LLM conditioned on current instructions, validating correctness through AST and execution checks.
  • �� Collect feedback from the actor model’s success rate, adjusting sampling and guiding early stopping.
  • �� Evolve instruction schemas through pattern composition, merging synergistic schemas based on sampler statistics.
  • �� Mutate underperforming schemas using adversarial prompts and validation, tightening constraints to increase difficulty.
  • �� Iterate this process over multiple rounds, continuously expanding and refining the dataset with challenging, valid instruction-code pairs.

Experiments

The authors curated a dataset from MBPP, LeetCode, and ClassEval, totaling 1,565 problems. They trained models of various sizes (1.3B to 32B) using data generated by IFCodeEvolve. Evaluation was performed on IFEvalCode and CodeIF benchmarks, measuring instruction satisfaction and task success rates. Hyperparameters included C=3, α=10, η=0.5, with multiple evolution rounds. Ablation studies examined the impact of schema composition, mutation, and feedback routing. Results showed consistent improvements, with the largest models achieving performance comparable to proprietary SOTA models, especially on complex instructions.

Results

Models trained with IFCodeEvolve data achieved over 20% higher instruction compliance and success rates. For example, the 32B model's instruction satisfaction increased from 0.68 to 0.87, and success rate from 0.58 to 0.85. Multi-round evolution further boosted performance, with successive generations showing incremental gains. Ablation studies confirmed that schema composition and mutation significantly contributed to data diversity and difficulty. The generated data also exhibited high logical correctness, validated via AST and execution checks, leading to improved robustness and reasoning ability.

Applications

This framework enables automatic generation of high-quality training data for code synthesis, benefiting large language models, automated programming tools, and intelligent tutoring systems. It can be applied in scenarios requiring diverse, challenging, and verifiable code problems, reducing manual effort and enabling scalable data augmentation. In industry, it supports the development of more reliable AI coding assistants and automated code review systems. Long-term, the methodology can be extended to scientific reasoning, mathematical problem solving, and multi-modal tasks, fostering autonomous AI systems capable of self-improvement.

Limitations & Outlook

The approach depends on predefined schema libraries, which may limit instruction diversity unless continuously expanded. Computational costs are high due to iterative sampling, validation, and schema mutation, especially for larger models. Its effectiveness on multi-modal or highly complex instructions remains to be validated. Future work should focus on schema expressiveness, efficiency improvements, and broader applicability to other reasoning domains.

Plain Language Accessible to non-experts

想象你在一家厨房里做菜。每次你都需要按照食谱准备食材、调料和步骤。有时候,菜做得不好,是因为调料放得不对或者步骤错了。为了做出更好吃的菜,你会不断尝试不同的调料组合和做法,逐渐找到最合适的搭配。研究人员也是这样,他们设计了一套“调料配方”,用电脑模拟不断试验不同的指令组合,确保每次生成的代码都能正确运行、难度逐步增加。通过不断调整和优化“调料配方”,他们让电脑学会做出越来越复杂、合理的菜肴,也就是更智能、更可靠的代码。这就像厨师不断试验新菜谱,最后能做出令人惊喜的菜肴一样。

ELI14 Explained like you're 14

想象你在玩一个超级难的拼图游戏。每次拼图都要遵守一些规则,比如不能用错颜色或位置。刚开始,你只知道一些简单的拼法,但有时候拼错了,拼图就拼不好。于是,你不断试验不同的拼法,学习哪些组合更容易成功。研究人员也是这样,他们让电脑不断尝试不同的“拼图方式”,用一种叫做“演员-模式协同演化”的方法,帮助电脑学会拼出更难、更复杂的拼图。每次拼完后,系统会告诉它哪里拼错了,然后调整拼法,下一次拼得更好。经过多次尝试,电脑能拼出非常复杂、正确的拼图,就像学会了写复杂的代码一样。这种方法让电脑变得越来越聪明,能解决以前难以完成的问题。

Abstract

Interpreting and following human instructions is a critical capability of large language models (LLMs) in automatic programming. However, synthesizing large-scale instruction-paired coding data remains largely unexplored and is particularly challenging when ensuring logical compatibility among multiple constraints. In this study, we propose IFCodeEvolve, an actor-schema co-evolution framework for instruction following coding data generation. By representing instructions as parametric function schema, we construct a library that covers the vast instruction space via dynamic constraint instantiation. Building upon this, Monte Carlo Tree Search (MCTS) sampler is applied to efficiently navigate this space, utilizing actor model feedback as a dynamic termination signal. Furthermore, to progressively explore challenging problems, we introduce a co-evolving paradigm that iteratively advances both the actor model and the schema library, via schema composition and mutation, based on sampler statistics. Empirical results demonstrate that IFCodeEvolve significantly boosts base model performance, with our 32B model achieving parity with proprietary SOTA models. Additionally, we contribute IFCodeBench, a comprehensive human-verified benchmark equipped with solutions and robust AST-based verification.

cs.SE cs.AI cs.PL