Abstract
UniDiff is a unified vision-language framework designed to bridge the gap between discriminative understanding and generative synthesis. By incorporating a novel Reciprocal Semantic Consistency (RSC) loss, UniDiff mitigates the common issue of "semantic collapse" encountered when fine-tuning large pre-trained models on small, domain-specific datasets. Experimental evaluations on specialized fashion and e-commerce datasets demonstrate that UniDiff outperforms specialized models like CLIP and Stable Diffusion in their respective tasks, showcasing a synergistic effect where generative training enhances discriminative performance and vice-versa.
Introduction
In the current vision-language landscape, models typically excel at either understanding relationships (discriminative models like CLIP) or synthesizing content (generative models like Stable Diffusion). However, fine-tuning these models on niche, domain-specific datasets (e.g., specialized fashion or e-commerce) often leads to two significant challenges: semantic collapse, where discriminative models lose general alignment due to limited data, and a generative-discriminative gap, where the strengths of one capability are not leveraged to improve the other.
UniDiff addresses these hurdles by creating a personalized model that can both "understand" and "paint" within a specific domain without requiring massive architectural overhauls.
Methodology
UniDiff integrates three primary modeling techniques into a single, cohesive pipeline:
- Image-Text Contrastive (ITC) Learning: Aligns global image and text features in a shared embedding space to facilitate retrieval tasks.
- Text-Conditioned Image Synthesis (IS): Utilizes Diffusion models to generate high-fidelity images matching textual descriptions.
- Reciprocal Semantic Consistency (RSC) Modeling: The core innovation of UniDiff, RSC bridges the visual features of the CLIP encoder and the Diffusion model's AutoEncoder. It ensures that reconstructed features from the generative process remain semantically consistent with discriminative features, acting as a stabilizer during training.
To reconcile the feature gap between the global semantics of the CLIP visual encoder and the pixel-level details of the Diffusion AutoEncoder, UniDiff employs a specialized Fusion Module.
Experimental Setup
The framework was evaluated on three specialized datasets characterized by fine-grained details and domain-specific vocabulary:
- Fashion-man: Male apparel subset of CM-Fashion.
- Fashion-woman: Female apparel subset of CM-Fashion.
- E-commercial Product: Consumer goods subset of M5Product (electronics, furniture, etc.).
Key Results and Insights
UniDiff demonstrated significant performance gains across both discriminative and generative benchmarks:
- Retrieval Performance: On the Fashion-man dataset, UniDiff achieved a 70.48% R@1 (Recall at 1) for image-to-text retrieval. In contrast, a standard fine-tuned CLIP-ViT-L/14 model suffered from semantic collapse, reaching only 35.79%.
- Generation Quality: UniDiff achieved superior Fréchet Inception Distance (FID) scores. On Fashion-man, it scored 12.62, outperforming the 16.32 achieved by fully fine-tuned Stable Diffusion.
- Synergistic Learning: The researchers found that simultaneous training for generation and understanding makes the model more robust than training for either task in isolation. The RSC loss proved crucial for maintaining stability during small-batch training.
Conclusion
UniDiff represents a "plug-and-play" enhancement for existing vision-language pipelines, achieving state-of-the-art results in specialized domains without altering base architectures. While the model shows sensitivity to prompt complexity and occasional constraints in extreme fine-grained detail, it successfully demonstrates that generative and discriminative tasks can be unified to mutual benefit. Future work will explore more sophisticated pooling methods and expansion to broader multi-modal contexts.
Summary updated