Abstract
Recent advancements in text-to-image diffusion models have demonstrated an extraordinary capacity to synthesize complex, high-fidelity images, suggesting they possess a deep understanding of visual-semantic relationships. This paper introduces VPD (Visual Perception with a pre-trained Diffusion model), a framework that repurposes massive pre-trained diffusion models, such as Stable Diffusion, as feature extractors for downstream visual tasks. By utilizing a single-pass feature extraction process, task-specific prompting, and the exploitation of internal cross-attention maps, VPD achieves state-of-the-art performance in depth estimation and referring image segmentation. Our findings suggest that generative pre-training provides a robust, high-performance alternative to traditional discriminative or self-supervised pre-training methods.
1. Introduction
Traditionally, visual representation learning has relied on contrastive learning (e.g., CLIP) or masked image modeling (e.g., MAE) to develop backbones for downstream tasks like segmentation and object detection. While effective, these methods often focus on either high-level semantic alignment or low-level structural reconstruction. Meanwhile, text-to-image diffusion models have shown a phenomenal ability to generate compositionally complex images, implying they implicitly learn both fine-grained structural details and high-level semantic concepts.
However, a significant architectural gap exists between the iterative denoising process of image generation and the single-pass requirement of visual perception. This research addresses a fundamental question: Can the rich visual-language knowledge trapped inside pre-trained diffusion models be extracted and utilized as a backbone for standard visual perception tasks?
2. The VPD Framework
The authors propose VPD, a framework that discards the iterative diffusion pipeline in favor of using the pre-trained denoising autoencoder (a UNet) as a standard, single-pass visual backbone. The framework is built upon several key innovations designed to bridge the gap between generative pre-training and discriminative perception.
2.1 Single-Step Feature Extraction
Rather than following the multi-step denoising process, VPD feeds the input image into the UNet without adding noise ($t=0$). This allows the model to extract hierarchical feature maps in a single forward pass, significantly reducing the computational overhead compared to the full generation process.
2.2 Implicit Guidance via Task-Specific Prompting
To align the generative model with specific perception tasks, VPD utilizes task-specific text prompts (e.g., "a photo of a [class name]"). These prompts are processed through a lightweight text adapter—a 2-layer MLP—which refines the CLIP text features to better suit the requirements of the downstream task.
2.3 Explicit Guidance via Cross-Attention
In diffusion models, cross-attention maps naturally correlate visual regions with specific words in a prompt. VPD extracts these maps from the UNet’s upsampling and downsampling blocks. By concatenating these maps with the visual features, the model receives explicit localization cues that indicate where specific objects or concepts are situated within the frame.
2.4 Lightweight Decoding
The combined features (visual features, adapted text features, and cross-attention maps) are fed into a standard, lightweight task-specific decoder, such as a Semantic FPN, to produce the final predictions.
3. Experimental Evaluation
The authors evaluated VPD across three distinct visual perception tasks using the weights from Stable Diffusion, which was pre-trained on the LAION-5B dataset.
- Depth Estimation: Evaluated on NYUv2, requiring low-level structural understanding.
- Referring Image Segmentation: Evaluated on RefCOCO, RefCOCO+, and G-Ref, requiring complex visual-language alignment.
- Semantic Segmentation: Evaluated on ADE20K, requiring fine-grained, high-level understanding.
3.1 Key Results
VPD demonstrated superior performance across all benchmarks:
- Depth Estimation: Established a new state-of-the-art on NYUv2 with an RMSE of 0.254, outperforming models specifically pre-trained for perception like SwinV2-L.
- Referring Image Segmentation: Achieved a new state-of-the-art of 73.3% oIoU on the RefCOCO-val dataset.
- Semantic Segmentation: Achieved 54.6% multi-scale mIoU on ADE20K.
- Convergence Speed: On a fast 8K-iteration training schedule for ADE20K, VPD achieved 48.7% mIoU, significantly outperforming MAE (46.7%) and ConvNeXt (47.1%) under identical constraints.
4. Discussion and Insights
The success of VPD yields several critical insights into the nature of generative models as perceivers. First, the weak supervision provided by natural language during text-to-image pre-training forces the model to learn highly robust features that rival dedicated perception pre-training. Second, the internal cross-attention maps are a "localization goldmine," providing the decoder with ready-made spatial information that drastically improves performance.
Furthermore, the authors observed that scaling laws apply to perception; weights from later checkpoints of Stable Diffusion (trained for more iterations) directly translated to better downstream performance. Finally, the strong vision-language alignment inherent in these models allows for rapid adaptation to new tasks.
5. Conclusion
VPD demonstrates that pre-trained diffusion models are not just powerful generators but also world-class feature extractors for visual perception. While the computational cost of the Stable Diffusion UNet remains a challenge, this work opens the door for future research into unified architectures that can handle both generation and perception efficiently. Future work will likely focus on designing more lightweight generative models optimized for this dual-purpose utility.
Summary updated