Feed 0% source
AI/ML AI-generated

Verifiable Environments Are LEGO Bricks: Recursive Composition for Reasoning Generalization

Generated by a local model (nvidia/Gemma-4-26B-A4B-NVFP4) from a scientific paper, claim-checked against the full text. Provenance is open by design.

Researchers report that a model can achieve the performance of 300 individual environments using only 50 base environments. This efficiency gain comes from a new framework called RACES. It turns simple logic tasks into complex ones by snapping them together like LEGO bricks. By training AI models on these combined tasks, the models learn better reasoning skills. These skills work even on problems they have never seen before.

In current Reinforcement Learning (RL) for Large Language Models (LLMs), we rely on "verifiable environments." These are tasks like code execution or math puzzles. They use a programmatic verifier to provide a deterministic ${0, 1}$ reward (a clear pass or fail signal). The prevailing wisdom is that to improve reasoning, you simply need more of these environments. However, current methods scale the number of environments linearly. If you want ten times the variety, you pay ten times the construction cost. This creates a bottleneck. The diversity of the training signal cannot keep pace with growing model capabilities.

The linear scaling trap

The status quo in RL with verifiable rewards (RLVR) involves curating massive pools of individual tasks. Whether these are hand-authored or synthesized via LLMs, the growth of the pool is tied to the cost of creating each unique task. Existing research attempts to automate this synthesis. However, these methods still treat environments as discrete, standalone units.

This approach hits a ceiling. As models advance, they exhaust the complexity offered by simple, isolated tasks. To drive genuine reasoning generalization (the ability to solve unseen, complex problems), we need more than just a larger pile of simple bricks. We need more complex structures. Relying on individual environment scaling is like trying to teach a model to build a skyscraper by showing it millions of pictures of single bricks.

Recursive assembly via RACES

The authors propose RACES (Recursive Automated Composition for Environment Scaling). This framework moves from linear scaling to combinatorial scaling. The core mechanism relies on the "compositional closure" of verifiable environments. If environment $A$ produces an output of type $Y$, and environment $B$ accepts an input of type $Y$, they can be fused. This creates a single composite environment $B \circ A$.

As shown in, RACES standardizes environments into a four-tuple.

Figure 1
Figure 1: Overview of the RACES framework. 1) RACES standardizes the format of a verifiable environment, which consists of four components. 2) Following the standard interface, RACES constructs a pool of verifiable environments. 3) RACES can snap environments together like Lego bricks if the codomain of one matches the domain of another. 4) RACES implements four composition operators, resulting in diverse composite patterns and reasoning requests.

This includes an input sampler, an output mapper (the core logic), a problem descriptor, and a programmatic verifier. The framework uses a frontier-based search strategy to find valid composition paths. It starts with an initial input and traverses a tree of compatible environments. It ensures each step is type-compatible and executable (meaning it does not crash or time out).

Once a path is discovered, RACES applies one of four composition operators. These turn the raw execution chain into a model-facing reasoning problem: 1. SEQUENTIAL: The model must predict all intermediate outputs in a chain. 2. PARALLEL: The model solves multiple independent environments within one context. 3. SORT: The model is given a shuffled set of environments. It must determine the correct execution order to reach a target output. 4. SELECT: The model must pick the correct subset and order them. It often faces "distractor" environments that are valid for other intermediate states.

Efficiency through combinatorial density

The primary engineering takeaway is that RACES is more sample-efficient than traditional scaling. The authors report that RACES achieves performance comparable to training on 300 individual environments while using only 50 base environments. This suggests that the utility of each environment is multiplied. An environment can appear in various positions, orders, and combinations within a composite task.

The performance results are substantial. For the DeepSeek-R1-Distill-Qwen-14B model, RLRACES improved the average score by 3.1 points (from 48.2 to 51.3) across six benchmarks. Similarly, Qwen3-14B saw a boost from 58.8 to 61.1. Crucially, these improvements were measured on benchmarks entirely unseen during training. This is the gold standard for proving reasoning generalization.

An interesting nuance appears in the training dynamics in .

Figure 2
Figure 2: Training dynamics on Qwen3-4B-Instruct-2507. (a) Smoothed training reward over 200 RL steps. (b) Average performance.

The "RLindividual" baseline shows faster reward growth and higher immediate training rewards. However, it plateaus early. RLRACES shows slower reward growth because composite tasks are harder to optimize. Yet, it continues to improve. It eventually surpasses the baseline in downstream performance.

Complexity vs. Trainability

The framework is not a "more is always better" tool. The authors tested different composition sizes (the number of environments in a chain). They found a non-monotonic relationship. As seen in, increasing the size from 2 to 5 generally improves generalization.

Figure 3
Figure 3: Effect of composition size. (a) rewards during training. (b) Average reward variance, the mean of every problem's rollout reward std.

However, pushing the size to 6 causes performance to drop.

There are three specific caveats for practitioners: * Optimization Difficulty: Deeper compositions lead to lower average rewards and lower reward variance during training . This makes the learning signal less informative for the model. * Context Window Requirements: Composite environments generate long, multi-step reasoning traces. They require significant context windows. The experiments used 32K tokens. If your target model has a small window, the reasoning might be cut off. * Sparse Rewards in Weak Models: RACES depends on the base model having enough initial competence. If the model is too weak, it will mostly receive zero rewards. This stalls the RL process.

The verdict

RACES is a practical approach for those hitting the "data wall" in RLVR. Instead of spending massive compute on synthesizing brand-new environments, you can extract more signal from existing ones. You can treat them as modular components. Moving from linear to combinatorial scaling is a fundamental shift in environment design.

If you are building reasoning models, do not just collect more tasks. Start building a library of composable primitives. The framework is documented. Code is reportedly available; see the paper for the canonical link. If you have a small, high-quality pool of verifiable environments, this is a low-cost way to increase training complexity.

Novelty
0.0/10
Overall
0.0/10
#reinforcement learning#reasoning#large language models#environment composition
How this was made
Generation

Model: nvidia/Gemma-4-26B-A4B-NVFP4
Persona: habr_engineer
Template: engineering_deepdive
Refinement: 0
Pipeline: forge-1.1

Verification

Evaluator: nvidia/Gemma-4-26B-A4B-NVFP4
Score: 95% (passed)
Claims verified: 15 / 15

Translation

Model: nvidia/Gemma-4-26B-A4B-NVFP4

Hardware & cost

NVIDIA GB10 · 128 GB unified · NVFP4 · 100% local · $0 cloud
Tokens: 94,986
Wall-time: 321.3s
Tokens/s: 295.6

Related
Next up

iVGR: Internalizing Visual Grounding into Textual Reasoning via Reinforcement...

8.7/10· 5 min