Taming Transformer Without Using Learning Rate Warmup

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Qi, Xianbiao, He, Yelin, Ye, Jiaquan, Li, Chun-Guang, Zi, Bojia, Dai, Xili, Zou, Qin, Xiao, Rong
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866918036872626176
author Qi, Xianbiao
He, Yelin
Ye, Jiaquan
Li, Chun-Guang
Zi, Bojia
Dai, Xili
Zou, Qin
Xiao, Rong
author_facet Qi, Xianbiao
He, Yelin
Ye, Jiaquan
Li, Chun-Guang
Zi, Bojia
Dai, Xili
Zou, Qin
Xiao, Rong
contents Scaling Transformer to a large scale without using some technical tricks such as learning rate warump and using an obviously lower learning rate is an extremely challenging task, and is increasingly gaining more attention. In this paper, we provide a theoretical analysis for the process of training Transformer and reveal the rationale behind the model crash phenomenon in the training process, termed \textit{spectral energy concentration} of ${\bW_q}^{\top} \bW_k$, which is the reason for a malignant entropy collapse, where ${\bW_q}$ and $\bW_k$ are the projection matrices for the query and the key in Transformer, respectively. To remedy this problem, motivated by \textit{Weyl's Inequality}, we present a novel optimization strategy, \ie, making the weight updating in successive steps smooth -- if the ratio $\frac{σ_{1}(\nabla \bW_t)}{σ_{1}(\bW_{t-1})}$ is larger than a threshold, we will automatically bound the learning rate to a weighted multiple of $\frac{σ_{1}(\bW_{t-1})}{σ_{1}(\nabla \bW_t)}$, where $\nabla \bW_t$ is the updating quantity in step $t$. Such an optimization strategy can prevent spectral energy concentration to only a few directions, and thus can avoid malignant entropy collapse which will trigger the model crash. We conduct extensive experiments using ViT, Swin-Transformer and GPT, showing that our optimization strategy can effectively and stably train these Transformers without using learning rate warmup.
format Preprint
id arxiv_https___arxiv_org_abs_2505_21910
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Taming Transformer Without Using Learning Rate Warmup
Qi, Xianbiao
He, Yelin
Ye, Jiaquan
Li, Chun-Guang
Zi, Bojia
Dai, Xili
Zou, Qin
Xiao, Rong
Machine Learning
Computer Vision and Pattern Recognition
Scaling Transformer to a large scale without using some technical tricks such as learning rate warump and using an obviously lower learning rate is an extremely challenging task, and is increasingly gaining more attention. In this paper, we provide a theoretical analysis for the process of training Transformer and reveal the rationale behind the model crash phenomenon in the training process, termed \textit{spectral energy concentration} of ${\bW_q}^{\top} \bW_k$, which is the reason for a malignant entropy collapse, where ${\bW_q}$ and $\bW_k$ are the projection matrices for the query and the key in Transformer, respectively. To remedy this problem, motivated by \textit{Weyl's Inequality}, we present a novel optimization strategy, \ie, making the weight updating in successive steps smooth -- if the ratio $\frac{σ_{1}(\nabla \bW_t)}{σ_{1}(\bW_{t-1})}$ is larger than a threshold, we will automatically bound the learning rate to a weighted multiple of $\frac{σ_{1}(\bW_{t-1})}{σ_{1}(\nabla \bW_t)}$, where $\nabla \bW_t$ is the updating quantity in step $t$. Such an optimization strategy can prevent spectral energy concentration to only a few directions, and thus can avoid malignant entropy collapse which will trigger the model crash. We conduct extensive experiments using ViT, Swin-Transformer and GPT, showing that our optimization strategy can effectively and stably train these Transformers without using learning rate warmup.
title Taming Transformer Without Using Learning Rate Warmup
topic Machine Learning
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2505.21910