# EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration

EVOLvE: 문맥 내 탐색을 위한 LLM 평가 및 최적화

Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le 외 1명 · arXiv · 2024년 10월 8일

- **연구 문제** LLM은 보상 분포를 모른 채 문맥 안의 이력만으로 탐색과 활용의 균형을 맞출 수 있는지가 불분명합니다.
- **연구 방법** BanditBench로 MAB와 CB 환경을 자연어로 구성하고, UCB 기반 추론 시점 지원과 UCB 궤적을 이용한 few-shot 및 fine-tuning으로 LLM의 탐색을 개선합니다.
- **주요 결과** 미세조정된 Gemini-1.5 Flash는 보고된 조건에서 Gemini-1.5 Pro를 능가하고, 문맥 밴딧에서 AG 정보를 포함한 fine-tuning 승률은 28.6에서 89.3으로 상승합니다.

## LLM은 불확실성 아래 탐색을 수행할 수 있는가

대규모 언어 모델은 추천이나 교육처럼 행동을 고르고 피드백을 받아 학습해야 하는 상황에 쓰이지만, 이런 상황에서 보상 분포를 알지 못한 채 탐색과 활용의 균형을 맞추는 능력은 충분히 연구되지 않았습니다. 이 논문은 상태가 없는 강화학습 형태인 밴딧 문제를 통해 LLM의 문맥 내 탐색(In-Context Exploration) 능력을 측정합니다. 에이전트는 과거 상호작용 이력을 문맥으로 받아 매 라운드 행동을 고르며, 목표는 누적 보상을 최대화하는 것입니다. 저자들은 이를 위해 다중 무장 밴딧(MAB)과 문맥 밴딧(CB)을 자연어로 구성한 BanditBench 벤치마크를 제안합니다.

## 이력 표현과 알고리즘 기반 지원

LLM에 주는 이력 표현 방식이 탐색 성능을 좌우합니다. 원시 이력(Raw History, RH)은 각 라운드의 (문맥, 행동, 보상) 기록을 그대로 나열합니다. 요약 이력(Summarized History, SH)은 경험적 평균과 선택 횟수, 현재 시점 같은 충분 통계량을 제공합니다. 이 논문은 UCB의 활용값과 탐색 보너스를 추론 시점에 문맥으로 주는 Algorithm-Guided Support(AG)를 제안합니다. MAB에서는 각 팔의 경험적 평균과 탐색 항을, CB에서는 선형 보상 가정 아래의 LinUCB 추정치와 신뢰 구간을 계산해 제공합니다. 이 방식은 LLM이 덧셈과 최댓값 선택만 수행하면 되도록 만든다는 것이 저자들의 설명입니다.

또한 UCB가 생성한 (이력 표현, 행동) 궤적을 이용하는 알고리즘 증류가 있으며, 문맥 내 few-shot 시연과 파라미터를 갱신하는 오라클 행동 fine-tuning(OFT)으로 나뉩니다. OFT는 UCB가 선택한 행동의 로그우도를 최대화하는 다음 행동 예측 목표를 사용합니다.

![Table 2: \| Overall Win-Rate (%) of different algorithm distillation methods. Flash and Pro refer to Gemini-1.5 Flash and Pro respectively. Best achieved perfor…](https://refivu.com/papers/71818669-db0f-4587-bcd4-f1fe708ce324/figures/figure-182a717749cff2de3a5cb4c2c60dad56.png?thumb=512)

**Table 2** \| Overall Win-Rate (%) of different algorithm distillation methods. Flash and Pro refer to Gemini-1.5 Flash and Pro respectively. Best achieved performances are highlighted. In this table, the history textualization used in oracle trajectory and inference-time support are the same. We conduct a few ablations in Figure 4.

[원문](https://arxiv.org/abs/2410.06238v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le, Minmin Chen · EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.

![Table 3: \| Situations where Algorithm-Guided Support significantly outperforms Raw History during inference](https://refivu.com/papers/71818669-db0f-4587-bcd4-f1fe708ce324/figures/figure-a5914dd6b3113249b1048aa1bac50348.png?thumb=512)

**Table 3** \| Situations where Algorithm-Guided Support significantly outperforms Raw History during inference.

[원문](https://arxiv.org/abs/2410.06238v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le, Minmin Chen · EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration · 원문 그림 인용 · 원본 PDF 11쪽에서 그림 영역을 추출했습니다.

## 쌍별 승률 기반 비교 설정

성능 비교는 누적 보상의 평균이 아니라 쌍별 승률(pairwise win-rate)로 수행됩니다. 구성마다 30회 독립 실행의 누적 보상 분포를 얻고, 두 구성 사이에 p\<0.05 수준의 Student's t-검정을 적용해 유의하게 높은 쪽만 승리로 셉니다. MAB는 16개 구성과 32개 모델, CB는 2개 구성과 14개 모델로 집계됩니다. 원문 설정표에서 MAB는 K=5와 K=20, CB는 K=10과 K=30 계열로 나뉘며, 본문의 한 문장은 K=30에서 T=1000, K=10에서 T=200을 사용한다고 기술하므로 이 설정을 함께 확인해야 합니다. 쉬운 설정과 어려운 설정의 차이는 Δmin이나 분산 σ로 조절됩니다.

## 추론 시점 지원과 fine-tuning의 효과

Gemini-1.5 Flash는 Gemini-1.5 Pro와 비교할 때 fine-tuning 후 경쟁력 있는 결과를 보입니다. 저자들은 최고 성능의 fine-tuning Gemini-1.5 Flash가 Gemini-1.5 Pro를 능가한다고 보고합니다. 반면 문맥 내 few-shot 시연은 Flash의 성능을 높이지만 Pro의 성능을 MAB와 CB 모두에서 낮춥니다. 저자들은 이를 큰 모델의 사고 연쇄 구조와 수작업 예시의 부적합성 때문이라고 가설로 제시합니다. 문맥 밴딧에서는 AG 정보를 궤적에 포함한 fine-tuning의 승률이 28.6에서 89.3으로 높아졌으며, 이 결과는 Gemini-1.5 Flash 모델 기준입니다.

![Figure 1: \| The best achieved performance within each category of method in both MAB and CB. Note that we took the max over different methodology setups within…](https://refivu.com/papers/71818669-db0f-4587-bcd4-f1fe708ce324/figures/figure-0bfa04b6da1dc40e7f42ac7adec12885.png?thumb=512)

**Figure 1** \| The best achieved performance within each category of method in both MAB and CB. Note that we took the max over different methodology setups within each category. For contextual bandit, OFT enabled a small fine-tuned model (Gemini-1.5 Flash) to approach the performance of the optimal classical algorithm (UCB).

[원문](https://arxiv.org/abs/2410.06238v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le, Minmin Chen · EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

![Table 1: \| Overall Win-Rate (%) of different inference-time support. Flash and Pro refer to Gemini-1.5 Flash and Pro respectively. UnlikeSH, AG can work for bo…](https://refivu.com/papers/71818669-db0f-4587-bcd4-f1fe708ce324/figures/figure-e9a9299c7bc1689cb2dfdb9f0d8fdad4.png?thumb=512)

**Table 1** \| Overall Win-Rate (%) of different inference-time support. Flash and Pro refer to Gemini-1.5 Flash and Pro respectively. UnlikeSH, AG can work for both MAB and CB. Refer to Section 4.1 for details.

[원문](https://arxiv.org/abs/2410.06238v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le, Minmin Chen · EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.

![Figure 4: \| The Impact of Context Representation in In-Context Examples and Fine-Tuning Data at Inference Time. We vary the context representation during “lear…](https://refivu.com/papers/71818669-db0f-4587-bcd4-f1fe708ce324/figures/figure-9c0fae7da2f812bf75a11c41e1b83701.png?thumb=512)

**Figure 4** \| The Impact of Context Representation in In-Context Examples and Fine-Tuning Data at Inference Time. We vary the context representation during “learning” (in-context and weight fine-tuning) and provide or withhold information during inference. ProvidingAG during inference will always increase the model’s performance. Providing it during learning allows the model to maximally leverage such infomation.

[원문](https://arxiv.org/abs/2410.06238v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le, Minmin Chen · EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.

## 쉬운 도메인에서 학습한 방법의 일반화

알고리즘 증류 데이터는 Bernoulli, Easy, K=5 설정에서 수집되었고, 평가는 Bernoulli, Hard, K=20 설정에서 수행되었습니다. 이 조건에서 SH 기준은 34.0%였고, few-shot은 43.0%, OFT는 48.4%로 보고됩니다. 이 결과는 쉬운 행동 공간에서 얻은 탐색 예시가 더 큰 행동 공간으로 일부 옮겨질 수 있음을 보여주지만, 보고된 설정 밖의 과제나 모델에 대한 일반화를 확인한 것은 아닙니다.

![Table 4: \| Easy-to-Hard Generalization: We collect distillation data from easy bandit tasks to learn the exploration behavior and evaluate on hard bandit tasks…](https://refivu.com/papers/71818669-db0f-4587-bcd4-f1fe708ce324/figures/figure-28fdfeea6ee548b9bf34b3b7bab2b15a.png?thumb=512)

**Table 4** \| Easy-to-Hard Generalization: We collect distillation data from easy bandit tasks to learn the exploration behavior and evaluate on hard bandit tasks. History representation during evaluation is in parentheses.

[원문](https://arxiv.org/abs/2410.06238v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le, Minmin Chen · EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration · 원문 그림 인용 · 원본 PDF 11쪽에서 그림 영역을 추출했습니다.

## 과잉 탐색과 최적 팔 선택 지표

누적 보상만으로는 우연히 최적 팔을 고른 경우와 실제 탐색을 구분하기 어렵기 때문에, 저자들은 MinFrac과 OptFrac을 함께 사용합니다. MinFrac은 최소 선택 팔에 할당된 당기기 비율로 방향성 탐색을 보여주는 지표이고, OptFrac은 최적 팔이 선택된 비율입니다. Bernoulli MAB 구성들의 평균에서 UCB의 OptFrac은 32.7%에서 65.0%로 증가하지만 Gemini-1.5 Flash는 9.3%에서 10.7%로 거의 변하지 않습니다. 이 결과는 Flash가 최적 팔 쪽으로 점차 집중하는 행동이 뚜렷하지 않음을 보여줍니다.

![Table 5: \| Optimality of Exploration: We show the measures on the𝑡-th step along the progression of exploration, averaged across Bernoulli MAB configurations.…](https://refivu.com/papers/71818669-db0f-4587-bcd4-f1fe708ce324/figures/figure-8c87f53aef6579b987d160b1e8b5fcf5.png?thumb=512)

**Table 5** \| Optimality of Exploration: We show the measures on the𝑡-th step along the progression of exploration, averaged across Bernoulli MAB configurations. Full version with more models in Table A4 and A5. While a model might achieve high performance by chance—e.g., consistently selecting the optimal arm without deliberate exploration—we examine its behavior more closely using two metrics.OptFrac

[원문](https://arxiv.org/abs/2410.06238v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le, Minmin Chen · EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.

## 누적 후회 함수 적합을 통한 탐색 효율 분석

논문은 누적 후회 곡선을 f(T)=λ log(T)^α/Δmin+βT+λ2 형태로 적합합니다. 여기서 log(T) 항은 UCB 같은 강한 알고리즘의 준선형 후회를, βT 항은 최적 정책을 따르지 못하는 선형 증가를 나타냅니다. α와 β는 양수이고 λ2는 제약이 없으며, 강한 알고리즘은 α가 작고 β=0에 가까워야 합니다. 적합에는 scikit-learn의 curve fit 함수를 사용했고, 큰 Pro 모델에 AG나 SH를 적용하면 준선형 후회에 가까워지며 Flash는 fine-tuning으로 더 작은 α를 얻는다고 보고합니다. Gemma 2B와 9B는 대부분의 방법에서 여전히 선형 후회 영역에 머무릅니다.

## 범위와 남은 질문

이 연구의 결과는 BanditBench의 MAB와 CB 설정, 제시된 Gemma와 Gemini 모델, 그리고 UCB 또는 LinUCB를 오라클로 한 조건에서 얻은 것입니다. CB 설정의 사용자와 영화 정보는 MovieLens 기반의 준합성 데이터이며, 평가 사용자는 학습에서 제외된 보류 집합입니다. 원문은 LLM과 고전 최적 알고리즘 사이에 최적성 격차가 남아 있다고 결론짓습니다. 또한 few-shot 시연 결과는 수작업으로 만든 예시의 품질에 민감할 수 있다고 저자들이 해석합니다.

## 논문 정보

- **저자**: Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le, Minmin Chen
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2024년 10월 8일
- **등록일**: 2026년 10월 31일
- **수정일**: 2025년 7월 14일
- **버전**: v2
- **arXiv**: 2410.06238
- **분류**: cs.LG · cs.AI · cs.CL
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2410.06238v2) · [원문 PDF ↗](https://arxiv.org/pdf/2410.06238v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Despite their success in many domains, large language models (LLMs) remain under-studied in scenarios requiring optimal decision-making under uncertainty. This is crucial as many real-world applications, ranging from personalized recommendations to healthcare interventions, demand that LLMs not only predict but also actively learn to make optimal decisions through exploration. In this work, we measure LLMs' (in)ability to make optimal decisions in bandits, a state-less reinforcement learning setting relevant to many applications. We develop a comprehensive suite of environments, including both context-free and contextual bandits with varying task difficulties, to benchmark LLMs' performance. Motivated by the existence of optimal exploration algorithms, we propose efficient ways to integrate this algorithmic knowledge into LLMs: by providing explicit algorithm-guided support during inference; and through algorithm distillation via in-context demonstrations and fine-tuning, using synthetic data generated from these algorithms. Impressively, these techniques allow us to achieve superior exploration performance with smaller models, surpassing larger models on various tasks. We conducted an extensive ablation study to shed light on various factors, such as task difficulty and data representation, that influence the efficiency of LLM exploration. Additionally, we conduct a rigorous analysis of the LLM's exploration efficiency using the concept of regret, linking its ability to explore to the model size and underlying algorithm.

## 원문 인용

Allen Nie, Yi Su, Bo Chang, Jonathan N. Lee, Ed H. Chi, Quoc V. Le, Minmin Chen (2024). EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration. arXiv:2410.06238v2. https://arxiv.org/abs/2410.06238v2

**BibTeX**

```
@misc{nie2024evolve,
  title = {{EVOLvE: Evaluating and Optimizing LLMs For In-Context Exploration}},
  author = {Allen Nie and Yi Su and Bo Chang and Jonathan N. Lee and Ed H. Chi and Quoc V. Le and Minmin Chen},
  year = {2024},
  eprint = {2410.06238},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.06238v2}
}
```

## 이 논문의 용어

- [UCB](https://refivu.com/terms/30e3d368e7d4-ucb)
- [Algorithm Distillation](https://refivu.com/terms/203ce108b0bc-algorithm-distillation)
- [cumulative regret](https://refivu.com/terms/1da6a4fd7624-cumulative-regret)
- [exploration bonus](https://refivu.com/terms/7d55e87e3b5f-exploration-bonus)
- [LinUCB](https://refivu.com/terms/7038d50314f0-linucb)
- [MovieLens](https://refivu.com/terms/22ceb9ae94bf-movielens)
- [Behavior Cloning (BC)](https://refivu.com/terms/00a5c11c8153-behavior-cloning-bc)
- [contextual bandit (CB)](https://refivu.com/terms/d15f9285b2a6-contextual-bandit-cb)

## 다른 논문 해설

- [ReVISE: Learning to Refine at Test-Time via Intrinsic Self-Verification](https://refivu.com/papers/8a7022a8-6f13-4d37-81ee-6e37932a18ae-revise-learning-to-refine-at-test-time-via.md)
- [PIPA: Preference Alignment as Prior-Informed Statistical Estimation](https://refivu.com/papers/be8524c3-1e28-43de-a955-2a054c1298bb-pipa-preference-alignment-as-prior-informed-statistical.md)
- [Analyze Feature Flow to Enhance Interpretation and Steering in Language Models](https://refivu.com/papers/ef41dce7-1ab8-436d-95f6-309d53881e68-analyze-feature-flow-to-enhance-interpretation-and-steering.md)
- [NestQuant: Nested Lattice Quantization for Matrix Products and LLMs](https://refivu.com/papers/fcf33004-4ca4-4b0c-bd9b-474a77e2a35d-nestquant-nested-lattice-quantization-for-matrix-products.md)
- [Generalists vs. Specialists: Evaluating LLMs on Highly-Constrained Biophysical Sequence Optimization Tasks](https://refivu.com/papers/90537ca5-09a6-4938-a0b2-cf8bcdd9bf45-generalists-vs-specialists-evaluating-llms-on-highly.md)
- [Speak Easy: Eliciting Harmful Jailbreaks from LLMs with Simple Interactions](https://refivu.com/papers/a94528b0-df05-4b76-91b4-955819162496-speak-easy-eliciting-harmful-jailbreaks-from-llms-with.md)
- [Subgroups Matter for Robust Bias Mitigation](https://refivu.com/papers/2a39c8a2-c675-4178-942e-a231ced5722f-subgroups-matter-for-robust-bias-mitigation.md)
- [On the Local Complexity of Linear Regions in Deep ReLU Networks](https://refivu.com/papers/4e18b138-8443-47ed-b132-30aafeb59696-on-the-local-complexity-of-linear-regions-in.md)
- [Compositional Flows for 3D Molecule and Synthesis Pathway Co-design](https://refivu.com/papers/feed94c0-7156-4f2f-9269-679de456e8d8-compositional-flows-for-3d-molecule-and-synthesis-pathway.md)
- [Enforcing Latent Euclidean Geometry in Single-Cell VAEs for Manifold Interpolation](https://refivu.com/papers/21f3b42c-975f-4475-a77f-1405d2b3c677-enforcing-latent-euclidean-geometry-in-single-cell-vaes.md)
- [Structured Preconditioners in Adaptive Optimization: A Unified Analysis](https://refivu.com/papers/d4bc52f1-4d2f-4226-921a-6ea9b9af64ee-structured-preconditioners-in-adaptive-optimization-a.md)
- [Patch-wise Structural Loss for Time Series Forecasting](https://refivu.com/papers/3067fd52-472e-43d8-89a0-57537cc1fb77-patch-wise-structural-loss-for-time-series-forecasting.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/71818669-db0f-4587-bcd4-f1fe708ce324-evolve-evaluating-and-optimizing-llms-for-in-context)
