Perception Encoder: The best visual embeddings are not at the output of the network

Daniel Bolya, Po-Yao Huang, Peize Sun, Jang Hyun Cho, Andrea Madotto, Chen Wei, Tengyu Ma, Jiale Zhi, Jathushan Rajasegaran, Hanoona Abdul Rasheed, Junke Wang, Marco Monteiro, Hu Xu, Shiyu Dong, Nikhila Ravi, Shang-Wen Li, Piotr Dollar, Christoph Feichtenhofer

Introduction

For years, the computer vision community has operated under a "specialization" paradigm. Conventional wisdom suggested that different tasks required fundamentally different pretraining objectives: contrastive learning for classification, captioning losses for multimodal chatbots, and spatially-aware self-supervision for object detection. Combining these into a single, scalable foundation model has remained a complex challenge.

Researchers at Meta have challenged this paradigm with the Perception Encoder (PE). Their research posits a provocative thesis: a single, simple pretraining objective is sufficient to learn universal features for OCR, detection, and depth estimation. However, these features are often hidden within the intermediate layers of the network, while the final output layer is frequently "polluted" by the specific requirements of the global contrastive loss. By introducing novel "alignment tuning" methods, the authors have unlocked these hidden embeddings to achieve state-of-the-art results across a massive range of tasks.

Methodology

The Perception Encoder family is developed through a rigorous three-stage pipeline designed to maximize both semantic understanding and spatial awareness.

1. Robust Image Pretraining

The authors refined the standard CLIP recipe using modern scaling techniques. This included the implementation of progressive resolution training, the use of the LAMB optimizer for large-batch stability, and the integration of 2D Rotary Positional Embeddings (RoPE) to better handle spatial relationships.

2. Video Data Engine

To bridge the gap between static images and dynamic video, the team developed a "Video Data Engine." This system utilizes an image-only model to generate frame-level captions, which are then synthesized by a Large Language Model (LLM) into a single, high-quality video description. Finetuning on this synthetic data—comprising the PE Video Dataset (PVD) with 1M high-quality videos—drastically improved video-language alignment.

3. Alignment Tuning

Recognizing that the best features reside in intermediate layers, the authors developed two distinct alignment strategies to bring these features to the surface:

  • Language Alignment: Intermediate layers (specifically layer 47 of a 50-layer model) are projected into an LLM space to preserve semantic richness.
  • Spatial Alignment: The model employs self-distillation, where the final layers are taught by the model’s own intermediate layers. This is combined with distillation from SAM 2.1 mask logits to force the final layers to maintain local, spatial coherence.

The "Dichotomy of Layers"

A central insight of this work is the visualization of how different tasks peak at different depths within the transformer architecture. The authors discovered a clear "Dichotomy of Layers":

  • Spatial tasks (such as tracking or detection) peak early, typically around layer 32.
  • Semantic tasks (such as VQA) peak much later, around layer 47.
  • The Final Layer (layer 50) is often the least effective for downstream tasks, as the global contrastive loss forces it to represent a "global" summary that destroys the local, spatial information necessary for dense prediction.

Key Results and Benchmarks

The Perception Encoder demonstrates that contrastive models can excel at spatial tasks if the right layers are utilized.

  • Spatial SOTA: The PE-spatial-G variant achieved 66.0 box mAP on COCO, setting a new benchmark for general-purpose encoders.
  • Document Understanding: When paired with an 8B LLM, the PE-lang-G achieved 94.6 on DocVQA and 80.9 on InfographicVQA, outperforming models three times its size.
  • Zero-Shot Robustness: The model obtained an average 86.6 zero-shot ImageNet robustness score and 76.9 zero-shot Kinetics-400 video classification accuracy.
  • Efficiency: The alignment tuning phase is remarkably efficient, requiring an order of magnitude fewer samples than the initial pretraining phase to specialize the foundation model.

Discussion and Future Work

The Perception Encoder proves that simplicity scales. By sticking to a contrastive loss and treating task-specialization as a post-processing alignment step, the authors avoided the complexity of multi-objective training.

However, limitations remain. The current video approach relies on average pooling of frames; more sophisticated temporal modeling could further enhance video-specific performance. Additionally, while the encoder is universal, it currently requires separate alignment tuning for language versus spatial tasks. Developing a single alignment that satisfies both simultaneously remains a primary goal for future research. Finally, while the 2B parameter model is highly performant, scaling this recipe to the 10B+ range may unlock even greater capabilities in frontier vision-language modeling.

Summary updated

BibTeX
@inproceedings{bolya2025perception,
  author = {Daniel Bolya and Po-Yao Huang and Peize Sun and Jang Hyun Cho and Andrea Madotto and Chen Wei and Tengyu Ma and Jiale Zhi and Jathushan Rajasegaran and Hanoona Abdul Rasheed and Junke Wang and Marco Monteiro and Hu Xu and Shiyu Dong and Nikhila Ravi and Shang-Wen Li and Piotr Dollar and Christoph Feichtenhofer},
  title = {{Perception Encoder: The best visual embeddings are not at the output of the network}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=INqBOmwIpG},
}
Figure