LLMs Are In-Context Bandit Reinforcement Learners
About
Large Language Models (LLMs) excel at in-context learning (ICL), a supervised learning technique that relies on adding annotated examples to the model context. We investigate a contextual bandit version of in-context reinforcement learning (ICRL), where models learn in-context, online, from external reward, instead of supervised data. We show that LLMs effectively demonstrate such learning, and provide a detailed study of the phenomena, experimenting with challenging classification tasks and models of sizes from 500M to 70B parameters. This includes identifying and addressing the instability of the process, demonstrating learning with both semantic and abstract labels, and showing scaling trends. Our findings highlight ICRL capabilities in LLMs, while also underscoring fundamental limitations in their implicit reasoning about errors.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Bandit Optimization | fnum nonlin | Cumulative Regret302.7 | 8 | |
| Bandit Optimization | fLLM | Cumulative Regret36 | 8 | |
| Bandit Optimization | nonlin2 | Cumulative Regret43.7 | 8 | |
| Bandit Optimization | fextract | Cumulative Regret11.5 | 8 | |
| Bandit Optimization | fnum lin | Cumulative Regret190 | 8 | |
| Bandit Optimization | nonlin1 | Cumulative Regret346.6 | 8 |