AutoInit: Automatic Initialization via Jacobian Tuning

Tianyu He, Darshil Doshi, Andrey GromovarXiv 2022 · DOI

Abstract

Initializing deep neural networks is a critical yet often manual process that significantly impacts training stability and final performance. We present AutoInit, a "one-shot" algorithm designed to automatically find optimal initializations for any feed-forward architecture. By tuning auxiliary scaling parameters to maintain a Jacobian norm near unity, AutoInit prevents gradient vanishing and explosion. Our evaluations on CIFAR-10 and ImageNet demonstrate that AutoInit achieves competitive performance across diverse architectures, including VGG and ResMLP, without the need for manual hyperparameter tuning.

Introduction

Finding the perfect starting point for training a new neural network architecture is often considered a "dark art" in deep learning. While standard schemes like Xavier or Kaiming initialization work well for simple models, modern architectures—featuring residual connections, BatchNorm, and complex branching—frequently require manual "hacks" or extensive hyperparameter searches to remain stable. AutoInit addresses this gap by providing a general-purpose, algorithmic solution that works regardless of the specific layers used.

The Problem: Balancing Signal Strength

Initializing Deep Neural Networks (DNNs) is a delicate balancing act. If weights are too small, signals vanish as they pass through layers; if they are too large, signals explode. Most existing schemes are derived for specific activation functions (like ReLU) or require analytical solutions that are unavailable for novel architectures. AutoInit aims to push any network toward criticality—a state where signal strength is preserved across layers.

The AutoInit Method

The core of AutoInit is the optimization of the Average Partial Jacobian Norm (APJN), which measures how much the input to a block changes its output. For a stable network, this value should be approximately 1.

  1. Auxiliary Parameters: Instead of directly modifying randomly sampled weights ($\theta$), AutoInit introduces auxiliary scalar multipliers ($a_\theta$).
  2. Jacobian Tuning: The algorithm freezes the actual weights and uses Stochastic Gradient Descent (SGD) to optimize only the multipliers ($a_\theta$).
  3. Jacobian Log Loss: The objective function penalizes deviations of the APJN from unity. Using the logarithm of the norm makes the optimization less sensitive to network depth, preventing internal gradient issues during initialization.
  4. Efficiency: To maintain low computational overhead, AutoInit uses an unbiased estimator based on Jacobian-Vector Products (JVP), avoiding the cost of full Jacobian matrix calculations.
Convergence of the Jacobian norm to theoretical and asymptotic values across different initialization scales.

Key Insights and Results

AutoInit is architecture-agnostic because it operates on the specific instance of a network, accounting for finite-width effects and unique layer combinations.

The Evolution of Criticality

As shown in the landscape plots, the algorithm successfully expands the region of criticality over time. Initially, the Jacobian norm may be far from the target, but through tuning, the network settles into a stable regime where the norm is near 1.

Evolution of the Jacobian norm landscape from t=1 to t=900, showing the expansion of the stable critical region (red).

Performance Benchmarks

  • ImageNet (ResMLP-S12): AutoInit achieved 74.0% top-1 accuracy. While slightly lower than the 76.6% reported in the original paper (which used highly specific manual tuning), it demonstrates that an automated method can reach competitive performance without human intervention.
  • VGG Stability: VGG networks are notoriously difficult to train without careful initialization. AutoInit successfully brought VGG19_BN to criticality, matching the performance of standard PyTorch initializations automatically.
  • The BatchNorm Paradox: The authors observed that BatchNorm can push Kaiming-initialized networks into a "chaotic" regime. AutoInit automatically corrects this, ensuring stability even in the presence of normalization layers.

Conclusion

AutoInit represents a significant step toward Automated Machine Learning (AutoML) by removing one of the most tedious manual steps in the model development pipeline. While currently focused on feed-forward networks, its ability to find identity-like mappings for deep models makes it a powerful tool for researchers developing novel architectures. Future work may extend this approach to recurrent structures and further reduce the pre-training compute overhead.

Summary updated

BibTeX
@misc{he2022autoinit,
  author = {Tianyu He and Darshil Doshi and Andrey Gromov},
  title = {{AutoInit: Automatic Initialization via Jacobian Tuning}},
  year = {2022},
  eprint = {2206.13568},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.13568},
}
Figure