Table of Contents
Fetching ...

Can RL Improve Generalization of LLM Agents? An Empirical Study

Zhiheng Xi, Xin Guo, Jiaqi Liu, Jiazheng Zhang, Yutao Fan, Zhihao Zhang, Shichun Liu, Mingxu Chai, Xiaowei Shi, Yitao Zhai, Xunliang Cai, Tao Gui, Qi Zhang, Xuanjing Huang

TL;DR

The results show that RFT generalizes well across task difficulty within an environment, but exhibits weaker transfer to unseen environments, which correlates with shifts in both semantic priors and observation/action interfaces.

Abstract

Reinforcement fine-tuning (RFT) has shown promise for training LLM agents to perform multi-turn decision-making based on environment feedback. However, most existing evaluations remain largely in-domain: training and testing are conducted in the same environment or even on the same tasks. In real-world deployment, agents may operate in unseen environments with different background knowledge, observation spaces, and action interfaces. To characterize the generalization profile of RFT under such shifts, we conduct a systematic study along three axes: (1) within-environment generalization across task difficulty, (2) cross-environment transfer to unseen environments, and (3) sequential multi-environment training to quantify transfer and forgetting. Our results show that RFT generalizes well across task difficulty within an environment, but exhibits weaker transfer to unseen environments, which correlates with shifts in both semantic priors and observation/action interfaces. In contrast, sequential training yields promising downstream gains with minimal upstream forgetting, and mixture training across environments improves the overall balance. We further provide detailed analyses and deeper insights, and hope our work helps the community develop and deploy generalizable LLM agents.

Can RL Improve Generalization of LLM Agents? An Empirical Study

TL;DR

The results show that RFT generalizes well across task difficulty within an environment, but exhibits weaker transfer to unseen environments, which correlates with shifts in both semantic priors and observation/action interfaces.

Abstract

Reinforcement fine-tuning (RFT) has shown promise for training LLM agents to perform multi-turn decision-making based on environment feedback. However, most existing evaluations remain largely in-domain: training and testing are conducted in the same environment or even on the same tasks. In real-world deployment, agents may operate in unseen environments with different background knowledge, observation spaces, and action interfaces. To characterize the generalization profile of RFT under such shifts, we conduct a systematic study along three axes: (1) within-environment generalization across task difficulty, (2) cross-environment transfer to unseen environments, and (3) sequential multi-environment training to quantify transfer and forgetting. Our results show that RFT generalizes well across task difficulty within an environment, but exhibits weaker transfer to unseen environments, which correlates with shifts in both semantic priors and observation/action interfaces. In contrast, sequential training yields promising downstream gains with minimal upstream forgetting, and mixture training across environments improves the overall balance. We further provide detailed analyses and deeper insights, and hope our work helps the community develop and deploy generalizable LLM agents.
Paper Structure (40 sections, 5 equations, 12 figures, 6 tables)

This paper contains 40 sections, 5 equations, 12 figures, 6 tables.

Figures (12)

  • Figure 1: An overview of three axes we study.
  • Figure 2: Average generated tokens and interactive turn of all environments for Qwen2.5-3B-Instruct model trained with varying-difficulty tasks.
  • Figure 3: Training dynamics of forgetting and transfer in sequential two-stage cross-environment training with Qwen2.5-7B-Instruct, where blue and red denote the upstream environment and the downstream environment, respectively.
  • Figure 4: Generalization of sequential two-stage cross-environment training with Qwen2.5-7B-Instruct. Across five environments (WS, SQ, TC, AW, BA), the figure presents the generalization performance on the three unseen environments following sequential training on two environments. Each subplot corresponds to a fixed first environment, with dashed line indicating the baseline performance.
  • Figure 5: Training dynamics of sequential training across five environments. We present the results for representative sequence combinations, monitoring how performance on each environment changes as the agent is trained on different environments sequentially. The dashed lines denote the performance achieved by joint training on a mixture of data from all five environments.
  • ...and 7 more figures