Temporal Latent Bottleneck: Synthesis of Fast and Slow Processing Mechanisms in Sequence Learning

Aniket Didolkar, Kshitij Gupta, Anirudh Goyal, Nitesh B. Gundavarapu, Alex Lamb, Nan Rosemary Ke, Yoshua Bengio

In the world of sequence learning, we’ve long faced a trade-off between two architectures. Recurrent Neural Networks (RNNs) are great at compressing history into a single hidden state, but they struggle with high-capacity representation. Transformers, the current kings of the hill, have massive capacity but are "memory-hungry"—they attend to every single past token with equal granularity, which is computationally expensive and often captures irrelevant noise.

A team of researchers recently proposed a middle ground: the Temporal Latent Bottleneck (TLB). By mimicking the brain's "fast" and "slow" processing systems, they’ve created a model that retains the power of Transformers while gaining the efficiency and generalization of RNNs.

TLDR

The Temporal Latent Bottleneck (TLB) architecture splits sequence processing into a high-capacity "fast" stream (Transformer) for local details and a recurrent "slow" stream for global context. This hybrid approach significantly improves sample efficiency and generalization—especially when moving to higher-resolution data—while reducing the quadratic computational cost of standard Transformers.

What Problem Does This Paper Address?

Standard Transformers have a "flat" view of time. To predict the next word or action, they can attend to every previous step. While powerful, this has two major downsides:

  1. Computational Complexity: The cost grows quadratically with the sequence length ($O(T^2)$).
  2. Lack of Inductive Bias: Because they can see everything, they often overfit to irrelevant details in the past rather than learning a high-level, compressed summary of what actually matters.

In contrast, human cognition uses a "fast" system for immediate sensory perception and a "slow" system for long-term memory and consolidation. The authors argue that Deep Learning needs a similar information asymmetry: a way to separate fine-grained local processing from coarse-grained distant history.

Methods

The TLB architecture divides computation into two interacting streams:

TLB Architecture
  • The Fast Stream (Perceptual Module): This is a Transformer that processes the input in fixed-size chunks (of size $K$). It handles the "nitty-gritty" details of the current window.
  • The Slow Stream (Temporal Latent Bottleneck): This is a recurrent module that maintains a set of $N$ latent vectors (the "bottleneck"). It only updates once per chunk, summarizing the most salient information from the fast stream.

The "Aha!" Mechanism: The two streams communicate via Attention Bottlenecks.

  1. Top-Down: The fast stream uses cross-attention to pull contextual information from the slow stream's latent state.
  2. Bottom-Up: After a chunk is processed, the slow stream uses cross-attention to "read" the fast stream's output and update its own internal summary.

Because the slow stream is recurrent and updates infrequently, it is forced to ignore noise and compress the history into a compact representation.

Datasets

The authors evaluated TLB across a diverse set of benchmarks:

  • Vision: CIFAR-10 and CIFAR-100 (specifically testing generalization from $64\times64$ training images to $128\times128$ test images).
  • Reinforcement Learning: BabyAI (instruction following in a maze) and Atari (using the Decision Transformer framework).
  • Long-Range Arena (LRA): ListOps and Text Classification (byte-level), which involve sequences of up to 4,000 tokens.
  • Synthetic: A classic Copying Task to test long-term memory retention.

Key Insights and Ideas

  • Information Asymmetry is a Feature: By forcing the model to pass information through a narrow bottleneck that updates slowly, the model learns to prioritize "salient" features over "irrelevant" details.
  • Better Generalization: In vision tasks, the TLB model outperformed standard Vision Transformers (ViT) when tested on higher resolutions than it was trained on. This suggests the bottleneck helps the model learn "concepts" rather than just memorizing pixel patterns.
  • Efficiency Gains: By chunking the input, the computational complexity drops from $O(T^2)$ to $O(\frac{T}{K}(K^2 + KN))$. For long sequences, this results in massive memory and speed improvements.

Key Results

  • Vision: On CIFAR-10, when transferred to $128\times128$ resolution, ViT + TLB achieved 84.38% accuracy, compared to just 73.18% for a standard ViT.
  • Reinforcement Learning: In Atari games, adding TLB to a Decision Transformer led to significant score jumps. For example, in Qbert, the score rose from 3268 (standard DT) to 5019 (DT + TLB). Furthermore, in complex BabyAI environments like "BossLevel," the TLB model demonstrated significantly faster learning and higher overall success rates compared to baselines.
BabyAI BossLevel Success Rate
  • Long-Range Dependencies: On the ListOps task, TLB outperformed the "Long-Short Transformer," a competitive baseline designed specifically for long sequences.
  • Computational Efficiency: For text classification, the TLB model was up to 4.4x faster to train and used as little as 1/10th the memory of a standard Transformer.

Limitations and Future Work

The primary limitation acknowledged by the authors is that the chunk size ($K$) is a fixed hyperparameter. In the real world, "events" don't happen in fixed intervals.

Future Work: The authors suggest exploring dynamic chunking, where the model itself decides when an important event has occurred and when to update its "slow" latent memory. Additionally, applying this to even larger-scale language modeling remains an open and promising frontier.

Summary updated

BibTeX
@inproceedings{didolkar2022temporal,
  author = {Aniket Didolkar and Kshitij Gupta and Anirudh Goyal and Nitesh B. Gundavarapu and Alex Lamb and Nan Rosemary Ke and Yoshua Bengio},
  title = {{Temporal Latent Bottleneck: Synthesis of Fast and Slow Processing Mechanisms in Sequence Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=lU4ZtJUYpE},
}
Figure