Recursive Self-Aggregation Unlocks Deep Thinking in Large Language Models

Siddarth Venkatraman, Vineet Jain, Sarthak Mittal, Vedant Shah, Johan S. Obando-Ceron, Yoshua Bengio, Brian R. Bartoldson, Bhavya Kailkhura, Guillaume Lajoie, Glen Berseth, Nikolay Malkin, Moksh Jain · DOI

TL;DR

This paper introduces Recursive Self-Aggregation (RSA), a novel test-time scaling method for Large Language Models (LLMs) that mimics evolutionary algorithms to improve reasoning. RSA iteratively refines a population of candidate solutions, leading to significant performance gains across various tasks and models, even outperforming larger models with smaller ones.

What Problem Does This Paper Address?

Large Language Models (LLMs) have shown impressive capabilities, but their performance can be further enhanced at inference time without retraining. Existing test-time scaling methods fall into two main categories: sequential (iteratively refining a single solution) and parallel (generating multiple solutions and selecting the best). However, a universal method that effectively combines the strengths of both, allowing for deep thinking and exploration of diverse solution paths, has been lacking. Specifically, sequential methods can get stuck in unproductive chains, while parallel methods might not fully leverage the information within multiple candidates. This paper addresses this gap by proposing a hybrid approach that recursively aggregates diverse candidate solutions to achieve more robust and deeper reasoning.

Methods

The core innovation is Recursive Self-Aggregation (RSA). It works by:

  1. Population Initialization: Generating an initial population of N candidate solutions (reasoning chains) for a given query using a base LLM.
  2. Subsampling: Creating N aggregation sets, each containing K randomly sampled candidate solutions from the current population.
  3. Self-Aggregation: Using the LLM to aggregate the K solutions within each set, along with the original query, to produce a new, improved candidate solution. This process is repeated for T steps, creating a recursive refinement loop.

RSA is inspired by evolutionary algorithms, specifically the crossover and mutation steps, but crucially, it uses the LLM itself for both generating candidates and aggregating them, eliminating the need for external verifiers. The paper also introduces an aggregation-aware reinforcement learning (RL) approach to further fine-tune LLMs for this aggregation task, which proves more effective than standard RL training.

Datasets

The paper evaluates RSA on a variety of established benchmarks:

  • Math: AIME-25 and HMMT-25 from MathArena.
  • General Reasoning: Reasoning Gym (RG), with tasks from "Games" and "Cognition + ARC" categories.
  • Code Generation: LiveCodeBench-v6.
  • Knowledge-Based Reasoning: SuperGPQA.
  • Challenging Reasoning: ARC-AGI-2 benchmark.

Key Insights and Ideas

  • Evolutionary Inspiration for LLM Reasoning: Applying evolutionary concepts like population-based refinement and aggregation to LLM inference unlocks deeper reasoning capabilities.
  • Self-Aggregation as a Powerful Hybrid: RSA effectively bridges the gap between sequential and parallel scaling by allowing exploration of diverse solutions (parallel) and iterative refinement (sequential) within a single framework.
  • LLMs as Self-Improvers: The ability of LLMs to not only generate solutions but also to aggregate and refine them is a key enabler of RSA's success.
  • Aggregation-Aware RL is Crucial: Standard RL training can actually degrade performance when combined with test-time aggregation. Training LLMs specifically to aggregate solutions is essential for maximizing the benefits of RSA.
  • Parameter Tuning Matters: The interplay between population size (N), aggregation set size (K), and recursion depth (T) is critical for performance, with N controlling asymptotic performance and K influencing mixing speed.

Key Results

  • Near Human-Level Performance on ARC-AGI-2: RSA with Gemini 3 Flash achieved performance close to human levels on the ARC-AGI-2 benchmark, significantly outperforming models like Gemini Deep Think at a fraction of the cost.
  • Empowering Smaller Models: RSA enabled Qwen3-4B-Instruct-2507 (a smaller model) to achieve performance comparable to much larger models like DeepSeek-R1 and 03-mini (high) on various tasks.
  • Consistent Gains Across Models and Tasks: RSA demonstrated substantial improvements in Pass@1 scores across diverse model families (including MoE and SSM architectures) and tasks like math, code generation, and general reasoning.
  • Recursive Aggregation Outperforms Single-Step: Increasing the number of aggregation steps (T) consistently improved performance, highlighting the benefit of recursive refinement.
  • Aggregation-Aware RL Boosts Performance: Models trained with aggregation-aware RL showed significantly better performance with RSA compared to those trained with standard RL or just the base model.

Limitations and Future Work

  • Population Diversity: Self-aggregation can lead to a loss of diversity over time. Maintaining a large population size (N) relative to the aggregation size (K) helps, but finding the optimal balance is key.
  • Computational Cost: While RSA improves performance at inference time, it inherently requires more computation than a single forward pass. The paper explores parameter tuning to balance performance and compute budget.
  • Prompt Engineering: The current implementation uses a straightforward prompt template. Future work could explore automated prompt optimization (e.g., GEPA) for even greater gains.
  • Integration with Other Methods: RSA could be combined with other test-time scaling methods like self-verification to further enhance performance by introducing explicit fitness functions.
  • Multi-Step RL: Exploring multi-step reinforcement learning for the end-to-end RSA procedure, rather than greedy single-step aggregation, is a promising direction.

Summary updated

BibTeX
@misc{venkatraman2025recursive,
  author = {Siddarth Venkatraman and Vineet Jain and Sarthak Mittal and Vedant Shah and Johan S. Obando-Ceron and Yoshua Bengio and Brian R. Bartoldson and Bhavya Kailkhura and Guillaume Lajoie and Glen Berseth and Nikolay Malkin and Moksh Jain},
  title = {{Recursive Self-Aggregation Unlocks Deep Thinking in Large Language Models}},
  year = {2025},
  eprint = {2509.26626},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.26626},
}
Figure