Abstract
The rapid advancement of Large Language Models (LLMs) has raised concerns regarding the validity of benchmark evaluations due to data contamination—the presence of test data within training sets. This paper presents CAP (Consistency Amplification-based Detection), a novel approach that identifies contamination by leveraging the brittleness of rote memorization. By applying minor, meaning-preserving modifications to test samples, CAP measures the Performance Consistency Ratio (PCR) to distinguish between genuine learning (fine-tuning) and simple memorization. Our results demonstrate that CAP effectively detects contamination in both white-box and black-box models across multiple task formats, including multiple-choice questions and sequence generation.
Introduction
As LLMs dominate benchmarks, distinguishing between true reasoning ability and memorized patterns becomes critical. Data contamination threatens the integrity of AI evaluation, as models may "cheat" by having seen test samples during pre-training or fine-tuning. Existing detection methods often require internal model probabilities or are limited to specific task types. CAP addresses these limitations by focusing on performance consistency under perturbation, providing a robust detection mechanism for any model.
The CAP Framework
The CAP framework operates through a multi-stage process designed to amplify the signal of contamination. The core intuition is that a model that has truly learned a concept should be robust to minor variations, whereas a memorized string is brittle.
- Consistency Amplification: The system generates modified versions of the benchmark data using three strategies:
- Factual Consistency: Shuffling options in Multiple Choice Questions (MCQs).
- Logical Consistency: Altering non-essential "distractor" details (e.g., dates) in reasoning tasks.
- Semantic Consistency: Paraphrasing text while maintaining the original meaning.
- Inference: The model processes both the original and modified datasets.
- PCR Calculation: Performance scores are compared to determine the consistency ratio.
- Detection: The difference between training and test PCRs is used to flag contamination. A key insight is directionality: if $PCR_{train} \gg PCR_{test}$, the model was likely fine-tuned; if $PCR_{train} \ll PCR_{test}$, it suggests contamination.
Experimental Evaluation
The authors evaluated CAP using four financial domain benchmarks: FinEval (MCQs), FinQA (numerical reasoning), AlphaFin (financial analysis), and ECTSum (summarization). Seven models were tested, including general-purpose LLMs (Llama-3, Mistral) and specialized financial models (FinMA, Disc-Fin).
Comparative Advantages
CAP outperforms existing methods by supporting a wider range of task formulations and working across all levels of model transparency.
Key Results
- Detection of Contaminated Models: CAP successfully identified likely contamination in Baichuan-13B and Disc-Fin-13B on the FinEval benchmark. A subsequent audit confirmed a 21-question overlap between the training data and the test set.
- Validation of Fine-tuning: For models like FinMA, CAP correctly identified legitimate fine-tuning on the FinQA training set, showing a high positive PCR difference.
- Inheritance of Contamination: The study found that contamination in a base model is typically inherited by any derivative models fine-tuned on it.
Conclusion
CAP provides a versatile and effective tool for detecting data contamination without requiring internal model access. By amplifying the inconsistency of memorized patterns, it offers a clear signal to distinguish between "cheating" and genuine domain expertise. Future work will focus on scaling these methods to larger models and achieving more granular, sample-level detection.
Summary updated