DataEnvGym: Data Generation Agents in Teacher Environments with Student Feedback

## Abstract

Abstract The process of creating training data to teach models is currently driven by humans, who manually analyze model weaknesses and plan how to create data that improves a student model.
Recent approaches using large language models (LLMs) as annotators reduce human annotation effort, but still require humans to interpret feedback from evaluations and control the LLM to produce data the student needs.
Automating this labor-intensive process by creating autonomous data generation agents – or teachers – is desirable, but requires environments that can simulate the feedback-driven, iterative, closed loop of data creation.
To enable rapid and scalable testing for such agents and their modules,
we introduce DataEnvGym , a testbed of teacher environments for data generation agents. DataEnvGym frames data generation as a
sequential decision-making task,
involving an agent consisting of a data generation policy (which generates a plan for creating training data) and a data generation engine (which transforms the plan into data), inside an environment that provides feedback from a student.
The agent’s end goal is to improve student model performance.
Students are iteratively trained and evaluated on generated data,
with their feedback (in the form of errors or weak skills) being reported to the agent after each iteration.
As a general-purpose testbed, DataEnvGym includes multiple instantiations of teacher environments across three levels of structure in the state representation and action space, with varying levels of scaffolding support.
More structured environments are based on automatically-inferred skills and offer a higher degree of interpretability and control over the curriculum.
We support developing and testing data generation agents in three diverse tasks covering both text and images (mathematics, programming, and visual question answering) and test multiple student and teacher models.
We find that example agents in our teaching environments can iteratively improve students across diverse tasks and settings.
Moreover, we show that environments can teach different skill levels and can be used to test variants of key modules, pointing to directions of future work in improving data generation agents, engines, and feedback mechanisms. Project page: https://DataEnvGym.github.io .

## 1 Introduction

Improving an already-trained model by creating additional training data that is targeted towards current model weaknesses is an important and frequent task for researchers and engineers.
For example, past work in instruction tuning and alignment has found that models can be improved with additional task-specific training examples (Touvron et al., ; Ding et al., ; Zhou et al., ; Chia et al., ; Wang et al., ; Shimabucoro et al., ).
However, the current model improvement process is largely driven by humans, who try to identify the weaknesses of the model based on evaluations, use intuition and heuristics to create data to target weaknesses, train an updated model on the data, and revise the data based on how the new model performs (Iyer et al., ; Longpre et al., ; Shao et al., ).
The labor and repetition involved in this process strongly motivate the creation of data generation agents that can automate the process of creating data to teach student models, in whole or part.
In our prior work, EnvGen (Zala et al., ), we automated the design of simple game instances that improved
small RL models on predefined skills.
In this work, we ask: how can this be scaled up to more ambitious and realistic open-ended tasks like visual question answering, mathematics, or code generation?
However, unlike for game tasks, there are currently no simulators or environments to serve as a testbed for the development of automated teacher agents for these more complex tasks, or even to evaluate the effectiveness of the different components required to automate such an iterative data generation and model improvement process.

We propose DataEnvGym, a testbed – or gym – of parameterizable teacher environments for developing autonomous data generation agents (i.e. teachers), whose goal is to
iteratively improve student models by generating targeted training data conditioned on representations of the student’s weaknesses (e.g. errors, inferred weak skills).
We frame this task as an iterative interaction between a teacher agent and a student model in which the teacher agent creates training data that improves the student model.
In the same way that game environments can be used to evaluate game-playing agents in conventional reinforcement learning (RL), DataEnvGym’s modular environments (cf. Sec. 2.1) allow us to test data generation agents for a given student model.
In these environments, the data generation agent (teacher), performs multiple rounds of data creation and receives feedback from the student after each iteration in the form of student performance, which is the teacher’s reward signal.
We provide modules for data generation, training, and evaluation, with final performance being measured by the improvement to the student model.
An overview of the DataEnvGym can be seen in Fig. 1.
First, the environment provides the agent with a *state* $s_{t}$, containing information about the errors of current student model $m_{t}$ (cf. Fig. 1(a)).
Then, the agent’s data generation policy $\pi$ predicts *actions* that constitute a plan for generating training data (cf. Fig. 1(b)):
$p_{t}\sim\pi(p_{t}|s_{t})$.
Next, the agent’s data generation engine executes the plan to create training data $d_{t}$ (cf. Fig. 1(c)).
The created datapoints are then used to train an updated student model (cf. Fig. 1(d)): $m_{t+1}=\texttt{Train}(m_{t},d_{t})$.
The updated student model is re-evaluated to produce the next iteration’s state $s_{t+1}$ and provide feedback to the agent (in the form of student performance).
DataEnvGym is designed in a generalizable way to support data creation for diverse agents
across multiple tasks, covering multimodal (visual question answering) and text-only (mathematics and programming) tasks.

DataEnvGym’s modular design enables many possible instantiations of data generation environments.
We provide three implementations of DataEnvGym environments along with the agent modules required for each.
These differ in the state representations and action spaces they provide to the agents, and they
range from open-ended (generating data directly from per-example model predictions) to more structured (generating data based on a skill-based hierarchical representation of intermediate model progress).
First, in the Open-Ended environment (cf. Fig. 2(a)), the state representation is an unstructured list of the student model’s errors.
The action space in this environment is also unstructured (i.e. open-ended), with an action consisting of generating a particular set of datapoints; i.e., the agent infers directly from the errors what type of data would help the model and then directly generates that data.
This contrasts with human developers, who typically use a more skill-directed approach, breaking performance down into skill-specific metrics to decide where to add data.
Skill-based development has three distinct advantages: it provides the agent with structured ways of controlling the data generation process,
it makes the process more interpretable by organizing data generation around easy-to-grasp skills,
and it enables human-model interoperability and curriculum control, where a human or a model can specify skills for the model to improve on.

Based on these advantages, we argue that skill-structured agents may be preferable or necessary in some cases.
Therefore,
DataEnvGym also supports skill-based teaching and learning.
Specifically, DataEnvGym includes the Skill-List environment (cf. Fig. 2(b)), in which a skill discovery module first automatically infers human-interpretable skills from the training data using a large language model (LLM).
This produces a more structured state representation (i.e., a report of skill-specific performance),
and makes the agent’s task more interpretable, as it has explicit feedback on which skills the student model is struggling.
Like the Open-Ended environment, the Skill-List environment asks agents to directly generate data.
While the Skill-List environment provides more structure
and interpretability to the agent than the Open-Ended environment by adding skills to the state representation, both have granular action spaces with a high degree of freedom.
Thus, while the Skill-List input space is more structured and interpretable, its output space is not.
To give the agent a more structured output, we also include an environment in which the action space is structured into fixed, coarser-grained actions.
To this end, in the Skill-Tree environment (cf. Fig. 2(c)), we abstract skills into a tree-based representation called a skill forest.
Here, skills are organized hierarchically into skill trees, with parent skills as root nodes and subskills as child nodes (see Fig. 3 for an example).
This hierarchical framing allows new, more granular subskills to be discovered and simplifies the agent’s task into a binary choice between two actions:
the explore action,
which grows a skill tree by adding new subskills,
and the exploit action, which rebalances the skill tree to allocate more data to existing subskills.
This split is designed to help the agent prioritize important skills (by generating more data for skills that have helped improve performance in the past) while also balancing competing pressures for breadth and depth in the skill hierarchy (by adding new subskills and broadening the skill tree).
Our DataEnvGym testbed not only provides default implementations for all these environments and components, but also makes it easy to test alternate implementations; for example, an improved skill discovery implementation or an alternate data structure can easily be plugged in and tested based on downstream student performance.
A summary of the input and action spaces for these environments is shown in Fig. 3.

We benchmark several baseline agents as examples (data generation policies combined with data generation engines) in DataEnvGym’s teaching environments, across different domains (mathematics, programming, visual question answering) and on different student and teacher models.
Generally, we find that the example agents we provide already improve student performance when models are trained in DataEnvGym’s teaching environments; after training, students see a consistent improvement when compared to their starting point (i.e. before training in the environment).
Across environments, students improve by an average of $4.43\%$ (absolute accuracy) on GQA, $4.82\%$ on MATH, and $1.80\%$ on LiveCodeBench.
Moreover, we find that our example agents can make use of student feedback to help iteratively improve the student: we compare baseline agent policies that make use of student feedback states (“With State” policies) to ones that do not (“No State” policies), finding that conditioning on the feedback state is key to successful data generation, with “With State” policies outperforming “No State” by $3.5\%$ in Open-Ended, $2.05\%$ in Skill-List, and $1.08\%$ in Skill-Tree.
We also show that some environments make improving students more challenging for teachers, based on how flexible versus how controllable (and interpretable) the curriculum needs to be.
Moreover, we show that environments can teach different skills (based on skill frequency and question difficulty) and can be used to test variants of key modules, e.g., the skill discovery module. Lastly, we provide qualitative examples of student model predictions before and after our training.
Overall, DataEnvGym is a general-purpose testbed for developing and evaluating data generation agents, engines, and feedback mechanisms, laying the foundation for future improvements to these key elements of automated model improvement.

Figure: Figure 2: Illustration of the three example instances of DataEnvGym environments described in Sec. 2. In the (a) Open-Ended environment, the state is represented as a list of per-example accuracies, and the data generation policy directly creates a data generation plan from them. In the (b) Skill-List environment, the state is represented as a categorized list of skills and per-skill student model performance; its data generation plan allows the policy to prioritize weak skills. In the (c) Skill-Tree environment, the state is represented as a forest of skill trees containing skill-subskill relational information, and its data generation policy chooses between two actions for each skill: explore (grow skill tree) and exploit (rebalance skill tree).
Refer to caption: x2.png

## 2 DataEnvGym Environments and Agents

We provide three categories of (environment, agent) pairs in DataEnvGym with multiple levels of structure given to data generation agent,
corresponding to different levels of interpretability.
Agents are composed of two modules: the
data generation policy $\pi$ (which creates a data generation plan $p_{t}\sim\pi(p_{t}|s_{t})$) and
the data generation engine Engine
(which executes the plan to produce training data $d_{t}=\texttt{Engine}(p_{t})$; cf. Sec. 2.2.2),
Both the policy and plan can change depending on the environment the agent is in, as the environment provides the agent with affordances that define the agent’s action space.
The environments encapsulate several modules, including a student model $m_{t}$, a trainer (which trains student model given the generated training data, $m_{t+1}=\texttt{Train}(m_{t},d_{t})$) and an evaluator (which evaluates the updated student model and outputs its performance, $s_{t+1}=\texttt{Eval}(m_{t+1})$; cf. Sec. 2.1.1).

As summarized in Table 1,
some environments have
additional modules for generating skill-specific training examples via automatic skill discovery (Sec. 2.1.2) and organization (Sec. 2.1.3).
Skill-based structures give agents three distinct advantages: first, they provide the agent with affordances to control how targeted or diverse the data it generates is (i.e. knobs that adjust to what degree the data addresses a single skill vs. broadly improves a variety of skills).
Secondly, when the skills are interpretable to people, skill-based agents provide *human-model interoperability and human-in-the-loop control*, where humans can influence the data generation process (e.g. by specifying skills to improve) or can in fact step in for the agent (and vice versa) whenever needed.
Finally, having skill-based improvements allows for interpretable agent behavior; a user can observe for which skills data is being generated and where training is most effective.
We provide all of these components for three different tasks: mathematics, visual question answering (VQA), and programming.

(1) Open-Ended Environment.
The Open-Ended environment, shown in Fig. 2(a), provides the simplest state structure
to the data generation agent, and is the least constrained of the environments.
State representation: The state is represented as a list of evaluated predictions from the student.
The agent must infer from this list what kind of data would best help the student, mapping directly from errors in the list to desired future datapoints.
Action space: The action space that the Open-Ended environment affords directly specifies the datapoints to generate, i.e. the agent is expected to directly generate specs for every datapoint, without any auxiliary actions to structure the generation process.

(2) Skill-List Environment.
The Skill-List environment (shown in Fig. 2(b)) requires the teacher, i.e. the data generation agent, to teach a specific set of skills.
State representation: The Skill-List environment induces skills needed for the task on the training data (see Sec. 2.1.2) and reports student performance on each of these skills.
The input to the agent policy is a list of evaluated predictions partitioned by skills.
This informs the agent about what mistakes are being made on questions requiring the skill.
Action space: The action space is shared with Open-Ended.

(3) Skill-Tree Environment.
The Skill-Tree environment, shown in Fig. 2(c),
disentangles data generation from data control, adding structure to the action space s.t. its policy no longer directly generates data specifications but simply dictates how much data is to be generated and for which subskills.
This constrains the action space and provides the agent with additional scaffolding.
State representation: The surface form of the state representation is shared with the Skill-List environment.
However, the Skill-Tree environment also maintains an underlying *skill forest* composed of *skill trees*, where each tree is a hierarchical representation of a skill and its subskills (see Sec. 2.1.3 for details, see Fig. 3 for an example).
Thus, while the input is similar (skill names and the student’s performance on each skill) the actual skills differ from those give in the Skill-List environment, which does not have any hierarchy.
Action space:
The Skill-Tree environment affords the agent a more structured action space.
At each iteration, rather than directly generating data, the agent chooses, for each skill (and its corresponding skill tree) to either exploit the existing skill set by *rebalancing the skill tree* for an existing skill,
i.e.,
re-allocating the data budget
to its subskills, or to explore, which *grows the skill tree* by creating new subskills.
The action is applied to the skill tree and produces a new skill tree that has either had new subskills added or had the amount of data allocated to each subskill changed.
The data generation engine then consumes each skill tree and produces the planned amount of training data for each subskill within each skill tree.

**Table 1: Summary of baseline environments for DataEnvGym, with different components that determine how to generate training examples for each iteration.**
| Environments | Trainer/Evaluator | Skill Discovery | Skill Organization |
| --- | --- | --- | --- |
| (Sec. 2.1.1) | (Sec. 2.1.2) | (Sec. 2.1.3) |  |
| Open-Ended | ✓ | - | - |
| Skill-List | ✓ | ✓ | - |
| Skill-Tree | ✓ | ✓ | ✓ |

Below, we describe
the constituent modules (Sec. 2.1) and the data generation agent (Sec. 2.2) that are instantiated in DataEnvGym.

### 2.1 Environment Modules

#### 2.1.1 Trainer and Evaluator

Given training data $d_{t}$ from the data generation engine,
the trainer performs a training run (i.e., a certain number of training steps on the dataset) updating the student model: $m_{t+1}=\texttt{Train}(m_{t},d_{t})$.
Then, the evaluator tests the student model and outputs its performance:
$s_{t+1}=\texttt{Eval}(m_{t+1})$.

Baseline implementation.
We use supervised finetuning for training using the Transformers (Wolf et al., ) library.
We present data in an instruction-finetuning format of Alpaca (Taori et al., ) with the standard language modeling loss.
For evaluation, we use the standard training splits from the datasets we test on.
More details of the training process, including hyperparameters such as learning rates and optimizers, are provided in Sec. B.1.

#### 2.1.2 Skill Discovery

Skill-List and Skill-Tree environments have a
skill discovery module that takes a set of training samples $d_{t}$ and returns a set of skills that would be needed to solve these examples;
in the beginning of training $t=0$, the environments use the skill discovery module to discover a set of skills over the validation set.
Alternatively, the environments can be parameterized by a set of user-specified target skills.
The skill discovery module will assign a discovered skill label to each evaluated student prediction in the validation set.
The list of skills and evaluated student predictions are consumed directly by the Skill-List environment.
In the Skill-Tree environment, skills are used as input by the skill organization module.

Baseline implementation.
To discover the skills, our baseline instantiation of the skill discovery module employs a two-stage approach, following Didolkar et al. ().
First, we assign a specific skill to each instance of a task, using a template that asks the LLM to identify the high-level skill required to solve the question.
Second, we aggregate these skills into categories using another template that asks the LLM to group similar skills.
Specifically, we present an LLM with a full list of skills and ask it to exhaustively partition the skills into mutually-exclusive categories.

In the Skill-Tree environment,
we use the same process to propose subskills for existing skills in a hierarchical fashion.
For example, given the skill “Algebra”, subskills might be “Solving Linear Equations” or “Polynomial Factorization”.
Implementationally, we provide the LLM with a skill and existing subskills for that skill.
It is instructed to propose subskills that are unique and belong to the given skill.
We can repeat this process again on top of an existing skill to induce a set of subskills for each skill, as needed.
The LLM prompts are shown in Sec. B.2.

#### 2.1.3 Skill Organization

To solve complex problems by adaptively growing the set of skills the student can perform, it is natural to organize skills into some kind of hierarchy.
In the Skill-Tree environment,
the skill organization module takes as inputs a set of skills, and outputs a forest of “skill-trees”, an organized hierarchical structure that encodes skills and stores their metadata (e.g., how much data is allocated to each skill).
This is the state $s_{t}$ in the Skill-Tree environment.
Fig. 3 shows an example skill tree.

Baseline implementation.
In the Skill-Tree environment,
the *skill forest* captures the student’s proficiency at increasing levels of granularity, with the root of each tree corresponding to a high-level skill domain and the children corresponding to subskills.
Each tree in the forest contains key information about subskills, including the amount of training data allocated to each subskill (i.e., the *data allocation*) and the student’s performance on the training split for each subskill.
Note that the specific implementation of the skill forest is left to the user; DataEnvGym provides a default version of the skill forest, but other implementations can be plugged in.

Figure: Figure 3: Example skill tree updates over time for MATH task’s “Algebra” skill in the Skill-Tree environment. Starting from a empty single node, the data generation policy (Sec. 2.2.1) iteratively chooses actions between explore (grow skill tree) and exploit (rebalance skill tree). Then the skill organization module (Sec. 2.1.3) accordingly adds/removes subskills and re-allocates the training data for each subskill.
Refer to caption: x3.png

### 2.2 Data Generation Agent Modules

#### 2.2.1 Data Generation Policy

The data generation policy $\pi$ takes as input
the student performance state $s_{t}$
(list of per-example errors for Open-Ended environment, skill-specific errors and the skill list for Skill-List environment, and skill-specific errors and the skill tree for Skill-Tree environment),
and outputs as an action the data generation plan (the inputs to a data generation engine):
$p_{t}\sim\pi(p_{t}|s_{t})$.
In the Open-Ended and Skill-List environments, the data generation plans are lists of specifications for training data, one for each training datum to be produced.
The training datum is rendered or formatted into the appropriate format for instruction finetuning by the data generation engine.
In the Skill-Tree environment, we shape the action space and provide two discrete actions: explore and exploit; note that further actions can easily be added.
Explore actions grow the skill tree by adding subskills.
Exploit actions change the allocation of data for existing subskills.

Baseline implementation.
We drive the policies for the Open-Ended and Skill-List environments with an LLM by giving the verbalized the state to the LLM and prompting it to produce the corresponding actions.
For the Skill-Tree environment, we implement a policy that grows the skill tree to a fixed size and while maintaining a uniform data distribution by sequencing explore and exploit actions. Details can be found in Sec. B.5.

#### 2.2.2 Data Generation Engine

The data generation engine’s role is to generate training examples based on the data generation plan from the policy: $d_{t}=\texttt{Engine}(p_{t})$.
The training examples will be used to teach the student.
Because each environment affords the agent with a different action space, the data generation engines corresponding to them also differ.
Specifically, for the Open-Ended and Skill-List environments, the data generation engine receives actions in the form of datapoints to generate (since the policy’s action space is unstructured) and formats the appropriate examples (e.g. for GQA, it generates images using a T2I model).
The Open-Ended and Skill-List generators have access to the task and a list of examples to render into training data.
For the Skill-Tree environment, where the action space is $\{$explore, exploit$\}$, the data generation engine must first interpret these actions.
Each action triggers a modification to the skill tree. An explore action invokes a subskill discovery pipeline to grow the skill tree by adding subskills.
When emitting an exploit action, the agent has to specify how to change the data allocation, or budget, for each subskill; executing the action means adjusting the budget stored in the skill tree accordingly.
Finally, the data generation engine consumes the skill tree and generates the planned amount of data for each subskill.

Baseline implementation.
For all tasks (mathematics, VQA, and programming), we generate training data using an LLM (GPT-4o).
For mathematics problems, we generate problems using an LLM, where each problem consists of a question, a step-by-step solution, and a final answer.
For VQA tasks, we first use an LLM to generate image descriptions aligned with the task/skill/subskill given as input.
We then employ a text-to-image model to convert these descriptions into images.
Then, the LLM is instructed to generate a specified number of unique questions for the given task/skill/subskill.
For programming, we generate data in two stages. We generate a problem and starter code given subskill information and detailed instructions about the expected format, and then solve it with an independent LLM call.
We provide details on the generators for each environment in Sec. B.3 and show generated training examples for each task in Appendix C.

## 3 Experiments

We experiment with DataEnvGym environments in three domains: visual questions answering, mathematics, and programming.
For visual question answering, we use the GQA (Hudson & Manning, );
for mathematics, we use MATH (Hendrycks et al., );
for programming, we use LiveCodeBench (Jain et al., ).
For most experiments (reported in Sec. 3.1) we start from instruction-tuned models rather than base models because we believe it is a more realistic and challenging setting since starting from instruction tuned models is standard for applications and these models have undergone post-training on large amounts of task-specific data.
For GQA, we use PaliGemma-3b-pt-224 (Beyer et al., )
as our student model and we use GPT-4o OpenAI () as the teacher agent policy, augmented with SDXL-Turbo (Sauer et al., )
for T2I generation.
For MATH and LiveCodeBench, we use Gemma-2-2B-Instruct (Gemma Team, ) and Llama-3-8B-Instruct (Llama Team, )
as students respectively, and generate data with GPT-4o.
Note that the student models we use are typically already proficient at the target task and thus are difficult to improve.
For each domain, we choose the student model to satisfy the following criteria: 1) the student should be strong enough to perform the given task (e.g. LiveCodeBench is too challenging for a Gemma2-2B student). 2) The student should not have been heavily post-trained s.t. further improvements are unlikely (e.g. Llama3-8B has been extensively trained for math and further improvements with additional training are unlikely, regardless of the data generation agent).
Details can be found in Sec. B.6 (validation and test splits) and Sec. B.3 (data generation).

We train all models for a fixed number of steps and terminate episodes after a fixed number of iterations, and
use validation accuracy to select the training dataset iteration corresponding to the highest student accuracy.
For each environment and domain, we report two values: first, we report the increase in student performance achieved by the baseline implementations of the teacher policy described in Sec. 2.2.1;
this policy takes in the state $s_{t}$, i.e., it is given by $\pi(p_{t}|s_{t})$. We refer to this setting as *With State*.
Second, we report the increase in student performance achieved by the same policy without conditioning on the state information, i.e. sampling an action from $\pi(p_{t}|\cdot)$ *without* conditioning on $s_{t}$.
For the Open-Ended environment policy, we replace the list of student errors with random train samples.
For the Skill-List policy, we do the same.
For the Skill-Tree policy, we take explore and exploit actions with equal probability.
We refer to this setting as *No State*.

### 3.1 Primary Results: VQA, Mathematics, Programming

**Table 2: Agents in DataEnvGym’s environments are able to improve students across tasks and teaching environments. ^∗Note that “No State” is the same for the Open-Ended and Skill-List environments because these only differ in their state representation, so their “No State” policies (which do not condition on the state) are identical.**
| Setting/Env. | GQA | MATH | LiveCodeBench | Avg. Improvement |
| --- | --- | --- | --- | --- |
| (PaliGemma 3B) | (Gemma2 2B) | (Llama3 8B) |  |  |
| Before teaching | 44.18 | 15.78 | 16.50 | - |
| Open-Ended environment |  |  |  |  |
| +No State^∗ $\pi(p_{t}|\cdot)$ | 43.48 (-0.70%) | 19.78 (+4.00%) | 16.50 (-0.00%) | (+1.10%) |
| +With State $\pi(p_{t}|s_{t})$ | 47.90 (+3.72%) | 23.44 (+7.66%) | 18.91 (+2.41%) | (+4.60%) |
| Skill-List environment |  |  |  |  |
| +No State^∗ $\pi(p_{t}|\cdot)$ | 43.48 (-0.70%) | 19.78 (+4.00%) | 16.50 (-0.00%) | (+1.10%) |
| +With State $\pi(p_{t}|s_{t})$ | 48.18 (+4.00%) | 19.48 (+3.70%) | 18.25 (+1.75%) | (+3.15%) |
| Skill-Tree environment |  |  |  |  |
| +No State $\pi(p_{t}|\cdot)$ | 49.53 (+5.35%) | 17.15 (+1.37%) | 16.50 (-0.00%) | (+2.24%) |
| +With State $\pi(p_{t}|s_{t})$ | 49.76 (+5.58%) | 18.90 (+3.12%) | 17.75 (+1.25%) | (+3.32%) |

Tab. 2 presents results on example instantiations of environments within DataEnvGym.
Here, we compare students before and after a multi-step trajectory of training across environments, with different data generation policies.
For each setting, we report the relative gain or loss (in blue)
compared to student model before training in DataEnvGym.
Note also that the models used here are already instruction-tuned on large datasets (including task-specific datasets), making obtaining further improvements particularly challenging.

LLM policies can make use of state information to provide better training data for the student. Students trained in the “No State” setting generally perform worse than those trained in the “With State” setting.
This is true across environments, with the largest difference (3.5%) for the Open-Ended environment and the smallest difference (1.08%) for the Skill-Tree environment.
On LiveCodeBench, policies without state information are not able to improve the student at all, whereas on MATH, a policy without state information is still able to improve a student in all environments.
The support provided to the teacher by the Skill-Tree environment is particularly robust for GQA, where a policy without state information reaches almost identical performance to a policy with state information.
However, absent Skill-Tree’s structured actions, removing state information actually *hurts* performance on GQA, with slight drops from the baseline for the “No State” setting on Open-Ended and Skill-List environments.
For both these environments, “With State” improves the student model.
Taken together, these results highlight the importance of the state information.

Teaching is easier in some environments than others.
With a fixed student and task (i.e. looking at “With State” entry across the columns of Tab. 2), teachers typically elicit the highest student performance in the unconstrained Open-Ended environments, where they are not required to teach a specific set of skills.
However, there may be domain specific effects here as the teachers in the Skill-Tree environment perform the best on the multimodal GQA dataset (+5.58%), whereas this is reversed for MATH, where teachers in the Open-Ended environment perform the best (+7.66%).

These difference may relate to the level of constraint imposed: in the Open-Ended environment, the teacher can produce any data without any constraints, while in the skill-structured environments, we require the teacher to improve the student along specified skills.
This may be a more difficult task, as it may impose suboptimal constraints on the teacher, i.e., the teacher may have difficulty teaching the specified skills, whereas in the unconstrained Open-Ended environment, the teacher may be implicitly able to identify and teach the skills it is best at teaching.
However, unconstrained teaching (which has no clear link between errors and generated data) may not always be useful in practice, e.g. when a user wants to control the training and make targeted improvements to certain skills.

Figure: Figure 4: Per-skill accuracy improvements of Gemma-2B trained on MATH in the Skill-Tree environment, as a function of (a) question difficulty and (b) skill rarity (inverse of frequency) in the training data. The biggest performance increases occur in the middle range for difficulty and on the lower range for rarity (i.e. on more frequent skills).
Refer to caption: x4.png

### 3.2 Analysis: Difficulty/Rarity, Training Dynamics, Skill Discovery Quality, and Qualitative Examples

Skill learning across rarity and difficulty levels.
Tab. 2 shows that skill-based learning in the Skill-Tree environment can improve overall performance of student models.
Two core questions are (1) how interpretable these skills are and (2) how learning correlates with features like question average difficulty or skill frequency.
In Fig. 4,
we plot the accuracy improvement of a Gemma-2B student model after training in DataEnvGym’s Skill-Tree environment for MATH; most skills improve, some more than others.
In Fig. 4(a) we plot improvement across the average question difficulty (provided by MATH on a scale of 1 to 5).
Training in DataEnvGym boosts student performance the most in the middle difficulty region (around 3.5).
On the edges, we see smaller boosts, with close to 0 difference for *Calculus and Optimization* (high difficulty) and even decreases for *Trigonometry* (low difficulty).
In Fig. 4(b) we compare performance to skill rarity (inverse frequency) in the training data.
Here, infrequent skills benefit less, with more frequent (i.e. less rare) skills generally benefiting more.
Taken together, the results in Fig. 4 suggest that there is a sweet-spot of difficulty and frequency.
At the low end this could be due to saturation: easy skills benefit less from training because the model already performs well on them or has saturated.
At the other end, difficult skills or very rare skills may be underrepresented in teacher’s training data or be harder to generate questions for, making learning less effective.
Alternatively, the questions generated may be too hard for the student.
In the middle difficulty range, the teacher generates helpful examples, allowing the student to learn.
Similar theories have been put forth for human learning, e.g., Vygotsky ()’s Zone of Proximal Development, where learning is most effective on problems slightly harder than those students could solve alone, but not so hard that they would have no hope of solving them.

Figure: Figure 5: Training dynamics across three tasks. Performance generally increases over iterations.
Refer to caption: x5.png

Iterative training dynamics.
In Fig. 5, we plot the change in the student model’s performance on the validation set throughout a full run in DataEnvGym on each task and for each environment.
Each experiment is truncated once the performance consistently decreases for multiple iterations.
We use the “With State” baseline agents for each environment, and use the same models as in Tab. 2.
Fig. 5 shows that the students generally improve across iterations.
In other words, the baseline agents do uncover new datapoints that further improve the student at each iteration.
Moreover, the behavior of agents trained in the three
environments differs across tasks: on GQA, Skill-Tree improves for more iterations than the other environments, while on MATH it reaches a plateau and on LiveCodeBench it is truncated after two rounds of data generation.

Impact of skill discovery quality.
In Tab. 3, we show the result of training students using data generated by Skill-List environments with different skill discovery modules.
For each domain, we determine a set of oracle skills.
For GQA, the oracle skills are the human-annotated skills.
Because MATH does not have human-annotated skills, we approximate oracle skills by running the skill discovery module on the test data, thereby creating skills from privileged information.
In both settings the oracle skills allow the teacher to produce better data and improve student performance.

**Table 3: DataEnvGym allows us to test various implementations of environment components. Here, we compare oracle vs. inferred skills for GQA and MATH. Better skills result in better teaching and thus an improved student.**
| Skill Type | GQA | MATH |
| --- | --- | --- |
|  | (PaliGemma 3B) | (Gemma2 2B) |
| Before teaching | 44.18 | 15.78 |
| Skill-List |  |  |
| +Oracle Skills | 53.02 (+8.84%) | 19.52 (+3.74%) |
| +Inferred Skills | 48.18 (+4.00%) | 18.25 (+2.47%) |

The increases from oracle skills are higher for GQA than MATH, possibly due to the fact that the MATH skills still rely on the same skill discovery module as the inferred skills.
This is a promising signal, as it indicates that further performance improvements can be obtained by improving the skill discovery module.
These results also highlight the utility of DataEnvGym in allowing us to swap in different components: by creating a modular framework for developing data generation agents, we enable future work to test modules and components in the framework using student performance as a metric.

##### Testing different teacher policies.

In Tab. 4, we replace the LLM policy driving the teacher agent with GPT-4o-mini, testing different teacher LLM policies, especially a smaller and less powerful one like GPT-4o-mini.
With a weaker LLM, the teacher agent’s generated data is not as effective at improving the student.
The weaker teacher has more success in skill-structured environments (+1.81% and +1.75%) than in the Open-Ended environment (+0.77%).

**Table 4: The quality of data produced by the teacher is important. Here, we replace GPT-4o inside the teacher agent with GPT-4o-mini.**
| Setting/Env. | GQA | MATH | LiveCodeBench | Avg. Improvement |
| --- | --- | --- | --- | --- |
| (PaliGemma 3B) | (Gemma2 2B) | (Llama3 8B) |  |  |
| Before teaching | 44.18 | 15.78 | 16.50 | - |
| Open-Ended environment |  |  |  |  |
| +GPT-4o-mini | 45.51 (+1.33%) | 15.78 (+0.00%) | 17.50 (+1.00%) | (+0.77%) |
| +GPT-4o | 47.90 (+3.72%) | 23.44 (+7.66%) | 18.91 (+2.41%) | (+4.60%) |
| Skill-List environment |  |  |  |  |
| +GPT-4o-mini | 46.74 (+2.56%) | 16.92 (+1.14%) | 17.25 (+1.25%) | (+1.75%) |
| +GPT-4o | 48.18 (+4.00%) | 19.48 (+3.70%) | 18.25 (+1.75%) | (+3.15%) |
| Skill-Tree environment |  |  |  |  |
| +GPT-4o-mini | 48.83 (+4.65%) | 16.06 (+0.28%) | 17.00 (+0.50%) | (+1.81%) |
| +GPT-4o | 49.76 (+5.58%) | 18.90 (+3.12%) | 17.75 (+1.25%) | (+3.32%) |

##### Generated skill trees and examples.

In Fig. 12, Fig. 13, and Fig. 14 (Appendix C) we show qualitative examples of skills and subskills discovered for GQA, MATH, and LiveCodeBench, respectively.
For each subskill, we also show example datapoints generated by the teacher model.
Note that these datapoints are generated in their entirety, including the images shown in Fig. 12.
Each task’s training data is structured differently, but the generated training data generally matches the style required by the target tasks for multiple skills.

##### Model predictions before and after training.

In Fig. 15 (Appendix C) we show qualitative examples of how training on generated data changes the response of a PaliGemma-3B student.
The example on the left falls under the “Material Identification and Comparison” skill that was identified during skill discovery. Training on generated data leads to the model correctly identifying the material as “plastic”.
This may be a result of debiasing in terms of the possible materials for chairs in the synthetic data.
On the right is another tricky example, where the initial answer could be a result of the model confusing the foreground (a giraffe) – for which “brown and tall” is true – with the background.
After training on synthetic data, this mistake is corrected.

## 4 Related Work

Training Environment Generation.
In agent learning frameworks, designing training environments
usually becomes a bottleneck, as it requires sophisticated human efforts (Park et al., ).
Unsupervised environment design (UED) (Dennis et al., ; Jiang et al., ; Parker-Holder et al., )
explores progressively increased environment difficulty based on agent scores in simple games.
Liesen et al. () introduce a meta-learning approach to create learning environments for continuous control.
In vision-language navigation (VLN),
past work (Li et al., ; Li & Bansal, ; Wang et al., )
propose augmenting the visual diversity of training environments with image generation models.
Generation has been applied to game environments as well: Cobbe et al. () generate a diverse set of game environments for training RL agents and measuring their generalization.
In our previous work – EnvGen (Zala et al., ) –
we continuously adapt game instances for training RL agents, using an LLM to generate different game engine parameters that teach core skills to the agent based on feedback from the agents’ intermediate progress, which improves the final performance of agents as well as learning efficiency.
Yang et al. () generate 3D embodied environments from user-specified prompts, generating rooms in different styles.
Generally, past environment generation work has focused on restricted environments like simple games, often with a few predefined actions and skills.
Moreover, past environment generation work has focused on developing *students* rather than improving the data generation process itself.
In contrast, our present work focuses on data generation agents, creating a testbed for teachers and treating students as part of the environment.
Furthermore, our work introduces environments for data generation with automatic skill discovery in
a diverse set of *open-ended and more realistic* settings such as mathematics, visual question answering, and programming.

Learning from Generated Data.
DataEnvGym involves transferring task knowledge from a teacher agent to a student model in an effective way, based on the student model’s feedback.
Past work on knowledge transfer from one model to another has been centered around knowledge distillation, where outputs from larger models are used to train smaller ones (Hinton et al., ; Buciluǎ et al., ; Chen et al., ); unlike the process in DataEnvGym, this process is typically not adaptive, relying on fixed datasets of inputs that are processed by the larger teacher model and used to train the student.
In the context of LLMs, symbolic distillation (West et al., ) has become increasingly common; here, text is generated from a large model and used to train a smaller one, e.g., in instruction tuning (Wang et al., ) or distilling chain-of-thought reasoning (Wei et al., ) from large proprietary models into smaller models (Magister et al., ; Shridhar et al., ; Fu et al., ; Ho et al., ; Saha et al., ; Mukherjee et al., ; Mitra et al., ; Chen et al., ).
The kind of teaching that data generation agents are expected to perform in DataEnvGym’s environments differs from the knowledge distillation setting in that the inputs to the model themselves are model-generated (as opposed to being sourced from an existing dataset).
Moreover, the inputs are dynamically determined based on the student model’s feedback and errors, whereas in knowledge distillation they are determined by a fixed dataset or generated all at once.
Note that DataEnvGym is compatible with different methods of training the student (i.e., symbolic distillation, logit-based losses, etc.), and these can be swapped into our modular environments.

## 5 Conclusion

We propose DataEnvGym, a testbed of teacher environments for developing modular data generation agents (i.e., teachers) and environments.
In DataEnvGym, a teacher agent generates training data for a student model and receives feedback on the student’s performance from the environment.
We provide three environment instantiations with different levels of structure.
Across three diverse domains (visual question answering, mathematics, and programming),
we demonstrate that the example teachers we introduce can improve students in all DataEnvGym environments.
We analyze DataEnvGym, including its training dynamics, performance across difficulty levels, and the impact of skill discovery module quality.
We hope our work will foster future progress on data generation agents, engines, and feedback mechanisms by providing a testbed for evaluating and improving them.

## Acknowledgments

This work was supported by DARPA ECOLE Program No. HR00112390060, NSF-AI Engage Institute DRL-2112635, DARPA Machine Commonsense (MCS) Grant N66001-19-2-4031, ARO Award W911NF2110220, ONR Grant N00014-23-1-2356, Accelerate Foundation Models Research program, and a Bloomberg PhD Fellowship. The views contained in this article are those of the authors and not of the funding agency.

## Appendix

In the appendix,
we present additional related work (Appendix A),
additional method details (Appendix B),
and
qualitative examples (Appendix C).

## Appendix A Additional Related Work

##### Skill Discovery.

A line of work in reinforcement learning has studied unsupervised skill discovery, where agents learn diverse emergent behaviors without explicit rewards.
The majority of this work helps agents discover new skills by maximizing the diversity of agent trajectories, such as exploration-encouraging rewards (Gregor et al., ; Bellemare et al., ) and adding randomness during action sampling (Watkins, ; Burda et al., ).
However, such methods require long exploration steps, which is expensive if the cost for agent action is not negligible.
Recent work has also proposed using the knowledge contained in pretrained language models to help in skill discovery (Sharma et al., ; Rho et al., ; Fu et al., ) and to sample new skills (Didolkar et al., ).
Developments and improvements to skill discovery are complementary to DataEnvGym, where skill discovery is used in the Skill-List and Skill-Tree environments in Sec. 2.1.2) to dynamically extract human-interpretable skills from data and to create student feedback.
These skills help identify model weaknesses and condition the data generation process, and we find that improving skill discovery can improve student model performance (cf. Tab. 3), pointing to directions for future work.
Moreover, by using skill discovery in its environments, DataEnvGym not only helps develop and test interpretable agents, but also provides a concrete extrinsic evaluation for skill discovery, allowing competing skill discovery methods to be evaluated and compared on the basis of how well they improve downstream agent performance.

##### Model Weakness Discovery.

Testing a trained machine learning model in different scenarios is crucial in mitigating unexpected malfunctions, so that developers can actively prevent such behaviors and finetune models on weak skills.
Traditionally, model weaknesses have been identified by hiring human annotators and asking them to create adversarial inputs in different scenarios and check when model outputs are incorrect or undesired (Ganguli et al., ).
Recent work explores automatically finding model weaknesses by
creating test cases in different scenarios,
with either with pipelines consisting of traditional ML models (Gao et al., ; Wu et al., ) or LLMs (Perez et al., ; Zhang et al., ; Wu et al., ).
These methods tend to focus on adversarial scenarios such as jailbreaking or redteaming, where a model is made more robust against an increasingly difficult adversary.
Our framing is orthogonal: rather than focusing on defending against adversaries, in DataEnvGym, students and teachers (data generation agents) are cooperative, working together to improve student performance.

## Appendix B Additional Method Details

### B.1 Training Details

#### B.1.1 GQA

We use the Transformers Wolf et al. () library for training.
We train PaliGemma-3b-pt-224 (Beyer et al., ) for 10 epochs using the AdamW (Loshchilov & Hutter, ) optimizer with 2 warmup steps and a learning rate of $2\times 10^{-}5$, a weight decay of $10^{-}6$ using the BF16 datatype and batch size of 16.
We apply LoRA (Hu et al., ) with a rank of 16 and an alpha of 32, no bias, and a dropout of 0.05. We apply LoRA to all linear layers.

#### B.1.2 LiveCodeBench and MATH

We use Transformers (Wolf et al., ) and Llama-Factory (Zheng et al., ) libraries for training.
We format all data in the Alpaca format (Taori et al., ) as instruction-response pairs.
We use the Adam optimizer with a batch size of 16 and a cosine learning rate scheduler with a warmup ratio of 0.1 and train for 3 epochs in the FP16 datatype.
We apply LoRA to all linear layers with a rank of 16 and an alpha of 32, no bias, and a dropout of 0.05.
We truncate all training examples to a maximum length of 1024 tokens.

### B.2 LLM Details

##### LLM configuration.

We use gpt-4o-2024-08-06  (OpenAI, ) for the following modules:
skill discovery (Sec. 2.1.2; in Skill-List env),
data generation policy (Sec. 2.2.1 in Skill-List env),
data generation engine (Sec. 2.2.2; in Open-Ended, Skill-List, and Skill-Tree envs).
We use a temperature of 0 and top-p of 1.0, which are default API settings.
We use the Instructor library(^1^11[https://github.com/jxnl/instructor](https://github.com/jxnl/instructor)) to produce structured output from LLM calls and automatically parse LLM calls into Python objects.

##### Prompt Templates.

We provide the LLM prompt templates for
skill discovery (Fig. 6),
data generation for GQA (Fig. 7) / MATH (Fig. 8) / LiveCodeBench (Fig. 9,),
and data generation policy for Open-Ended (Fig. 10) and Skill-List (Fig. 11) environments.

Figure: Figure 6: LLM prompt templates employed in the skill discovery module used in the Skill-Tree and Skill-List environments.
Refer to caption: x6.png

Figure: Figure 7: LLM prompt template for data generation - GQA.
Refer to caption: x7.png

Figure: Figure 8: LLM prompt template for data generation - MATH.
Refer to caption: x8.png

Figure: Figure 9: LLM prompt template for data generation - LiveCodeBench.
Refer to caption: x9.png

Figure: Figure 10: LLM prompt template for generation policy for the Open-Ended environment.
Refer to caption: x10.png

Figure: Figure 11: Example of a prompt for the Skill-List environment for MATH.
Refer to caption: x11.png

### B.3 Data Generation Details

For all tasks, we use validation accuracy to identify when to terminate an episode.
An episode is terminated when a fixed number of iterations is reached, and the best student is selected from all students trained by the policy using validation accuracy.

##### GQA.

We use stabilityai/sdxl-turbo with 4 inference steps to generate images at a resolution of $1024\times 1024$.
In the Skill-List environment, our baseline policy exhausted its data budget after 3 iterations, producing $7.5$k data points.
In the Skill-Tree environment, the baseline policy episode produced the top performing student after 20 steps at $\approx 3$k datapoints.
In the Open-Ended environment, the baseline policy episode produced the top performing student after 5 steps and $\approx 3$k data points.

##### MATH.

For math, we follow the termination criteria as for GQA. In the Skill-List environment, the baseline policy produces roughly $2.1$k datapoints and its best student after 4 iterations.
In the Skill-Tree environment, the baseline policy produces $2.8$k datapoints over 20 steps to produce the best student.
In the Open-Ended environment, the baseline policy requires 10 iterations and 752 datapoints to produce its best student.

##### LiveCodeBench.

For LiveCodeBench, we first generate problems, and then ask the LLM to solve the problem.
Termination criteria are the same as the other settings.
In the Open-Ended environment, the baseline policy produces $1.6$k datapoints and produces the best student after 5 iterations.
In the Skill-List environment, the baseline policy produces 675 datapoints and produces the best student after 11 iterations.
In the Skill-Tree environment, the baseline policy produces 3138 datapoints and produces the best student after 10 iterations.

### B.4 Skill Forest Details

The skill forest (used in Skill-Tree environment) is a hierarchical structure representing skills and subskills across various domains. It models the student model’s skill proficiency with increasing detail. Each tree in the forest corresponds to a high-level skill domain and contains the following key pieces of information for each subskill:

- 1.
Data Allocation: The amount of training data allocated to each subskill.
- 2.
Performance on Training Data: The student model’s performance on the training data for each subskill.
- 3.
Skill Name: The name of the skill.
- 4.
Subskills: A list of subskills for the skill, which starts out empty.

The forest evolves through two mechanisms.

- 1.
Growing: Adding new subskills to the tree.
- 2.
Rebalancing: Adjusting data allocation for existing subskills based on performance.

These actions conceptually correspond to exploring and exploiting the skill tree.

This structure allows us to represent fine-grained skills, allocate resources for data generation, track the student model’s progress, and prioritize skills in the data production process.

### B.5 Skill-Tree Policy

We develop a policy as the baseline “With State” policy shown in Tab. 2.
that aims to grow and balance a skill tree. It operates in two phases:
Growth Phase: The policy alternates between exploration and exploitation actions until a predetermined maximum number of subskills is reached. During exploration, new subskills are added to the tree. During exploitation, the policy resets data allocations to zero, preparing for the next exploration.
Filling Phase: Once the maximum number of subskills is reached, the policy switches to a pure exploitation strategy. It calculates and executes actions that incrementally allocate data to each subskill, aiming to reach a specified maximum amount of data per subskill. The policy respects a maximum allocation limit per action and continues until all subskills have reached their data capacity.

### B.6 Validation and Test Splits

For GQA, we create validation and test splits by doing a balanced stratified sampling of the validation and testdev sets repeatedly. Specifically, we sample 5 questions from each of the 100 question types in GQA, following Gupta & Kembhavi ().
For MATH, we create a validation set by doing balanced stratified sampling of the test set across all levels and topics in MATH, selecting 50 from each group.
We use the official test set for MATH.
For LiveCodeBench, we create a validation set by choosing all problems that are in the 2nd release but not in the 1st release as our validation set, and use the entire 1st release as our test set.
This results in a relatively small validation set of only 100 problems.

## Appendix C Qualitative Examples

##### Generated skill trees and examples.

In Fig. 12, Fig. 13, and Fig. 14 we show qualitative examples of skills and subskills discovered for GQA, MATH, and LiveCodeBench, respectively.
For each subskill, we also show example datapoints generated by the teacher model.
Note that these datapoints are generated in their entirety, including the images shown in Fig. 12.

##### Model predictions before and after training.

In Fig. 15 we show qualitative examples of how training on generated data changes the response of a PaliGemma-3B student.
The example on the left falls under the “Material Identification and Comparison” skill that was identified during skill discovery. Training on generated data leads to the model correctly identifying the material as “plastic”.
This may be a result of debiasing in terms of the possible materials for chairs in the synthetic data.
On the right is another tricky example, where the initial answer could be a result of the model confusing the foreground (a giraffe) – for which “brown and tall” is true – with the background.
After training on synthetic data, this mistake is corrected.

Figure: Figure 12: A partial view of a skill forest for GQA. Depicted are 2 out of 13 discovered skills. For each skill in the skill tree, we show 2 subskills and 2 examples of generated data for that subskill. Note that all images are generated and tend to have boolean answers because a majority of the questions in GQA are yes / no questions.
Refer to caption: x12.png

Figure: Figure 13: A partial view of a skill forest for MATH. Depicted are 2 out of 12 discovered skills. For each skill in the skill tree, we show 2 subskills and 1 example of generated data for that subskill.
Refer to caption: x13.png

Figure: Figure 14: A partial view of a skill forest for LiveCodeBench. Depicted are 2 out of 15 discovered skills. For each skill in the skill tree, we show 2 subskills and 1 example of generated data for that subskill.
Refer to caption: x14.png

Figure: Figure 15: Qualitative examples of how training on generated data changes the response of a PaliGemma-3B student.
Refer to caption: x15.png

## Peer Reviews

confidence: 4
contribution: 4
initial_rating: 8
presentation: 3
questions: - Is it possible to implement a random-policy baseline where you randomly chose a set of (naturally collected) datapoints from a data pool? The no-state baseline has flavor of this baseline but LLM-informed decisions could be biased. 
- Is it possible to compare this approach with active learning, in which instead of doing data generation, you do data *selection* and ask models to generate only synthetic labels, but not synthetic inputs?
soundness: 4
strengths: - Tackle a timely and interesting problem. 
- Provide the necessary infrastructure for the community to study the problem, opening up opportunities for future contributions. 
- Consider various data generation strategies,
- Well-desgined experiments which demonstrate the effectiveness of the proposed approaches and conduct insightful analyses.
summary: This paper introduces Gym environments for data synthesis, framing the problem as sequential decision-making. In these environments, actions correspond to data-generation plans, and states represent the performance summary of a student model. The paper implements environments for three tasks: visual question answering (VQA), math, and code generation. Each environment offers three state representations: open-ended, skill-list, and skill-tree. Additionally, it proposes an LLM-based policy for data generation. Experimental results demonstrate that the LLM can make strategically effective choices based on environment-state information.
weaknesses: * The paper is currently dense and difficult to follow. The introduction includes excessive implementation details, which detract from providing a simple, high-level intuition. Using a specific task example to guide readers through the core concepts would make the paper more accessible.

* The paper focuses solely on the data generation plan rather than a full, end-to-end data generation process. It relies on a fixed, off-the-shelf data-generation engine that cannot be modified. The authors should admit this limitation and discuss potential strategies for overcoming it.

* The quality of the data-generation engine can impact both student performance and the data-generation plan itself. Current approaches do not take into account the data-generation engine capabilities in the design of the policy or the evaluation of the student. For instance, poor student performance might result from the engine producing low-quality data on a specific skill, which could prompt the policy to avoid querying the engine for that skill.

* The learning procedure can be resource-intensive. The authors should report the time, cost, and computing resources used for the experiments.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: In the Experiments section, the authors mention that the baseline student model should not have been heavily post-trained so that there are rooms for further improvements. However, it would be beneficial to provide additional evidence and details to support the claim that the student's performance is improved due to the added data points rather than insufficient training. For instance, the training protocol involved a fixed 10-epoch training period; it remains unclear whether the model had reached convergence within this timeframe or if the introduction of new data points accelerated convergence. Further clarification on this aspect would enhance the overall validity of the results.

Also the result would be more sound if more quantitative and qualitative results for skill discovery is reported in this paper.
soundness: 4
strengths: This paper presents a novel and insightful perspective on the autonomous data generation problem, leveraging principles from reinforcement learning to conceptualize it as a sequential decision-making process. The authors provide a thorough explanation of this approach, the motivations behind and the underlying mechanics.

This paper proposed a modular framework/testbed that can be easily adapted to various tasks, showcasing its versatility and potential for widespread applicability. The authors demonstrate the effectiveness of their approach through experiments on 3 tasks of multiple modalities, including text, image, and code generation, yielding promising early results.
summary: This paper presents a modular system for automated data generation, designed to minimize the need for human annotations. The proposed approach employs a reinforcement learning-inspired methodology, decomposing the process into a sequence of action predictions (data generation policy) based on state information (feedback from model errors) in an iterative manner. The effectiveness of this approach is demonstrated through three diverse tasks, encompassing text, image, and code generation across different modalities.
weaknesses: The experiment part should be conducted more thoroughly: specifically, creating a test set that incorporates newly generated data points from the data generation agent and reporting evaluation results for each retrained model over successive iterations would provide more comprehensive insights into the system's performance.

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: - How does the performance of the data generation agents change over longer iterations? The paper truncates experiments when performance increases, but it would be insightful to explore whether performance plateaus or continuously increase over extended training.
- Is the total training data allocation fixed in each environment, or does it vary dynamically? The methodology mentions rebalancing but lacks clarity on how these allocations adjust adaptively based on feedback.
soundness: 2
strengths: - Good contribution to automated data generation for model improvement.
- Clearly written with structured sections explaining each environment type and experimental results.
summary: The paper presents DataEnvGym, a framework designed to simulate environments for data generation agents. These agents iteratively generate synthetic data to address weaknesses in student models, aiming to improve model performance across tasks like mathematics, programming, and visual question answering. DataEnvGym provides various structured environments (Open-Ended, Skill-List, and Skill-Tree) where data generation agents create targeted training examples based on feedback from the student model, offering a dynamic approach to automated model improvement.
weaknesses: - The paper should clarify early on that the focus is on synthetic data generation for training purposes, as this underpins the motivation for the approach.
- Important related works on algorithms using feedback from training to generate the next training environments are missing [1, 2, 3, 4].
- Lines 460 - 465, I believe there is a typo whereby it says that “each experiment is truncated once the performance consistently decreases for multiple iterations”. Should it be “increases”?
- Repeated runs of experiments without confidence intervals will be valuable, especially since the variance of performance seems to be very high.

[1] Sudhakaran, S., González-Duque, M., Freiberger, M., Glanois, C., Najarro, E., & Risi, S. (2024). Mariogpt: Open-ended text2level generation through large language models. Advances in Neural Information Processing Systems, 36.
[2] Todd, G., Earle, S., Nasir, M. U., Green, M. C., & Togelius, J. (2023, April). Level generation through large language models. In Proceedings of the 18th International Conference on the Foundations of Digital Games (pp. 1-8).
[3] Zhang, J., Lehman, J., Stanley, K., & Clune, J. (2023). Omni: Open-endedness via models of human notions of interestingness. arXiv preprint arXiv:2306.01711.
[4] Faldor, M., Zhang, J., Cully, A., & Clune, J. (2024). OMNI-EPIC: Open-endedness via Models of human Notions of Interestingness with Environments Programmed in Code. arXiv preprint arXiv:2405.15568.

---

confidence: 4
contribution: 3
initial_rating: 8
presentation: 2
questions: Limited Evaluation of Agent Architectures: The paper primarily focuses on introducing the DataEnvGym environment, but the evaluation of data generation agents is limited to relatively simple baseline policies. Exploring more sophisticated agent architectures, such as reinforcement learning agents (e.g., using policy gradient methods, Q-learning) or agents incorporating larger language models for planning and decision-making (similar to the approaches used in Shimabucoro et al. (2024), would substantially strengthen the paper. A systematic comparison of different agent architectures in terms of their effectiveness in improving student models, their sample efficiency, and their computational cost would provide valuable insights and contribute to a better understanding of the challenges and opportunities in automated data generation.

Limited Analysis of Skill Discovery Quality: The paper briefly discusses the impact of oracle skills on student performance but doesn't delve deeply into the quality of the skills discovered by the proposed LLM-based method. A more thorough analysis is needed to understand the strengths and limitations of the skill discovery module. This could involve quantitative measures of skill quality, such as measuring their coherence, coverage, and relevance to the target task, or qualitative analysis by human experts. Investigating how the quality of the discovered skills affects the performance of the data generation agents and the resulting student models would strengthen the paper's contribution. Exploring alternative skill discovery methods (e.g., clustering-based approaches, topic modeling) and comparing their effectiveness with the proposed method would further enhance the analysis.

Lack of Comparison with Existing Methods: The paper positions DataEnvGym as a novel approach for model improvement, but it lacks a direct comparison with existing methods like curriculum learning (Bengio et al., 2009) or active learning (Settles, 2009). Evaluating how DataEnvGym compares to these established techniques in terms of student model performance, data efficiency, and computational cost would provide valuable context and highlight the advantages of the proposed framework. This would also clarify the specific niche and contribution of DataEnvGym within the broader landscape of model improvement techniques.

Limited Discussion of Scalability: The experiments in the paper are conducted with relatively small datasets and models. It's essential to address the scalability of DataEnvGym to more realistic scenarios involving larger datasets, more complex models, and a broader range of skills. Discussing the computational challenges and potential optimizations for scaling the framework to more demanding settings would strengthen the paper's practical relevance. For instance, how can the computational cost of LLM-based data generation be reduced while maintaining data quality? How can the skill discovery and agent training processes be optimized for larger datasets? Addressing these questions would provide valuable insights for future research and practical applications.
soundness: 3
strengths: Novel Problem: Automating data generation to improve models is a significant challenge with practical applications. This work directly addresses this problem with a novel approach.

Well-Defined Framework: DataEnvGym is presented as a well-defined framework with clear components (trainer, evaluator, data generation policy, data generation engine) and different levels of structure (open-ended, skill-list, skill-tree). This structure makes the problem tractable and facilitates modular development and testing.

Multiple Tasks and Domains: The inclusion of experiments across diverse tasks (mathematics, programming, visual question answering) and with different student models demonstrates the generalizability of the framework.

Promising Results: The initial results showing improved student model performance across tasks and environments are encouraging and suggest the potential of this approach. The analysis of difficulty/rarity and training dynamics adds value.

Open-Source Release: The commitment to publicly releasing the code and leaderboard promotes reproducibility and encourages further research in this area.
summary: This paper introduces DataEnvGym, a novel testbed of teacher environments for developing data generation agents that iteratively improve student models by generating targeted training data. DataEnvGym frames data generation as a sequential decision-making task where an agent, comprising a data generation policy and engine, interacts with an environment that provides feedback from a student model. The agent's goal is to improve student model performance by generating training data based on student feedback (errors or weak skills). DataEnvGym offers multiple instantiations of teacher environments across three levels of structure: open-ended, skill-list, and skill-tree, each with varying levels of scaffolding support. Experiments across text and image-based tasks (mathematics, programming, and visual question answering) demonstrate that example agents within DataEnvGym can iteratively improve student model performance. Furthermore, the authors analyze the impact of state information, environment structure, and skill discovery quality on agent performance and student learning. The paper concludes that DataEnvGym, with its modular design and support for diverse tasks and student models, provides a valuable platform for developing and evaluating data generation agents, engines, and feedback mechanisms for automated model improvement. The code and leaderboard will be publicly released.
weaknesses: Limited Evaluation of Agent Architectures: The focus is primarily on the environment itself, with less emphasis on the architecture and training of the data generation agents. While baseline agents are provided, more sophisticated agent designs (e.g., reinforcement learning agents, agents leveraging larger language models) and their systematic evaluation would significantly strengthen the paper. How do different agent architectures compare in terms of effectiveness and efficiency? Are there specific architectural choices that are particularly well-suited for this task?

Over-Reliance on LLMs for Data Generation: While using LLMs for data generation is a reasonable starting point, it raises concerns about the quality and diversity of the generated data. Exploring alternative data generation methods (e.g., data augmentation techniques, programmatic data generation) and comparing their effectiveness with LLM-based generation would be valuable. How robust is the framework to the quality of the generated data?

Limited Analysis of Skill Discovery Quality: While the paper briefly touches upon the impact of skill discovery quality, a more thorough investigation is needed. How does the quality of the discovered skills affect the performance of the data generation agents and the student models? What are the limitations of the current skill discovery method, and how can it be improved? Quantitative analysis of skill quality (e.g., measuring coherence, coverage, and relevance) would strengthen the paper.

Lack of Comparison with Existing Methods: While related work on knowledge distillation and model weakness discovery is discussed, there's no direct comparison with existing methods for model improvement. How does DataEnvGym compare to techniques like curriculum learning or active learning in terms of effectiveness and efficiency? Including such comparisons would better contextualize the contributions and highlight the advantages of the proposed approach.

Limited Discussion of Scalability: The experiments are conducted with relatively small datasets and models. How does DataEnvGym scale to larger datasets and more complex models? What are the computational challenges associated with training data generation agents in more realistic settings? Addressing these scalability concerns is crucial for practical applications.

Meta-review: The paper frames the problem of automatic data generation (to improve a ML model) as a sequential decision making task, and provides Gym environments as well as LLM-based agents that are effective for them. The resulting datasets are shown to be effective for ML models in math reasoning, coding, and visual question answering domains.

All of the reviewers agreed that the paper is a solid contribution for ICLR. Reviewers praised the novelty and significance of the DataEnvGym, and anticipated follow-up works on data-generation agents.
The authors addressed the weaknesses identified by the reviewers very skillfully during the rebuttal.

Decision: Accept (Spotlight)