Improving Probability-based Prompt Selection Through Unified Evaluation and Analysis

Sohee Yang, Jonghyeon Kim, Joel Jang, Seonghyeon Ye, Hyunji Lee, Minjoon Seo

TL;DR

This paper introduces a unified framework for evaluating probability-based prompt selection methods, revealing that most existing techniques are actually variants of Mutual Information (MI). By identifying these connections, the authors propose new combinatorial variants and a novel calibration method, Calibration by Marginalization (CBM), which boosts prompt selection effectiveness to nearly 97% of the theoretical "oracle" optimum.

What Problem Does This Paper Address?

Large Language Models (LLMs) are notoriously sensitive to prompting; a slight change in wording can lead to massive swings in performance. While "prompt engineering" aims to find the best prompt, doing so usually requires a labeled validation set, which defeats the purpose of zero-shot learning.

"Probability-based" selection methods attempt to pick the best prompt without labels, relying solely on the model's own output distributions. However, these methods were developed in isolation, making it impossible to know which one truly works best. Furthermore, LLMs suffer from inherent biases (e.g., favoring certain labels just because they are common in pre-training), which can lead these selection methods astray.

Methods

The authors contribute three main technical advancements:

  1. Unified Framework: They prove that existing methods—like Global Entropy (GE), Local Entropy (LE), and Minimum Description Length (MDL)—can be interpreted as sub-terms of the Mutual Information equation between inputs and outputs.
  2. Combinatorial Variants: By mixing and matching design choices from different methods (e.g., using all tokens of a verbalizer vs. just the first, or selecting prompts per-instance vs. per-dataset), they created new variants like $MI_{AGL}$ that outperform previous state-of-the-art methods.
  3. Calibration by Marginalization (CBM): They propose a new way to fix model bias. Unlike previous methods that use "content-free" inputs (like "N/A"), CBM estimates the model's label bias by averaging its predictions across the entire unlabeled evaluation dataset.
The unified view shows how different methods correspond to specific parts of the Mutual Information equation.

Datasets

The study uses a comprehensive benchmark of 13 diverse NLP tasks categorized by their label distributions:

  • Balanced: IMDB, SST-2, AG News, RTE.
  • Unbalanced: Newspop, Tweet-Irony, Tweet-Emotion, CB, SST-5.
  • Dynamic (sentence-level answers): COPA, PIQA, StoryCloze, HellaSwag.

They tested these across 10 different LLMs ranging from 1.3B to 66B parameters (including GPT-Neo, OPT, and BLOOM) to ensure their findings were not model-specific.

Key Insights and Ideas

  • The "Aha" Moment: The realization that disparate methods are just different ways of looking at Mutual Information. For instance, Global Entropy (GE) focuses on making predictions balanced across the dataset, while Local Entropy (LE) focuses on making the model confident for each specific input.
  • Calibration is Non-Trivial: Surprisingly, popular calibration methods like Contextual Calibration (CC) often degraded performance in zero-shot settings. CBM succeeded because it uses the actual data distribution to ground the model's probabilities.
  • No Universal Winner: The "best" existing method depends on the dataset type. GE and MDL shine on balanced data, while MI is better for unbalanced tasks. This highlights the need for the authors' unified, flexible approach.

Key Results

  • Performance Leap: Their best combinatorial variant, $MI_{AGL}$, improved the "scaled F1" (the ratio of selected prompt performance to the best possible prompt) from 87.79% to 94.98%.
  • Calibration Boost: Adding CBM calibration pushed this further to 96.85%, effectively achieving 99.44% of the oracle prompt's performance in an uncalibrated scenario.
  • Robustness: CBM improved answer selection for more than half of the prompts across all 13 datasets, whereas previous calibration methods often made things worse (see Figure 1b below).
Main results showing (a) the superiority of the proposed methods and (b) the robustness of CBM calibration compared to existing techniques.

Limitations and Future Work

  • Computational Cost: Calculating these scores requires running the model on the entire evaluation set for every candidate prompt. For very large datasets or many prompts, this becomes expensive. The authors suggest using a smaller subset of data for selection as a potential fix.
  • Closed-Source Models: These methods require access to the model's internal probability distributions. This makes them difficult to use with "black-box" APIs (like GPT-4) that only provide text outputs or limited log-probabilities.
  • Future Directions: Exploring how these selection methods behave in few-shot settings and finding ways to reduce the computational overhead are logical next steps.

Summary updated

BibTeX
@article{yang2024improving,
  author = {Sohee Yang and Jonghyeon Kim and Joel Jang and Seonghyeon Ye and Hyunji Lee and Minjoon Seo},
  title = {{Improving Probability-based Prompt Selection Through Unified Evaluation and Analysis}},
  journal = {Trans. Assoc. Comput. Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=OPI30xrn7f},
}
Figure