Envs-FORGE: Frontier-Optimized Reward-Grounded Environment Synthesis for Agent RL
Organizations: IDEA Research · The Hong Kong University of Science and Technology (Guangzhou) · DataArcTech Ltd.
Abstract
Reinforcement learning (RL) for terminal agents needs executable training environments with reliable rewards and useful difficulty. Fixed recipes such as few-shot, Self-Instruct, and Evol-Instruct apply the same prompting policy to every seed, even when the current policy would benefit from a harder, easier, or simply different task. We present Envs-FORGE, a prompting policy that converts verifier rewards into per-seed environment-synthesis actions. Envs-FORGE estimates seed pass rates, scores six projection--direction actions around a target learning frontier, and solves a per-seed mixed-integer linear program (MILP) to choose the action that conditions generation. The selected action drives synchronized rewriting of the instruction, fixtures, oracle solution, tests, and Docker environment; only gold-verified bundles enter RL training. The indexed MILP form also supports optional soft skill coverage for portfolio planning. On Qwen 3.5 35B, Envs-FORGE improves Pass@1 over Base by 9.2 percentage points on tb-core (40.0% to 49.2%) and 6.4 points on tb-2.0 (23.0% to 29.4%), exceeding the strongest fixed-recipe baseline by 2.4 and 2.1 points. It reaches 77.1% on SWE-bench Verified versus 73.4% for Base, and improves tb-core by 6.8--9.2 points across the evaluated 4B--35B models. All synthesis methods export 100 verified environments and use 2.27M--2.88M synthesis tokens, placing the comparison at the same downstream training-set size and the same operational scale. The source code is available at https://github.com/DataArcTech/DataArc-SynData-Toolkit/.
Figures & tables
| Training data / model | Method | Records | Accepted | Task dirs | Attempt sum | Prompt tokens | Final completion tokens | Total synthesis tokens | tb-core Pass@1 | tb-2.0 Pass@1 |
|---|---|---|---|---|---|---|---|---|---|---|
| Base | – | – | – | – | – | – | – | – | 40.0% | 23.0% |
| few-shot | few_shot | 121 | 100 | 210 | 226 | 1,835,473 | 607,592 | 2,443,065 | 43.2% | 24.1% |
| Self-Instruct | self_instruct | 113 | 100 | 194 | 190 | 1,745,028 | 527,247 | 2,272,275 | 45.6% | 27.3% |
| Evol-Instruct | evol_instruct_in_depth + evol_instruct_in_breadth | 112 | 100 | 195 | 207 | 1,974,723 | 543,023 | 2,517,746 | 46.8% | 25.6% |
| Envs-FORGE | MILP | 120 | 100 | 203 | 291 | 1,862,146 | 618,910 | 2,881,056 | 49.2% | 29.4% |
| Benchmark | Base | few-shot | Self-Inst. | Evol-Inst. | FORGE |
|---|---|---|---|---|---|
| tb-core | 40.0% | 43.2% | 45.6% | 46.8% | 49.2% |
| tb-2.0 | 23.0% | 24.1% | 27.3% | 25.6% | 29.4% |
| SWE-bench Verified | 73.4% | 74.6% | 75.2% | 75.8% | 77.1% |
| Training data | Attempts / accepted | Tokens / accepted | Tokens / attempt |
|---|---|---|---|
| few-shot | 2.26 | 24,431 | 10,810 |
| Self-Instruct | 1.90 | 22,723 | 11,959 |
| Evol-Instruct | 2.07 | 25,177 | 12,163 |
| Envs-FORGE | 2.91 | 28,811 | 9,901 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Projection | Agent-relative regime | Permitted movement | Invariants |
|---|---|---|---|
| increase | Seed is too easy | Add one or two constraints, edge cases, larger fixtures, or stricter deterministic outputs. | Preserve the core skill subgraph; update the solution and tests to cover every added requirement. |
| reduce | Seed is too hard | Remove secondary systems or replace brittle infrastructure with a smaller bridge task. | Preserve the target skill path and its essential artifacts; simplification must not collapse the task into an unrelated problem. |
| diversify | Seed is near the frontier | Change fixtures, neighboring requirements, or scenario while keeping similar difficulty. | Avoid unrelated breadth jumps; synchronize expected outputs and verifier logic with the new fixture. |
| Category | Skill nodes |
|---|---|
| Domain | system_admin , data_processing , testing , security , ml_ops , game_reasoning |
| Tool | bash , python , systemd , docker , sql , node |
| Artifact | logs , csv , json , jsonl , source_code , config |
| Operation | merge , parse , repair , configure , generate_tests , rank , validate |
| Constraint | concurrency , scheduling , atomicity |
| FORGE-added nodes | edge_cases , structured_output , deterministic_sorting , alternate_fixture , neighboring_constraint , file_level_simulation , deterministic_fixture |
| Symbol | Meaning | Symbol | Meaning |
|---|---|---|---|
| Seed environment bundle | Current policy pass-rate estimate on seed | ||
| Projection and evolution direction | Predicted pass rate after applying | ||
| Frontier utility of a candidate | Binary candidate-selection variable | ||
| Required skill nodes | Optional addable or removable skill nodes | ||
| Binary activation of skill node | Continuous shortfall for target coverage ; capped by in reported experiments | ||
| Selected seed–action count in indexed portfolio form; one per local task | Constant action mask for restricted baseline |
RL for LLM Agents
Reinforcement learning for large language model agents trains models to plan, use tools, and adapt through feedback from interactive tasks.
See all 608 papers