Towards Theoretically Inspired Neural Initialization Optimization

Yibo Yang, Hong Wang, Haobo Yuan, Zhouchen Lin
10/12/2022
cs.LGcs.CV

Official code: HarborYuan/GradCosine (8 stars, Python, last commit 2023-03-30).

Abstract

Automated machine learning has been widely explored to reduce human efforts in designing neural architectures and looking for proper hyperparameters. In the domain of neural initialization, however, similar automated techniques have rarely been studied.

Show full abstract

Most existing initialization methods are handcrafted and highly dependent on specific architectures. In this paper, we propose a differentiable quantity, named GradCosine, with theoretical insights to evaluate the initial state of a neural network. Specifically, GradCosine is the cosine similarity of sample-wise gradients with respect to the initialized parameters. By analyzing the sample-wise optimization landscape, we show that both the training and test performance of a network can be improved by maximizing GradCosine under gradient norm constraint. Based on this observation, we further propose the neural initialization optimization (NIO) algorithm. Generalized from the sample-wise analysis into the real batch setting, NIO is able to automatically look for a better initialization with negligible cost compared with the training time. With NIO, we improve the classification performance of a variety of neural architectures on CIFAR-10, CIFAR-100, and ImageNet. Moreover, we find that our method can even help to train large vision Transformer architecture without warmup.

View on arXivView PDF

Code Implementations(1)

81Python, DockerfileOct 8, 20223 years ago

Similar Papers

Cite this paper

@article{yang2022towards,
  title  = {Towards Theoretically Inspired Neural Initialization Optimization},
  author = {Yibo Yang and Hong Wang and Haobo Yuan and Zhouchen Lin},
  year   = {2022},
  eprint = {2210.05956},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.05956}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.05956.svg)](https://codeofpaper.com/paper/2210.05956)

Discussion