TL;DR
This paper introduces COPA, a novel Vision-Language Pre-training (VLP) method that efficiently integrates fine-grained object-text alignment into Vision Transformer (ViT) models. By developing a "Patch-Text Alignment" (PTA) task and a "Text-aware Patch Detector" (TPD), COPA significantly reduces computational costs and speeds up inference by focusing on text-relevant image patches, achieving competitive performance on downstream tasks.
What Problem Does This Paper Address?
Current state-of-the-art Vision-Language Pre-training (VLP) methods fall into two main camps: detection-based and ViT-based. Detection-based methods excel at fine-grained alignment between objects and text, but their reliance on object detectors makes them computationally expensive and prone to error propagation. On the other hand, ViT-based methods are more efficient but often struggle with coarse-grained alignment, as they process entire images or long sequences of patches without explicitly identifying which patches are most relevant to the text. This leads to processing many redundant, text-irrelevant patches, increasing computational load without improving performance. COPA aims to bridge this gap by enabling efficient, fine-grained alignment within a ViT architecture.
Methods
COPA introduces two key innovations:
- Text-aware Patch Detector (TPD): This is a plug-and-play module integrated into the ViT backbone. It takes text embeddings and image patch features to predict an "alignment score" for each patch, indicating its relevance to the text.
- Patch-Text Alignment (PTA) Pre-training Task: This novel task trains the TPD. It leverages existing object/region annotations (like bounding boxes) from datasets. These annotations are converted into patch-level labels (e.g., a patch overlapping a bounding box gets label 1). The TPD is then trained to predict these labels using a binary cross-entropy loss. This allows the model to learn which patches are text-relevant using a small fraction of annotated data.
COPA uses these components to select and retain only text-relevant patches, fusing the remaining "undetected" patches into a single token. This significantly reduces the length of the visual sequence processed by the ViT, leading to faster computation. The PTA task is jointly trained with other standard VLP objectives (ITC, ITM, MLM, PrefixLM) in an end-to-end manner.
Datasets
COPA uses a combination of datasets for pre-training and evaluation:
- Pre-training:
- 4 million image-text pairs from a combination of in-domain datasets (MS COCO, Visual Genome) and out-of-domain web datasets (Conceptual Captions, SBU Captions).
- Object/region annotations from MS COCO and Visual Genome are used specifically for training the Patch-Text Alignment (PTA) task.
- Evaluation:
- Standard benchmarks for Visual Question Answering (VQA), Cross-modal Retrieval, Image Captioning, and Visual Grounding.
Key Insights and Ideas
- Leveraging Object Annotations Efficiently: The core idea is to use existing object annotations (which are often readily available) to train a patch-level relevance detector, rather than requiring full patch-level annotations. This makes the fine-grained alignment approach computationally feasible.
- Text-Guided Patch Selection: By explicitly training a detector to identify text-relevant patches, COPA avoids processing irrelevant visual information, which is a major bottleneck in standard ViT-based VLP.
- End-to-End Training: Integrating the TPD and PTA task into the standard VLP training pipeline allows for joint optimization, ensuring that the patch selection mechanism directly benefits the overall VLP objective.
- Generalization of TPD: The Text-aware Patch Detector (TPD) demonstrates strong generalization capabilities, performing well even on web-crawled data with potentially noisy annotations, which is crucial for large-scale pre-training.
Key Results
- Efficiency: COPA achieves a significant speedup, with nearly 88% faster throughput compared to prior VLP models. For example, on VQA, throughput increased from 186.42 to 349.71.
- Performance: Despite the efficiency gains, COPA maintains competitive or superior performance on various downstream tasks, including VQA (e.g., 77.84 on VQA test-dev with a 50% keeping ratio).
- Reduced Computational Cost: The method significantly reduces FLOPS and GPU memory usage, especially when compared to baseline models like mPLUG.
- Higher Resolution Handling: COPA can effectively leverage higher resolution images for improved performance without a proportional increase in computational cost, thanks to its patch selection mechanism.
Limitations and Future Work
- Detection Location Impact: While the keeping ratio significantly impacts GPU memory, the specific layer where the TPD is inserted (detection location) can affect accuracy. Placing it too early in the ViT backbone can lead to performance degradation.
- Single-Stream Extension: While COPA can be extended to single-stream models (like ViLT), the performance on downstream tasks is slightly lower than the dual-stream COPA, though efficiency is improved.
- Future Work: The paper suggests that further exploration of optimal detection locations and keeping ratios could yield even better results. The generalizability of the TPD to various types of visual-linguistic tasks is also a promising avenue.
Summary updated