CLAILGFeb 26, 2025

Sliding Window Attention Training for Efficient Large Language Models

arXiv:2502.18845v219 citationsh-index: 19Has Code
Originality Highly original
AI Analysis

This addresses efficiency bottlenecks for LLMs in processing long documents, offering a simple method that preserves the Transformer architecture, though it is incremental compared to existing approaches like sparse attention.

The paper tackles the quadratic computational complexity of transformer-based Large Language Models (LLMs) for long sequences by introducing SWAT, which uses sliding window attention training with sigmoid instead of softmax and balanced position embeddings, achieving state-of-the-art performance on eight benchmarks.

Recent advances in transformer-based Large Language Models (LLMs) have demonstrated remarkable capabilities across various tasks. However, their quadratic computational complexity concerning sequence length remains a significant bottleneck for processing long documents. As a result, many efforts like sparse attention and state space models have been proposed to improve the efficiency of LLMs over long sequences. Though effective, these approaches compromise the performance or introduce structural complexity. This calls for a simple yet efficient model that preserves the fundamental Transformer architecture. To this end, we introduce SWAT, which enables efficient long-context handling via Sliding Window Attention Training. This paper first attributes the inefficiency of Transformers to the attention sink phenomenon resulting from the high variance of softmax operation. Then, we replace softmax with the sigmoid function and utilize a balanced ALiBi and Rotary Position Embedding for efficient information compression and retention. Experiments demonstrate that SWAT achieves SOTA performance compared with state-of-the-art linear recurrent architectures on eight benchmarks. Code is available at https://github.com/Fzkuji/swat-attention.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes