PertEval: Unveiling Real Knowledge Capacity of LLMs with Knowledge-Invariant Perturbations

Jiatong Li, Renjun Hu, Kunzhe Huang, Yan Zhuang, Qi Liu, Mengxiao Zhu, Xing Shi, Wei Lin · DOI

TL;DR

This paper introduces PertEval, a novel toolkit designed to more accurately assess the "true" knowledge capacity of Large Language Models (LLMs). By using "knowledge-invariant perturbations" to slightly alter existing benchmarks, PertEval reveals that LLMs often perform significantly better on standard tests than they would in more realistic, slightly varied scenarios, highlighting an overestimation of their capabilities.

What Problem Does This Paper Address?

Evaluating the knowledge capacity of LLMs is crucial, especially as they are deployed in increasingly critical applications. Current methods primarily rely on static, close-ended benchmarks (like multiple-choice tests). However, these benchmarks have two major drawbacks:

  1. Limited Scenarios: They don't reflect the diverse ways humans might interact with or question an LLM in the real world.
  2. Data Contamination: LLMs might have inadvertently "memorized" the test data during their extensive training, leading to inflated performance scores that don't represent genuine understanding.

These issues make it difficult to trust the reported knowledge capacity of LLMs, hindering reliable evaluation and development.

Methods

PertEval tackles this problem by introducing two key components:

  1. Knowledge-Invariant Perturbations: This is the core innovation. Instead of creating entirely new datasets, PertEval modifies existing ones in ways that shouldn't change the underlying knowledge required to answer a question. These perturbations are designed to be "human-like" and include:
  2. Content-Level Perturbations (KnInvPara): Paraphrasing sentences within a question to alter phrasing while preserving the core meaning. This is done by an LLM rewriter.
  3. Format-Level Perturbations: Altering the structure or presentation of the question and its options without changing the knowledge needed. Examples include:
  4. Option Permutation (OptionPerm): Shuffling the order of answer choices.
  5. Option Format Refactoring (OptionForm): Changing how options are presented (e.g., adding parentheses).
  6. Option ID Shifting (OptionCaesar): Renaming options (e.g., A, B, C to U, V, W).
  7. Question Type Changing (ChangeType): Converting a multiple-choice question to a multiple-judgment question.
  8. Question Position Swapping (SwapPos): Swapping the question text with the options.
  9. Response Consistency Analyses: After generating perturbed datasets, PertEval evaluates LLM performance on both the original and perturbed versions. This comparison reveals how robust the LLM's knowledge is. Key metrics include:
  10. Consistent Accuracy (ACC@Consist): Measures accuracy on both original and perturbed data. A significant drop indicates a lack of robust knowledge.
  11. Performance Drop Rate (PDR): Quantifies the decrease in accuracy due to perturbations.
  12. Recall of Performance (ROP): Measures how often an LLM consistently answers correctly before and after perturbation.

Datasets

The paper uses existing datasets from the Massive Multitask Language Understanding (MMLU) benchmark. Specifically, they evaluate on four supercategories:

  • College Mathematics (C-Math)
  • World History (W-History)
  • Professional Psychology (P-Psychology)
  • Professional Medicine (P-Medicine)

These datasets are chosen for their comprehensiveness across different domains.

Key Insights and Ideas

  • Overestimation is Real: Standard benchmarks significantly overestimate LLM knowledge capacity. The performance drop on perturbed data is substantial, revealing a gap between "benchmark accuracy" and "real knowledge capacity."
  • LLMs Memorize, Not Always Understand: The perturbations highlight that LLMs might be relying on rote memorization of specific question-answer pairs rather than true comprehension. They struggle when the phrasing or format slightly changes.
  • Vulnerability to Format Changes: Even seemingly minor format changes (like shuffling options or changing question order) can disproportionately impact LLM performance, suggesting a lack of robustness.
  • Knowledge Invariance is Tricky: Measuring "knowledge invariance" is challenging. Simple string-based metrics (like edit distance) don't correlate well with how well an LLM retains knowledge.
  • Response Patterns Reveal Weaknesses: Analyzing how LLMs answer (e.g., selecting multiple options, including incorrect ones) provides deeper insights into their failure modes under perturbation.

Key Results

  • GPT-4 Overestimation: GPT-4 showed an absolute overestimation of 25.8% on MMLU benchmarks when compared to PertEval's assessment.
  • Performance Drop: Across various LLMs, a significant performance drop was observed on perturbed datasets. For instance, GPT-4's accuracy dropped by over 25% when evaluated with composite perturbations.
  • ACC@Consist: Even the best-performing LLM (GPT-4) achieved an ACC@Consist of only 0.555, indicating that less than 60% of its knowledge is consistently reliable across different question presentations.
  • SwapPos Impact: The SwapPos perturbation (swapping question and options) significantly impacted performance across all LLMs, even on "mastered" questions, suggesting a sensitivity to global text order.
  • ROP Scores: GPT-4 achieved the highest average ROP of 0.9, indicating strong consistency, while other LLMs showed more vulnerability.

Limitations and Future Work

  • Benchmark Scope: PertEval is currently designed for close-ended benchmarks and cannot be directly applied to open-ended questions due to their inherent complexity and evaluation challenges.
  • Controllability: Achieving precise control over paraphrasing while maintaining knowledge invariance is difficult due to the complex nature of LLMs. Future work aims for finer-grained controllability (e.g., tone, length).
  • Cost: Experiments were conducted on a subset of MMLU due to budget constraints. Expanding to more datasets is desired.
  • Adaptive Optimization: As PertEval is open-sourced, there's a risk of LLMs being optimized to specifically pass PertEval. The authors suggest that the diversity of perturbations and the cost of adaptive optimization can mitigate this. They also propose a platform for regularly updating perturbation strategies.
  • Fine-tuning for Improvement: The paper demonstrates that fine-tuning LLMs on PertEval-generated data can improve their robustness and knowledge capacity, suggesting a path for LLM refinement.

Summary updated

Abstract

Expert-designed close-ended benchmarks serve as vital tools in assessing the knowledge capacity of large language models (LLMs). Despite their widespread use, concerns have mounted regarding their reliability due to limited test scenarios and an unavoidable risk of data contamination. To rectify this, we present PertEval, a toolkit devised for in-depth probing of LLMs' knowledge capacity through knowledge-invariant perturbations. These perturbations employ human-like restatement techniques to generate on-the-fly test samples from static benchmarks, meticulously retaining knowledge-critical content while altering irrelevant details. Our toolkit further includes a suite of transition analyses that compare performance on raw vs. perturbed test sets to precisely assess LLMs' genuine knowledge capacity. Six state-of-the-art LLMs are re-evaluated using PertEval. Results reveal significantly inflated performance of the LLMs on raw benchmarks, including an absolute 21% overestimation for GPT-4. Additionally, through a nuanced response pattern analysis, we discover that PertEval retains LLMs' uncertainty to specious knowledge, potentially being resolved through rote memorization and leading to inflated performance. We also find that the detailed transition analyses by PertEval could illuminate weaknesses in existing LLMs' knowledge mastery and guide the development of refinement. Given these insights, we posit that PertEval can act as an essential tool that, when applied alongside any close-ended benchmark, unveils the true knowledge capacity of LLMs, marking a significant step toward more trustworthy LLM evaluation.
BibTeX
@inproceedings{li2024perteval,
  author = {Jiatong Li and Renjun Hu and Kunzhe Huang and Yan Zhuang and Qi Liu and Mengxiao Zhu and Xing Shi and Wei Lin},
  title = {{PertEval: Unveiling Real Knowledge Capacity of LLMs with Knowledge-Invariant Perturbations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=FtngbLICb3},
}
Figure