The ICL Consistency Test

Lucas Weber, Elia Bruni, Dieuwke HupkesarXiv 2023

Abstract

Just like the previous generation of task-tuned models, large language models (LLMs) that are adapted to tasks via prompt-based methods like in-context-learning (ICL) perform well in some setups but not in others. This lack of consistency in prompt-based learning hints at a lack of robust generalisation. We here introduce the ICL consistency test -- a contribution to the GenBench collaborative benchmark task (CBT) -- which evaluates how consistent a model makes predictions across many different setups while using the same data. The test is based on different established natural language inference tasks. We provide preprocessed data constituting 96 different 'setups' and a metric that estimates model consistency across these setups. The metric is provided on a fine-grained level to understand what properties of a setup render predictions unstable and on an aggregated level to compare overall model consistency. We conduct an empirical analysis of eight state-of-the-art models, and our consistency metric reveals how all tested LLMs lack robust generalisation.

Introduction

In-context learning (ICL) has revolutionized how we interact with Large Language Models (LLMs), allowing them to perform tasks with just a few examples. However, this method is notoriously "chaotic." A model's performance can fluctuate significantly based on minor changes: the order of examples, specific wording, or label distributions. This sensitivity suggests that high accuracy scores might mask a lack of robust generalization. If a model is truly robust, its predictions should be invariant to changes that do not alter the task's semantic nature.

The ICL Consistency Test

To systematically measure this instability, we developed the ICL Consistency Test. This framework evaluates models across 96 different prompting setups for every data point, varying several "binary factors":

  • n-shots: 2 vs. 5 examples.
  • HP instructions: High-performing vs. low-performing (but semantically equivalent) templates.
  • Balanced labels: Balanced vs. randomly sampled labels in the prompt.
  • Cross-task: Examples from the same task vs. a different task (e.g., using paraphrase examples for a logic task).
  • Instructions: Swapping between different valid task descriptions.

Consistency is measured using Cohen’s kappa ($\kappa$), treating the same model under two different setups as two separate "raters." A $\kappa$ of 1.0 indicates perfect consistency, while 0 indicates agreement no better than chance.

Key Findings

The Impact of Scale and Instruction Tuning

Our analysis of the LLaMA family (7B to 65B) and their instruction-tuned (IT) counterpart, Alpaca, reveals a critical distinction. For "vanilla" pre-trained models, increasing the parameter count does not improve consistency; they remain equally unstable regardless of size.

In contrast, instruction tuning acts as a significant stabilizer. Not only are IT models more consistent overall, but they also exhibit a positive scaling law: as the model grows, its consistency improves significantly, whereas vanilla models stay relatively flat.

Average consistency ($\kappa_{avg}$) vs model size for vanilla and instruction-tuned (IT) models.

Identifying Failure Points

Even the most advanced models struggle with consistency. The highest $\kappa$ scores observed were around 0.75, meaning a substantial portion of predictions still flip when prompts change slightly.

We found that models are most sensitive to the HP instructions factor. Using a "low-performing" template—even if it is semantically equivalent to a "high-performing" one—is the most common way to break model consistency across all tested sizes.

Model consistency ($\kappa$) across different prompt factors for vanilla and instruction-tuned models.

Conclusion

The ICL Consistency Test highlights that accuracy is a narrow metric for evaluating LLMs. A model can achieve high accuracy while remaining fundamentally unstable. Our results show that while instruction tuning and scale help, current LLMs still lack the robust generalization required for truly reliable performance. This benchmark, now part of the GenBench collaborative task, provides a path forward for the community to develop more invariant and robust models.

Summary updated

BibTeX
@misc{weber2023icl,
  author = {Lucas Weber and Elia Bruni and Dieuwke Hupkes},
  title = {{The ICL Consistency Test}},
  year = {2023},
  eprint = {2312.04945},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.04945},
}
Figure