Skip to main content
QUICK REVIEW

[Paper Review] On the Strong Correlation Between Model Invariance and Generalization

Weijian Deng, Stephen Jay Gould|arXiv (Cornell University)|Jul 14, 2022
Machine Learning and Data ClassificationComputer Science5 citations
TL;DR

This paper introduces Effective Invariance (EI), a novel label-free metric to quantify model invariance by measuring prediction consistency and confidence across data transformations. It demonstrates a strong linear correlation between EI and generalization performance across diverse models and datasets, including in-distribution and out-of-distribution settings, enabling unsupervised model selection and OOD accuracy prediction.

ABSTRACT

Generalization and invariance are two essential properties of any machine learning model. Generalization captures a model's ability to classify unseen data while invariance measures consistency of model predictions on transformations of the data. Existing research suggests a positive relationship: a model generalizing well should be invariant to certain visual factors. Building on this qualitative implication we make two contributions. First, we introduce effective invariance (EI), a simple and reasonable measure of model invariance which does not rely on image labels. Given predictions on a test image and its transformed version, EI measures how well the predictions agree and with what level of confidence. Second, using invariance scores computed by EI, we perform large-scale quantitative correlation studies between generalization and invariance, focusing on rotation and grayscale transformations. From a model-centric view, we observe generalization and invariance of different models exhibit a strong linear relationship, on both in-distribution and out-of-distribution datasets. From a dataset-centric view, we find a certain model's accuracy and invariance linearly correlated on different test sets. Apart from these major findings, other minor but interesting insights are also discussed.

Motivation & Objective

  • To address the lack of systematic, quantitative analysis on the relationship between model generalization and invariance.
  • To develop a robust, label-free invariance metric that accounts for both prediction consistency and confidence.
  • To conduct large-scale empirical studies linking invariance (via EI) and generalization across diverse models and datasets.
  • To enable unsupervised model selection and OOD performance prediction using EI without requiring test labels.

Proposed method

  • Proposes Effective Invariance (EI) as a new invariance metric that computes the agreement and confidence between model predictions on a base image and its transformed version.
  • Uses a confidence-weighted agreement score: high agreement with high confidence yields high EI; disagreement or low confidence results in low EI.
  • Applies EI to evaluate invariance under rotation and grayscale transformations across 150 ImageNet models and 8 test sets, including in-distribution and out-of-distribution benchmarks.
  • Performs model-centric and dataset-centric correlation analyses to study the relationship between EI and test accuracy.
  • Compares EI with existing metrics like accuracy drop and Jensen-Shannon divergence, showing superior robustness and label independence.
  • Employs a standardized evaluation pipeline on a 3090Ti GPU with PyTorch 1.11.0 and timm 1.5, using publicly available models and datasets.

Experimental results

Research questions

  • RQ1Is there a strong quantitative correlation between model invariance and generalization across diverse models and datasets?
  • RQ2Can Effective Invariance (EI) serve as a reliable, label-free proxy for model generalization performance?
  • RQ3How does invariance, as measured by EI, correlate with generalization on out-of-distribution datasets where labels are unavailable?
  • RQ4Does the training regime (e.g., data augmentation vs. more training data) have a measurable impact on both invariance and generalization?
  • RQ5Can EI be used to predict model accuracy on OOD datasets without access to ground-truth labels?

Key findings

  • A strong linear correlation exists between model generalization (accuracy) and Effective Invariance (EI) across 150 models on both in-distribution and out-of-distribution datasets.
  • On out-of-distribution datasets such as ImageNet-Rendition and ImageNet-Corruption, model accuracy and EI scores exhibit a significant linear relationship, enabling OOD accuracy prediction without labels.
  • EI outperforms existing invariance metrics like accuracy drop and Jensen-Shannon divergence in reliability and label independence, especially under OOD conditions.
  • Models pre-trained on larger datasets show higher EI and better generalization, indicating data scale is more effective than data augmentation for improving invariance.
  • Training with robust data augmentation (e.g., CutMix, MixUp) improves both invariance and generalization, but pre-training on more data yields stronger gains.
  • The correlation between EI and accuracy holds across diverse architectures, including ResNets, Vision Transformers (e.g., BEiT), and EfficientNet variants, confirming broad applicability.

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.