Preprint
Large Language Models

Advancing transformer architecture in long-context large language models: A comprehensive survey

Yunpeng Huang, Jingwei Xu, Zixu Jiang, Junyu Lai, Zenan Li, Yuan Yao, Taolue Chen, Lijuan Yang, Zhou Xin, Xiaoxing Ma
January 1, 2023arXiv.org128 citations

128

Citations

6

Influential Citations

arXiv.org

Venue

2023

Year

Abstract

Transformer-based Large Language Models (LLMs) have been applied in diverse areas such as knowledge bases, human interfaces, and dynamic agents, and marking a stride …

Analysis

Why This Paper Matters

Long-context understanding is a critical frontier for large language models, enabling applications such as document-level reasoning, code generation over large codebases, and multi-turn dialogue with extended history. The quadratic complexity of standard self-attention has been a major bottleneck, and this survey provides a timely and structured overview of the rapidly evolving landscape of architectural solutions.

By systematically categorizing approaches—from sparse attention patterns and linear attention variants to memory-augmented transformers and improved positional encodings—the paper helps practitioners navigate the trade-offs between computational efficiency, model quality, and implementation complexity. It also highlights underexplored areas, such as evaluation benchmarks for long-context tasks and the interplay between context length and model scale.

Technical Contributions

  • Taxonomy of long-context methods: The paper organizes techniques into three main categories: (1) attention pattern modifications (e.g., sparse, sliding window, dilated attention), (2) memory and recurrence mechanisms (e.g., Transformer-XL, Compressive Transformers), and (3) positional encoding improvements (e.g., ALiBi, RoPE extensions).
  • Analysis of efficiency-performance trade-offs: Each category is evaluated on criteria such as theoretical complexity, memory footprint, and empirical performance on long-document benchmarks.
  • Identification of open challenges: The survey points out issues like the lack of standardized long-context benchmarks, difficulty in training stability, and the need for methods that generalize across different sequence lengths.

Results

As a survey, the paper does not present original experimental results. However, it compiles key findings from the literature: sparse attention methods (e.g., Longformer, BigBird) achieve O(n) complexity with minimal accuracy loss on tasks like text classification and question answering. Memory-based approaches (e.g., Transformer-XL) enable context lengths of tens of thousands of tokens but introduce recurrence overhead. Positional encoding variants like ALiBi allow extrapolation to longer sequences without retraining.

Significance

This survey provides a structured roadmap for researchers aiming to push the boundaries of LLM context length. By clarifying the landscape of existing solutions and their limitations, it accelerates progress toward models that can process entire books, long-form conversations, or massive codebases in a single pass. The paper also underscores the importance of developing unified benchmarks and evaluation protocols, which are essential for fair comparison and reproducible research in this fast-moving field.