ReZero is All You Need: Fast Convergence at Large Depth

Thomas Bachlechner, Bodhisattwa Prasad Majumder, Huanru Henry Mao, Garrison W. Cottrell, Julian McAuley
3/10/2020
cs.LGcs.CLstat.ML

Official code: majumderb/rezero (419 stars, MIT, last commit 2024-07-25).

Abstract

Deep networks often suffer from vanishing or exploding gradients due to inefficient signal propagation, leading to long training times or convergence difficulties. Various architecture designs, sophisticated residual-style networks, and initialization schemes have been shown to improve deep signal propagation. Recently, Pennington et al. used free probability theory to show that dynamical isometry plays an integral role in efficient deep learning. We show that the simplest architecture change of gating each residual connection using a single zero-initialized parameter satisfies initial dynamical isometry and outperforms more complex approaches. Although much simpler than its predecessors, this gate enables training thousands of fully connected layers with fast convergence and better test performance for ResNets trained on CIFAR-10. We apply this technique to language modeling and find that we can easily train 120-layer Transformers. When applied to 12 layer Transformers, it converges 56% faster on enwiki8.

View on arXivView PDF

Code Implementations(1)

majumderb/rezeroOfficial100%
MIT

Official PyTorch Repo for "ReZero is All You Need: Fast Convergence at Large Depth"

41952PythonMar 6, 20202 years agoMIT
deep-neural-networkslanguage-modelingpytrochresnettransformer

Cite this paper

@article{bachlechner2020rezero,
  title  = {ReZero is All You Need: Fast Convergence at Large Depth},
  author = {Thomas Bachlechner and Bodhisattwa Prasad Majumder and Huanru Henry Mao and Garrison W. Cottrell and Julian McAuley},
  year   = {2020},
  eprint = {2003.04887},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2003.04887}
}

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/2003.04887.svg)](https://codeofpaper.com/paper/2003.04887)

Discussion