[Paper Review] Assessing Generalization of SGD via Disagreement
This paper proposes using the disagreement rate between two deep neural networks trained with the same data but different random seeds as a direct, unlabeled-data-only estimator of test error. It demonstrates that this disagreement rate closely equals the generalization error across diverse architectures and datasets, and theoretically proves that this equality holds when the ensemble of SGD-trained models is well-calibrated, establishing a novel link between generalization and calibration.
We empirically show that the test error of deep networks can be estimated by simply training the same architecture on the same training set but with a different run of Stochastic Gradient Descent (SGD), and measuring the disagreement rate between the two networks on unlabeled test data. This builds on -- and is a stronger version of -- the observation in Nakkiran & Bansal '20, which requires the second run to be on an altogether fresh training set. We further theoretically show that this peculiar phenomenon arises from the \emph{well-calibrated} nature of \emph{ensembles} of SGD-trained models. This finding not only provides a simple empirical measure to directly predict the test error using unlabeled test data, but also establishes a new conceptual connection between generalization and calibration.
Motivation & Objective
- To investigate whether model disagreement on unlabeled data can predict generalization error without requiring labeled test data.
- To determine if the phenomenon observed in prior work—disagreement correlating with test error—persists when both models are trained on the same dataset with different random seeds.
- To establish a theoretical foundation for the observed agreement between disagreement rate and test error.
- To explore the practical utility of disagreement as a black-box, privacy-preserving measure of model generalization.
Proposed method
- Train two deep neural networks with identical architecture and hyperparameters on the same training dataset but with different random seeds (e.g., different weight initializations and data shuffling orders).
- Compute the disagreement rate between the two models on an unlabeled test set by measuring the fraction of samples where the models predict different labels.
- Measure the generalization error (test error) of each model on the same unlabeled test set to compare with the disagreement rate.
- Theoretically prove that if the ensemble of models trained via stochastic optimization is well-calibrated, then the expected disagreement rate equals the expected test error.
- Use calibration plots and confidence histograms to empirically validate the well-calibrated nature of SGD-trained ensembles.
- Conduct ablation studies across different data splits, model architectures, and hyperparameters (e.g., width, depth, batch size) to assess robustness of the disagreement-generalization link.
Experimental results
Research questions
- RQ1Does model disagreement on unlabeled data still correlate with test error when both models are trained on the same dataset with different random seeds, rather than on separate datasets as in prior work?
- RQ2Can the disagreement rate serve as a reliable, direct estimator of generalization error without requiring labeled test data or model internals?
- RQ3Why does the disagreement rate approximately equal the test error in practice, and what underlying property of SGD-trained models explains this phenomenon?
- RQ4Under what conditions does the disagreement-generalization equality hold, particularly across out-of-distribution data?
- RQ5Is the observed relationship between disagreement and test error robust to variations in model hyperparameters such as width, depth, and batch size?
Key findings
- The disagreement rate between two models trained on the same dataset with different random seeds closely approximates the test error, with an R² of 0.986 and Kendall’s tau of 0.858 across all model pairs.
- The disagreement-generalization equality holds even under small hyperparameter variations (e.g., width, depth, batch size), indicating robustness to model configuration changes.
- The phenomenon is explained theoretically by the well-calibrated nature of SGD-trained ensembles: when ensembles are well-calibrated, the expected disagreement rate equals the expected test error.
- The relationship holds on out-of-distribution data in the PACS dataset for some domains, though not universally, suggesting sensitivity to domain shift.
- The disagreement measure is effective as a black-box, privacy-preserving estimator of generalization, requiring only unlabeled data and no access to model weights or gradients.
- Using multiple model pairs improves estimation accuracy, with four pairs reducing average deviation from the diagonal (test error = disagreement) to 0.034 compared to 0.112 for a single pair.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.