Source-linked AI summary

Dataset Cartography: Mapping and Diagnosing Datasets with Training Dynamics

Swabha Swayamdipta, Roy Schwartz, Nicholas Lourie, Yizhong Wang, Hannaneh Hajishirzi, Noah A. Smith, Yejin Choi

arXiv:2009.10795v2cs.CL

TL;DR

Large datasets make data quality difficult to assess, motivating a model-based alternative to quantity-focused evaluation. The paper introduces Data Maps from training dynamics and finds recurring regions linked to generalization, optimization, and labeling errors.

  • Problem

    Large dataset scale makes it challenging to automatically characterize which instances contribute to in-distribution and out-of-distribution performance.

  • Method

    Data Maps use each instance’s mean and standard deviation of true-label probabilities across training epochs as model-dependent coordinates.

  • Results

    Across four datasets, Data Maps reveal ambiguous, easy-to-learn, and hard-to-learn regions; ambiguous instances promote out-of-distribution generalization, while hard-to-learn instances often correspond to labeling errors.

  • Takeaways & Limitations

    Data Maps could diagnose large datasets and help locate examples for constructing higher-quality datasets and models that generalize better.

  • Takeaways & Limitations

    Discovering useful examples requires training a model on the full dataset, limiting the immediate training-speedup potential of data selection.

Abstract

from arXiv · show

Large datasets have become commonplace in NLP research. However, the increased emphasis on data quantity has made it challenging to assess the quality of data. We introduce Data Maps---a model-based tool to characterize and diagnose datasets. We leverage a largely ignored source of information: the behavior of the model on individual instances during training (training dynamics) for building data maps. This yields two intuitive measures for each example---the model's confidence in the true class, and the variability of this confidence across epochs---obtained in a single run of training. Experiments across four datasets show that these model-dependent measures reveal three distinct regions in the data map, each with pronounced characteristics. First, our data maps show the presence of "ambiguous" regions with respect to the model, which contribute the most towards out-of-distribution generalization. Second, the most populous regions in the data are "easy to learn" for the model, and play an important role in model optimization. Finally, data maps uncover a region with instances that the model finds "hard to learn"; these often correspond to labeling errors. Our results indicate that a shift in focus from quantity to quality of data could lead to robust models and improved out-of-distribution generalization.

1 Introduction

The paper introduces Data Maps, which use training dynamics to characterize dataset instances and diagnose their roles in learning and generalization. Across four datasets, the maps reveal ambiguous, easy-to-learn, and hard-to-learn regions with distinct properties.

  • Motivation and approach: Data Maps characterize dataset instances using model behavior during training, focusing on confidence and variability of true-label probabilities across epochs.The measures are obtained from a single training run.
  • Data-map regions: Three regions recur across datasets: ambiguous instances with high variability, easy-to-learn instances with high confidence and low variability, and hard-to-learn instances with low confidence and low variability.These categories are defined with respect to the model.
  • Generalization: Training exclusively on ambiguous instances promotes out-of-distribution generalization with little or no effect on in-distribution performance.The result is reported for experiments across the mapped datasets.
  • Optimization: Easy-to-learn instances form the majority of datasets and support optimization, although they are not as critical for in-distribution or out-of-distribution performance.Removing all such instances could cause training to fail to converge.
  • Dataset diagnosis: Hard-to-learn instances frequently correspond to labeling errors, while data maps can diagnose datasets at the cost of training a model on them.The authors suggest that locating these regions may support higher-quality datasets and models that generalize better.

2 Mapping Datasets with Training Dynamics

The paper defines training-dynamics statistics that place examples on data maps according to model confidence and variability. These maps expose recurring regions across datasets and connect them to annotation difficulty, model behavior, and dataset diagnosis.

  • 2.1 Training Dynamics: Training dynamics are statistics computed across E epochs, and their values serve as coordinates in the data map.The framework assumes stochastic gradient-based optimization with randomly ordered training instances each epoch.
  • 2.1 Training Dynamics: Confidence is the mean probability that the model assigns to an instance’s true label across training epochs.It is measured against the gold label rather than the model’s highest-scoring label.
  • 2.1 Training Dynamics: Variability is the standard deviation of true-label probabilities across epochs, distinguishing consistent predictions from training-time indecision.Consistent predictions, whether accurate or inaccurate, have low variability; indecision produces high variability.
  • 2.2 Data Maps: The maps reveal easy-to-learn, hard-to-learn, and ambiguous regions across SNLI, MultiNLI, WinoGrande, and QNLI.Easy examples have high confidence and low variability; hard examples have low confidence and low variability; ambiguous examples have high variability.
  • 2.1 Training Dynamics: Confidence and variability are fairly stable across parameter initializations, with average Pearson correlations of 0.75 or higher across five WinoGrande random seeds.The measures can also be computed at different granularities, including steps and epochs.
  • 2.2 Data Maps: WinoGrande has a much lower-density hard-to-learn region than SNLI, possibly reflecting rigorous post-collection annotation validation, although manual errors remain.Examples of these regions are presented in Table 1.

3 Data Selection using Data Maps

The paper evaluates training exclusively on data-map regions and finds that ambiguous and hard-to-learn subsets improve OOD generalization with less data, while easier examples support optimization.

  • Experimental setup: The study trains models exclusively on instances selected from distinct data-map regions, then evaluates standard ID and OOD performance.Selections are compared using subsets containing 33% of the training data, alongside full-data and random-sample baselines.
  • WinoGrande results: On WinoGrande, the 33% most ambiguous subset achieves the best OOD performance, while ambiguous, hard-to-learn, and low-correctness selections improve ID performance over other 33% baselines.These selections can still degrade ID performance relative to full training, whereas high-confidence, high-correctness, and low-variability selections underperform the random baseline.
  • Cross-dataset results: Across SNLI and MultiNLI, selecting 33% of the most ambiguous examples keeps ID performance within 0.2% of full training while substantially improving OOD performance across NLI Diagnostics categories.Hard-to-learn subsets also match or outperform the full-training baseline on OOD test sets.
  • Data quantity and optimization: WinoGrande experiments show that at least 25% ambiguous data is needed for high ID and OOD performance, while smaller subsets may fail to optimize without easier examples.Replacing one-tenth of the 17% most ambiguous subset with easy-to-learn instances enables successful learning and improves ID performance, but additional replacements reduce OOD accuracy.
  • Cross-dataset results: On QNLI, selecting one-third of the data gains over 2% on the OOD Adversarial SQuAD test set with minimal loss in ID accuracy.This result is part of the paper’s broader finding that regional selections improve generalization using substantially less data.
  • Limitations: Discovering useful regional selections requires computing training dynamics by training a model on the full dataset, limiting the immediate training-speedup benefit.The paper identifies more efficient data maps as a future direction.

4 Role of Easy-to-Learn Instances

Easy-to-learn instances support successful optimization even though ambiguous instances are more valuable for out-of-distribution performance. Replacing a small portion of ambiguous examples with easy-to-learn ones can restore learning in low-data settings, but the optimal balance remains unresolved.

  • 17% or fewer ambiguous WinoGrande instances led to chance-level performance, whereas random subsets of similar sizes could still learn.At 25% or more, ambiguous subsets produced high in-distribution and out-of-distribution performance.
  • Replacing one-tenth of the 17% most ambiguous subset with easy-to-learn examples enabled learning and exceeded the random baseline’s in-distribution performance.More replacements reduced performance, and out-of-distribution performance matched or fell below the baseline.
  • The best balance between easy-to-learn and ambiguous examples in low-data regimes remains an open problem.

5 Detecting Mislabeled Examples

Data maps help identify potentially mislabeled or ambiguous examples using training-dynamics measures. A simple confidence-based classifier showed strong agreement with human re-annotation, while variability alone was less effective.

  • A confidence-only linear classifier achieved 100% F1 on a sanity-check test set for distinguishing label-flipped from clean examples.
  • The classifier identified 31 noisy instances among 40K WinoGrande examples and 15K among 500K SNLI examples.These results were obtained using original training-dynamics measures after training on balanced noisy-versus-clean data.
  • Using variability alone reduced the classifier’s performance to 70% F1.
  • 67% of WinoGrande examples predicted noisy were mislabeled or ambiguous, compared with 13% predicted correctly labeled.For SNLI, the corresponding rates were 76% and 4%.
  • The authors conclude that data maps can support dataset cleanup by identifying mislabeled or ambiguous instances.They note that more accurate noise detectors remain worth exploring.

6 Training Dynamics as Uncertainty Measures

Training-dynamics measures connect model behavior with uncertainty and human agreement. Confidence tracks annotator agreement, while variability captures model uncertainty more directly.

  • The paper separates ambiguity inherent to examples from limitations of the model as distinct sources of prediction error.Human agreement is used as a proxy for intrinsic uncertainty on SNLI.
  • Human agreement was estimated from multiple SNLI development-set annotations by comparing each annotator with the majority label from the other four.The development set excludes examples without a majority, introducing potential bias.
  • High confidence corresponds to high human agreement, whereas low confidence often indicates annotator disagreement.Once confidence is known, variability adds little information about agreement.
  • Variability captures the model’s uncertainty by measuring how the confidence signal changes across training.
  • Checkpoint ensembles are presented as a cheaper alternative that may capture some benefits of independently trained ensembles.

7 Related Work

The paper situates data maps among instance-scoring, forgetting, active-learning, and curriculum-based methods. Its distinguishing choice is to use training dynamics for hard selection while retaining easy-to-learn examples.

  • Data maps use training dynamics to score examples, whereas loss landscapes also incorporate variables from stochastic optimization.
  • The paper’s correctness metric resembles forgetting-based discrete scores, while producing models with better performance.
  • Unlike approaches that advocate removing easy instances, this work finds that easy-to-learn examples can be useful.This aligns with curriculum-learning and self-paced-learning intuitions about example difficulty.
  • Chang et al. use prediction variance and threshold closeness to reweight examples, whereas this work performs hard selection.
  • Active-learning methods often select unlabeled low-confidence or representative points, while this approach selects among labeled data similarly to core-set methods.
  • The paper relates ambiguous examples to potential benefits for out-of-distribution generalization.

8 Conclusion

Data maps provide an automatic, model-agnostic way to visualize and diagnose datasets through training dynamics. Across four datasets, they reveal ambiguous, easy-to-learn, and hard-to-learn regions, while alternative granularities or early stopping may reduce computation.

  • Conclusion: Data maps reveal similar terrains across four datasets: ambiguous instances, easy-to-learn instances aiding optimization, and hard-to-learn instances often corresponding to data errors.The maps are based on ROBERTA-large, but the construction methods are model-agnostic.
  • Conclusion: Ambiguous instances are useful for high performance, whereas easy-to-learn instances aid optimization and hard-to-learn instances often correspond to data errors.These roles are reported across the datasets examined.
  • Conclusion: Data maps may support diagnosing existing datasets, constructing new datasets, and comparing model architectures trained on a given dataset.The authors identify these as potential uses and make their implementation publicly available.
  • Conclusion: Training dynamics can be computed before convergence because early burn-out measures correlate well with measures obtained at convergence.The experiments nevertheless use later burn-outs corresponding to model convergence.

A.2 Datasets

The evaluation covers four large NLP datasets spanning commonsense reasoning, natural language inference, and sentence-level question answering. Each dataset has at least 10K instances, with in-distribution and out-of-distribution evaluation settings described for the tasks.

  • Datasets: The experiments use four large datasets with at least 10K instances, crowdworker labels, and accuracy-based evaluation.Out-of-distribution test sets are manually or semi-automatically created.
  • WinoGrande: WinoGrande is a large-scale crowd-sourced commonsense reasoning dataset using multiple-choice questions and an out-of-distribution WSC validation set.The WSC data are converted to WinoGrande’s cloze-style format with repetitions removed.
  • SNLI and MultiNLI: SNLI and MultiNLI evaluate natural language inference over premise–hypothesis pairs labeled as entailment, contradiction, or neutrality.NLI diagnostics provide the out-of-distribution evaluation set.
  • Dataset diagnostics: Training to convergence is not required to obtain a good approximation of WinoGrande instance variability.Figure 6 reports a high correlation between converged and early-stopped training dynamics.
  • QNLI: QNLI reformulates SQuAD question answering as sentence-level binary classification, with Adversarial SQuAD used for out-of-distribution evaluation.The adversarial set adds distractor sentences and is automatically converted to QNLI format.

A.3 Experimental Settings

The experiments train ROBERTA-large classifiers with cross-entropy and Adam-based optimization across multiple random seeds. Training durations differ by dataset, and validation results include qualitative and quantitative comparisons for SNLI.

  • Training setup: Each classifier minimizes cross entropy with Adam using the AdamW learning-rate schedule, three random seeds, and a learning rate selected with AllenTune.WinoGrande and SNLI models train for 6 epochs, while MultiNLI and QNLI train for 5 epochs.
  • SNLI evaluation: Qualitative samples from different SNLI data-map regions are provided in Table 6.The table compares examples across regions and highlights cases where authors disagree with the gold standard.
  • SNLI evaluation: SNLI validation performance for different selection methods is reported in Table 7 using the best of three runs across seeds.The table is intended to compare alternative instance-selection strategies.

B.1 Training Dynamics vs. Dropout

The paper compares confidence and variability from training dynamics with dropout-based uncertainty estimates. On WinoGrande, both measures correlate positively, while training dynamics require no additional computation beyond training.

  • Comparison: Training-dynamics confidence and variability are compared with dropout estimates intended to quantify intrinsic and model uncertainty.Dropout predictions from different masks are treated as posterior samples, whose mean and standard deviation yield the corresponding measures.
  • Results: 0.450–0.452 Pearson’s r measures the correlation between confidence from training dynamics and dropout on WinoGrande’s development set.The interval is reported at 95% confidence.
  • Results: 0.390–0.393 Pearson’s r measures the correlation between variability from training dynamics and dropout on WinoGrande’s development set.This interval is also reported at 95% confidence.
  • Comparison: Training dynamics have the pragmatic advantage that the information needed to compute them is already available from training.Unlike dropout, they require no additional work or computation for these measures.

C.1 Effect of Encoder in building Data Maps

Data maps are model-dependent: different architectures can assign different coordinates to instances, while potentially revealing similar overall structures. Across four SNLI architectures, weaker models produce broader, less distinct regions than ROBERTA.

  • Model dependence: Data maps can be built for any model, but instances may receive different coordinates when models have different capacities.The passage notes that training dynamics are model-dependent and gives BERT versus ROBERTA as an example of differing model capabilities.
  • Architectural comparison: Four different architectures are compared for SNLI in Figures 10 and 11.
  • Architectural comparison: BoW and LSTM maps retain bell-shaped curves, but show smaller curvature, greater spread across regions, and less distinct regions than ROBERTA.These differences are attributed to the weaker architectures being less able to overfit the data.
  • Architectural comparison: The eSIM map also has smaller curvature than ROBERTA, while its regions are more broadly spread and less distinct.Figure 11 plots 25K instances in each data map for clarity and includes BERT-large as the other comparison architecture.
Loading 2009.10795v2…