Learning to Build the Environment: Self-Evolving Reasoning RL via Verifiable Environment Synthesis

Yucheng Shi, Zhenwen Liang, Kishan Panaganti, Dian Yu, Wenhao Yu, Haitao MiarXiv 2026

TL;DR

Instead of generating static synthetic data to train itself, a language model can learn to build its own executable training environments (Python code that samples tasks, computes references, and scores responses). By leveraging the structural asymmetry between how easy it is to code a verifier versus solving the problem in natural language, this method (EvoEnv) prevents reinforcement learning from saturating and drives continuous self-improvement even in state-of-the-art reasoning models.

What Problem Does This Paper Address?

Reinforcement Learning with Verifiable Rewards (RLVR) has become a cornerstone for training LLM reasoning capabilities (e.g., DeepSeek-R1). However, standard RLVR recipes rely on fixed datasets and static verifiers. As the model improves, it quickly saturates these static pools: it either solves almost every prompt or repeatedly fails the same impossible ones, causing the reward signal to lose its variance and effectiveness.

While some methods use the model to generate new problems on the fly, relying on the model's own answers as pseudo-labels often leads to "policy-coupled" rewards, where the model simply games its own flawed beliefs. The authors ask: Can a language model learn to construct its own verifiable training environments rather than just individual problems?

Methods

The authors introduce EvoEnv, a framework where a single policy alternates between two roles:

  1. Generator Role: Proposes new Python-based environments (subclasses of a VerifiableEnvironment interface) starting from a tiny pool of seeds.
  2. Solver Role: Solves fresh problem instances sampled from the newly accepted environments.
Overview of the EvoEnv workflow, showing the dual-role single policy model and the environment validation pipeline.

The core engine driving this loop is stable solve–verify asymmetry. For many tasks, writing a compact oracle program is trivial, but executing that same logic in natural language is hard (e.g., writing a graph traversal algorithm vs. manually tracing a graph in text).

To ensure the generated environments are robust and helpful, candidate code must pass through a strict multi-layer admission gate:

  • L1–L5 Mechanical Validation: Checks for valid syntax, execution determinism, non-triviality across seeds, and resistance to malformed answers.
  • Semantic Self-Review: The model acts as a code reviewer (using an any-reject rule across 3 independent samples) to ensure the code matches the natural language prompt description.
  • Difficulty Calibration: EvoEnv targets an environment pass rate of $a^* = 0.3$. If an environment is too easy (100% success) or too hard (0% success) for the current solver, it is rejected.
  • Novelty Gating: Uses code and prompt embeddings to prevent the generator from spamming minor variations of the same template.

Datasets

EvoEnv requires zero external problem-answer training data. It initializes from just 10 seed environments covering basic algorithmic concepts like sorting, dynamic programming, graph connectivity, and number theory.

To evaluate generalizability, the model is tested across eight diverse external benchmarks:

  • Competition Math: AIME 2024, AIME 2025, AMC 2023, HMMT Feb 2025, Beyond-AIME, and Brumo 2025.
  • Graduate-Level Reasoning: GPQA Diamond.
  • Coding: LiveCodeBench (LCB) v6 (2024-08 to 2025-05).

Key Insights and Ideas

  • The "Compile-Once, Solve-Many" Advantage: Generating an environment yields an unbounded stream of calibrated, unique problem instances from a single piece of verified code, making it far more sample-efficient than generating one-off problems.
  • A Dropping Training Score is a Good Sign: In traditional RL, a declining training curve indicates degradation. In EvoEnv, the training score decreases because the generator actively synthesizes harder environments to match the solver's growing capabilities, maintaining a healthy "frontier signal."
  • Template Breadth Drives OOD Transfer: Ablation studies showed that removing the diversity/novelty reward severely hurt performance on external benchmarks like GPQA and LiveCodeBench. Breadth in environment design is what prevents the model from merely memorizing synthetic templates.

Key Results

EvoEnv consistently outperformed strong baselines across three distinct model families. Most notably, it shines in the "already-strong" model regime where static data methods begin to fail.

Main evaluation results across three base models and eight benchmarks.
  • Qwen3-4B-Thinking: On this highly optimized checkpoint, standard public-data RLVR (DAPO) and fixed hand-crafted environment RLVR (RLVE) actually decreased the average score (dropping to 64.8 and 69.2, respectively). EvoEnv was the only method that improved it, pushing the average from 72.4 to 74.8.
  • Out-of-Distribution Transfer: Despite training only on its self-generated math/algorithmic environments, Qwen3-4B-Thinking saw its GPQA Diamond score jump from 65.2 to 70.2 and its LiveCodeBench score rise from 59.0 to 63.2.

Limitations and Future Work

  • Scope of Interface: The current framework is restricted to deterministic Python environments. It is well-suited for math, logic, and algorithms, but cannot yet handle open-ended judgment, human preference modeling, or long-horizon physical simulations.
  • Code Safety: Executing model-generated code inherently carries risks. While the authors utilized sandboxed subprocesses with restricted imports and resource limits, expanding this to richer web or file-system environments will demand significantly more stringent isolation and monitoring protocols.

Summary updated

BibTeX
@misc{shi2026learning,
  author = {Yucheng Shi and Zhenwen Liang and Kishan Panaganti and Dian Yu and Wenhao Yu and Haitao Mi},
  title = {{Learning to Build the Environment: Self-Evolving Reasoning RL via Verifiable Environment Synthesis}},
  year = {2026},
  eprint = {2605.14392},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.14392},
}
Figure