Post-mortem on a deep learning contest: a Simpson’s paradox and the complementary roles of scale metrics versus shape metrics

Michael W. Mahoney, charles h martin

TL;DR

This paper investigates why certain metrics, particularly the "AlphaHat" metric from Heavy-Tailed Self-Regularization (HT-SR) theory, are good at predicting the generalization performance of deep neural networks (DNNs). By analyzing models from a machine learning contest, the authors reveal a "Simpson's paradox" where traditional "scale" metrics perform well overall but poorly on specific model subsets, while "shape" metrics show the opposite behavior. This highlights the complementary nature of scale and shape in understanding DNN quality and explains AlphaHat's success.

What Problem Does This Paper Address?

Predicting how well a deep neural network will generalize to unseen data is crucial, especially when dealing with pre-trained models where access to training data and protocols is limited. While metrics like AlphaHat have shown promise, the underlying reasons for their effectiveness, particularly in relation to traditional statistical learning theory (SLT) metrics, remain unclear. This paper aims to dissect AlphaHat into its components and understand how these components, representing "scale" and "shape" properties of the network, interact and contribute to generalization prediction, especially when considering variations in model architecture (depth) and training hyperparameters.

Methods

The authors analyze a dataset of pre-trained DNN models from a machine learning contest. They break down the AlphaHat metric into two sub-components:

  • Scale Metrics: Primarily represented by the LogSpectralNorm, which is derived from traditional SLT and measures the "scale" of the model's learned parameters.
  • Shape Metrics: Primarily represented by "Alpha," derived from HT-SR theory, which measures the "shape" of the spectral density of the model's weight matrices.

They then investigate how these individual metrics correlate with test accuracy across different subsets of models, particularly when varying model depth and regularization hyperparameters. A key analytical tool is the identification and interpretation of Simpson's paradoxes within these correlations.

Datasets

The primary dataset used is a corpus of pre-trained DNN models made publicly available for a machine learning contest focused on predicting generalization performance. These models include:

  • Task1: 96 VGG-like models trained on CIFAR10, with variations in depth and regularization hyperparameters.
  • Task2: 54 stacked Dense layer models trained on SVHN, also with variations in depth and regularization hyperparameters.

These models were partitioned into sub-groups of fixed depth, allowing for the analysis of hyperparameter variations within specific architectural constraints.

Key Insights and Ideas

  • Simpson's Paradox in DNN Metrics: The most striking finding is the presence of Simpson's paradox. Traditional "scale" metrics (like LogSpectralNorm) can show a positive correlation with generalization performance when all models are aggregated, but this trend can reverse or disappear when models are analyzed within specific depth sub-groups. Conversely, "shape" metrics (like Alpha) might show a consistent trend within sub-groups but a different or reversed trend when aggregated.
  • Complementary Roles of Scale and Shape: The paper strongly suggests that scale and shape metrics capture different, complementary aspects of DNNs. Scale metrics (norms) might capture broader architectural trends (like depth), while shape metrics (spectral density exponents) are better at capturing fine-grained properties influenced by training hyperparameters (like regularization).
  • Limitations of Aggregate Metrics: The study highlights that relying solely on aggregate metrics can obscure important behaviors and lead to misleading conclusions, especially when dealing with heterogeneous model populations.
  • HT-SR Theory's Predictive Power: The findings provide a clearer explanation for why AlphaHat, which combines scale and shape information, works well. It effectively "corrects for" the Simpson's paradoxes observed in individual scale or shape metrics.

Key Results

  • LogSpectralNorm Behavior: For Task1, LogSpectralNorm generally increases with model quality when aggregated, but this trend can be inconsistent across sub-groups. For Task2, the aggregated trend is reversed, showing a clear Simpson's paradox.
  • Alpha Behavior: For Task1, Alpha generally decreases with model quality when aggregated. For Task2, the aggregated trend is reversed, also exhibiting a Simpson's paradox.
  • Anti-correlation in Sub-groups: In many sub-groups, Alpha and LogSpectralNorm are strongly anti-correlated, indicating they capture distinct information. For example, in Task1's 2xx and 9xx models, the correlation is strong (R² > 0.6, τ > 0.75).
  • AlphaHat's Robustness: The AlphaHat metric, by combining scale and shape, successfully mitigates the Simpson's paradoxes observed in its individual components, demonstrating its robustness across different model configurations.

Limitations and Future Work

  • Causality vs. Correlation: While the paper identifies correlations and interprets them in terms of scale and shape, establishing definitive causal links between these metrics and generalization remains a challenge. The authors suggest that further counterfactual analysis would be needed.
  • Understanding "Why": The paper proposes a hypothesis that scale metrics are influenced by coarse parameters like depth, while shape metrics are influenced by fine-grained hyperparameters. Testing this hypothesis is identified as an important future direction.
  • Broader Applicability: While the study uses contest data, future work could explore these concepts on a wider range of models and tasks, including fine-tuning, model engineering, and neural architecture search.
  • Improved Metrics: The authors note that developing improved methods to extract scale and shape parameters from pre-trained DNN models is an important area for future research.

Summary updated

BibTeX
@misc{mahoney2021post,
  author = {Michael W. Mahoney and charles h martin},
  title = {{Post-mortem on a deep learning contest: a Simpson’s paradox and the complementary roles of scale metrics versus shape metrics}},
  year = {2021},
  eprint = {2106.00734},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.00734},
}
Figure