Abstract
While Large Language Models (LLMs) hold promise to become autonomous agents, they often explore suboptimally in sequential decision-making. Recent work has sought to enhance this capability via supervised fine-tuning (SFT) or reinforcement learning (RL), improving regret on the classic multi-armed bandit task. However, it remains unclear how these learning methods shape exploration strategies and how well they generalize. We investigate both paradigms by training LLMs with SFT on expert trajectories and RL with a range of tailored reward signals including a strategic, regret-shaped reward to reduce variance, and an algorithmic reward that enables oracle imitation. The resulting agents outperform pre-trained models and achieve performance comparable to Upper Confidence Bound (UCB) and Thompson Sampling, with robust generalization to 6x longer horizons and across bandit families. Behavioral analysis reveals that gains often stem from more sophisticated but greedier exploitation: RL/SFT agents are more prone to early catastrophic failure than pre-trained models, prematurely abandoning exploration. Furthermore, agents trained to imitate UCB learn to outperform their teacher by adopting more exploitative variants. Our findings clarify when each training paradigm is preferable and advocate tailored reward design and evaluation beyond average regret to promote robust exploratory behavior.
Introduction
In sequential decision-making, agents must navigate the fundamental exploration-exploitation trade-off: whether to exploit the current best-known option or explore alternatives to discover potentially superior rewards. The Multi-Armed Bandit (MAB) problem serves as the standard benchmark for this challenge. While Large Language Models (LLMs) are increasingly deployed as autonomous agents, they frequently exhibit "short-sighted" behavior, defaulting to greedy strategies that neglect long-term optimization. This study investigates how Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) can be leveraged to improve LLM performance in MAB environments and how these training methods influence the resulting decision-making strategies.
Methodology
The researchers trained Qwen 2.5 (3B and 7B) models as "meta-bandit agents" using two primary paradigms. In the Supervised Fine-Tuning (SFT) approach, models were trained on "Chain-of-Thought" trajectories where an expert algorithm, such as Upper Confidence Bound (UCB), explicitly calculates uncertainty bonuses before selecting an arm.
For Reinforcement Learning (RL), the authors utilized Proximal Policy Optimization (PPO) with three distinct reward signals:
- RL-OG (Original): Standard stochastic rewards from the environment.
- RL-STR (Strategic): A reward shaped by "regret" (the difference between the chosen arm and the optimal arm) to minimize training variance.
- RL-ALG (Algorithmic): A binary reward contingent on the LLM’s choice matching the UCB oracle’s selection.
Behavioral Insights: The Exploitation Bias
A key finding of the study is the emergent "greedy" advantage. The most effective agents did not necessarily become better explorers; instead, they became more sophisticated exploiters. These models learned to identify "sufficiently good" options more rapidly and ceased exploration earlier than theoretical benchmarks.
Interestingly, agents trained via RL-ALG to imitate UCB frequently outperformed their teacher. By analyzing the models' internal reasoning, researchers discovered that these agents developed "exploitative variants" of the UCB formula, learning to deviate from strict exploration rules to maximize immediate rewards. However, this efficiency comes with a cost: SFT models showed "arithmetic fragility," where performance collapsed when encountering reward distributions (e.g., negative values) not seen during training.
Results and Generalization
The trained agents demonstrated remarkable robustness, successfully generalizing to task horizons up to six times longer than those encountered during training (e.g., generalizing from 50 steps to 300 steps).
RL-trained policies, particularly those using the RL-ALG signal, proved more robust across different bandit families (Gaussian vs. Bernoulli) compared to SFT models, which tended to overfit to the specific mathematical patterns of their training data. While the best-learned policies achieved average regret comparable to gold standards like Thompson Sampling, behavioral analysis revealed a bimodal performance distribution. Agents either succeeded brilliantly by identifying the optimal arm early or failed catastrophically by prematurely abandoning exploration—a phenomenon termed "suffix failure."
Conclusion
This research highlights that while SFT and RL can significantly boost LLM performance in decision-making tasks, they often do so by inducing a strong exploitation bias. While this bias leads to superior average performance in static environments, it may compromise long-term robustness in dynamic settings. The study suggests that future work should focus on reward designs that explicitly incentivize information gain and evaluation metrics that look beyond average regret to ensure truly robust exploratory behavior in LLM agents.
Summary updated