TL;DR
This paper introduces Learning to Self-Evolve (LSE), a novel reinforcement learning framework that explicitly trains Large Language Models (LLMs) to improve their own prompts (contexts) at test time. LSE demonstrates that by treating self-evolution as a learnable skill, even a smaller LLM can significantly outperform larger, state-of-the-art models and specialized prompt optimization techniques on complex tasks like Text-to-SQL generation and question answering.
What Problem Does This Paper Address?
Current LLMs, while powerful, are largely static once deployed. They apply the same reasoning and generation strategies regardless of the new information or feedback they encounter. This is a stark contrast to human learning, where experience leads to continuous adaptation and improvement. The paper addresses this gap by focusing on "test-time self-evolution," where an LLM can dynamically update its own internal instructions or context to perform better on new problems after its initial training. Existing methods for this rely on the LLM's inherent reasoning abilities to figure out how to improve its prompts, but they don't explicitly train the LLM to be good at self-improvement. This paper argues that self-evolution is a distinct reasoning challenge that can be explicitly optimized.
Methods
The core of LSE is a reinforcement learning (RL) framework designed to train a "self-evolving policy" (fy). Instead of optimizing the entire multi-step evolution process, LSE simplifies it to a single-step RL objective. The self-evolving policy receives the current context and a summary of its recent performance and outputs a new, improved context. The key innovation here is the reward function: LSE rewards the improvement in performance (post-edit reward minus pre-edit reward), rather than just the absolute post-edit performance. This prevents the policy from simply preserving already good contexts and encourages genuine learning.
At test time, LSE employs a "tree-guided evolution loop." This is a more sophisticated approach than simply chaining edits linearly. It maintains an "evolution tree" where each node represents a context. The system uses an Upper Confidence Bound (UCB) strategy to select the most promising node to extend, allowing it to explore different evolutionary paths and backtrack if an edit proves detrimental. This tree search mechanism helps avoid getting stuck in suboptimal evolutionary trajectories.
Datasets
The paper evaluates LSE on two primary task domains:
- Text-to-SQL Generation: The BIRD dataset is used, which consists of natural language questions paired with SQL queries across various database domains.
- General Question Answering (QA): The MMLU-Redux dataset is used, covering multiple-choice questions across diverse academic subjects. The authors also use SuperGPQA to convert questions into a format compatible with MMLU-Redux.
For evaluation, the authors use specific splits of these datasets, with a fixed holdout set (D) for consistent performance measurement across evolution rounds.
Key Insights and Ideas
- Self-evolution is a learnable skill: The paper's central thesis is that the ability of an LLM to improve its own prompts can and should be explicitly trained, rather than relying solely on emergent capabilities from pre-training.
- Improvement-based reward is crucial: Rewarding the delta in performance (improvement) is more effective than rewarding absolute performance for training self-evolving policies. This encourages exploration and genuine learning, preventing the policy from becoming overly conservative.
- Tree search prevents catastrophic forgetting: The tree-guided evolution strategy, particularly with UCB, is vital for navigating the complex space of prompt edits. It allows the system to recover from bad edits by backtracking to better-performing ancestors, a capability that linear chaining lacks.
- Smaller models can compete: A 4B-parameter model trained with LSE can match or surpass much larger, state-of-the-art models like GPT-5 and Claude Sonnet 4.5, highlighting the efficiency and effectiveness of explicit training for self-evolution.
- Transferability: The LSE-trained self-evolving policy can guide other LLMs (even specialized ones) without further training, demonstrating the generality of the learned evolutionary strategy.
Key Results
- Text-to-SQL (BIRD): A 4B-parameter LSE-trained model achieved 67.3% accuracy, outperforming GPT-5 (65.2%) and Claude Sonnet 4.5 (64.5%). It also surpassed prompt optimization methods like GEPA (62.8%) and TextGrad (63.1%).
- Question Answering (MMLU-Redux): LSE achieved 73.3% accuracy, matching GPT-5 (72.5%) and outperforming Claude Sonnet 4.5.
- Reward Design Ablation: The improvement-based reward (LSE) outperformed the standard accuracy-based reward (AGRPO) by 4.3% on BIRD.
- Search Strategy Ablation: Tree search (UCB) improved average accuracy by 2.4% on BIRD and 2.2% on MMLU-Redux compared to a linear chain approach.
- Specialized Models: When applied to a specialized Text-to-SQL model (Arctic-Text2SQL-R1-7B), LSE evolution improved its average accuracy from 57.7% to 64.4%.
Limitations and Future Work
The authors acknowledge several limitations:
- Single-step training: Reducing the multi-step evolution to a single-step RL objective delegates exploration entirely to the test-time tree search. Jointly optimizing multi-step trajectories could yield stronger policies but would be computationally more challenging.
- Domain-specific policies: The current framework trains a separate self-evolving policy for each task domain. Training a single policy that generalizes across diverse tasks is a natural and important extension.
- Constrained evolution: Evolution is currently limited to the instruction field of the context. Exploring updates to other components like tools, skill libraries, or external memory could be beneficial.
- Parameter/Latent space updates: The framework focuses on prompt evolution. Integrating LSE with parameter or latent space updates could offer further improvements.
- Scalability: The current training and evaluation environments are relatively small. Developing more principled and scalable approaches for environment curation and evaluation is crucial for advancing test-time self-evolution.
Summary updated