TL;DR
While fine-tuning Large Language Models (LLMs) can significantly improve their performance on sequential decision-making tasks like the multi-armed bandit, these gains often come from a "smarter" but riskier bias toward exploitation. This paper reveals that models trained via Reinforcement Learning (RL) or Supervised Fine-Tuning (SFT) often outperform their "expert" teachers by adopting greedier strategies, making them more prone to catastrophic long-term failures despite better average scores.
What Problem Does This Paper Address?
The "exploration-exploitation" trade-off is the cornerstone of sequential decision-making: do you stick with the best option you’ve found so far (exploit), or try something new to find an even better one (explore)? While frontier LLMs like GPT-4 show some ability to handle this in-context, most models are naturally "short-sighted" and default to greedy behavior, failing to gather enough information to succeed in complex environments.
Recent research has tried to fix this by training LLMs as "meta-bandits"—agents that learn a general policy for exploring any new environment. However, we haven't fully understood how these training methods (SFT vs. RL) change the model's underlying logic. Do they actually learn to explore better, or are they just getting better at "guessing" the best arm early and sticking to it?
Methods
The authors investigate two primary training paradigms using Qwen 2.5 (3B and 7B) models:
- Supervised Fine-Tuning (SFT): The model is trained on "expert" trajectories generated by the Upper Confidence Bound (UCB) algorithm, complete with Chain-of-Thought (CoT) reasoning that shows the math behind the decisions.
- Reinforcement Learning (RL): Using PPO, the authors test three different reward signals:
- RL-OG: Standard stochastic rewards from the environment.
- RL-STG (Strategic): A "regret-shaped" reward that reduces variance by penalizing the model based on the gap between the chosen action and the optimal action.
- RL-ALG (Algorithmic): A novel "imitation" reward where the model gets points only if its action matches a UCB oracle's decision.
The models are trained on short horizons (50 steps) and tested on much longer ones (300 steps) to evaluate generalization.
Datasets
The study primarily uses synthetic Multi-Armed Bandit (MAB) environments:
- Gaussian Families: Continuous rewards where means and variances are shifted to test robustness.
- Bernoulli Families: Discrete binary (0/1) rewards.
- OOD Generalization: Testing on 10-arm bandits after training on 5-arm bandits, and transferring between Gaussian and Bernoulli distributions.
- MovieLens-100K: A real-world contextual bandit dataset used to see if these "meta-bandit" skills transfer to recommendation tasks.
Key Insights and Ideas
- The "Greedy" Paradox: Fine-tuned agents achieve lower "regret" (better performance) than pre-trained models, but they are actually more prone to "suffix failure"—prematurely abandoning the best arm after a few bad samples. They aren't necessarily better explorers; they are just more sophisticated exploiters.
- Outperforming the Teacher: In a surprising twist, agents trained to imitate UCB (via RL-ALG) often achieved lower regret than the UCB algorithm itself. They did this by discovering "exploitative variants" of the UCB formula—essentially learning to stop exploring earlier than the math suggests they should.
- Arithmetic Fragility: SFT models are highly sensitive to the training data distribution. For example, an SFT model trained on Bernoulli bandits (rewards of 0 or 1) completely falls apart when it encounters negative rewards in a Gaussian environment, leading to "hallucinated" math and nonsensical decisions.
- Scaling Matters: 7B models were able to learn effectively from raw environmental rewards (RL-OG/STG), whereas 3B models struggled unless they had "teacher guidance" (SFT or RL-ALG).
Key Results
- Robust Generalization: Trained agents generalized to horizons 6× longer than their training data (from 50 to 300 steps) and maintained stable performance even as the number of "arms" increased from 5 to 10.
- RL-ALG is the Winner: The algorithmic reward (imitating UCB via RL) proved to be the most consistent method, offering the best balance of high performance and robustness across different bandit families.
- Linear vs. Sub-linear Regret: Pre-trained LLMs show "linear regret" (meaning they never stop making mistakes), while fine-tuned models achieve "sub-linear regret" (meaning they eventually converge on the best action), matching the efficiency of classical algorithms like Thompson Sampling.
Limitations and Future Work
The authors highlight a "fundamental imbalance" in training data: as an agent gets better, it spends most of its time exploiting and very little time exploring. This makes it hard for the model to learn from the rare, "high-surprise" moments that define good exploration.
Future directions include: * Focused Replay: Weighting training data to emphasize informative exploration steps rather than repetitive exploitation. * Adversarial Environments: Designing tasks that specifically punish greedy behavior to force the model to value long-term information gain. * Improving Arithmetic: Mixing bandit training with general mathematical data to prevent the "arithmetic hallucinations" seen when models go out-of-distribution.
Summary updated