Perceiver: General Perception with Iterative Attention

Andrew Jaegle, Felix Gimeno, Andy Brock, Oriol Vinyals, Andrew Zisserman, João Carreira

Introduction

The Perceiver is a general-purpose Transformer-based architecture designed to process high-dimensional inputs from any modality—vision, audio, point clouds, and more—without domain-specific assumptions like 2D convolutions. By introducing an asymmetric attention mechanism that distills large inputs into a small latent bottleneck, the model achieves linear scaling with input size and performs competitively with specialized, state-of-the-art models across diverse tasks.

The Problem with Modality-Specific Architectures

Traditional deep learning architectures are often "locked" to specific modalities. For example, Convolutional Neural Networks (CNNs) rely on the 2D grid structure of images, while LSTMs or 1D convolutions are tailored for sequential audio data. This requires researchers to manually redesign architectures every time they encounter a new input type or sensor configuration.

While Transformers offer a more flexible, "structure-agnostic" alternative, they suffer from a major scaling issue: standard self-attention has a quadratic complexity ($O(M^2)$) relative to the number of inputs ($M$). This makes it computationally infeasible to process raw, high-resolution data like a 50,000-pixel image or a high-fidelity audio stream directly. The Perceiver aims to bridge this gap, providing a single architecture that is both flexible and scalable.

Methods: The Latent Bottleneck

The core innovation of the Perceiver is the latent bottleneck. Instead of performing all-to-all self-attention on the massive input array, the model uses an asymmetric cross-attention module.

  1. Cross-Attention Bottleneck: A small set of learned "latent units" (index dimension $N$) queries the large input array (index dimension $M$). Because $N \ll M$ (e.g., 512 latents vs. 50,000 pixels), the complexity drops from $O(M^2)$ to $O(MN)$, which is linear in the input size.
  2. Latent Transformer: Once the input is distilled into the small latent space, a deep stack of standard Transformer blocks processes these units. This is computationally cheap ($O(N^2)$) and allows for very deep models regardless of the input's original size.
  3. Iterative Attention: The model can re-query the input array multiple times, allowing the latents to "refine" their understanding of the data based on previous processing steps.
  4. Position Encodings: To compensate for the lack of hard-coded spatial structure (like convolutions), the authors use Fourier feature position encodings. These allow the model to learn spatial or temporal relationships without baking them into the network's wiring.
The Perceiver architecture uses cross-attention to map a large input array to a small latent bottleneck, followed by a deep latent Transformer.

Datasets and Multimodal Capabilities

The authors evaluated the Perceiver on a wide range of modalities to prove its generality:

  • ImageNet: Standard image classification (50,176 pixels per image).
  • AudioSet: Sound event classification using raw audio waveforms, mel spectrograms, and video frames.
  • ModelNet-40: 3D point cloud classification, which lacks a natural grid structure.
The Perceiver handles diverse modalities like images, video, audio, and point clouds with essentially no architectural changes.

Key Insights

  • Decoupling Depth from Input Size: By isolating the heavy computation in the latent space, the network's depth is no longer constrained by the resolution of the input.
  • Structure-Agnosticism is Viable: The paper demonstrates that "hard-coding" 2D priors (convolutions) isn't strictly necessary for high performance, provided the model has enough capacity and the right attention mechanism.
  • Robustness to Permutation: Unlike CNNs, which fail if you scramble an image's pixels, the Perceiver (and Transformers in general) is naturally permutation-invariant. If you permute the input and its corresponding position encodings, the Perceiver's output remains identical.
  • Weight Sharing as Recurrence: When weights are shared across iterative attention steps, the Perceiver effectively becomes a Recurrent Neural Network (RNN) unrolled in depth, which significantly improves parameter efficiency.

Key Results

  • ImageNet: The Perceiver achieved 78.0% top-1 accuracy, performing on par with ResNet-50 and the Vision Transformer (ViT), despite having no built-in knowledge of 2D image structure.
  • AudioSet: It reached near state-of-the-art results on both audio-only (38.4 mAP) and multi-modal (audio+video) experiments, outperforming many specialized fusion models.
  • ModelNet-40: On 3D point clouds, it achieved 85.7% accuracy, significantly outperforming generic baselines and proving its effectiveness on non-grid data.

Limitations and Future Work

  • Overfitting: Because the model is so flexible and makes so few assumptions, it is prone to overfitting. The authors used heavy data augmentation and weight sharing to mitigate this.
  • Pre-training: The authors suggest that pre-training on even larger datasets (like JFT-300M) would likely unlock even higher performance, as seen with other Transformer models.
  • Remaining Modality-Specifics: While the architecture is general, the authors still used modality-specific data augmentation and position encodings. A truly "modality-agnostic" learning pipeline remains a goal for future research.

Summary updated

BibTeX
@inproceedings{jaegle2021perceiver,
  author = {Andrew Jaegle and Felix Gimeno and Andy Brock and Oriol Vinyals and Andrew Zisserman and João Carreira},
  title = {{Perceiver: General Perception with Iterative Attention}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=WM44ldTauj},
}
Figure