In traditional sequence processing, models like the Transformer assume the entire input is available at once. However, real-world applications—such as live speech translation, real-time dialogue systems, and financial forecasting—operate on data that arrives piece by piece. When a model designed for "offline" processing is forced into these "online" scenarios, it often falls back on a strategy called restart-incrementality: every time a new token arrives, the model re-processes the entire accumulated history from scratch.
This approach is computationally ruinous. As Patrick Kahardipraja, Brielen Madureira, and David Schlangen demonstrate in Towards Incremental Transformers, re-calculating the prefix for every new token leads to a quadratic increase in latency. For a sequence of length $N$, the total computation scales at $O(N^2)$, creating a scaling bottleneck that makes long-form real-time interaction impossible.
The Bidirectional Bottleneck
The primary culprit for this inefficiency is the bidirectional encoder. In a standard BERT-style encoder, the representation of the first word depends on the last word. Consequently, when the "last word" changes (because a new word arrived), every single hidden state in the sequence must be updated. Shaolei Zhang and Yang Feng note in Future-Guided Incremental Transformer for Simultaneous Translation that this leads to cubic training complexity in simultaneous translation tasks, as the model must simulate this re-computation at every step of the sequence.
To achieve true real-time performance, research has shifted toward architectures that can "update" their internal state rather than "re-calculate" it.
From Re-computation to State Updates
The core intuition behind efficient streaming is to ensure that the past remains stable. If the representation of token $t$ does not change when token $t+1$ arrives, we can simply cache the hidden states (the "KV cache") and compute only the new token's contribution.
- Unidirectional Constraints: By enforcing causality in the encoder, researchers like Chengxi Li and Jie Zhu in Efficient and Adaptive Simultaneous Speech Translation with Fully Unidirectional Architecture eliminate the need for re-processing. When the encoder is unidirectional, the history is fixed, allowing for $O(1)$ updates per new token.
- Incremental Encoding: In the FASST framework, Siqi Ouyang and Xi Xu use specialized "consistency masks" to allow Large Language Models to process streaming speech. This reduces computational overhead by 4x by treating the incoming audio chunks as incremental additions to a persistent KV cache.
- Linear Complexity Neural Processes: Beyond translation, Philip Mortimer and colleagues introduced the Incremental Transformer Neural Process. By applying causal masking to the context set, they transform the quadratic cost of incorporating new observations into a linear one, enabling high-fidelity streaming inference.
Adaptive Revision: Knowing When to Re-think
While unidirectional models are efficient, they lose the benefit of "future context"—the ability to revise an interpretation based on later information. This is the "garden-path" problem: a model might commit to a translation or a parse that becomes clearly wrong two words later.
To bridge this gap, Brielen Madureira proposed TAPIR, a two-pass model. A fast, incremental first pass provides immediate results, while a "controller" decides when the incoming information is surprising enough to trigger a full, expensive re-computation. This "adaptive revision" achieves a 4.5x speedup by only paying the quadratic cost when it actually matters.
The Memory Perspective
Efficiency isn't just about time; it's about what the model chooses to remember. Standard models are "distracted" by every token in the history. In Efficient Seq2seq Coreference Resolution, Matt Grenander and Shay B Cohen show that by discarding "filler" text and maintaining a compressed memory of entity mentions, models can process long dialogues with significantly less GPU memory and lower latency.
Similarly, the "Scratchpad Mechanism" introduced by Ryan Y. Benmalek and Madian Khabsa in Keeping Notes allows the decoder to write back to the encoder's state. This turns the encoder into a dynamic, updatable memory, preventing the model from repeating itself without requiring a full re-scan of the generated output.
By moving away from global, static representations toward local, incremental state updates, these researchers are enabling a new generation of AI that can listen, think, and respond in lockstep with human time.