paper-with-me

Papers

LipsFormer: Introducing Lipschitz Continuity to Vision Transformers

2023-04-19 · Xianbiao Qi, Jianan Wang, Yihao Chen, Yukai Shi, Lei Zhang

We present a Lipschitz continuous Transformer, called LipsFormer, to pursue training stability both theoretically and empirically for Transformer-based models. In contrast to previous practical tricks that address training instability by learning rate warmup, layer normalization, attention formulation, and weight initialization, we show that Lipschitz continuity is a more essential property to ensure training stability. In LipsFormer, we replace unstable Transformer component modules with Lipschitz continuous counterparts: CenterNorm instead of LayerNorm, spectral initialization instead of Xavier initialization, scaled cosine similarity attention instead of dot-product attention, and weighted residual shortcut. We prove that these introduced modules are Lipschitz continuous and derive an upper bound on the Lipschitz constant of LipsFormer. Our experiments show that LipsFormer allows stable training of deep Transformer architectures without the need of careful learning rate tuning such as warmup, yielding a faster convergence and better generalization. As a result, on the ImageNet 1K dataset, LipsFormer-Swin-Tiny based on Swin Transformer training for 300 epochs can obtain 82.7\% without any learning rate warmup. Moreover, LipsFormer-CSwin-Tiny, based on CSwin, training for 300 epochs achieves a top-1 accuracy of 83.5\% with 4.7G FLOPs and 24M parameters. The code will be released at \url{https://github.com/IDEA-Research/LipsFormer}.

📄 PDF Abstract BibTeX arXiv:2304.09856

Code (1)

idea-research/lipsformer 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Position-Wise Feed-Forward Layer 설명 없음
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Stochastic Depth Stochastic Depth aims to shrink the depth of a network during training, while keeping it unchanged during testing. This is achieved by randomly dropping entire…

Similar Papers 제목 키워드 기반

Approximation Theory for Lipschitz Continuous Transformers

2026-02-17 · Takashi Furuya, Davide Murari, Carola-Bibiane Schönlieb arxiv

Stability and robustness are critical for deploying Transformers in safety-sensitive settings. A principled way to enforce such behavior is to constrain the model's Lipschitz constant. However, approximation-theoretic gu…

Lipschitz Normalization for Self-Attention Layers with Application to Graph Neural Networks

2021-03-08 · George Dasoulas, Kevin Scaman, Aladin Virmaux

Attention based neural networks are state of the art in a large range of applications. However, their performance tends to degrade when the number of layers increases. In this work, we show that enforcing Lipschitz conti…

Deep AttentionGraph AttentionNode Classification

Lipschitz Continuity of Mahalanobis Distances and Bilinear Forms

2016-04-04 · Valentina Zantedeschi, Rémi Emonet, Marc Sebban

Many theoretical results in the machine learning domain stand only for functions that are Lipschitz continuous. Lipschitz continuity is a strong form of continuity that linearly bounds the variations of a function. In th…

BIG-bench Machine Learning

Certifying Ensembles: A General Certification Theory with S-Lipschitzness

2023-04-25 · Aleksandar Petrov, Francisco Eiras, Amartya Sanyal, Philip H. S. Torr 외

Improving and guaranteeing the robustness of deep learning models has been a topic of intense research. Ensembling, which combines several classifiers to provide a better model, has shown to be beneficial for generalisat…

Data-Driven Lipschitz Continuity: A Cost-Effective Approach to Improve Adversarial Robustness

2024-06-28 · Erh-Chung Chen, Pin-Yu Chen, I-Hsin Chung, Che-Rung Lee

The security and robustness of deep neural networks (DNNs) have become increasingly concerning. This paper aims to provide both a theoretical foundation and a practical solution to ensure the reliability of DNNs. We expl…

Adversarial Robustness