Methods › General › Normalization › LayerScale
LayerScale
Introduced by Hugo Touvron et al. in Going deeper with Image Transformers
archive 2025-07-28 Description, source and code snippet are the archive's method entry.
LayerScale is a method used for vision transformer architectures to help improve training dynamics. It adds a learnable diagonal matrix on output of each residual block, initialized close to (but not at) 0. Adding this simple layer after each residual block improves the training dynamic, allowing for the training of deeper high-capacity image transformers that benefit from depth.
Specifically, LayerScale is a per-channel multiplication of the vector produced by each residual block, as opposed to a single scalar, see Figure (d). The objective is to group the updates of the weights associated with the same output channel. Formally, LayerScale is a multiplication by a diagonal matrix on output of each residual block. In other words:
xₗ^' =xₗ+diag(λ_(l, 1), …, λ_(l, d)) ×SA(η(xₗ))
xₗ₊₁ =xₗ^'+diag(λ_(l, 1)^', …, λ_(l, d)^') ×FFN(η(xₗ^'))
where the parameters λ_(l, i) and λ_(l, i)^' are learnable weights. The diagonal values are all initialized to a fixed small value ε: we set it to ε=0.1 until depth 18 , ε=10⁻⁵ for depth 24 and ε=10⁻⁶ for deeper networks.
This formula is akin to other normalization strategies ActNorm or LayerNorm but executed on output of the residual block. Yet LayerScale seeks a different effect: ActNorm is a data-dependent initialization that calibrates activations so that they have zero-mean and unit variance, like BatchNorm. In contrast, in LayerScale, we initialize the diagonal with small values so that the initial contribution of the residual branches to the function implemented by the transformer is small. In that respect the motivation is therefore closer to that of ReZero, SkipInit, Fixup and T-Fixup: to train closer to the identity function and let the network integrate the additional parameters progressively during the training. LayerScale offers more diversity in the optimization than just adjusting the whole layer by a single learnable scalar as in ReZero/SkipInit, Fixup and T-Fixup.
Papers archive 2025-07-28
12 shown of 12, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.
-
Guiding the Experts: Semantic Priors for Efficient and Focused MoE Routing 24 May 2025 · 1 repository · arXiv:2505.18586
-
SpectralKD: A Unified Framework for Interpreting and Distilling Vision Transformers via Spectral Analysis 26 Dec 2024 · 1 repository · arXiv:2412.19055
-
Detecting Severity of Diabetic Retinopathy from Fundus Images: A Transformer Network-based Review 3 Jan 2023 · 0 repositories · arXiv:2301.00973
-
MaiT: Leverage Attention Masks for More Efficient Image Transformers 6 Jul 2022 · 0 repositories · arXiv:2207.03006
-
DeiT III: Revenge of the ViT 14 Apr 2022 · 12 repositories · arXiv:2204.07118
-
Three things everyone should know about Vision Transformers 18 Mar 2022 · 8 repositories · arXiv:2203.09795Syntology ran 1 of 1 samples · 0 unverified
-
A ConvNet for the 2020s 10 Jan 2022 · 54 repositories · arXiv:2201.03545Syntology ran 54 of 80 samples · 26 unverified · 11 pointer-only (licence)
-
Augmenting Convolutional networks with attention-based aggregation 27 Dec 2021 · 5 repositories · arXiv:2112.13692Syntology ran 1 of 2 samples · 1 unverified
-
Poformer: A simple pooling transformer for speaker verification 10 Oct 2021 · 0 repositories · arXiv:2110.04692
-
MaiT: integrating spatial locality into image transformers with attention masks 29 Sep 2021 · 1 repository
-
ResMLP: Feedforward networks for image classification with data-efficient training 7 May 2021 · 19 repositories · arXiv:2105.03404Syntology ran 2 of 7 samples · 5 unverified
-
Going deeper with Image Transformers 31 Mar 2021 · 21 repositories · arXiv:2103.17239Syntology ran 5 of 11 samples · 6 unverified · 2 pointer-only (licence)
Tasks archive 2025-07-28
19 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.
Usage over time archive 2025-07-28
Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).
Categories archive 2025-07-28
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections