[Paper Review] Towards understanding how momentum improves generalization in deep learning
This paper provides a theoretical and empirical analysis of why momentum improves generalization in deep learning, showing that it enhances generalization in datasets where examples share common features but differ in margin. The key insight is that momentum preserves learning of shared features by leveraging historical gradients, preventing memorization of low-margin examples, which standard gradient descent fails to do.
Stochastic gradient descent (SGD) with momentum is widely used for training modern deep learning architectures. While it is well-understood that using momentum can lead to faster convergence rate in various settings, it has also been observed that momentum yields higher generalization. Prior work argue that momentum stabilizes the SGD noise during training and this leads to higher generalization. In this paper, we adopt another perspective and first empirically show that gradient descent with momentum (GD+M) significantly improves generalization compared to gradient descent (GD) in some deep learning problems. From this observation, we formally study how momentum improves generalization. We devise a binary classification setting where a one-hidden layer (over-parameterized) convolutional neural network trained with GD+M provably generalizes better than the same network trained with GD, when both algorithms are similarly initialized. The key insight in our analysis is that momentum is beneficial in datasets where the examples share some feature but differ in their margin. Contrary to GD that memorizes the small margin data, GD+M still learns the feature in these data thanks to its historical gradients. Lastly, we empirically validate our theoretical findings.
Motivation & Objective
- To understand the underlying mechanism by which momentum improves generalization in deep learning, beyond faster convergence.
- To investigate whether momentum's generalization benefit is tied to stochasticity or intrinsic to the optimization dynamics.
- To formally analyze a binary classification setting where GD+M provably generalizes better than GD in over-parameterized CNNs.
- To identify conditions under which momentum improves generalization, particularly in data with shared features but varying margins.
Proposed method
- Propose a binary classification setting using a one-hidden layer over-parameterized convolutional neural network to compare GD and GD+M.
- Formally prove that GD+M generalizes better than GD when data share features but differ in margin, due to historical gradient utilization.
- Use theoretical analysis to show that momentum prevents memorization of low-margin examples by preserving feature learning.
- Empirically validate findings on CIFAR-10 and synthetic Gaussian datasets using VGG-19 and MLP/CNN architectures with and without batch normalization.
- Isolate momentum's effect by using full-batch gradient descent (GD and GD+M), eliminating stochastic gradient noise.
- Analyze the role of historical gradients in maintaining feature learning despite margin variations in data points.
Experimental results
Research questions
- RQ1Why does momentum improve generalization in deep learning, beyond faster convergence?
- RQ2Is the generalization benefit of momentum due to noise reduction or due to a structural property of the optimization path?
- RQ3Under what data and network conditions does momentum lead to better generalization?
- RQ4Can momentum prevent memorization of low-margin examples while still learning shared features?
- RQ5Does momentum's benefit persist in full-batch settings, independent of stochasticity?
Key findings
- Momentum improves generalization in full-batch settings, indicating its benefit is not due to stochastic gradient noise.
- In synthetic Gaussian datasets, GD+M generalizes better than GD when the target function is complex (e.g., 1-CNN, 2-CNN), with test accuracy improvements up to 3.5%.
- For a 1-CNN student network, GD+M achieves 94.39% test accuracy compared to 94.18% for GD, showing consistent improvement.
- Theoretical analysis proves that GD+M generalizes better than GD in over-parameterized CNNs when examples share features but differ in margin.
- Momentum prevents memorization of low-margin examples by leveraging historical gradients to maintain feature learning.
- Empirical results on CIFAR-10 show that generalization improvement from momentum increases with larger batch sizes, confirming its effect is not stochastic.
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.