Composition-RL: Compose Your Verifiable Prompts for Reinforcement Learning of Large Language Models

TL;DR

Proposes Composition-RL, automatically combining prompts to improve reasoning, achieving up to 21.4% pass@1 gains on 30B models.

cs.CL 🔴 Advanced 2026-02-12 43 views
Xin Xu Clive Bai Kai Yang Tianhao Chen Yangkun Chen Weijie Liu Hao Chen Yang Wang Saiyong Yang Can Yang
Reinforcement Learning Large Language Models Prompt Engineering Compositional Methods Reasoning Enhancement

Key Findings

Methodology

This paper introduces the Composition-RL framework, which leverages automatic prompt composition via the Compose operator, recursively building multi-layer prompts (Depth K). It integrates algorithms like GRPO for policy optimization, maximizing verifiable rewards. The approach involves constructing complex prompts by extracting key values and relations from existing questions, then training models with RL to improve reasoning. A curriculum strategy gradually increases composition depth, enhancing generalization. Extensive experiments on models from 4B to 30B demonstrate consistent performance improvements, especially in multi-task and cross-domain settings.

Key Results

  • Across multiple math and reasoning benchmarks, Composition-RL improved pass@1 accuracy by up to 21.4%, with overall gains of 10.5% on 30B models. Increasing composition depth from 1 to 3 yielded continuous performance boosts, validating the curriculum approach. Cross-domain experiments combining physics and math prompts showed an average improvement of 0.8%. The method also mitigates the issue of overly easy prompts dominating training, leading to richer reasoning capabilities.

Significance

This work addresses the critical bottleneck of limited high-quality prompts in large-scale RL training, offering a scalable way to generate complex, verifiable prompts from existing data. It significantly enhances the reasoning and generalization abilities of LLMs, with broad implications for multi-task learning, educational AI, and industrial applications. The approach reduces data collection costs and improves model robustness across diverse tasks, pushing forward the frontier of AI reasoning capabilities.

Technical Contribution

Key innovations include the Compose operator for prompt combination, recursive multi-layer prompt construction (Depth K), and the integration of curriculum strategies for progressive complexity. The method extends RL algorithms like GRPO to compositional prompts, providing theoretical guarantees for generalization. It differs from prior single-prompt or hard-example prioritization methods by systematically increasing prompt complexity, enabling models to learn deeper reasoning patterns with fewer data. The framework also supports cross-domain prompt composition, broadening applicability.

Novelty

This is the first systematic attempt to utilize automatic prompt composition to enhance reasoning in large models within an RL framework. Unlike previous works focusing on hard or individual prompts, this approach emphasizes combining multiple simpler prompts into complex, verifiable questions, thus significantly expanding training data diversity and complexity. The recursive composition and curriculum strategies are novel contributions that set this work apart.

Limitations

  • The method relies on pre-existing prompt datasets; in extremely complex tasks, the composition may not fully capture the necessary reasoning depth. Increasing composition depth incurs higher computational costs and may lead to diminishing returns. Cross-domain composition, while promising, still faces challenges in balancing relevance and complexity, requiring further optimization.

Future Work

Future directions include developing adaptive composition algorithms that dynamically adjust complexity based on model performance, extending to multimodal prompts, and exploring unsupervised prompt generation. Further research is needed to optimize the balance between composition depth and training efficiency, as well as theoretical analysis of generalization bounds in compositional RL settings.

AI Executive Summary

Large language models (LLMs) have revolutionized natural language understanding, but their reasoning capabilities remain limited by the quality and quantity of training prompts. Traditional reinforcement learning with verifiable rewards (RLVR) relies heavily on curated prompts, which are costly to produce and often contain many simple or uninformative examples. As training progresses, the proportion of overly easy prompts (pass@1=1) increases, reducing the effective training signal. To address this, the authors propose Composition-RL, a novel framework that automatically combines multiple prompts into more complex, verifiable questions. This approach leverages an operator called Compose, which extracts key values and relations from existing prompts and recursively constructs multi-layer prompts (Depth K). By integrating a curriculum strategy that gradually increases the compositional depth during training, the model learns to handle increasingly complex reasoning tasks. Extensive experiments across models from 4B to 30B demonstrate that Composition-RL consistently outperforms baseline RL methods, with improvements up to 21.4% in pass@1 accuracy on challenging benchmarks like AIME24 and IMOBench. The method also shows strong cross-domain performance when combining physics and math prompts, indicating its versatility. These results highlight the potential of compositional prompt generation to significantly enhance the reasoning and generalization capabilities of large models, reducing data collection costs and enabling more scalable training paradigms. Despite its success, the approach faces challenges such as computational overhead with deeper compositions and the need for better cross-domain relevance. Future work will focus on adaptive composition strategies, multimodal prompts, and theoretical analysis of generalization bounds, aiming to further push the boundaries of AI reasoning.

Deep Analysis

Background

The evolution of large-scale pretraining models like GPT-3 and BERT has underscored the importance of prompt engineering in enhancing reasoning capabilities. Reinforcement learning with verifiable rewards (RLVR) has been instrumental in guiding models to improve complex reasoning, exemplified by Chain of Thought prompting and RLHF techniques. However, the high cost of curating high-quality prompts and the increasing prevalence of overly simple prompts (pass@1=1) during training limit further progress. Researchers have explored methods such as advantage shaping and hard prompt prioritization, but these approaches do not fully address the challenge of prompt diversity and complexity. Recent efforts focus on prompt augmentation and composition, aiming to generate richer training signals from existing datasets, which is crucial for scaling reasoning abilities in large models.

Core Problem

The core issue lies in the diminishing effective training data as models become stronger, with the proportion of 'solve all' prompts rising sharply, reducing the informativeness of training signals. Collecting new high-quality prompts is expensive, and the existing data often contains many uninformative or overly easy examples. This bottleneck hampers the model’s ability to learn deeper reasoning patterns and generalize across tasks and domains. Additionally, current methods lack systematic mechanisms to generate complex prompts that can challenge models without incurring prohibitive costs, limiting the scalability of reasoning improvements.

Innovation

The paper introduces three main innovations: 1) the Compose operator, which automatically combines multiple prompts into a single, more complex prompt by extracting key values and relations; 2) recursive multi-layer prompt construction (Depth K), enabling the gradual increase of reasoning complexity; 3) a curriculum training strategy that progressively raises the composition depth, fostering better learning of complex reasoning patterns. These innovations differ from prior approaches by systematically expanding prompt complexity through automation and recursion, rather than relying solely on manual prompt design or hard examples. The framework supports cross-task and cross-domain composition, broadening its applicability.

Methodology

  • �� Develop the Compose operator to merge two prompts by extracting answer values and defining relations, creating a new, more challenging prompt.
  • �� Extend Compose recursively to build multi-layer prompts (Depth K), increasing reasoning complexity.
  • �� Use RL algorithms like GRPO to optimize policy on these compositional prompts, maximizing verifiable rewards.
  • �� Implement a curriculum strategy, starting training with simple prompts (Depth 1) and gradually increasing to Depth 3, allowing models to adapt progressively.
  • �� Incorporate cross-domain prompts (e.g., physics and math) to enhance multi-task generalization.
  • �� Sample prompts from datasets such as MATH12K and other benchmarks, ensuring diversity and relevance.
  • �� Evaluate performance using pass@1 accuracy across multiple benchmarks, including AIME24, IMOBench, and MMLU-Pro.

Experiments

The experimental setup involves training models of sizes 4B, 8B, 14B, and 30B on datasets like MATH12K, with comparison between original RL and Composition-RL. The key metrics include pass@1 accuracy, evaluated on in-domain and out-of-domain benchmarks. The experiments test various composition depths, curriculum strategies, and cross-domain prompts. Hyperparameters such as batch size, learning rate, and rollout settings are kept consistent. Ablation studies analyze the impact of composition depth and prompt diversity. Results confirm that Composition-RL outperforms baseline methods, with significant gains in challenging mathematical and reasoning tasks.

Results

Composition-RL consistently improves performance across models, with the largest gains (up to 21.4%) on difficult benchmarks like AIME24. Increasing composition depth from 1 to 3 yields further performance boosts, validating the curriculum approach. Cross-domain experiments combining physics and math prompts show an average accuracy increase of 0.8%, demonstrating versatility. The method effectively reduces the prevalence of overly easy prompts, leading to richer training signals and better reasoning depth. Larger models benefit more, with improvements scaling with model size, indicating strong potential for scaling reasoning capabilities.

Applications

This approach is applicable in educational AI, scientific research, and industrial automation where complex reasoning is required. It enables automatic generation of challenging prompts from existing datasets, reducing manual effort and costs. The method can be integrated into multi-task learning pipelines, enhancing model robustness and transferability across domains. Future deployment could include intelligent tutoring systems, scientific problem solvers, and AI assistants capable of handling multi-step reasoning tasks efficiently.

Limitations & Outlook

The approach depends on the quality of existing datasets; in highly complex or novel domains, prompt composition may not fully capture necessary reasoning patterns. Increasing composition depth raises computational costs and may lead to diminishing returns. Cross-domain relevance remains a challenge, requiring further refinement of composition strategies. Additionally, the method’s effectiveness in real-world, noisy data scenarios needs further validation, and scalability to extremely large models may encounter resource constraints.

Plain Language Accessible to non-experts

想象你在厨房做菜,手边有很多不同的食材和调料。以前,你只用一种食材做菜,味道很单调。现在,你学会了把不同的食材组合在一起,做出更丰富、更复杂的菜肴。这个过程就像把简单的问题组合成一个难题,让模型变得更聪明。通过不断尝试不同的组合,你的厨艺变得更厉害,能做出各种新菜。同样,模型也可以通过组合提示,学会解决更复杂的问题,就像成为了大厨一样。

ELI14 Explained like you're 14

想象你在学校里学数学,老师给你一些简单的题目。有时候题太简单,你很快就做完了,但觉得没挑战。于是,老师让你把两个题目结合起来,变成一个更难的题,比如先算一个,然后用答案去解另一个。这样一来,你得用更多的思考,变得更聪明。这个方法就像把两个简单的任务合成一个大任务,让你变得更厉害。通过不断练习组合题,你会发现自己变得更擅长解决复杂问题,就像数学高手一样!

Abstract

Large-scale verifiable prompts underpin the success of Reinforcement Learning with Verifiable Rewards (RLVR), but they contain many uninformative examples and are costly to expand further. Recent studies focus on better exploiting limited training data by prioritizing hard prompts whose rollout pass rate is 0. However, easy prompts with a pass rate of 1 also become increasingly prevalent as training progresses, thereby reducing the effective data size. To mitigate this, we propose Composition-RL, a simple yet useful approach for better utilizing limited verifiable prompts targeting pass-rate-1 prompts. More specifically, Composition-RL automatically composes multiple problems into a new verifiable question and uses these compositional prompts for RL training. Extensive experiments across model sizes from 4B to 30B show that Composition-RL consistently improves reasoning capability over RL trained on the original dataset. Performance can be further boosted with a curriculum variant of Composition-RL that gradually increases compositional depth over training. Additionally, Composition-RL enables more effective cross-domain RL by composing prompts drawn from different domains. Codes, datasets, and models are available at https://github.com/XinXU-USTC/Composition-RL.

cs.CL