Perceiver

Perceiver is a general-purpose transformer architecture that uses cross-attention to project arbitrary-size inputs into a fixed-size latent array — decoupling the computational cost from input size so that a 100K-pixel image, a 50K-token audio clip, and a 10K-point cloud all get processed through the same small latent bottleneck (e.g., 512 latent vectors), enabling a single architecture to handle any modality without modality-specific design choices.

What Is Perceiver?

  • Definition: A transformer architecture (Jaegle et al., 2021, DeepMind) where the input (of any size) is processed through cross-attention with a small learned latent array (typically 256-1024 vectors), and all subsequent self-attention operates on this compact latent space rather than the high-dimensional input space.
  • The Problem: Standard transformers apply O(n²) self-attention directly on the input. For a 224×224 image (50K pixels), that's 2.5 billion attention computations per layer — impossible. CNNs and ViTs work around this with patches, but each modality needs custom architecture.
  • The Solution: Project ANY input into a fixed-size latent array via cross-attention (cost: O(n × M) where M is latent size << n), then apply self-attention only on the small latent array (cost: O(M²), independent of input size).

Architecture

StepOperationInputOutputComplexity
1. Cross-AttentionLatent queries attend to inputLatent: M × d, Input: N × d_inM × d (latent updated)O(M × N)
2. Self-AttentionLatent self-attention (multiple blocks)M × dM × d (refined)O(M²) per block
3. Repeat (optional)Additional cross-attention + self-attentionUpdated latent + original inputM × d (further refined)O(M × N + M²)
4. DecodeTask-specific output (class token, etc.)M × dTask outputO(M)

Key Insight: The Latent Bottleneck

PropertyStandard TransformerPerceiver
Self-attention costO(N²) — depends on input sizeO(M²) — depends on latent size (fixed)
Input flexibilityFixed tokenization per modalityAny byte array, any modality
ScalabilityCost grows quadratically with inputCost fixed regardless of input size
Architecture per modalityDifferent: ViT for images, BERT for textSame architecture for everything

Example: M=512 latents, N=50,000 input elements:
- Standard: Self-attention = 50,000² = 2.5B operations per layer
- Perceiver: Cross-attn = 512 × 50,000 = 25.6M; Self-attn = 512² = 262K per block

Modality Flexibility

ModalityInput RepresentationSame Perceiver Architecture
ImagesPixel array (H×W×C) with positional encoding✓
AudioRaw waveform or spectrogram✓
Point Clouds3D coordinates (N×3)✓
VideoPixel frames (T×H×W×C)✓
TextToken embeddings✓
MultimodalConcatenate all modalities as one input array✓

Perceiver is the universal perception architecture — using cross-attention to a fixed-size latent array to decouple computational cost from input size and modality, enabling a single unchanged architecture to process images, audio, video, point clouds, and multimodal inputs with O(M²) self-attention cost regardless of whether the input has 1,000 or 1,000,000 elements, pioneering the movement toward truly modality-agnostic deep learning.

Take perceiver further

Ask the copilot about this term, or have our engineers assess it against your process.