Skip to main content
QUICK REVIEW

[Paper Review] Deep Learning Through the Lens of Example Difficulty

Robert John Nicholas Baldock, Hartmut Maennel|arXiv (Cornell University)|Jun 17, 2021
Adversarial Robustness in Machine LearningComputer Science61 references20 citations
TL;DR

This paper introduces prediction depth—a measure of computational example difficulty based on when a deep neural network's prediction stabilizes across layers. By analyzing hidden representations with k-NN probes, the authors reveal that easier examples are predicted earlier in the network, while harder examples require deeper processing. The study uncovers linear relationships between prediction depth and model confidence, accuracy, and learning speed, and identifies three distinct difficulty types that explain diverse phenomena in deep learning, such as early-layer generalization and late-layer memorization.

ABSTRACT

Existing work on understanding deep learning often employs measures that compress all data-dependent information into a few numbers. In this work, we adopt a perspective based on the role of individual examples. We introduce a measure of the computational difficulty of making a prediction for a given input: the (effective) prediction depth. Our extensive investigation reveals surprising yet simple relationships between the prediction depth of a given input and the model's uncertainty, confidence, accuracy and speed of learning for that data point. We further categorize difficult examples into three interpretable groups, demonstrate how these groups are processed differently inside deep models and showcase how this understanding allows us to improve prediction accuracy. Insights from our study lead to a coherent view of a number of separately reported phenomena in the literature: early layers generalize while later layers memorize; early layers converge faster and networks learn easy data and simple functions first.

Motivation & Objective

  • To develop a data-dependent measure of example difficulty that reflects actual internal processing in deep networks, rather than relying on aggregate or statistical summaries.
  • To overcome the limitations of one-dimensional difficulty measures by distinguishing between different types of example difficulty based on hidden representations.
  • To unify disparate observations in deep learning—such as early-layer generalization and curriculum-like learning—through a unified framework grounded in prediction depth.
  • To enable improved model design, including better uncertainty estimation, fairness-aware training, and curriculum learning, by identifying the root causes of example difficulty.

Proposed method

  • Prediction depth is defined as the earliest layer in a deep network where k-NN classifiers trained on hidden embeddings consistently predict the same label across all deeper layers.
  • k-NN probes are used to evaluate prediction consistency across layers, with predictions considered stable when they converge and remain fixed through subsequent layers.
  • The method leverages trained deep networks (e.g., ResNet18, VGG16) and extracts feature embeddings at multiple layers to assess when classification becomes deterministic.
  • Three interpretable difficulty types are identified by analyzing how embeddings relate to label ambiguity, mislabeling, and class confusion: 'mislabeled-looking', 'label-dependent', and 'inherently ambiguous' inputs.
  • The approach is validated across multiple datasets (CIFAR10, CIFAR100, SVHN, Fashion-MNIST) and architectures, with consistency tested across random seeds and model variants.
  • Alternative probes (e.g., logistic regression) are evaluated, but k-NN is selected due to its ability to detect clustering and convergence in representation space.

Experimental results

Research questions

  • RQ1How does the depth at which a prediction stabilizes correlate with the model’s confidence, accuracy, and learning speed for individual examples?
  • RQ2Can prediction depth serve as a meaningful, consistent measure of example difficulty that captures more than just a single scalar difficulty score?
  • RQ3What are the distinct types of example difficulty that emerge from analyzing hidden representations, and how do they differ in their processing within deep networks?
  • RQ4How does prediction depth explain well-known phenomena such as early-layer generalization and late-layer memorization?
  • RQ5Can insights from prediction depth lead to improvements in model calibration, fairness, and curriculum learning?

Key findings

  • Prediction depth is strongly correlated with visual difficulty: easier examples (e.g., Fashion-MNIST) stabilize earlier, while harder examples (e.g., CIFAR100) require deeper processing.
  • The mean prediction depth ranks datasets in intuitive order: Fashion-MNIST (lowest), SVHN, CIFAR10, and CIFAR100 (highest), confirming its alignment with perceived task difficulty.
  • Predictions for examples with lower prediction depth are, on average, more accurate and consistent, establishing a linear lower bound on prediction reliability.
  • Examples with high prediction depth are more likely to be mislabeled or visually ambiguous, and are processed similarly to both noisy labels and rare subgroup examples.
  • The study reveals that early layers generalize while later layers memorize, and that networks learn easy examples and simple functions first—phenomena unified under the prediction depth framework.
  • The three difficulty types—mislabeled-looking, label-dependent, and inherently ambiguous—explain how different inputs are processed differently within the network, offering a path to better uncertainty estimation and fairness-aware training.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.