Orthros: Phase-Aware Heterogeneous Attention for Efficient Transformers
Yuhong CHOU, Zehao Liu, Yuqi Pan, Qian Liu, Xianwei Chen, Jibin Wu
NeurIPS page · Open on the map
Category: Efficient LLM Inference & Training › Efficient Attention Mechanisms · Type: new method · Keywords: efficient attention, phase-aware attention, linear complexity, in-context recall, Transformer acceleration
Areas: Long Context › Long-context mechanisms › Efficient attention; Model Architectures & Sequence Modeling › Language Model Architectures › Efficient Attention
Summary
Orthros introduces phase-aware heterogeneous attention that dynamically switches between linear-complexity prefilling and full attention decoding, achieving linear asymptotic complexity and a 21.9× speedup over Transformers.
Explained to a 5-year-old
Computers that read many words can be slow and forget things they read earlier. We made a new trick that lets them read quickly when they are learning new words. When they need to remember what they learned, the trick switches to a careful way of reading. This helps them find information, like a lost toy, even in a very long list. Because of this, the computers become faster and remember better.
Explained to a 5-year-old, longer
When we read a story, our brain has to keep track of many words. Some computer programs that read stories are slow because they look at every word together. To make them faster, we can use a special way of reading that only looks at a few words at a time. But when we need to remember something we read earlier, that fast way can forget it. So we need a method that can change how it reads depending on what it's doing. The new idea works like a switch: when the program is learning new words, it reads quickly. When it needs to remember what it learned, it switches to a careful reading mode. This careful mode looks at all the words, like the original way, but only when needed. By doing this, the program can handle very long texts without getting slow. It also helps find specific information, like a hidden needle in a big haystack. The result is a computer that reads faster and remembers better at the same time. This makes it useful for real-world tasks like reading long documents or answering questions.
For a technical reader
Orthros is a new attention module that dynamically switches between linear-complexity and full-attention computation based on the processing phase. During prefilling it uses a phase-aware pattern that reduces quadratic cost to linear, while during decoding it falls back to standard full attention to preserve recall. This eliminates the need to interleave expensive full-attention layers, giving a theoretical speedup of up to 21.9× on long-context workloads. The authors show that Orthros can be efficiently converted from a vanilla Transformer and matches or exceeds baseline performance on needle-in-a-haystack and in-context recall benchmarks.
Problem
Efficient attention mechanisms reduce Transformer complexity but often degrade in-context recall, requiring full attention layers that reintroduce quadratic bottlenecks in long contexts. This leaves efficient processing of long sequences unresolved.
Method
The approach decouples attention computation into phases, using linear-complexity patterns during prefilling and full attention during decoding, and dynamically switches between them based on processing phase. This phase-aware heterogeneous attention module is integrated as a unified replacement for standard attention layers, enabling linear asymptotic complexity in typical long-context workloads.
Results
The approach achieves a 21.9× prefilling speedup over Transformers, maintains near-perfect recall on a 128K needle-in-a-haystack test, and matches strong Transformer baselines on in-context recall tasks while scaling across model sizes.
Contributions
It proposes a phase-aware attention design that dynamically switches between linear and full attention, provides theoretical complexity analysis, demonstrates scalability and conversion feasibility, and empirically validates superior efficiency and recall over existing efficient attention mechanisms.
Practical relevance
It offers a practical, efficient attention module that can be deployed in production systems to handle long sequences with high throughput and preserved recall.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction