Reproduce “Transformers without Normalization” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Jiachen Zhu, Xinlei Chen, Kaiming He, Yann LeCun, Zhuang Liu

Dynamic Tanh (DyT) replaces LayerNorm or RMSNorm in Transformer models with a learned-scaled tanh that bends extreme activations while remaining nearly linear near zero, without computing activation statistics. The authors report comparable performance across several tasks; on ImageNet-1K, ViT-B reaches 82.5% top-1 accuracy versus 82.3% with LayerNorm. The evidence mainly concerns LayerNorm and RMSNorm, not batch normalization.

Key insights

  • Layer Normalization (LN) and RMSNorm, despite their statistical computation, collectively exhibit an S-shaped, tanh-like input-output mapping across activations in trained deep networks, particularly in deeper layers.
  • The learnable scalar parameter 'α' in DyT dynamically scales input activations similar to how normalization layers adjust magnitudes based on variance, effectively learning to track the inverse of the standard deviation (1/std) of inputs.
  • The functional squashing of extreme activation values via a smooth non-linearity like `tanh`, combined with adaptive scaling, appears to be a critical mechanism for stable training that DyT successfully emulates, rather than complex statistical normalization.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.