Implicit and Explicit Language Guidance for Diffusion-Based Visual Perception

Hefeng Wang, Jiale Cao, Jin Xie, Aiping Yang, Yanwei Pang

TL;DR

IEDP (Implicit and Explicit language guidance for Diffusion-based Perception) is a new framework that repurposes pre-trained text-to-image diffusion models for visual understanding tasks. By training with a dual-branch system that combines image-derived "implicit" embeddings with ground-truth "explicit" labels, it achieves state-of-the-art results in semantic segmentation and depth estimation while remaining significantly faster than previous methods during inference.

What Problem Does This Paper Address?

Text-to-image diffusion models like Stable Diffusion are masters of synthesis because they have "seen" millions of images paired with text, learning a deep, structured representation of the visual world. Naturally, researchers want to use these powerful features for visual perception—tasks like identifying every object in a scene (semantic segmentation) or calculating the distance to every pixel (depth estimation).

However, bridging the gap between generating images and understanding them is tricky. Existing methods have two main flaws:

  1. Misalignment: Some methods (like VPD) use a list of every possible class in a dataset as a text prompt. This confuses the model because an image of a "kitchen" shouldn't be conditioned on the word "skyscraper."
  2. Efficiency vs. Accuracy: Other methods (like TADP) use secondary models like BLIP-2 to generate specific captions for each image. While more accurate, this is computationally expensive and introduces "noise" if the captioning model makes a mistake.

Methods

The authors propose IEDP, which introduces a clever dual-branch training strategy to get the best of both worlds.

The IEDP framework uses two branches during training to guide the Stable Diffusion backbone.

1. The Implicit Branch (Training & Inference)

Instead of converting an image to text and then back to an embedding, this branch uses a frozen CLIP image encoder. It extracts visual features, which are then processed by a "projector" and a set of learnable queries via cross-attention. This creates "implicit text embeddings" directly from the visual data, bypassing the need for actual text prompts during inference.

2. The Explicit Branch (Training Only)

During training, we have access to the "gold standard": ground-truth (GT) labels. This branch takes the actual labels for the image (e.g., "bed," "lamp," "curtain"), encodes them using a CLIP text encoder, and feeds them into the diffusion model. Because these labels are noise-free and perfectly accurate, they provide strong guidance for feature learning.

3. Weight Sharing

Crucially, both branches share the same weights for the Denoising UNet (the core of the diffusion model) and the Task-Specific Decoders. By jointly training them, the implicit branch learns to produce features that are just as useful as those guided by the perfect ground-truth labels. At test time, the explicit branch is simply discarded, leaving a streamlined, high-performance model.

Comparison of IEDP vs. previous methods. IEDP simplifies inference by removing the need for manual prompts or captioning models.

Datasets

The model was evaluated on two benchmark datasets:

  • ADE20K: A challenging semantic segmentation dataset with 150 semantic categories across 20,000+ natural images.
  • NYUv2: A standard dataset for monocular depth estimation, consisting of 24,000 training images of various indoor scenes.

Key Insights and Ideas

  • Ground-Truth as a Teacher: The "aha moment" here is using GT labels not just as a final target, but as a prompt during training. This forces the diffusion backbone to align its internal features with precise semantic concepts.
  • Eliminating the Middleman: By using an implicit branch, the authors prove you don't actually need human-readable text to leverage a language-aligned model. The CLIP image encoder provides enough semantic context to "trigger" the right features in the Stable Diffusion UNet.
  • Efficiency Gains: Because IEDP doesn't need to run a heavy captioning model (like BLIP-2) at test time, it is much faster than its competitors while maintaining or exceeding their accuracy.

Key Results

IEDP sets new benchmarks for diffusion-based perception:

  • Semantic Segmentation: On ADE20K, it achieved a 55.9% mIoU, outperforming the baseline VPD by 2.2%.
  • Depth Estimation: On NYUv2, it achieved an RMSE of 0.226, representing an 11.0% relative improvement over the baseline.
  • Speed: During inference, IEDP is 4.2 times faster than TADP on semantic segmentation tasks because it avoids the cumbersome caption-generation step.

Limitations and Future Work

While IEDP is highly effective, the authors note a few areas for growth:

  • Closed-Set Focus: The current experiments focus on "classical" perception where the categories are pre-defined. Extending this to open-vocabulary scenarios (detecting objects the model wasn't explicitly trained on) is a logical next step.
  • Query Sensitivity: Ablation studies showed that the number of learnable queries in the implicit branch affects performance; finding the optimal balance between query count and computational overhead remains an engineering challenge.
  • Training Cost: Like most diffusion-based methods, training still requires significant GPU resources (the authors used four NVIDIA RTX A6000s).

For more details, you can find the full paper on arXiv under the ID 2404.07600v3.

Summary updated

BibTeX
@article{wang2025implicit,
  author = {Hefeng Wang and Jiale Cao and Jin Xie and Aiping Yang and Yanwei Pang},
  title = {{Implicit and Explicit Language Guidance for Diffusion-Based Visual Perception}},
  journal = {IEEE Trans. Multimedia},
  year = {2025},
  url = {https://openreview.net/forum?id=6mYhBnbO4X},
}
Figure