What is different between these datasets?

Zhicheng Guo, Varun Babbar, Cynthia Rudin

In the world of machine learning, we often talk about distribution shift—that dreaded moment when the data your model sees in production looks different from the data it was trained on. While we have plenty of tools to detect that a shift has occurred (like Wasserstein distance or KL divergence), these metrics are often opaque. They tell you that something is wrong, but not what is wrong.

A new paper from researchers at Duke University, titled "What is Different Between These Datasets?", introduces a comprehensive framework to bridge this gap. Instead of just flagging a shift, it provides human-understandable explanations for why two datasets differ across tabular, image, audio, and text data.

TL;DR

This paper moves beyond simple distribution shift detection to distribution shift explanation. The authors propose a versatile framework of interpretable methods—ranging from identifying "influential examples" to learning representative "prototypes"—that provide actionable insights into how and why two datasets from the same domain differ.

What Problem Does This Paper Address?

Machine learning models are only as good as their data. When we deploy a model, we assume the "real world" matches our training set. When it doesn't, the model fails.

Current methods for analyzing these shifts are mostly quantitative and global. A data scientist might see a high "distance" score between two datasets but have no idea if the difference is due to a specific demographic subgroup, a change in image lighting, or a subtle nuance in how synthetic audio is generated. This paper addresses the lack of dataset-level explanations—tools that help humans understand systematic differences directly from the data itself.

Highlights of the differences between explanations at the instance-level vs. those at the dataset-level.

Methods

The authors propose a pipeline (Figure 3) that selects the best explanation method based on the data modality and whether the features are interpretable.

Pipeline for our explanation framework.

Key novel approaches include:

  1. Influential Example Explanations: This method identifies a small set of "culprit" examples that, if removed, would make the feature importances of two datasets align. It leverages the Rashomon Effect—the idea that many different models can perform equally well on a task—to find "intrinsic" feature importance that is robust to small data changes.
  2. Prototype-Based Explanations:
    • Neighborhood-based: Compares local regions in a latent space. It uses two new metrics: NSPD (does one dataset have more examples in this region?) and NSDD (are the examples in this region further away from the center in one dataset?).
  3. Summarization-based: Trains a classifier to distinguish between Dataset A and Dataset B, then extracts "prototypes" (representative samples) that best illustrate the unique characteristics of each.
  4. LLM-Based Attribute Extraction: For text data, where "distance" is hard to define, the framework uses Large Language Models to extract interpretable attributes (e.g., "Is the tone neutral?", "Is the language formal?") and compares the frequency of these attributes across datasets.

Datasets

The framework was tested across a wide variety of modalities:

  • Tabular: The Adult census dataset (predicting income) and the HELOC credit risk dataset.
  • Time-Series/Audio: RAVDESS (human emotional speech) vs. Coqui TTS (AI-generated speech), and the Stanford PPG dataset (cardiac signals) vs. synthetic signals.
  • Images: The EMBED mammography dataset (comparing different patient populations) and the Office-Home domain adaptation dataset.
  • Text: The HC-3-English dataset, comparing human answers to ChatGPT-generated answers.

Key Insights and Ideas

  • Dataset-Level vs. Instance-Level: Traditional XAI (like SHAP or LIME) explains why a model made a specific prediction. This framework explains why a whole dataset is different, which is more useful for data debugging and auditing.
  • The "Aha" Moments in Case Studies:
    • Audio: The framework revealed that AI-generated speech starts immediately, whereas humans have a natural "silent waiting period" before speaking.
  • Tabular (Adult): It identified that the primary difference in income prediction between men and women was driven by a small group of highly educated, middle-aged women who were nonetheless in a low-income bracket.
  • Medical Imaging: It successfully flagged that differences in mammography datasets were primarily due to tissue density and breast size, which are critical factors for clinical model deployment.
  • Actionable Recourse: By identifying "influential examples," researchers can literally see which data points are causing a model to rely on different features, allowing them to fix biases by targeted data collection or removal.

Key Results

  • Interpretability without Accuracy Loss: The prototype-based methods (using ProtoPNet) achieved classification accuracy similar to standard "black-box" models while providing visual explanations.
  • Robustness: The authors demonstrated that their influential example rankings were highly stable across different bootstrapped versions of the datasets (Kendall-Tau similarity ~0.99).
  • Humanizing AI: In the text case study, the framework identified that ChatGPT is much more formal and structured than humans. By using these insights to prompt the LLM to be "less formal," they successfully reduced the classifier's ability to distinguish between human and AI text from 85% to 45% accuracy.

Limitations and Future Work

  • Evaluation Metrics: The authors note that there is no "gold standard" for evaluating dataset-level explanations yet. While they propose the AUCC (Area Under the Coverage Curve) to measure how well prototypes represent a dataset, more work is needed on human-centric evaluation.
  • Latent Space Quality: For high-dimensional data (images/audio), the explanation is only as good as the latent space it's projected into. If the encoder doesn't capture meaningful features, the prototypes won't be helpful.
  • Computational Cost: Finding the "Rashomon set" (the set of all near-optimal models) can be computationally expensive for very large datasets or complex model classes.

This framework represents a significant step toward "Data-Centric AI," giving practitioners the tools to look under the hood of their datasets and understand the subtle shifts that can make or break a machine learning system.

Summary updated

BibTeX
@article{guo2025what,
  author = {Zhicheng Guo and Varun Babbar and Cynthia Rudin},
  title = {{What is different between these datasets?}},
  journal = {JMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=fPlffuoOIo},
}
Figure