Guiding Diffusion-based Reconstruction with Contrastive Signals for Balanced Visual Representation
Organizations: State Key Laboratory of AI Safety, Institute of Computing Technology, CAS · School of Computer Science and Tech., University of Chinese Academy of Sciences · Beijing Academy of Artificial Intelligence · Institute of Information Engineering, CAS · School of Cyber Security, University of Chinese Academy of Sciences · School of Computer Science and Technology, Beijing Institute of Technology
Abstract
The limited understanding capacity of the visual encoder in Contrastive Language-Image Pre-training (CLIP) has become a key bottleneck for downstream performance. This capacity includes both Discriminative Ability (D-Ability), which reflects class separability, and Detail Perceptual Ability (P-Ability), which focuses on fine-grained visual cues. Recent solutions use diffusion models to enhance representations by conditioning image reconstruction on CLIP visual tokens. We argue that such paradigms may compromise D-Ability and therefore fail to effectively address CLIP's representation limitations. To address this, we integrate contrastive signals into diffusion-based reconstruction to pursue more comprehensive visual representations. We begin with a straightforward design that augments the diffusion process with contrastive learning on input images. However, empirical results show that the naive combination suffers from gradient conflict and yields suboptimal performance. To balance the optimization, we introduce the Diffusion Contrastive Reconstruction (DCR), which unifies the learning objective. The key idea is to inject contrastive signals derived from each reconstructed image, rather than from the original input, into the diffusion process. Our theoretical analysis shows that the DCR loss can jointly optimize D-Ability and P-Ability. Extensive experiments across various benchmarks and multi-modal large language models validate the effectiveness of our method. The code is available at https://github.com/boyuh/DCR.
Figures & tables
| CLIP Backbone | Resol. | #Params | Method | Avg | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| OpenAI ViT-L-14 | 224 | 427.6M | Original | 13.3 | 13.3 | 20.0 | 20.0 | 13.3 | 53.3 | 20.0 | 6.7 | 13.3 | 19.2 |
| DIVA | 13.3 | 20.0 | 40.0 | 6.7 | 20.0 | 53.3 | 46.7 | 20.0 | 13.3 | 25.9 | |||
| GenHancer | 13.3 | 33.3 | 33.3 | 20.0 | 6.7 | 73.3 | 46.7 | 20.0 | 40.0 | 31.8 | |||
| un 2 CLIP | 0.0 | 33.3 | 46.7 | 26.7 | 13.3 | 80.0 | 40.0 | 20.0 | 33.3 | 32.6 | |||
| Ours | 13.3 | 33.3 | 33.3 | 26.7 | 6.7 | 73.3 | 46.7 | 20.0 | 46.7 | 33.3 | |||
| OpenAI ViT-L-14 | 336 | 427.9M | Original | 0.0 | 20.0 | 40.0 | 20.0 | 6.7 | 20.0 | 33.3 | 6.7 | 33.3 | 20.0 |
| Backbone | Method | MNIST [ 33 ] | CIFAR-10 [ 32 ] | Eurosat [ 22 ] | Caltech-101 [ 13 ] | DTD [ 7 ] | ImageNet-1K [ 10 ] | Avg | ||||||||||||||
| NMI | ACC | ARI | NMI | ACC | ARI | NMI | ACC | ARI | NMI | ACC | ARI | NMI | ACC | ARI | NMI | ACC | ARI | NMI | ACC | ARI | ||
| O-1 | Original | 0.63 | 0.63 | 0.50 | 0.82 | 0.82 | 0.76 | 0.71 | 0.72 | 0.61 | 0.78 | 0.53 | 0.35 | 0.55 | 0.45 | 0.30 | 0.79 | 0.53 | 0.41 | 0.71 | 0.61 | 0.49 |
| DIVA | 0.66 | 0.60 | 0.49 | 0.81 | 0.82 | 0.75 | 0.70 | 0.72 | 0.61 | 0.78 | 0.52 | 0.34 | 0.51 | 0.41 | 0.26 | 0.79 | 0.52 | 0.40 | 0.71 | 0.60 | 0.48 | |
| GenHancer | 0.69 | 0.73 | 0.60 | 0.58 | 0.65 | 0.49 | 0.61 | 0.67 | 0.56 | 0.81 | 0.54 | 0.38 | 0.56 | 0.45 | 0.31 | 0.64 | 0.26 | 0.14 | 0.65 | 0.55 | 0.41 | |
| un 2 CLIP | 0.67 | 0.70 | 0.53 | 0.81 | 0.82 | 0.74 | 0.64 | 0.75 | 0.60 | 0.80 | 0.55 | 0.41 | 0.55 | 0.46 | 0.31 | 0.73 | 0.41 | 0.28 | 0.70 | 0.62 | 0.48 | |
| Ours | 0.73 | 0.74 | 0.62 | 0.89 | 0.86 | 0.80 | 0.68 | 0.73 | 0.61 | 0.83 | 0.57 | 0.43 | 0.58 | 0.48 | 0.33 | 0.84 | 0.66 | 0.45 | 0.76 | 0.67 | 0.54 | |
| LLM | CLIP | Vision-Centric Benchmarks | Conventional MLLM Benchmarks | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MMVP- MLLM [ 75 ] | NaturalBench [ 36 ] | CV-Bench 2D [ 74 ] | CV-Bench 3D [ 74 ] | POPE [ 41 ] | SciQA- IMG [ 53 ] | Hallusion Avg. [ 17 ] | ||||||||
| Acc | Q-Acc | I-Acc | G-Acc | ADE20K | COCO | rand | pop | adv | ||||||
| Vicuna-7B | Original | 24.7 | 76.4 | 53.6 | 56.4 | 17.6 | 49.6 | 60.9 | 58.7 | 87.3 | 86.1 | 84.2 | 66.8 | 27.6 |
| DIVA | 31.3 | 75.3 | 51.7 | 56.1 | 22.3 | 51.3 | 63.4 | 60.2 | 87.9 | 87.0 | 84.6 | 66.3 | 28.6 | |
| GenHancer | 30.7 | 77.3 | 55.6 | 59.1 | 24.4 | 52.9 | 63.6 | 63.2 | 88.1 | 86.7 | 84.6 | 66.5 | 28.4 | |
| un 2 CLIP | 31.3 | - | - | - | - | 53.9 | 65.1 | 61.2 | 88.0 | 87.4 | 85.4 | 68.4 | 28.4 | |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Notations | Descriptions |
|---|---|
| Input image. | |
| Training dataset. | |
| VAE latent of image . | |
| Diffusion timestep. | |
| Noisy latent at diffusion step . | |
| Diffusion noise prediction network. |
| Method | Classification | Retrieval-Image@5 | Retrieval-Text@5 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| MNIST | C10 | Eur | C101 | DTD | IN-1K | Flickr30k | COCO | Flickr30k | COCO | |
| Original | 76.4 | 95.6 | 60.1 | 86.6 | 55.4 | 75.5 | 87.2 | 61.1 | 97.4 | 79.2 |
| Genhancer | 69.7 | 73.7 | 58.5 | 71.5 | 48.4 | 73.8 | 81.6 | 51.1 | 87.3 | 61.4 |
| Ours | 76.5 | 95.6 | 60.3 | 86.7 | 55.4 | 75.6 | 87.3 | 61.1 | 97.3 | 79.3 |
| Ratio | MMVP-VLM | Clustering | ||
|---|---|---|---|---|
| ACC | NMI | ACC | ARI | |
| 0% | 33.30 | 0.76 | 0.67 | 0.54 |
| 10% | 31.85 | 0.76 | 0.63 | 0.53 |
| 50% | 23.70 | 0.73 | 0.60 | 0.46 |
| 80% | 21.48 | 0.69 | 0.57 | 0.44 |
| 100% | 20.74 | 0.65 | 0.55 | 0.42 |
| CLIP Backbone | Training #Params | Training Time | Training GPU Memory |
|---|---|---|---|
| OpenAI CLIP ViT-L@224 | 350.5M | 7.7h | 53544M |
| OpenAI CLIP ViT-L@336 | 350.5M | 7.6h | 60472M |
| MetaCLIP ViT-L@224 | 350.5M | 7.7h | 60472M |
| MetaCLIP ViT-H@224 | 360.0M | 9.2h | 76430M |
| SigLIP ViT-SO@224 | 358.5M | 8.0h | 66798M |
| SigLIP ViT-SO@384 | 358.5M | 9.7h | 78792M |