Skip to main content
QUICK REVIEW

[Paper Review] GradInit: Learning to Initialize Neural Networks for Stable and Efficient Training

Chen Zhu, Renkun Ni|arXiv (Cornell University)|Feb 16, 2021
Advanced Neural Network ApplicationsComputer Science15 citations
TL;DR

GradInit is an architecture-agnostic method that learns optimal initialization scalars for neural network layers by minimizing the loss after one step of SGD or Adam. It accelerates convergence, improves test accuracy, and enables training Transformers without learning rate warmup—achieving state-of-the-art results on ImageNet and IWSLT translation benchmarks.

ABSTRACT

Innovations in neural architectures have fostered significant breakthroughs in language modeling and computer vision. Unfortunately, novel architectures often result in challenging hyper-parameter choices and training instability if the network parameters are not properly initialized. A number of architecture-specific initialization schemes have been proposed, but these schemes are not always portable to new architectures. This paper presents GradInit, an automated and architecture agnostic method for initializing neural networks. GradInit is based on a simple heuristic; the norm of each network layer is adjusted so that a single step of SGD or Adam with prescribed hyperparameters results in the smallest possible loss value. This adjustment is done by introducing a scalar multiplier variable in front of each parameter block, and then optimizing these variables using a simple numerical scheme. GradInit accelerates the convergence and test performance of many convolutional architectures, both with or without skip connections, and even without normalization layers. It also improves the stability of the original Transformer architecture for machine translation, enabling training it without learning rate warmup using either Adam or SGD under a wide range of learning rates and momentum coefficients. Code is available at https://github.com/zhuchen03/gradinit.

Motivation & Objective

  • Address the challenge of training instability in deep neural networks due to poor initialization, especially in complex or novel architectures.
  • Overcome the limitations of architecture-specific initialization rules that are not portable across new or heterogeneous architectures.
  • Develop a general-purpose, optimizer-aware initialization method that improves training stability and convergence speed without requiring architectural modifications.
  • Enable training of deep models like 1202-layer ResNet and Post-LN Transformers without learning rate warmup using SGD or Adam.
  • Provide a scalable and efficient initialization technique that uses less than 1% of total training time to learn optimal scaling factors.

Proposed method

  • Introduces a scalar multiplier for each parameter block (e.g., convolution kernel or linear layer) to re-scale the randomly initialized weights.
  • Optimizes these scalar multipliers using a numerical scheme to minimize the training loss after one step of a specified optimizer (SGD or Adam).
  • Treats the optimization step as a differentiable process, allowing backpropagation through the first update to learn the best scaling factors.
  • Accounts for the stochasticity of mini-batch sampling, learning rate, and optimizer dynamics (e.g., momentum and adaptive learning rates).
  • Applies the learned scalars to re-scale the original random weights before standard training begins.
  • Supports both Adam and SGD optimizers, with distinct scaling patterns learned for each, reflecting differences in gradient variance reduction strategies.

Experimental results

Research questions

  • RQ1Can a single, automated method learn initialization scalars that improve training stability and convergence across diverse architectures?
  • RQ2To what extent can GradInit eliminate the need for learning rate warmup in Transformers trained with Adam or SGD?
  • RQ3How does GradInit compare to existing initialization schemes (e.g., Xavier, He, Admin) in terms of final test accuracy and training stability?
  • RQ4Can GradInit stabilize extremely deep networks (e.g., 1202-layer ResNet) that fail to train with standard initialization?
  • RQ5What patterns in learned scaling coefficients reveal insights into gradient variance and initialization-induced instability?

Key findings

  • GradInit enables training the original Post-LN Transformer on IWSLT-14 DE-EN without learning rate warmup using either Adam or SGD, achieving BLEU scores of 36.0 (average) under extreme hyperparameter settings.
  • With GradInit, a 1202-layer ResNet achieves significantly higher test accuracy than ResNet-110, demonstrating success in training extremely deep networks where standard initialization fails.
  • On ImageNet, GradInit improves the final test accuracy of ResNet-50 by learning better initializations, even without Batch Normalization.
  • GradInit reduces initial gradient variance across most layers, particularly in the encoder and residual branches, and downweights output projection and FFN layers to balance skip connections.
  • The method learns distinct scaling patterns for Adam and SGD, indicating that optimizer-specific initialization is crucial for gradient variance control.
  • Visualizations show that GradInit re-scales weights to place the network in a smoother loss region at initialization, reducing inter-sample gradient variance and accelerating convergence.

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.