Abstract
In-Context Learning (ICL) is notoriously sensitive to prompt variations, such as instruction phrasing and example ordering. This paper investigates the relationship between this sensitivity and model accuracy. We demonstrate a strong negative correlation between a model's sensitivity to prompt perturbations and its prediction correctness. Leveraging this insight, we propose SENSEL (Sensitivity-based Selective Prediction), a method that uses sensitivity as a confidence signal to decide when a model should abstain from predicting. Our results show that SENSEL consistently outperforms standard probability-based baselines, providing a more reliable measure of model uncertainty in few-shot settings.
Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities in performing tasks via In-Context Learning (ICL). However, the performance of ICL is often "brittle," meaning that minor, semantically equivalent changes to the prompt can lead to drastically different outputs. While previous research has focused on mitigating this sensitivity, this work explores whether sensitivity itself can be a useful signal. We hypothesize that if a model's prediction is highly sensitive to the way a task is prompted, it is less likely to be correct.
Methodology
We conducted a systematic study of sensitivity across ten classification datasets using GPT-J-6B and GPT-Neo-2.7B. Sensitivity was measured by applying two types of perturbations:
- Instruction Perturbation: Paraphrasing human-written instructions or applying automated noise.
- Example Ordering: Permuting the sequence of few-shot demonstrations.
Addressing Label Bias
A key methodological hurdle is "label bias"—the model's inherent preference for certain labels. We found that label bias often masks a model's true sensitivity. By applying Prototypical Calibration (PC), we were able to mitigate these biases, revealing that the "true" sensitivity of models is significantly higher than previously estimated.
The Sensitivity-Accuracy Correlation
Our analysis reveals a robust negative correlation between sensitivity and accuracy, with Pearson correlation coefficients reaching up to -0.40. This suggests that sensitivity is a reliable indicator of a model's lack of "concept" mastery for a given input. When a model is uncertain, slight changes in the prompt's context cause it to flip its prediction.
SENSEL: Selective Prediction via Sensitivity
Based on the observed correlation, we propose SENSEL. Unlike traditional methods that rely on the maximum softmax probability (MaxProb) of the output, SENSEL evaluates the stability of a prediction across multiple perturbed prompts. If the model's output is inconsistent (high sensitivity), SENSEL marks the prediction as low-confidence and chooses to abstain.
Results and Discussion
SENSEL demonstrates superior performance in selective prediction tasks compared to standard baselines like MaxProb and Entropy.
- Performance Gains: On GPT-J-6B, SENSEL improved the Area Under the F1-Coverage curve (AUC) by an average of +4.1 points.
- Instruction Sensitivity: Human-written paraphrases provided the most effective perturbation set for identifying incorrect predictions.
- Zero-Instruction Scenarios: In settings where task instructions were unavailable, perturbing example ordering (SENSEL-ExOrd) still yielded a +3.0 AUC point improvement over probability-based methods.
These findings suggest that sensitivity and standard probability-based confidence are complementary signals. SENSEL is particularly effective in identifying "brittle" cases where the model might otherwise be overconfident but wrong.
Conclusion
This research turns a well-known weakness of ICL—its sensitivity to prompt phrasing—into a strength for model reliability. By measuring sensitivity, we can better detect when an LLM is likely to make a mistake. While SENSEL introduces additional computational overhead due to multiple inference passes, the resulting gains in prediction reliability make it a promising approach for high-stakes LLM applications.
Summary updated