Abstract
Current large-scale vision-language models are typically bifurcated into generative models, which excel at image synthesis, and discriminative models, which specialize in cross-modal alignment. We present DiffDis, a unified framework that bridges this gap by reformulating image-text alignment as a diffusion process of text embeddings. By sharing a backbone and training jointly, DiffDis leverages generative knowledge to enhance discriminative understanding. Our results demonstrate that this synergy allows a single model to outperform specialized baselines in both zero-shot classification and high-fidelity image generation.
Introduction
The field of computer vision has seen remarkable progress through two distinct paradigms: generative diffusion models like Stable Diffusion and discriminative contrastive models like CLIP. While the former masters the creation of visual content, the latter excels at understanding the relationship between images and text. Historically, these capabilities have been siloed.
Inspired by Richard Feynman’s principle, "What I cannot create, I do not understand," this work investigates whether the rich internal representations of a generative model can be harnessed for discriminative tasks. DiffDis addresses the limitations of previous unification attempts—such as GAN-based instabilities or the failure of diffusion models to fully utilize their paradigm for discrimination—by introducing a unified denoising-based framework for both tasks.
Methodology
The core innovation of DiffDis is the unification of generation and discrimination under a single diffusion-based denoising objective.
Discrimination as Denoising
Unlike standard contrastive models that align fixed embeddings, DiffDis formulates discrimination as a generative diffusion process of the text embedding, conditioned on the image. The model learns to reconstruct a clean text embedding from a noisy version by attending to visual features. This approach allows the model to "reason" about text representations in a manner consistent with its image synthesis process.
Unified Architecture
The framework employs a dual-stream architecture featuring parallel paths for latent images and text queries. A shared U-Net backbone serves as the primary feature extractor for both streams. To facilitate deep interaction, we introduce a "Deep Fusion Attention Block" that injects multi-scale visual context into the text stream.
Training Paradigm
The model is trained using a joint objective that alternates between image generation loss and image-text alignment loss. This joint training ensures that the features learned for high-fidelity synthesis directly benefit cross-modal alignment, and vice versa.
Experimental Results
We evaluated DiffDis across a variety of benchmarks to test its dual capabilities.
Zero-Shot Classification and Retrieval
DiffDis shows significant improvements over discriminative baselines. On zero-shot classification across 12 diverse datasets, DiffDis achieved a 4.7% average accuracy gain over CLIP-ViT-L/14. In retrieval tasks on Flickr30k, the model improved Recall@1 by nearly 20% for both image-to-text and text-to-image directions compared to similarly trained CLIP models.
Image Generation Quality
The generative performance also benefits from the joint training. On the MSCOCO dataset, DiffDis improved the FID score by 2.42 compared to a generation-only baseline. This suggests that the discriminative task helps the model learn more robust and semantically accurate visual features, leading to higher quality and more diverse image synthesis.
Discussion and Limitations
The synergy between generation and discrimination in DiffDis confirms that "understanding" and "creating" are deeply linked. However, the model's performance is currently bounded by the scale and diversity of its pre-training data (CC3M). Future work will focus on scaling to larger datasets like LAION-5B and addressing common diffusion artifacts, such as the occasional generation of watermarks or anatomical inaccuracies in complex subjects.
Conclusion
DiffDis demonstrates that generative and discriminative capabilities are not mutually exclusive but mutually reinforcing. By unifying these tasks within a single diffusion framework, we pave the way for more versatile and capable vision-language models that can both see and imagine the world with high precision.
Summary updated