Scaling LLM Multi-turn RL with End-to-end Summarization-based Context Management

TL;DR

SUPO algorithm scales LLM multi-turn RL via summarization-based context management, enhancing success rate and reducing context length.

cs.CL 🔴 Advanced 2025-10-08 40 views
Miao Lu Weiwei Sun Weihua Du Zhan Ling Xuesong Yao Kang Liu Jiecao Chen
reinforcement learning large language model multi-turn interaction context management summarization optimization

Key Findings

Methodology

The paper introduces a summarization-based context management method, termed SUPO algorithm. By periodically compressing historical information in multi-turn tool use, it maintains a compact context with task-relevant information. This method integrates summarization steps directly into state transitions, allowing RL infrastructures to seamlessly optimize tool-use behaviors and summarization strategies.

Key Results

  • In the CodeGym environment, SUPO algorithm improved success rate by 3.2% and by 14.0% in the BrowseComp-Plus task, while maintaining or reducing working context length.
  • For complex search tasks, SUPO further improved evaluation performance by 7.0% when scaling test-time summarization rounds.
  • Ablation studies validated the effectiveness of SUPO's advantage calculation and overlong mask design.

Significance

This research introduces summarization management to overcome fixed context length limitations, offering new possibilities for LLM applications in long-horizon tasks. It significantly enhances success rates in complex tasks and provides a scalable framework for future RL training.

Technical Contribution

SUPO algorithm achieves seamless integration with existing RL infrastructures, providing a new policy gradient representation. It allows effective context management in long-horizon tasks through summarization optimization strategies, surpassing traditional methods' context limitations.

Novelty

SUPO is the first to introduce summarization management in RL training, distinct from traditional context compression methods. It optimizes summarization strategies in an end-to-end manner, significantly improving task success rates.

Limitations

  • SUPO may face performance degradation when handling extremely long contexts, as optimizing summarization strategies requires substantial computational resources.
  • In specific tasks, manual adjustment of summarization thresholds may be needed for optimal performance.

Future Work

Future research could explore further optimization of summarization strategies to reduce computational resource consumption and validate SUPO's effectiveness across a broader range of tasks.

AI Executive Summary

In long-horizon multi-turn tool use, existing reinforcement learning methods face context length limitations, leading to degraded instruction following and excessive computational costs. To address these challenges, this paper proposes a summarization-based context management method, termed SUPO algorithm. By periodically compressing historical information, it maintains a compact context with task-relevant information, overcoming fixed context window limitations.

SUPO algorithm was validated in CodeGym and BrowseComp-Plus tasks, showing significant improvements in success rates while maintaining or reducing working context length. Particularly in complex search tasks, SUPO can further enhance performance by scaling test-time summarization rounds. Ablation studies validated the effectiveness of SUPO's advantage calculation and overlong mask design.

This research offers new possibilities for LLM applications in long-horizon tasks and provides a scalable framework for future RL training. However, SUPO may face performance degradation when handling extremely long contexts. Future research could explore further optimization of summarization strategies to reduce computational resource consumption and validate SUPO's effectiveness across a broader range of tasks.

Deep Analysis

Background

In recent years, large language models (LLMs) have made significant advances in natural language processing, code generation, and complex reasoning. However, in long-horizon multi-turn tasks, LLMs face context length limitations, leading to degraded instruction following and excessive computational costs. Existing RL methods train within a fixed context length, limiting their application in complex tasks.

Core Problem

In long-horizon multi-turn tasks, LLMs need to handle a large amount of context information, including initial prompts, model outputs, tool observations, and reasoning traces. This rapid accumulation of information leads to context lengths exceeding the model's processing capacity, becoming a bottleneck for RL training.

Innovation

This paper introduces a summarization-based context management method, termed SUPO algorithm. By periodically compressing historical information, it maintains a compact context with task-relevant information, overcoming fixed context window limitations. Unlike traditional methods, SUPO optimizes summarization strategies in an end-to-end manner, significantly improving task success rates.

Methodology

  • �� SUPO algorithm integrates summarization steps into state transitions, optimizing tool-use behaviors and summarization strategies.
  • �� At each time step, it checks context length and triggers summarization if it exceeds the threshold.
  • �� Uses policy gradient representation to decompose long-horizon rollout policy gradient into the sum of gradients from summarized sub-trajectories.

Experiments

Experiments were conducted in CodeGym and BrowseComp-Plus environments to validate the effectiveness of SUPO algorithm. Baselines included traditional RL methods, with evaluation metrics being success rate and context length. Ablation studies validated the effectiveness of SUPO's advantage calculation and overlong mask design.

Results

SUPO improved success rate by 3.2% in CodeGym and by 14.0% in BrowseComp-Plus tasks. In complex search tasks, scaling test-time summarization rounds improved performance by 7.0%. Ablation studies validated the effectiveness of SUPO's advantage calculation and overlong mask design.

Applications

SUPO algorithm can be applied to tasks requiring long-horizon multi-turn interactions, such as complex search and function calling. It improves success rates while maintaining or reducing context length, suitable for industrial applications requiring efficient context management.

Limitations & Outlook

SUPO may face performance degradation when handling extremely long contexts, as optimizing summarization strategies requires substantial computational resources. Future research could explore further optimization of summarization strategies to reduce computational resource consumption and validate SUPO's effectiveness across a broader range of tasks.

Plain Language Accessible to non-experts

Imagine you're in a kitchen cooking multiple dishes. After each dish, you clean up the kitchen, leaving only the ingredients and tools needed for the next dish. The SUPO algorithm is like a smart kitchen assistant that keeps the kitchen organized after each dish, leaving only the most important information. This way, even if you have to cook many dishes, the kitchen won't become cluttered. The assistant decides which ingredients and tools to keep based on each dish's needs, ensuring efficiency and order.

ELI14 Explained like you're 14

Imagine playing a super complex game where each level requires different tools. After each level, you need to organize your backpack, keeping only what you need for the next level. The SUPO algorithm is like a super smart game assistant that helps you organize your backpack, putting away unnecessary items and keeping only the most important tools. This way, you can easily pass levels without your backpack getting too full. Isn't that cool?

Glossary

Reinforcement Learning

A machine learning method that trains models through rewards and penalties to improve performance in specific tasks.

Used to optimize LLM performance in multi-turn tool use.

Large Language Model

A large-scale neural network model capable of understanding and generating natural language.

Serves as the core component for intelligent agents in multi-turn tasks.

Context Management

Maintaining a compact context by compressing and summarizing historical information in long-horizon tasks.

Used to address context length limitations.

Policy Gradient

A method for optimizing policies by calculating gradients to update policy parameters.

Used to optimize tool-use behaviors and summarization strategies.

Summarization Optimization

Compressing context information through summarization to optimize task execution efficiency.

Core mechanism of the SUPO algorithm.

Open Questions Unanswered questions from this research

  • 1 How to further optimize summarization strategies without increasing computational costs?
  • 2 How can SUPO's performance be improved in extremely long context tasks?

Applications

Immediate Applications

Complex Search Tasks

SUPO algorithm can improve success rates in complex search tasks, suitable for applications requiring efficient context management.

Function Call Optimization

In tasks requiring multi-turn function calls, SUPO algorithm can improve task success rates through summarization optimization.

Long-term Vision

Intelligent Assistants

SUPO algorithm can be applied to intelligent assistants, helping them manage context and make decisions efficiently in long-horizon tasks.

Abstract

We study reinforcement learning (RL) fine-tuning of large language model (LLM) agents for long-horizon multi-turn tool use, where context length quickly becomes a fundamental bottleneck. Existing RL pipelines can suffer from degraded instruction following, excessive rollout costs, and most importantly, strict context limits. To address these challenges, we introduce summarization-based context management to training. In specific, it periodically compresses the tool using history by LLM-generated summaries that retain task-relevant information to keep a compact context while enabling the agent to scale beyond the fixed context window. Building on this formulation, we derive a policy gradient representation that seamlessly enables standard LLM RL infrastructures to optimize both tool-use behaviors as well as summarization strategies in an end-to-end fashion. We instantiate this framework with \underline{SU}mmarization augmented \underline{P}olicy \underline{O}ptimization (\texttt{SUPO}), an LLM RL algorithm that enables long-horizon training beyond a fixed context limit. Experiments on interactive function calling and searching tasks demonstrate that \texttt{SUPO} significantly improves the success rate while maintaining the same or even lower working context length compared to baselines. We also demonstrate that for complex searching tasks, \texttt{SUPO} can further improve the evaluation performance when scaling test-time maximum round of summarization beyond that of training time. Our results establish summarization-based context management as a principled and scalable approach for training RL agents beyond a fixed context length limit.

cs.CL cs.AI cs.LG