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.
In Syntology name not resolved (unknown_name). The lookup matched no method, paper or venue by this name; that asserts nothing about whether code exists.
Syntology's have check for this name (free, it answers coverage only), read 2026-10-05; ask it again live. A level is the served verification level of that one answer; nothing here is summed across methods.
Papers archive 2025-07-28
archive papers tagged: 12 · with a code link: 9 · where Syntology ran a sample: 5 (5 with a run with no instrument failure, 0 where every run was a failure of Syntology's instrument) Syntology
Show: all tagged papersonly where code ran (5 of 12 tagged: 5 with a run with no instrument failure, 0 where every run was a failure of Syntology's instrument)
Page 1 of 1: papers 1 to 12 of 12, newest first by the archive's date (ties by slug), in archive order.
Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code, as “N ran (of which C constructed an object rather than computing a result; K with no instrument failure: H honoured, V violated, P with no contract checked; I where Syntology's instrument failed) · U unverified”; the instrument figure counts failures of Syntology's instrument, not of the code. It is per sample and not a correctness claim. When the archive marks a repository official for the paper, the line starts with that repository's state (the archive's flag, not a verdict on who wrote the code; “community repositories only” when every sample that ran came from a community repository, “official: no sample here; runs from other or unrecorded repositories” when some came from a repository the paper names or has in its text, or from none recorded); hover it for the repositories the samples that ran came from.
-
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 community repositories only · 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 1 violated, 0 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified (of 1 harvested sample)
-
A ConvNet for the 2020s 10 Jan 2022 · 54 repositories · arXiv:2201.03545Syntology community repositories only · 57 ran (of which 39 constructed an object rather than computing a result; 49 with no instrument failure: 2 honoured, 0 violated, 47 with no contract checked; 8 where Syntology's instrument failed) · 23 unverified (of 80 harvested samples) · 12 pointer-only (licence)
-
Augmenting Convolutional networks with attention-based aggregation 27 Dec 2021 · 5 repositories · arXiv:2112.13692Syntology official (archive's flag): 1 ran · 2 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified (of 2 harvested samples)
-
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 community repositories only · 5 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 1 honoured, 1 violated, 3 with no contract checked; 0 where Syntology's instrument failed) · 2 unverified (of 7 harvested samples)
-
Going deeper with Image Transformers 31 Mar 2021 · 21 repositories · arXiv:2103.17239Syntology official: no sample here; runs from other or unrecorded repositories · 9 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 2 violated, 4 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified (of 11 harvested samples) · 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