Home Knowledge Base Layer Decay (Layer-wise Learning Rate Decay)

Layer Decay (Layer-wise Learning Rate Decay) is a highly effective, carefully calibrated fine-tuning hyperparameter strategy that assigns progressively smaller learning rates to the earlier (deeper) layers of a pre-trained Vision Transformer while allowing the later (shallower, task-specific) layers to train with aggressively higher learning rates — mathematically preserving the universal low-level features learned during massive pre-training while rapidly adapting the high-level classification head to the new downstream task.

The Fine-Tuning Dilemma

The Layer Decay Formula

Layer Decay introduces a multiplicative decay factor ($alpha$, typically $0.65$ to $0.85$) applied layer-by-layer from the top of the network downward:

$$LR_i = LR_{base} imes alpha^{(N - i)}$$

Where $N$ is the total number of layers and $i$ is the current layer index (starting from 1 at the bottom). The result is a smooth exponential gradient: the final classification head trains at the full $LR_{base}$, while the first patch embedding layer trains at a learning rate that may be $100 imes$ smaller.

Why Layer Decay is Critical for ViTs

Layer Decay is the principle of frozen roots — training a transplanted neural network by aggressively renovating the penthouse while barely touching the foundation, mathematically guaranteeing that the universal knowledge embedded in the deepest layers survives the transfer intact.

layer decaycomputer vision

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.