MetaInit: Initializing learning by learning to initialize

Yann N. Dauphin, Samuel S. SchoenholzNeurIPS 2019

This paper from Google AI researchers Yann Dauphin and Samuel Schoenholz introduces MetaInit, an automated way to initialize neural networks. Instead of relying on handcrafted initialization schemes (like Xavier or Kaiming initialization) or architectural "crutches" (like Batch Normalization), MetaInit uses meta-learning to find a starting point where the loss landscape is locally linear and easy to navigate.

TL;DR

MetaInit is a task-agnostic algorithm that automatically tunes the scale of initial weights by minimizing a "gradient quotient," a metric for local curvature. It enables stable training of deep architectures—even those without skip connections or normalization layers—achieving performance competitive with state-of-the-art methods.

What Problem Does This Paper Address?

Training deep neural networks is notoriously difficult. If weights are too small, gradients vanish; if they are too large, gradients explode. To combat this, the field has historically relied on two things:

  1. Handcrafted Initializations: Mathematical derivations (like Glorot/Xavier) that work for specific architectures but often fail when you change the activation function or depth.
  2. Architectural Stabilizers: Techniques like Batch Normalization (BN) and skip connections (Residual blocks) that make the loss landscape smoother.

The authors argue that these stabilizers often mask the underlying problem: poor initialization. Furthermore, these "tricks" make it hard to tell if a new architecture is actually good or just easier to train. MetaInit aims to automate the search for a good starting point for any architecture, reducing the need for manual hyperparameter tuning and complex architectural additions.

Methods

The core of the paper is the Gradient Quotient (GQ).

The Gradient Quotient

The authors hypothesize that a good initialization should start in a region that looks "locally linear." In such a region, the gradient shouldn't change abruptly after a small step. They formalize this as the GQ:

Visual intuition of the Gradient Quotient (GQ)

$$GQ \approx \frac{1}{N} \left\| \frac{\mathbf{g}(\theta - \mathbf{g}(\theta))}{\mathbf{g}(\theta) + \epsilon} - 1 \right\|_1$$

Essentially, it measures the relative change in the gradient after one step of gradient descent. If the GQ is near zero, the landscape is flat and linear. If it's high, the landscape is "curvy" and difficult for first-order optimizers like SGD to handle.

Meta-Optimization

MetaInit doesn't train the network on the actual task yet. Instead, it performs a "pre-training" phase where it uses gradient descent to minimize the GQ by adjusting the norms (scales) of the weight matrices.

Task-Agnostic Meta-Learning (TAML)

Surprisingly, the authors found that they don't need real data for this. MetaInit works using randomly generated noise as input. This makes the initialization "task-agnostic"—once a model is initialized via MetaInit, it’s ready to be trained on any relevant dataset.

Datasets

The researchers evaluated MetaInit on standard computer vision benchmarks:

  • CIFAR-10: Used to test plain CNNs and WideResNets.
  • ImageNet (ILSVRC2012): Used to demonstrate scalability on a ResNet-50 architecture.

Key Insights and Ideas

  • Curvature is the Real Enemy: Most initialization research focuses on the magnitude of gradients. MetaInit focuses on the Hessian (curvature). By starting where the landscape is flat, you avoid the "shattered gradients" problem.
  • Random Data is Sufficient: The geometric properties of a network's initialization are largely determined by its architecture, not the specific data it sees. Using random noise for meta-initialization is computationally efficient and prevents overfitting to the training set.
  • Disentangling Training from Architecture: MetaInit shows that "plain" networks (without skip connections) can perform much better than previously thought. This suggests that skip connections are primarily training stabilizers rather than essential components for representational power.

Key Results

  • Recovering from "Bad" Starts: MetaInit can take a network initialized with terrible weight scales (e.g., 10x too large or too small) and automatically move them to a "good" range that matches or improves upon hand-tuned schemes.
MetaInit adjusting weight norms across layers from various poor starting points
  • Beating BatchNorm on Plain Nets: On CIFAR-10, a 28-layer plain CNN (no skip connections) with MetaInit achieved a 3.7% test error, significantly outperforming the same network with Batch Normalization (6.0%).
  • ImageNet Scalability: For a ResNet-50 on ImageNet, MetaInit achieved 24.0% error using the Swish activation function, which is competitive with standard BatchNorm/ReLU setups (23.3%).
  • Efficiency: Meta-initializing a ResNet-50 takes only about 11 minutes on 8 V100 GPUs—less than 1% of the total training time.

Limitations and Future Work

  • Hyper-hyperparameters: While MetaInit reduces the need to tune weight scales, it introduces its own meta-hyperparameters (like the learning rate and momentum for the GQ optimizer).
  • Norms Only: Currently, MetaInit only tunes the scale of the weights, not the shape of the distribution (e.g., it won't turn a Gaussian distribution into a Uniform one).
  • Large Batch Sizes: For very large models, getting a stable estimate of the gradient quotient can require large batch sizes during the meta-initialization phase.
  • Numerical Instability: While it helps with conditioning, it doesn't solve all numerical issues, especially when training with low-precision (FP16) hardware without normalization.

Summary updated

BibTeX
@inproceedings{dauphin2019metainit,
  author = {Yann N. Dauphin and Samuel S. Schoenholz},
  title = {{MetaInit: Initializing learning by learning to initialize}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure