Abstract
Zero-shot in-context learning (ZS-ICL) enables Large Language Models (LLMs) to perform tasks by generating their own "pseudo-demonstrations." However, traditional ZS-ICL methods often process problems in a random order, leading to error accumulation and contextually irrelevant demonstrations. We propose DAWN-ICL (Demonstration-AWare MoNte Carlo Tree Search), a framework that reformulates ZS-ICL as a strategic planning problem. By utilizing MCTS to optimize the sequence of problem-solving, DAWN-ICL generates high-quality trajectories that minimize hallucinations. Our approach incorporates a demonstration-aware Q-value function and an efficient action cache to balance performance and computational cost. Experimental results on BIG-Bench Hard and MMLU demonstrate that DAWN-ICL consistently outperforms existing zero-shot baselines and rivals human-annotated few-shot learning.
Introduction: The Challenge of Random Ordering in ZS-ICL
In-context learning (ICL) has traditionally relied on human-annotated examples. Zero-shot variants (ZS-ICL) attempt to remove this bottleneck by having the model generate its own (input, label) pairs. However, a significant flaw in current ZS-ICL implementations is the reliance on random problem ordering.
As illustrated in Figure 1, random ordering can lead to two primary issues:
- Error Accumulation: An early mistake creates an incorrect pseudo-demonstration that triggers a "hallucination snowball," degrading performance on all subsequent problems.
- Task Irrelevance: In mixed-task scenarios, a randomly selected demonstration may be "helpless" or detrimental if it lacks semantic relevance to the current problem.
Methodology: Planning with DAWN-ICL
DAWN-ICL treats the problem-solving process as a search for an optimal trajectory. It leverages Monte Carlo Tree Search (MCTS) to explore different sequences, ensuring that "easier" or more relevant problems are solved first to provide a high-quality context for more difficult ones.
Key Technical Innovations
- MCTS for Trajectory Search: The framework uses the four phases of MCTS—Selection, Expansion, Simulation, and Back-propagation—to navigate the astronomical state space of possible problem sequences.
- Demonstration-Aware Q-value (DQ): To accelerate the search, the $DQ$ function initializes the value of solving a specific problem based on its semantic similarity to existing pseudo-demonstrations and the model's self-reported confidence.
- Action Cache: High-confidence predictions are stored in a cache. During the Simulation phase, the system retrieves these cached results instead of re-invoking the LLM, drastically reducing inference costs.
- Calibration-Enhanced Aggregation: Final answers are aggregated across multiple MCTS iterations using a calibration strategy to mitigate the model's inherent token biases.
Experimental Results
The researchers evaluated DAWN-ICL using models such as Llama 3.1-8B, Qwen 2.5-7B, and GPT-4o-mini across benchmarks including BIG-Bench Hard (BBH) and MMLU.
Performance Highlights
- Surpassing Human Baselines: On the BBH benchmark with Llama 3.1-8B, DAWN-ICL achieved an average accuracy of 48.01%, significantly higher than the 45.42% achieved by standard few-shot learning using human-annotated examples.
- Cost Efficiency: The Action Cache mechanism proved vital for practical deployment. On BBH with GPT-4o-mini, it reduced the total API cost from $5.81 to just $0.52 while maintaining accuracy.
- Robustness in Messy Data: In "cross-domain" tests (BBH-mini) where tasks were mixed, DAWN-ICL's strategic planning showed even more pronounced gains over random baselines, proving its ability to filter for relevant context.
Discussion and Future Work
The core insight of DAWN-ICL is the "curriculum effect": the order in which a model solves problems acts as a self-generated training curriculum. By using confidence as a proxy for truth, the model can effectively guide its own learning process.
Despite its success, MCTS remains more computationally intensive than single-pass prompting. Future research could explore training specialized "value models" to replace the simulation phase or developing more advanced pruning techniques to handle even larger problem sets. Furthermore, testing the framework on larger "frontier" models will be essential to understanding its full potential in scaling laws.
Summary updated