paper-with-me

홈 › Papers

Short-Range Dependency Effects on Transformer Instability and a Decomposed Attention Solution

2025-05-21 · Suvadeep Hajra

Transformer language models have driven significant progress across various fields, including natural language processing and computer vision. A central component of these models is the self-attention (SA) mechanism, which learns rich vector representations of tokens by modeling their relationships with others in a sequence. However, despite extensive research, transformers continue to suffer from training instability -- often manifesting as spikes or divergence in the training loss during a run. In this work, we identify one source of this instability: SA's limited ability to capture short-range dependencies, especially in tasks like language modeling, where almost every token heavily relies on its nearby neighbors. This limitation causes the pre-softmax logits of SA to grow rapidly, destabilizing training. To address this, we propose decomposing the SA into local (short-range) and global (long-range) attention heads. This decomposed attention, referred to as Long Short-attention (LS-attention), mitigates logit explosion and results in more stable training compared to an equivalent multi-head self-attention (MHSA). Empirical comparisons with two alternative training stabilization methods show that LS-attention reduces the validation perplexity to nearly 2/5 of that achieved by one method and reaches a similar perplexity as the other method using only 1/20 of the GPU hours. Additionally, our experiments demonstrate that LS-attention reduces inference latency by up to 36% compared to a state-of-the-art implementation of equivalent MHSA.

📄 PDF Abstract BibTeX arXiv:2505.15548

Code (0)

등록된 구현이 없습니다.

Tasks

GPULanguage ModelingLanguage Modelling

Methods 이 논문이 사용한 방법론

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$…
Attention 설명 없음

Similar Papers 제목 키워드 기반

Causal Transformers Perform Below Chance on Recursive Nested Constructions, Unlike Humans

2021-10-14 · Yair Lakretz, Théo Desbordes, Dieuwke Hupkes, Stanislas Dehaene

Recursive processing is considered a hallmark of human linguistic abilities. A recent study evaluated recursive processing in recurrent neural language models (RNN-LMs) and showed that such models perform below chance le…

MMST-ViT: Climate Change-aware Crop Yield Prediction via Multi-Modal Spatial-Temporal Vision Transformer

2023-09-16 · ICCV 2023 1 · Fudong Lin, Summer Crawford, Kaleb Guillot, Yihe Zhang 외

Precise crop yield prediction provides valuable information for agricultural planning and decision-making processes. However, timely predicting crop yields remains challenging as crop growth is sensitive to growing seaso…

Contrastive LearningCrop Yield PredictionDecision Making

Can Transformers Process Recursive Nested Constructions, Like Humans?

2022-10-01 · COLING 2022 10 · Yair Lakretz, Théo Desbordes, Dieuwke Hupkes, Stanislas Dehaene

Recursive processing is considered a hallmark of human linguistic abilities. A recent study evaluated recursive processing in recurrent neural language models (RNN-LMs) and showed that such models perform below chance le…

Integration of Mamba and Transformer -- MAT for Long-Short Range Time Series Forecasting with Application to Weather Dynamics

2024-09-13 · Wenqing Zhang, Junming Huang, Ruotong Wang, Changsong Wei 외

Long-short range time series forecasting is essential for predicting future trends and patterns over extended periods. While deep learning models such as Transformers have made significant strides in advancing time serie…

Computational EfficiencyMambaTime SeriesTime Series Forecasting

The Dynamics of Instability

2023-03-13 · César Barilla, Duarte Gonçalves

We study a model in which two players with opposing interests try to alter a status quo through instability-generating actions. We show that instability can be used to secure longer-term durable changes, even if it is co…