TL;DR
This paper introduces DIFF (DIffusion Feature Fusion) and IPKL (Implicit Posterior Knowledge Learning), a framework that repurposes pre-trained text-to-image diffusion models as robust feature extractors for semantic segmentation. By distilling the "universal" visual knowledge of Stable Diffusion into a segmentation pipeline, the authors achieve state-of-the-art results in domain generalization, making models significantly more resilient to shifts like synthetic-to-real data or adverse weather.
What Problem Does This Paper Address?
Semantic segmentation models often suffer from the domain gap. A model trained on synthetic data (like GTA V) or clear sunny days often fails when deployed in the real world or during heavy fog and night. This is because standard backbones (like ResNet or ViT) tend to overfit to the specific style, lighting, and textures of their training data.
While pre-trained diffusion models (e.g., Stable Diffusion) are famous for generating images, they are essentially "universal feature learners" trained on billions of diverse images. The authors ask: How can we leverage this implicit, domain-agnostic knowledge to help segmentation models generalize to unseen environments?
Methods
The authors propose two main innovations to bridge the domain gap:
1. DIffusion Feature Fusion (DIFF)
Instead of using a single denoising step to extract features, the authors argue that the entire diffusion trajectory (the multi-step process of adding/removing noise) contains richer semantic information.
- They extract intermediate features and cross-attention maps from multiple layers and multiple time steps of the frozen Stable Diffusion U-Net.
- These are integrated using a Convolutional Fusion block to create a unified, robust feature representation.
2. Implicit Posterior Knowledge Learning (IPKL)
A major challenge is that diffusion models rely on text prompts, which aren't available during standard segmentation inference. To solve this, they use a dual-stream training framework:
- Conditional Branch (Teacher): During training, the model uses the ground truth labels to create text prompts (e.g., "a photo of a road and sky") and spatial masks. This branch learns a "posterior" distribution—essentially, what the features should look like given the ground truth.
- Unconditional Branch (Student): This branch receives only the image, with no text guidance.
- Consistency Loss: The model is trained to make the unconditional branch's output match the conditional branch's output. This effectively "distills" the text-guided semantic knowledge into the standard image-only pipeline used at test time.
Datasets
The model was rigorously tested across several challenging domain generalization scenarios:
- Synthetic-to-Real: Trained on GTAV or Synthia; evaluated on Cityscapes (CS), BDD-100K, and Mapillary Vistas (MV).
- Real-to-Adverse: Trained on clear Cityscapes data; evaluated on ACDC (fog, rain, snow) and Dark Zurich (DZ) (nighttime).
Key Insights and Ideas
- The Trajectory Matters: The paper demonstrates that fusing features across multiple diffusion steps provides a more stable representation than picking a single arbitrary step.
- Text as a Bridge: Text prompts provide a high-level semantic anchor. By using text during training to guide feature extraction, the model learns to focus on "what" an object is (semantics) rather than "how" it looks in a specific domain (style).
- Frozen Knowledge is Power: By freezing the diffusion U-Net, the authors preserve the "universal" features learned during massive pre-training, preventing the model from "forgetting" this general knowledge while learning the specific task of segmentation.
Key Results
The proposed method achieved State-of-the-Art (SOTA) performance across multiple benchmarks:
- GTAV → Cityscapes: Reached 58.01% mIoU, a significant jump over previous diffusion-based methods like PromptDiff (52.00%).
- Adverse Weather: On the Dark Zurich (nighttime) dataset, the method showed a massive improvement of +11.69% over previous SOTA methods when trained on GTAV.
- Ablation Success: As shown in the table below, adding the DIFF module and the IPKL framework with L2 consistency loss improved the baseline mIoU from 49.72% to 58.01%.
Qualitatively, the model is much better at identifying tricky categories like sidewalks and roads in unseen domains compared to previous methods.
Limitations and Future Work
- Source Domain Capacity: The authors noted that because they freeze most of the network parameters to preserve generalization, the model's learning capacity on the source domain itself might be slightly limited compared to fully trainable transformer backbones in very specific, narrow scenarios.
- Computational Overhead: Extracting features from a multi-step diffusion process is computationally heavier than a standard single-pass backbone. Future work could involve optimizing this process for real-time applications.
- Inference Speed: While the IPKL framework allows for image-only inference, the underlying diffusion backbone is still large. Exploring lighter-weight diffusion models or pruning techniques could be a promising next step.
Summary updated