Bring Your Own Data! Self-Sensitivity Evaluation for Large Language Models

Neel Jain, Khalid Saifullah, Yuxin Wen, John Kirchenbauer, Manli Shu, Aniruddha Saha, Micah Goldblum, Jonas Geiping, Tom GoldsteinCOLM 2024

TL;DR

This paper introduces "self-sensitivity evaluation," a novel framework for assessing Large Language Models (LLMs) by analyzing their output's invariance to input text transformations. This approach bypasses the need for costly human-labeled datasets, enabling continuous monitoring of LLMs in real-world deployment scenarios and offering a more robust evaluation of their behavior across various capabilities.

What Problem Does This Paper Address?

The rapid advancement and widespread deployment of Large Language Models (LLMs) have created a critical need for accurate and comprehensive evaluation metrics. Traditional evaluation methods rely on curated, domain-specific datasets with human-annotated labels. However, these datasets face several challenges: they are expensive and time-consuming to create, often represent a narrow distribution of real-world data, and are susceptible to data leakage from training sets, rendering them obsolete over time. This makes it difficult to reliably assess LLM behavior in diverse, dynamic, and real-world applications.

Methods

The core of this paper is the "self-sensitivity evaluation" framework. Instead of relying on external labels, this method probes LLM behavior by introducing controlled transformations to input text and measuring the model's output's invariance or sensitivity to these changes. The general procedure involves:

  1. Corpus Selection: Using a text corpus (e.g., Wikipedia, medical texts, bookcorpus).
  2. Transformation: Applying a specific perturbation to the original text (e.g., negating a fact, swapping words, introducing typos). This creates pairs of original ($x$) and transformed ($x'$) texts.
  3. Model Output Extraction: Feeding these pairs into the LLM to obtain outputs, which can be probability distributions, perplexity scores, or feature vectors.
  4. Similarity Measurement: Quantifying the difference or similarity between the outputs for the original and transformed texts using a similarity metric ($M$).
  5. Aggregation: Averaging these similarity scores across all transformed pairs to produce a final sensitivity score.

The paper demonstrates this framework through several case studies, including:

  • Knowledge Probing via Negations: Measuring how a model's understanding of facts changes when they are negated.
  • Toxicity: Assessing a model's stoicism to profanity by appending trigger words.
  • Word Order Sensitivity: Evaluating how word order changes affect model predictions.
  • Long-Range Dependency: Testing a model's ability to maintain context across longer passages.
  • Tokenization Sensitivity: Examining how variations in text tokenization impact model output.

Datasets

The paper utilizes several datasets for its experiments:

  • Wikipedia: Used as a general corpus for various self-sensitivity evaluations.
  • Bookcorpus: Employed as a "neutral" corpus for normalizing sensitivity scores in knowledge probing.
  • TriviaQA: A human-labeled dataset used to validate the correlation between self-sensitivity metrics and traditional accuracy-based evaluations for knowledge probing.
  • MMLU (clinical knowledge subset): Used to validate the self-sensitivity metric for medical domain knowledge.
  • RealToxicityPrompts: A benchmark for toxicity evaluation, used for comparison.
  • HellaSwag: A commonsense reasoning task used for comparison with the word order sensitivity metric.
  • LAMBADA: A dataset for evaluating long-range dependency, used for comparison.
  • Medical terms dataset (gamino/wiki_medical_terms): Used for domain-specific evaluation of knowledge probing.

No new benchmarks were explicitly introduced, but the framework is designed to be dataset-agnostic and applicable to "in-the-wild" data.

Key Insights and Ideas

  • Self-Supervised Evaluation is Viable: The paper convincingly demonstrates that LLM behavior can be effectively evaluated without relying on human-annotated labels by leveraging input transformations. This opens the door for more scalable and continuous evaluation.
  • Instruction Tuning Impacts Sensitivity: Instruction-tuned models generally exhibit increased sensitivity to input transformations (e.g., negations, word order changes) compared to their pretrained counterparts. This suggests that instruction tuning might enhance a model's ability to process and react to nuanced linguistic structures.
  • Tokenization Robustness Varies Significantly: Models differ greatly in their sensitivity to tokenization errors. The paper highlights that models trained on more data (higher FLOPS) tend to be more robust to these changes, with OPT models being a notable exception due to their limited training data.
  • Traditional Metrics Can Be Misleading: For instruction-tuned models, perplexity alone is not as robust an evaluation metric as self-sensitivity, potentially due to their overconfidence. The Cohere Command model is identified as an outlier where traditional metrics might not capture its insensitivity to grammatical structure.
  • Self-Sensitivity Complements, Not Replaces: The authors emphasize that self-sensitivity evaluation is a complementary approach to existing labeled benchmarks, providing a different lens through which to understand LLM capabilities and limitations.

Key Results

  • Strong Correlations: The proposed self-sensitivity metrics show strong correlations with established human-supervised benchmarks like TriviaQA (Pearson correlation of 0.76 for vanilla models, 0.73 for instruction models) and MMLU (clinical) (Pearson correlation of 0.91).
  • Instruction Tuning Boosts Sensitivity: On average, instruction finetuning increases sensitivity scores across various metrics, including knowledge probing via negations and long-range dependency.
  • Toxicity Correlation: The self-sensitivity toxicity metric shows a high correlation (Pearson correlation of 0.97) with the Perspective API.
  • Word Order and HellaSwag: A positive correlation (Pearson correlation of 0.88) was observed between the Word Order Score and HellaSwag performance.
  • LLaMA and MPT Robustness: LLaMA and MPT models demonstrated better robustness to tokenization sensitivity compared to other models.

Limitations and Future Work

  • Dataset Bias: For the truthfulness measurement (knowledge probing), the dataset used must contain a larger fraction of true statements than neutral or false ones to be most effective.
  • Nuanced Toxicity: The toxicity analysis focuses on explicit profanity and may not capture more subtle forms of toxicity. The reliance on predefined lists of profane words is also a limitation.
  • Word Order Proxy: The assumption that next-token prediction after word swaps is a good proxy for word order sensitivity might not hold universally.
  • Memorization Effects: The paper acknowledges that it's challenging to disentangle the effects of memorization from genuine generalization, and this interaction with sensitivity metrics warrants further research.
  • Future Work: The authors suggest exploring entropy and memorization in more detail. They also propose that analyzing attention probabilities might be more effective for transformers than token probability space for long-range sensitivity. Further research could also focus on developing more sophisticated transformations, potentially leveraging LLMs themselves to generate counterfactuals. The potential for self-supervised metrics to be conducted at scale is highlighted as a key direction for future LLM evaluation.

Summary updated

BibTeX
@inproceedings{jain2024bring,
  author = {Neel Jain and Khalid Saifullah and Yuxin Wen and John Kirchenbauer and Manli Shu and Aniruddha Saha and Micah Goldblum and Jonas Geiping and Tom Goldstein},
  title = {{Bring Your Own Data! Self-Sensitivity Evaluation for Large Language Models}},
  booktitle = {COLM},
  year = {2024},
  url = {https://openreview.net/forum?id=k2xZYPZo34},
}
Figure