Normalized Stochastic Gradient Descent Training of Deep Neural Networks

Salih Atici, Hongyi Pan, Ahmet Enis ÇetinarXiv 2022 · OpenReview

TL;DR

This paper introduces Input Normalized Stochastic Gradient Descent (INSGD), a new optimization algorithm inspired by adaptive filtering techniques. INSGD aims to improve deep learning model training by normalizing the learning rate based on the input vector to each neuron, leading to more stable convergence and higher accuracy across various datasets and architectures.

What Problem Does This Paper Address?

Training deep neural networks (DNNs) on large datasets is notoriously sensitive to the choice of optimization algorithm and its hyperparameters, especially the learning rate. Suboptimal learning rates can lead to divergence or slow convergence, trapping models in local minima. Existing methods like SGD, Adam, and others have limitations in adapting to varying input scales and historical gradient information, making them prone to issues with hyperparameter tuning and potentially hindering performance. The authors aim to address the fragility of learning rate selection and the impact of input power on training stability.

Methods

The core contribution is the Input Normalized Stochastic Gradient Descent (INSGD) algorithm. It draws inspiration from the Normalized Least Mean Squares (NLMS) algorithm, commonly used in adaptive filtering.

Here's how it works:

  • Input Normalization: Unlike traditional methods that might normalize based on error or cumulative gradients, INSGD normalizes the learning rate using the input vector to the neuron. This is achieved by dividing the update term by a factor related to the norm (specifically, $\ell_1$ or $\ell_2$ norm) of the input vector.
  • Mathematical Formulation: The update rule for a neuron's weights ($w$) can be seen as an orthogonal projection onto a hyperplane defined by the input ($x$) and desired output ($d$). The INSGD update equation is derived from this, incorporating a learning rate ($\lambda$ or $\mu$) that is dynamically adjusted by the input's norm.
  • Momentum and Regularization: To further enhance stability and robustness, INSGD incorporates an input momentum term to estimate the "power" of the input data. This helps in normalizing the learning rate more effectively. Additionally, a logarithm function and a rectified linear unit (ReLU) are used to stabilize the normalization factor and prevent issues like division by zero or negative scaling, especially when dealing with small input powers.
  • Layer-wise Application: The algorithm is designed to be applied to each weight in every layer of a deep learning model, leveraging backpropagation to propagate gradients and update weights layer by layer.

Datasets

The paper evaluates INSGD on several standard benchmark datasets:

  • CIFAR-10: A dataset of 60,000 32x32 color images in 10 classes.
  • CIFAR-100: A more challenging dataset with 100 classes.
  • ImageNet-1K: A large-scale dataset consisting of 1.2 million images across 1000 classes.

Key Insights and Ideas

  • Input-Centric Normalization: The key insight is that normalizing the learning rate based on the input to a neuron, rather than just the error or gradient history, can provide a more direct and stable way to adapt to varying data scales. This is analogous to how NLMS adapts to input signal characteristics.
  • Robustness to Input Power: By incorporating input momentum and logarithmic scaling, INSGD becomes more robust to variations in the "power" or magnitude of input features, which can be a source of instability in other optimizers.
  • Bridging Adaptive Filtering and Deep Learning: The paper successfully demonstrates how concepts from adaptive filtering (like NLMS) can be adapted and applied to the complex optimization landscape of deep neural networks, offering a novel perspective.
  • Improved Accuracy Across Architectures: INSGD shows consistent improvements in accuracy across different network architectures (ResNet-20, WResNet-18, ResNet-50, and a custom CNN), suggesting its general applicability.

Key Results

INSGD consistently outperformed standard optimizers like SGD and Adam across various datasets and initial learning rates.

  • CIFAR-10:
    • ResNet-18: Accuracy improved from 92.42% to 92.71% (with $\ell_2$ norm).
  • Custom CNN: Achieved higher accuracies than SGD with different initial learning rates (e.g., 79.14% with NSGD-$\ell_2$ vs. 77.43% with SGD at 0.03 learning rate).
  • CIFAR-100:
    • WResNet-18: Top-1 accuracy improved from 77.22% (SGD) to 77.89% (NSGD-$\ell_2$) with a batch size of 256. Top-5 accuracy also saw improvements.
  • ImageNet-1K:
    • ResNet-50: Top-1 accuracy improved from 75.56% (SGD) to 75.79% (NSGD-$\ell_2$) with an initial learning rate of 0.1.

The paper also shows that INSGD is less sensitive to the initial learning rate compared to other optimizers.

Limitations and Future Work

  • Computational Cost: While not explicitly detailed as a major drawback, the normalization step involving input norms and momentum might add a slight computational overhead compared to simpler SGD.
  • Norm Choice: The paper explores both $\ell_1$ and $\ell_2$ norms for input normalization. While $\ell_2$ is used as the primary example due to its NLMS inspiration, the paper notes that $\ell_1$ norm can be more robust to outliers, suggesting further investigation into norm choices.
  • Extending to Deeper Networks: The paper mentions that extending INSGD to deeper networks with multiple layers poses a challenge in its derivation, though they adopt similar assumptions to backpropagation.
  • Future Work: The authors suggest exploring different norms (like $\ell_{max}$) and investigating the algorithm's behavior with larger batch sizes, especially for datasets like ImageNet. Further research into the theoretical convergence properties of INSGD would also be valuable.

Summary updated

Abstract

In this paper, we propose a novel optimization algorithm for training machine learning models called Input Normalized Stochastic Gradient Descent (INSGD), inspired by the Normalized Least Mean Squares (NLMS) algorithm used in adaptive filtering. When training complex models on large datasets, the choice of optimizer parameters, particularly the learning rate, is crucial to avoid divergence. Our algorithm updates the network weights using stochastic gradient descent with $\ell_1$ and $\ell_2$-based normalizations applied to the learning rate, similar to NLMS. However, unlike existing normalization methods, we exclude the error term from the normalization process and instead normalize the update term using the input vector to the neuron. Our experiments demonstrate that our optimization algorithm achieves higher accuracy levels compared to different initialization settings. We evaluate the efficiency of our training algorithm on benchmark datasets using ResNet-18, WResNet-20, ResNet-50, and a toy neural network. Our INSGD algorithm improves the accuracy of ResNet-18 on CIFAR-10 from 92.42\% to 92.71\%, WResNet-20 on CIFAR-100 from 76.20\% to 77.39\%, and ResNet-50 on ImageNet-1K from 75.52\% to 75.67\%.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
CIFAR-10INSGD-\ell_2Test Accuracy92.67%+0.12 vs baselinesplit: test · backbone=ResNet-20
Source quote
L314: INSGD-\ell_2 │ 0.1 │ 92.67%
CIFAR-100NSGD-\ell_2Top-1 Accuracy78.85%+0.1 vs baselinesplit: test · epochs=200 · backbone=Wide ResNet-18
Source quote
L387: NSGD-\ell_2 │ 0.1 │ 128 │ 78.85% │ 94.34%
ImageNet-1KNSGD-\ell_2Top-1 Accuracy75.79%+0.23 vs baselinesplit: val · epochs=90 · backbone=ResNet-50 · resolution=center-crop
Source quote
L423: NSGD-\ell_2 │ 0.1 │ 75.79% │ 92.81%
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
CIFAR-10SGD baselineTest Accuracy92.55%split: test · backbone=ResNet-20
Source quote
L301: SGD │ 0.1 │ 92.55%
CIFAR-100SGD baselineTop-1 Accuracy78.75%split: test · epochs=200 · backbone=Wide ResNet-18
Source quote
L385: SGD │ 0.1 │ 128 │ 78.75% │ 94.20%
ImageNet-1KSGD baselineTop-1 Accuracy75.56%split: val · epochs=90 · backbone=ResNet-50 · resolution=center-crop
Source quote
L417: SGD │ 0.1 │ 75.56% │ 92.53%
BibTeX
@misc{atici2022normalized,
  author = {Salih Atici and Hongyi Pan and Ahmet Enis Çetin},
  title = {{Normalized Stochastic Gradient Descent Training of Deep Neural Networks}},
  year = {2022},
  eprint = {2212.09921},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.09921},
}
Figure