Optimization Variance: Exploring Generalization Properties of DNNs

Xiao Zhang, Dongrui Wu, Haoyi Xiong, Bo Dai

Abstract

Deep Neural Networks (DNNs) often exhibit a "double descent" phenomenon where test error decreases, increases, and then decreases again as model complexity or training time grows. This behavior complicates traditional early stopping methods. We introduce Optimization Variance (OV), a novel metric that tracks a model's test error using only training data. By measuring the sensitivity of model updates to different random batches, OV provides a reliable proxy for generalization performance without requiring a separate validation set.

Introduction

In classical learning theory, the bias-variance tradeoff suggests a U-shaped error curve where increasing model complexity eventually leads to overfitting. However, modern DNNs frequently defy this rule, showing a "double descent" where performance improves in the over-parameterized regime. This makes determining the optimal stopping point challenging, especially in data-limited scenarios where a validation set is a luxury. We investigate whether internal training dynamics can reveal the model's generalization state.

Bias-Variance Decomposition

To understand the drivers of double descent, we performed a bias-variance decomposition of the zero-one loss (classification error). Our analysis reveals a striking result: while bias typically decreases monotonically and stabilizes, the variance component—representing the model's sensitivity to specific training samples—closely mirrors the double-descent shape of the test error.

Bias-variance decomposition of zero-one loss across various architectures and datasets. Note how variance (green) tracks the overall loss (blue) more closely than bias (orange).

Optimization Variance (OV)

Building on the insight that variance is the primary driver of generalization error in late-stage training, we propose Optimization Variance (OV). OV measures the "wiggles" in a model's outputs (logits) when updated by different random batches of training data. Formally, it is the coefficient of variation for model updates, normalized to allow comparison across different training stages.

A key advantage of OV is its independence from a validation set. By monitoring the internal inconsistency of model updates, we can identify the first major minimum in the OV curve, which serves as an effective signal for early stopping. This provides a mathematical explanation for why bigger models often generalize better: they are more resilient to "sampling noise."

Key Results

We validated OV across multiple architectures (VGG, ResNet) and datasets (SVHN, CIFAR-10/100). Our results show a remarkably high correlation between OV and test accuracy, with Pearson correlation coefficients reaching as high as -0.94.

Optimization Variance (OV) and test accuracy (acc) across different datasets and models. OV (dashed lines) effectively tracks the trends in accuracy (solid lines), even under label noise.

Furthermore, OV-based early stopping points were found to be remarkably close to the "ground truth" points found using an actual test set. The metric is also computationally efficient, requiring as few as 10 random batches to estimate accurately, making it viable for real-world pipelines.

Conclusion

Optimization Variance provides a window into the generalization properties of DNNs using only training data. By identifying variance as the key driver of the second descent in test error, OV offers a practical tool for early stopping and a theoretical lens for understanding model stability. Future work will explore extending this metric to regression tasks and unsupervised learning.

Summary updated

BibTeX
@misc{zhang2021optimization,
  author = {Xiao Zhang and Dongrui Wu and Haoyi Xiong and Bo Dai},
  title = {{Optimization Variance: Exploring Generalization Properties of DNNs}},
  year = {2021},
  eprint = {2106.01714},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.01714},
}
Figure