Perceiver-VL: Efficient Vision-and-Language Modeling with Iterative Latent Attention

Zineng Tang, Jaemin Cho, Jie Lei, Mohit Bansal

TL;DR

Perceiver-VL is an efficient vision-and-language framework that achieves linear computational complexity by replacing standard quadratic self-attention with iterative latent cross-attention. By incorporating LayerDrop and a novel mixed-stream retrieval architecture, it dramatically reduces GFLOPs and latency while maintaining competitive performance on both video-text and image-text benchmarks.

What Problem Does This Paper Address?

Multimodal models that combine vision and language (VL) have advanced significantly, but they face a massive scalability bottleneck. Standard architectures rely heavily on the Transformer's self-attention mechanism, which has a quadratic computational cost ($O(M^2)$) relative to the input length ($M$).

When dealing with high-dimensional inputs—such as long videos or high-resolution images paired with text—the input length explodes. For instance, a standard 8-frame video clip can easily translate into an input sequence length greater than 1,500 tokens. This quadratic scaling makes processing long-form video content or deploying models in latency-sensitive environments prohibitively expensive. Perceiver-VL aims to break this bottleneck by decoupling processing costs from raw input size.

Methods

The core innovation of Perceiver-VL lies in how it handles attention and information routing:

  • Iterative Latent Cross-Attention: Instead of performing self-attention across the entire high-dimensional input array ($M$), Perceiver-VL uses cross-attention to map the input to a much smaller, fixed-size latent array ($N$, where $N \ll M$). Subsequent deep self-attention layers operate solely on this compact latent space. This shifts the computational complexity from $O(M^2)$ to $O(NM)$, achieving linear scaling with respect to input size.
  • LayerDrop on Cross-Attention: To provide on-demand flexibility, the authors apply LayerDrop (structured dropout) to the encoder's cross-attention layers during training. At inference time, users can dynamically drop cross-attention layers to reduce depth and latency without needing to retrain or store separate model checkpoints.
  • Mixed-Stream Retrieval Architecture: For cross-modal retrieval, standard models use either a slow but accurate "single-stream" (joint encoding) or a fast but less accurate "multi-stream" (dual encoder) setup. Perceiver-VL introduces a mixed-stream variant: separate encoders process each modality into compact latent arrays, which are then fused via a lightweight cross-attention decoder. This provides a superior accuracy-latency trade-off.
Perceiver-VL Architecture

Datasets

The model was pretrained and evaluated on a comprehensive suite of image and video benchmarks:

  • Pretraining Datasets: WebVid-2.5M (video-text pairs) and Conceptual Captions (CC-3M, image-text pairs).
  • Video-Text Downstream Tasks: MSRVTT, DiDeMo, LSMDC, and ActivityNet Captions for video retrieval; TGIF-QA and MSRVTT-QA for video question answering.
  • Image-Text Downstream Tasks: Flickr30k for image retrieval; VQAv2 and NLVR2 for visual question answering and reasoning.

Key Insights and Ideas

  • Linear Scaling in Practice: The computational cost (GFLOPs) of Perceiver-VL scales linearly with both the number of video frames and frame size, making it exceptionally well-suited for long-video understanding compared to standard transformers.
  • LayerDrop Double-Benefit: Beyond enabling on-demand inference speedups, training with LayerDrop acts as a powerful regularizer, actually improving downstream task accuracy when all layers are kept intact.
  • Latent Space Flexibility: The size of the latent array ($N$) can be scaled down during finetuning (e.g., from 128 to 32) to drastically cut GFLOPs with only a minimal drop in downstream task accuracy.
  • Simplicity Wins in Aggregation: The authors found that simply concatenating visual and text tokens into a single joint input array performs just as well as more complex, separate modality-specific cross-attention schemes, while requiring the least computation.

Key Results

Perceiver-VL demonstrates substantial efficiency gains across the board:

  • Video Retrieval (MSRVTT): Perceiver-VL (with mixed-stream architecture) achieves a Recall@1 of 32.6 with an inference time of 72.0 ms and 43.9 GFLOPs. In comparison, the closely related Frozen-in-Time baseline achieves a lower R@1 of 31.0 while taking 260.0 ms and 89.0 GFLOPs.
  • Visual Question Answering (VQAv2): The model achieves 70.91% accuracy using only 30.5 GFLOPs and 18.0 ms of inference time, cutting the computational cost and latency of ViLT-B/32 nearly in half (55.9 GFLOPs, 32.0 ms) while maintaining comparable accuracy.
  • On-Demand Latency Reduction: By leveraging LayerDrop during finetuning, the encoder's inference latency can be reduced by 19.4% (from 72.0 ms down to 58.0 ms) with less than a 1% drop in retrieval accuracy.
Retrieval Architecture Variants

Limitations and Future Work

The primary limitation highlighted in the paper is the weight initialization gap. Popular pretrained visual backbones (like CLIP or ViT) are optimized for patch-level self-attention rather than compact latent spaces. Because Perceiver-VL introduces cross-attention layers that cannot be warm-started from these standard transformer weights, they must be trained from scratch, leaving a performance gap compared to fully transformer-based models initialized with massive web-scale models like CLIP.

The authors note that future work should focus on large-scale pretraining directly on Perceiver-style architectures from scratch, as well as developing more effective knowledge distillation and transfer methods from heterogeneous transformer models.

Summary updated

BibTeX
@inproceedings{tang2023perceiver,
  author = {Zineng Tang and Jaemin Cho and Jie Lei and Mohit Bansal},
  title = {{Perceiver-VL: Efficient Vision-and-Language Modeling with Iterative Latent Attention}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  doi = {10.1109/wacv56688.2023.00439},
}
Figure