Verifiable Environments Are LEGO Bricks: Recursive Composition for Reasoning Generalization
Abstract
Reinforcement Learning (RL) with verifiable environments has emerged as a powerful approach for enhancing the reasoning capabilities of Large Language Models (LLMs). While prior research demonstrates that scaling environment quantity improves RL performance, existing manual or individual construction methods suffer from linear scaling limits, thereby hindering scalable reasoning generalization. This paper introduces RACES (Recursive Automated Composition for Environment Scaling), a framework that conceptualizes verifiable environments as composable building blocks that can be recursively assembled. The key insight is that when the codomain (output type) of one environment matches the domain (input type) of another, they can be automatically fused into a new verifiable environment, enabling recursive composition. RACES is implemented with 300 individual environments and defines a set of composition operators (SEQUENTIAL, PARALLEL, SORT, and SELECT) that induce diverse reasoning patterns. Extensive experiments show that RL training on these composite environments consistently enhances reasoning generalization. Specifically, RACES improves DeepSeek-R1-Distill-Qwen-14B by an average of 3.1 points (from 48.2 to 51.3) and boosts Qwen3-14B performance from 58.8 to 61.1 on six benchmarks, which are unseen during the construction of training environments. Moreover, RACES achieves performance comparable to training on 300 individual environments using only 50 base environments, demonstrating significant efficiency in environment utilization.
1 Introduction
Recent work has explored cost-effective methods for constructing reinforcement learning data with verifiable environments such as code, puzzles, and related tasks (Zeng et al., 2025; Wang et al., 2026), which yield deterministic outputs for given inputs. In this setting, models are required to reason over environment descriptions and inputs to produce correct outputs without relying on external tools (Jiang et al., 2025; Ding et al., 2025).
Prior studies have demonstrated that increasing the number of environments leads to significant performance gains (Zeng et al., 2025), naturally motivating the scaling of environment pools. While several works have pursued limited scaling through automated environment synthesis (Xu et al., 2026a; He et al., 2026a), synthesizing environments individually increases the environment pool only linearly with construction cost. This linear scaling restricts the achievable diversity within a fixed budget and remains inadequate to support optimal reasoning generalization. Instead of generating entirely new environments from scratch, this study explores expanding the environment space by leveraging existing ones. Drawing inspiration from the closure property of transformation composition (Birkhoff and Mac Lane, 2017) and prior research on problem composition (Yuan et al., 2026; Pei et al., 2025; Chen et al., 2024), this work introduces RACES (Recursive Automated Composition for Environment Scaling), a framework that composes existing environments to achieve scaling beyond linear growth.
The central insight of RACES is that when the codomain (output type) of one environment aligns with the domain (input type) of another, they can be fused into a new verifiable environment, enabling recursive composition. As illustrated in Figure 1, akin to LEGO bricks snapping together to form complex structures, verifiable environments can be assembled to create increasingly challenging reasoning tasks†† If environments and each produce deterministic verifiable outputs, then their composition also yields a verifiable output via intermediate results.. To systematically convert these assembled composites into training problems, RACES defines a set of composition operators including SEQUENTIAL, PARALLEL, SORT and SELECT, each specifying how an executable composite is presented to the model and how the response is verified. For instance, SEQUENTIAL presents an assembled chain in execution order and requires the model to compute intermediate outputs, whereas SORT conceals the order and asks the model to recover a valid permutation that achieves a specified target output. By varying the operator choice and composition size, RACES scales to an unbounded space of environments and introduces diverse reasoning patterns, providing a robust basis for reasoning generalization.
To demonstrate the effectiveness of RACES, we construct a pool of 300 environments, implement four representative composition operators, and generate tens of thousands of composite environments for reinforcement learning on Qwen3 (Team, 2025) and DeepSeek-R1-Distill-Qwen (DeepSeek-AI, 2025). Across all model configurations, RACES consistently enhances generalization. For DeepSeek-R1-Distill-Qwen-14B, RACES increases the average score by 3.1 points (51.3 compared to 48.2), with notable improvements on IFEval (+4.0) and LongBench-v2 (+3.5). Similarly, RACES boosts Qwen3-14B performance (61.1 compared to 58.8). Furthermore, RACES enables significantly more efficient environment utilization. Using only 50 base environments, it achieves performance comparable to training on 300 uncompounded environments. Additional analysis demonstrates that the difficulty of composite environments can be systematically modulated by adjusting the composition size, offering greater flexibility for training design. These findings establish RACES as an efficient and controllable approach for scaling verifiable environments and improving reasoning generalization.
2 Related Work
RLVR
Reinforcement learning with verifiable rewards (RLVR) has become a leading approach for improving the reasoning capabilities of large language models (Guo et al., 2025; Shao et al., 2024; Liu et al., 2025). RLVR depends on a substantial volume of verifiable data to provide effective learning signals. However, as model performance rapidly advances, even larger and harder curated datasets (He et al., 2026b) cannot keep up with the growing demand for high-quality training signals (Villalobos et al., 2024). Although several studies aim to improve training algorithms for more efficient use of existing data, these approaches do not directly address the issue of diminishing data effectiveness (Zhu et al., 2025; Yue et al., 2025; Wang et al., 2025). Hence, automatic construction of verifiable training data has received considerable attention in recent years (Zhao et al., 2025; Huang et al., 2026; Liang et al., 2026).
Verifiable Environments
Generating training data via verifiable environments represents a promising direction in automatic data synthesis (Jiang et al., 2025). RLVE (Zeng et al., 2025) introduces hundreds of algorithmically verifiable environments with adaptive difficulty, demonstrating the effectiveness of the verifiable environment approach by surpassing the performance of much larger static datasets. SCALER (Xu et al., 2026a) and RESYN (He et al., 2026a) further leverage LLMs to automatically generate reasoning environments equipped with verifiers, reducing the costs of manual environment construction. Despite these advancements, current approaches scale the environment pool individually and fail to scale the environments towards infinite scale. In contrast, RACES combines a finite set of environments to construct structurally diverse composites, inducing deeper and more varied reasoning patterns and scaling combinatorially with composition size.
Problem Composition
Much research focuses on composing simple problems into more complex ones, thereby generating diverse training signals from limited data (Pan et al., 2025; Zhou et al., 2025; Chen et al., 2024). MathFusion (Pei et al., 2025) introduces strategies for pairwise composition of mathematical problems, emphasizing the critical role of composition method design. H1 (Motwani et al., 2025) composes GSM8K problems into extended dependency chains and applies curriculum reinforcement learning to enhance model capabilities. Composition-RL (Xu et al., 2026b) sequentially integrates multiple verifiable problems to create more challenging tasks. Although these methods show significant potential, they primarily focus on the question level, making it challenging to implement composition and resulting in shallow compositional depth. The full potential of composition remains unrealized (Pei et al., 2025). Unlike these problem-level composition methods, RACES natively supports programmatic, recursive composition of verifiable environments, eliminating the need for hand-crafted adapters between each pair of composed objects.
3 Method
3.1 Preliminary
The fundamental unit of RACES is the verifiable environment. Each verifiable environment is formally defined as a four-tuple:
| (1) |
where the components are defined as follows: (1) Input sampler programmatically yields valid input instances from , providing an unlimited stream of training data for each environment. (2) Output mapper produces a unique output for any valid input. is implemented as code and encodes the core semantics of the verifiable environment. Its domain and codomain jointly define the domain signature , which is the primary criterion for determining whether two environments can be composed. (3) Problem descriptor †† denotes the natural language space. utilizes a sampled input to render the environment to a solvable problem. (4) Programmatic verifier evaluates whether a model’s output matches the reference answer .
This four-tuple characterizes a family of verifiable environments capable of generating an unlimited supply of RL training data and forms the foundation of RACES. Details regarding the construction of initial environments are provided in Appendix D.
3.2 Compositional Closure of Verifiable Environments
RACES leverages the compositional closure property of verifiable environments. Two environments and with domain signatures and are composable if the codomain of the first matches the domain of the second, that is, . Their composition is defined as:
| (2) |
Because both mappers are deterministic, the composite is also deterministic, mapping to . Consequently, the composite maintains the same domain-codomain interface as the initial environment and can be further composed with additional environments. More generally, a domain-compatible sequence induces a composite mapper
| (3) |
with domain signature . If another environment satisfies , the composite can be recursively extended by . This compositional closure enables RACES to expand a finite set of environments into a substantially larger space. In practice, domain matching serves as a proposal mechanism rather than a guarantee of validity. The quality filtering process is detailed in Section 3.3.
3.3 Implementation of Recursive Composition
To operationalize compositional closure, RACES recursively constructs composite environments through a frontier-based search strategy. Given an environment pool, RACES automatically assembles executable composite environments at scale and renders these as model-facing RL instances. The construction process comprises three stages: composition path discovery, quality assurance, and operator instantiation.
Composition path discovery.
Given an initial input and an environment pool , RACES searches over domain-compatible composition paths. All valid continuations form a search tree rooted at : each node is a state value and each outgoing edge an environment whose domain matches that state. A length- path is represented as
| (4) |
yielding the composite mapper defined in Eq. (3). At each frontier state , RACES retrieves all domain-compatible candidates and executes each on . If execution succeeds and the output passes the later quality checks, the extended path
| (5) |
is added to the frontier for further extension. RACES implements the search as a randomized breadth-first traversal, constrained by maximum composition depth, per-execution time limits, and a cap on extensions per frontier state. Each environment is assigned a usage budget, and candidates are sampled with probabilities weighted by remaining budgets to promote balanced utilization of the pool.
Quality assurance.
Domain compatibility is a necessary but insufficient condition for effective composition. Because each is implemented as executable code, a domain-compatible extension may still fail on specific intermediate states due to runtime exceptions, step-limit violations, timeouts, or invalid outputs. RACES therefore applies online executable filtering during composition path discovery, retaining only those extensions that execute successfully and yield well-formed intermediate states. This step ensures that the constructed composites are both domain-compatible and executable, making them suitable for programmatic verification. The complete criteria are provided in Appendix D.
Operator instantiation.
After trajectory discovery and quality assurance, RACES obtains a pool of executable composite environments that are not yet formatted as model-facing training problems. A composition operator transforms a composite environment into a model-facing problem by specifying the presented information, required model predictions, and the verification process. A single composite environment can support multiple operators, resulting in distinct reasoning patterns without redefining the composition. The composition size directly measures task difficulty, as longer paths require the model to track additional intermediate states and mitigate error accumulation. RACES samples operator-specific sizes and applies balanced sampling to prevent the training set from being dominated by a narrow range of path lengths.
3.4 Composition Operators
As shown in Figure 1, RACES implements four representative operators: SEQUENTIAL, PARALLEL, SORT, and SELECT.
SEQUENTIAL
Given and the ordered descriptors , the model predicts all intermediate outputs . The reward rewards the longest correct prefix:
| (6) |
This reward structure captures the causal dependency in chained execution, where an error at any step invalidates all subsequent outputs.
PARALLEL
PARALLEL evaluates the model’s ability to maintain multiple independent computational threads within a shared context. This operator samples independent environment-input pairs and asks the model to solve them jointly within a single context. The reward is computed as the average of individual verifications:
| (7) |
SORT
The model receives , the terminal output , and a shuffled set of environment descriptors, and must output a permutation of . The verifier executes the predicted order from , and the reward is
| (8) |
Non-canonical but correct orderings also receive credit under this reward scheme.
SELECT
SELECT requires the model to identify both the correct subset and the appropriate ordering. The path is augmented with distractors sampled from domain-compatible alternatives encountered during the search process:
| (9) |
where denotes the distractor set. Because the distractors are themselves executable on intermediate states, they are harder than random negatives. Given , , and , the model outputs an ordered sequence of distinct candidates with each . The reward is
| (10) |
4 Experiments
4.1 Experimental Setup
Models.
Main experiments are conducted on two 14B backbones: DeepSeek-R1-Distill-Qwen-14B and Qwen3-14B. To reduce computational cost, analysis experiments are conducted on Qwen3-4B-Instruct-2507. All models are trained using the same pool of 300 verifiable environments described in Section 3.1.
Evaluation
Models are evaluated on six benchmarks: LiveCodeBench (Jain et al., 2025), AIME 2024/2025 (Mathematical Association of America, 2024; Mathematical Association of America, 2025), Enigmata (Chen et al., 2026), IFEval (Zhou et al., 2023), and LongBench-v2 (Bai et al., 2025). These benchmarks encompass code generation, mathematical reasoning, logic reasoning, instruction following, and long-context understanding. None of these benchmarks are used in RACES. Consequently, improvements on these challenging benchmarks indicate genuine reasoning generalization. To mitigate test randomness, each benchmark is evaluated multiple times (32 times for AIME 2024/2025 and 4 times for other benchmarks), and the average score is reported.
Data Construction.
Two configurations sharing the same environment pool are compared: an individual-environment baseline that samples instances directly from the pool, and RACES, which samples a composition operator, a composition size, and domain-compatible environments to form a composite. Composition sizes are uniformly drawn from for SEQUENTIAL and PARALLEL, and for SORT and SELECT. In the analysis experiments, these ranges are reduced to for SEQUENTIAL and PARALLEL, and for SORT. An anonymized subset is available at https://anonymous.4open.science/r/Submission_of_NIPS2026_34776-B7FD.
Training Details.
All RL experiments are implemented with VERL on a 32 × NVIDIA A100 80GB cluster and vLLM for rollout generation. Optimization is performed with GRPO (Shao et al., 2024) using a clip ratio of 0.28 and no KL regularization to a reference policy. For the main experiments, each configuration is trained for 300 steps using 12,800 training instances, a batch size of 128, a learning rate of 2e-6, 8 rollouts per problem, and a maximum sequence length of 32K tokens. For the analysis experiments, Qwen3-4B-Instruct-2507 is trained for 200 steps using 6,400 instances, a batch size of 64, and a maximum sequence length of 16K tokens. Select is excluded from the analysis as it yields near-zero rewards on this smaller backbone.
4.2 Main Results
| Model | LCBench | Enigmata | LBench-V2 | IFEval | AIME | Avg. |
|---|---|---|---|---|---|---|
| DeepSeek-R1-Distill-Qwen-14B as base model | ||||||
| Base | 47.2 | 32.3 | 32.5 | 70.6 | 58.5 | 48.2 |
| 46.9 | 34.2 | 33.7 | 69.3 | 59.8 | 48.8 | |
| 48.8 | 35.4 | 36.0 | 74.6 | 61.7 | 51.3 | |
| Qwen3-14B as base model | ||||||
| Base | 55.0 | 47.4 | 32.5 | 84.5 | 74.8 | 58.8 |
| 56.3 | 48.2 | 34.1 | 85.7 | 76.0 | 60.1 | |
| 57.0 | 49.2 | 35.5 | 86.7 | 77.0 | 61.1 | |
Table 1 presents a comparison between RL on RACES () and RL on individual environments (). and are initialized from the same environment pool and utilize identical RL data scales. Across both model families, RACES consistently demonstrates superior performance. For DeepSeek-R1-Distill-Qwen-14B, increases the average score marginally, from 48.2 to 48.8. In contrast, RACES improves the average score to 51.3, outperforming by 2.5 points. For Qwen3-14B, RACES also surpasses , increasing the average score from 60.1 to 61.1. Performance gains are consistent across all benchmarks for both backbones.
exposes the model to isolated environments, whereas trains the model on composed environments that require chaining transformations, maintaining intermediate states, and inferring valid operation orders or subsets. The consistent advantage of RACES indicates that environmental composition offers a more effective training signal than sampling instances from the original environment pool, resulting in stronger transfer on unseen reasoning benchmarks.
5 Analysis
The main experiments show that RACES improves generalization. Further analysis is conducted to evaluate RACES’s performance. All analysis experiments are conducted on Qwen3-4B-Instruct-2507 to reduce computational cost.
5.1 Performance across Training Process
We first compare the training dynamics of and on Qwen3-4B-Instruct-2507. A natural expectation is that a method that increases reward more rapidly during reinforcement learning will also achieve superior downstream generalization. However, the results indicate that this expectation does not hold. Figure 2(a) compares the training reward and average performance during RL training. improves more rapidly and maintains consistently higher rewards throughout training, suggesting that the model adapts more easily to environments. In contrast, exhibits progressively slower reward growth, reflecting the increased complexity of composite environments.
However, the advantage of in training reward does not result in superior downstream performance. As shown in Figure 2(b), the average score of improves fast at the beginning, and then quickly peaks around 50.5. Conversely, continues to improve throughout the training process. While initially comparable to , it gradually surpasses after the early stages, reaching 51.9 at step 200 compared to 50.4.
These findings differentiate between overfitting to training environments and acquiring transferable reasoning behaviors. Individual environments are shorter and structurally simpler, making them easier to optimize and leading to rapid reward gains. However, this improvement remains largely restricted to the training distribution. Composite environments in RACES require the model to maintain intermediate states, execute multi-step transformations, and, in some cases, infer the latent order of operations. Although these tasks are more challenging and result in slower reward improvement, they offer a richer training signal and produce more sustained gains on downstream benchmarks. This suggests that the primary advantage of RACES is the induction of reasoning patterns that generalize more effectively beyond the training environments.
5.2 Efficiency of Environment Utilization
| Setting | LCB | Enigmata | LBench-V2 | IFEval | AIME | Avg. |
|---|---|---|---|---|---|---|
| Qwen3-4B-Instruct-2507 as base model | ||||||
| BASE | 32.4 | 36.5 | 41.3 | 82.2 | 53.7 | 49.2 |
| (50 envs) | 32.7 | 38.6 | 41.6 | 82.9 | 55.1 | 50.2 |
| (300 envs) | 31.5 | 39.3 | 41.9 | 83.5 | 55.6 | 50.4 |
| (50 envs) | 33.2 | 38.7 | 42.4 | 82.8 | 57.0 | 50.8 |
| (300 envs) | 34.0 | 39.5 | 42.7 | 85.2 | 58.3 | 51.9 |
| DeepSeek-R1-Distill-Qwen-14B as base model | ||||||
| Base | 47.2 | 32.3 | 32.5 | 70.6 | 58.5 | 48.2 |
| (300 envs) | 46.9 | 34.2 | 33.7 | 69.3 | 59.8 | 48.8 |
| (50 envs) | 47.4 | 34.7 | 35.7 | 73.0 | 60.3 | 50.2 |
The results in Figure 2(b) indicate that significantly outperforms when both are provided with the same 300 initial environments. Further analysis examines whether RACES maintains this advantage across varying numbers of environments.
Table 2 compares the performance of Qwen3-4B-Instruct-2507 on 50 and 300 initial environments, denoted as and improves the average score from 49.2 to 50.2 and rises to 50.4 when utilizing all 300 environments. In contrast, achieves 50.8, outperforming with only one-sixth of the base environment pool. further increases to 51.9. The same trend appears on DeepSeek-R1-Distill-Qwen-14B. reaches 50.2, clearly above at 48.8.
This substantial difference demonstrates that RACES enhances the efficiency of environment utilization. An individual environment can provide only instances of a single transformation family. However, once composed, the same environment can appear at different positions, with different neighboring environments, under different operators. Thus, composition converts a fixed environment pool into a much larger and structurally more diverse training distribution. This represents the principal advantage of RACES over linear environment scaling, as it increases the utility of each existing environment rather than relying exclusively on synthesizing additional independent environments.
5.3 Effect of Composition Size
The effect of composition size on training effectiveness is subsequently examined. Composition size is a central control variable in RACES, increasing it does not merely change the amount of generated data but directly changes the structure and difficulty of the resulting composite environments. Larger compositions require the model to maintain more intermediate states, handle longer dependency chains, and tolerate stronger error propagation, thereby increasing the overall reasoning burden.
To isolate this effect, the environment pool is fixed at , and variants with different composition sizes are trained on Qwen3-4B-Instruct-2507. The analysis focuses on the SEQUENTIAL operator, for which composition size has the most direct interpretation, and varies the size from 2 to 6. Figure 3 summarizes both the training dynamics and the final performance under different composition sizes.
The training curves reveal a clear increase in optimization difficulty as composition size grows. As shown in Figure 3(a), the rewards are consistently higher for smaller composition sizes and decrease as the size increases, indicating that deeper compositions are harder for the policy to optimize. A similar trend is observed in Figure 3(b). The average reward variance (affecting advantage directly) tends to be lower for larger composition sizes, suggesting that deeper compositions leave a less informative learning signal for RL.
The effect on downstream performance is shown in Table 3. As the composition size increases from 2 to 5, the average score improves steadily from 50.8 to 51.2. However, when the size is increased further to 6, performance decreases to 50.7. This produces a clear non-monotonic trend. Increasing composition size is beneficial up to a moderate-to-large range, but excessively deep compositions become less effective. Taken together, these results reveal a trade-off between reasoning generalization and trainability. Small composition sizes are easier to optimize, but they provide only limited expansion beyond environments. Increasing the composition size introduces richer multi-step reasoning patterns and improves reasoning generalization. However, once the composition becomes too deep, the difficulty of optimization begins to dominate: rewards decrease, reward variance becomes less informative, and final performance deteriorates. In practice, these results suggest that composition size should be regarded as a controllable curriculum variable rather than a parameter to maximize indiscriminately.
| Size | Performance |
|---|---|
| 2 | 50.8 |
| 3 | 50.7 |
| 4 | 51.0 |
| 5 | 51.2 |
| 6 | 50.7 |
5.4 Pattern Analysis
To complement the aggregate results, qualitative comparisons are made between responses from the base model, , and on identical AIME and Enigmata prompts. Three representative cases are presented in Appendix E.
For AIME. In the grid-coloring problem (Appendix E.1), the base model sets up a valid enumeration but confuses variables when filling the case table and makes a single inconsistent update on an internal edge color. Both errors are local yet propagate to the final count. The model instead introduces a compact function that maps each pair of internal-edge colors to its boundary-assignment count, applies it uniformly, and cross-checks the total via an independent grouping calculation—replacing error-prone table-filling with representation-mediated counting and self-consistency verification.
For Enigmata. In a list-transformation task (Appendix E.2), the base model and both cycle through surface rules (suffix extraction, duplicate-run selection) without rejecting hypotheses that fail earlier examples and even notes a contradiction yet continues with the falsified rule. The model maintains explicit index–value tracking, tests each candidate against all demonstrations, and identifies the correct rule. A related pattern appears on Sum Skyscraper (Appendix E.3), non-RACES models commit to an incomplete row-wise search and reach a spurious “no valid solution.” reframes the search column-by-column, exhausts a smaller space, propagates fixed values through row-uniqueness, and verifies all 16 clues.
These behaviors reflect the RACES training signal. SEQUENTIAL compositions train state carry-over, Parallel compositions train subproblem separation, Sort compositions train order inference, and Select introduces distractor discrimination. The transferable routines, including stable intermediate representations, constraint preservation, hypothesis revision, and final-answer verification, account for the observed performance gains without requiring surface similarity to the training environments.
6 Conclusion
We introduce RACES, a recursive composition framework that enables the modular assembly of verifiable environments. When the codomain of one environment aligns with the domain of another, the two can be composed into a new, verifiable environment that remains composable. Our experiments demonstrate that RACES consistently enhances generalization across diverse model backbones and evaluation benchmarks. Composing only 50 base environments with RACES outperforms direct reinforcement learning applied to 300 initial environments, highlighting the efficiency of RACES in leveraging available environments. Further analysis indicates that the size of the composition serves as a principled control for task difficulty, with moderate composition depths resulting in optimal transfer performance. Together, these results establish RACES as an efficient and controllable method for scaling verifiable environments beyond linear expansion.
References
- LongBench v2: towards deeper understanding and reasoning on realistic long-context multitasks. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), W. Che, J. Nabende, E. Shutova, and M. T. Pilehvar (Eds.), Vienna, Austria, pp. 3639–3664. External Links: Link, Document, ISBN 979-8-89176-251-0 Cited by: §4.1.
- A survey of modern algebra. AK Peters/CRC Press. Cited by: §1.
- Enigmata: scaling logical reasoning in large language models with synthetic verifiable puzzles. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, External Links: Link Cited by: §4.1.
- The SIFo benchmark: investigating the sequential instruction following ability of large language models. In Findings of the Association for Computational Linguistics: EMNLP 2024, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 1691–1706. External Links: Link, Document Cited by: §1, §2.
- DeepSeek-r1: incentivizing reasoning capability in llms via reinforcement learning. External Links: 2501.12948, Link Cited by: §1.
- LongReasonArena: a long reasoning benchmark for large language models. External Links: 2508.19363, Link Cited by: §1.
- DeepSeek-r1 incentivizes reasoning in llms through reinforcement learning. Nature 645 (8081), pp. 633–638. External Links: ISSN 1476-4687, Document, Link Cited by: §2.
- ReSyn: autonomously scaling synthetic environments for reasoning models. External Links: Link Cited by: Appendix B, Appendix D, §1, §2.
- DeepMath-103k: a large-scale, challenging, decontaminated, and verifiable mathematical dataset for advancing reasoning. In The Fourteenth International Conference on Learning Representations, External Links: Link Cited by: §2.
- R-zero: self-evolving reasoning LLM from zero data. In The Fourteenth International Conference on Learning Representations, External Links: Link Cited by: §2.
- LiveCodeBench: holistic and contamination free evaluation of large language models for code. In The Thirteenth International Conference on Learning Representations, External Links: Link Cited by: §4.1.
- LogicPro: improving complex logical reasoning via program-guided learning. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), W. Che, J. Nabende, E. Shutova, and M. T. Pilehvar (Eds.), Vienna, Austria, pp. 26200–26218. External Links: Link, Document, ISBN 979-8-89176-251-0 Cited by: §1, §2.
- Beyond pass@ 1: self-play with variational problem synthesis sustains RLVR. In The Fourteenth International Conference on Learning Representations, External Links: Link Cited by: §2.
- Understanding r1-zero-like training: a critical perspective. In Second Conference on Language Modeling, External Links: Link Cited by: §2.
- 2024 american invitational mathematics examination. Note: Competition administered on February 1, 2024 External Links: Link Cited by: §4.1.
- 2025 american invitational mathematics examination. Note: Competition administered on February 6, 2025 External Links: Link Cited by: §4.1.
- H1: bootstrapping llms to reason over longer horizons via reinforcement learning. External Links: 2510.07312, Link Cited by: §2.
- REST: stress testing large reasoning models by asking multiple problems at once. External Links: 2507.10541, Link Cited by: §2.
- MathFusion: enhancing mathematical problem-solving of LLM through instruction fusion. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), W. Che, J. Nabende, E. Shutova, and M. T. Pilehvar (Eds.), Vienna, Austria, pp. 7400–7420. External Links: Link, Document, ISBN 979-8-89176-251-0 Cited by: §1, §2.
- DeepSeekMath: pushing the limits of mathematical reasoning in open language models. External Links: 2402.03300, Link Cited by: §2, §4.1.
- Qwen3 technical report. External Links: 2505.09388, Link Cited by: §1.
- Position: will we run out of data? limits of LLM scaling based on human-generated data. In Forty-first International Conference on Machine Learning, External Links: Link Cited by: §2.
- RLAnything: forge environment, policy, and reward model in completely dynamic rl system. External Links: 2602.02488, Link Cited by: §1.
- Reinforcement learning for reasoning in large language models with one training example. arXiv preprint arXiv:2504.20571. Cited by: §2.
- LeetCodeDataset: a temporal dataset for robust evaluation and efficient training of code llms. External Links: 2504.14655, Link Cited by: Appendix D.
- SCALER:synthetic scalable adaptive learning environment for reasoning. External Links: 2601.04809, Link Cited by: Appendix B, Appendix D, §1, §2.
- Composition-rl: compose your verifiable prompts for reinforcement learning of large language models. External Links: 2602.12036, Link Cited by: §2.
- From f(x) and g(x) to f(g(x)): LLMs learn new skills in RL by composing old ones. In The Fourteenth International Conference on Learning Representations, External Links: Link Cited by: §1.
- VAPO: efficient and reliable reinforcement learning for advanced reasoning tasks. External Links: 2504.05118, Link Cited by: §2.
- RLVE: scaling up reinforcement learning for language models with adaptive verifiable environments. External Links: 2511.07317, Link Cited by: §1, §1, §2.
- Absolute zero: reinforced self-play reasoning with zero data. External Links: 2505.03335, Link Cited by: §2.
- Instruction-following evaluation for large language models. arXiv preprint arXiv:2311.07911. Cited by: §4.1.
- GSM-$\infty$: how do your LLMs behave over infinitely increasing reasoning complexity and context length?. In Forty-second International Conference on Machine Learning, External Links: Link Cited by: §2.
- The surprising effectiveness of negative reinforcement in LLM reasoning. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, External Links: Link Cited by: §2.
Appendix A Limitations
Several limitations of the present work are acknowledged. First, the four composition operators address representative patterns but do not fully capture the entire design space. More complex structures, such as conditional branching and bounded loops, remain unexplored. Second, the effectiveness of RACES relies on the underlying model demonstrating adequate reasoning competence. Models with limited capabilities typically yield sparse rewards on composite tasks. Finally, composite environments generate extended reasoning traces, which require a sufficiently large context window (32K in these experiments) to enable effective training. These limitations present opportunities for future research rather than imposing fundamental constraints on the framework.
Appendix B Declaration of LLM Usage
Methodological use.
Following the SCALER [Xu et al., 2026a] and RESYN [He et al., 2026a] synthesis paradigms, Claude-Sonnet-4.5 generates candidate verifiable environments, which subsequently pass through our two-stage filtering (static code self-consistency followed by multi-sample output consistency) before entering the initial environment pool.
Writing assistance.
LLMs were used exclusively for limited writing assistance, specifically for grammar checking and minor sentence-level refinement.
Appendix C Broader Impacts
Positive impacts.
RACES advances automatic verifiable RL data construction, reducing reliance on human annotation. By transforming a small pool of environments into a structurally diverse and effectively unbounded space of composite tasks, RACES increases the accessibility of verifiable RL for research groups lacking industrial-scale annotation resources.
Potential negative impacts.
As with most foundational work on improving LLM capabilities, the techniques that enhance reasoning may also be misapplied. Specifically, the methodology could be adapted to synthesize verifiable training data for malicious purposes, and the energy consumption associated with large-scale RL training may contribute to environmental impact. Since model checkpoints are not released, the most direct vector of misuse is absent in this work. The remaining artifacts serve as general-purpose research infrastructure rather than capability-amplifying weights. The 300 environments do not contain content related to poison or dangerous material.
Appendix D Initial environments construction.
RACES constructs an initial pool of 300 environments, sourced from three categories: (1) standardized algorithmic problem datasets [Xia et al., 2025]†† 45 of the 300 environments are derived from algorithms.; (2) environments automatically generated by Claude-Sonnet-4.5, following the synthesis paradigms of SCALER [Xu et al., 2026a] and RESYN [He et al., 2026a]; and (3) manually authored environments. Each environment undergoes a quality assurance review. For each, 20 inputs are sampled from , and Claude-Sonnet-4.5 is tasked with solving multiple times, requiring a -judged pass rate exceeding 95
This section outlines the filtering criteria applied to each candidate extension during composition-path discovery.
Executability.
Each candidate is executed on the current state within a sandboxed process and is discarded if it raises an exception, exceeds a 2-second wall-clock timeout, or returns no output. Extensions requiring more than 400 atomic steps are also rejected, as this is considered beyond the reasonable effort of a human solver.
Non-degeneracy.
Let denote the resulting output and its string representation. An extension is discarded if (i) repeats an earlier state in the same path or duplicates a sibling output at the same frontier, (ii) equals or , or is an integer greater than , (iii) has a length exceeding , or (iv) consists of a single repeated character.
After path discovery, paths with a length less than two are discarded, as single-step paths reduce to environments.
Appendix E Case Studies for Pattern Analysis
This appendix presents the prompts and key response excerpts for the three cases referenced in Section 5.4. The excerpts focus on the decision points where the three models diverge; complete responses are released in the supplementary materials. We label the models as Base, , and for consistency with the main text.
E.1 AIME: Grid-Coloring
Pattern illustrated. A shift from ad-hoc enumeration toward representation-mediated counting: introduces a reusable function abstraction that decouples argument tracking from arithmetic and verifies the final sum in two independent ways.
E.2 Enigmata: List-Transformation Rule Induction
Pattern illustrated. Hypothesis verification against all demonstrations, combined with explicit index–value tracking. systematically rules out candidate rules that fail on earlier examples, where Base and repeatedly propose rules contradicted by their own observations.
E.3 Enigmata: Sum Skyscraper Logic Puzzle
Pattern illustrated. Stateful constraint propagation with deliberate decomposition. switches the search axis (rows columns) so that the smaller search space is exhausted first, then propagates the resulting fixed values to constrain the remaining cells; both Base and commit to an incomplete row-wise search and incorrectly conclude that no solution exists.