Data Checklist: On Unit-Testing Datasets with Usable Information

Heidi Chenyu Zhang, Shabnam Behzad, Kawin Ethayarajh, Dan Jurafsky

TL;DR

This paper introduces "data checklists," a novel framework for systematically evaluating datasets themselves, analogous to unit testing for code. By leveraging $\mathcal{V}$-information, these checklists uncover hidden artifacts in datasets, leading to improved LLM training and data efficiency, particularly in the challenging domain of preference alignment.

What Problem Does This Paper Address?

While model checklists (like Ribeiro et al., 2020) are useful for testing LLM behavior, they often address issues that stem from the training data itself. Currently, dataset evaluation for artifacts (like annotation biases or spurious correlations) is largely done ad hoc after model performance issues are detected. This reactive approach is inefficient. The paper argues for a more proactive, principled method to "unit test" datasets before they are used to train models, aiming to identify and mitigate dataset-induced problems upstream.

Methods

The core contribution is a taxonomy of ten "data checklist" tests, grounded in the $\mathcal{V}$-information framework. $\mathcal{V}$-information quantifies how much information a variable $X$ contains about a variable $Y$ that is accessible to a specific model family $\mathcal{V}$. The tests are formulated as inequalities involving $\mathcal{V}$-information, with a small tolerance threshold $\epsilon$.

These tests probe various aspects of a dataset:

  • Viability/Unviability: Does the input $X$ contain any usable information about the output $Y$?
  • Applicability/Inapplicability: Can a specific attribute $\Phi$ of the input $X$ be used to learn about $Y$?
  • Non-Exclusivity/Exclusivity: Is all usable information about $Y$ contained only within attribute $\Phi$?
  • Insufficiency/Sufficiency: Is all usable information about $Y$ contained within attribute $\Phi$?
  • Necessity/Redundancy: Does attribute $\Phi$ contain usable information about $Y$ that is not present elsewhere in $X$?

The paper also introduces Pointwise $\mathcal{V}$-information (PVI), which measures the difficulty of individual data points. This allows for data filtering by removing low-PVI (easy) or high-PVI (hard) examples, depending on the test.

Datasets

The paper uses several datasets for evaluation and demonstration:

  • SNLI (Stanford Natural Language Inference): Used to rediscover known artifacts like premise-hypothesis overlap.
  • DWMW17 (Davidson et al., 2017): A hate speech detection dataset used to examine lexical bias.
  • Preference Datasets:
    • SHP (Stanford Human Preferences Dataset): Human preferences from Reddit.
  • Anthropic-HH: Helpfulness and harmlessness comparisons from natural language dialogues.
  • UltraFeedback: Automated preference pairs generated using GPT-4.

The authors also developed a library for creating and applying these data checklists.

Key Insights and Ideas

  • Datasets are first-class citizens for testing: The paper shifts the focus from solely testing models to systematically testing the datasets that train them, treating datasets as components that can have "bugs" or "artifacts."
  • $\mathcal{V}$-information provides a principled lens: Using $\mathcal{V}$-information allows for a formal, quantitative way to assess dataset properties, moving beyond qualitative observations.
  • Preference datasets are rife with subtle artifacts: The authors discover previously unknown artifacts in preference datasets, such as response length bias, which are hard to detect with traditional methods.
  • Low-PVI examples can indicate mislabeling: The study found that data points with very low PVI scores in preference datasets were often mislabeled or ambiguous, suggesting PVI can be a signal for data quality issues.
  • Data filtering based on PVI is effective: Filtering data based on PVI scores, particularly for viability, can improve LLM alignment performance and efficiency.

Key Results

  • Rediscovered known artifacts: The data checklist successfully identified premise-hypothesis overlap in SNLI and lexical bias in hate speech detection, confirming prior findings.
  • Discovered new artifacts:
    • In preference datasets (SHP, HH-helpful), response length was found to be an applicable but insufficient attribute for predicting preference, indicating it's a useful but not sole determinant.
  • In UltraFeedback, non-English components were found to be largely exclusive, suggesting that the model's ability to handle non-English text might be an externality of English training rather than the multilingual data itself.
  • PVI-based filtering improves LLM alignment: Filtering HH-harmless data by removing low-viability PVI examples led to improved preference and reward accuracy in DPO-aligned models. This filtering could preserve accuracy while removing a significant portion of data.
  • Efficiency gains: Removing non-English data from UltraFeedback (based on non-exclusivity tests) allowed for similar accuracy with 15% less data.

Limitations and Future Work

  • Model family dependence: $\mathcal{V}$-information is dependent on the chosen model family $\mathcal{V}$. The paper primarily uses T5-base and DistilGPT2, and notes that results might differ with other model families.
  • Estimating $\mathcal{V}$-information: The paper uses empirical estimates of $\mathcal{V}$-information, which are boundedly close to the true values. The authors suggest considering PAC bounds for more rigorous theoretical guarantees.
  • Model-extracted attributes: The paper mentions that attributes like "humor" might not be easily extractable programmatically and suggests this as a direction for future work, potentially involving large language models themselves to identify and test such attributes.
  • Empirical adjustment of $\epsilon$: The tolerance threshold $\epsilon$ is set to 0.01 but can be empirically adjusted based on specific use cases.
  • Broader applicability: While the paper demonstrates the utility of data checklists on NLU and preference datasets, their application to other domains and data types could be explored.

Summary updated

BibTeX
@inproceedings{zhang2024data,
  author = {Heidi Chenyu Zhang and Shabnam Behzad and Kawin Ethayarajh and Dan Jurafsky},
  title = {{Data Checklist: On Unit-Testing Datasets with Usable Information}},
  booktitle = {COLM},
  year = {2024},
  url = {https://openreview.net/forum?id=XGJBEeziEb},
}
Figure