We propose DiffCLIP, a novel vision-language model that extends the differential attention mechanism to CLIP architectures. Differential attention was originally developed for large language models to amplify relevant context while canceling out noisy information. In this work, we integrate this mechanism into CLIP's dual encoder (image and text) framework. With minimal additional parameters, DiffCLIP achieves superior performance on image-text understanding tasks. Across zero-shot classification, retrieval, and robustness benchmarks, DiffCLIP consistently outperforms baseline CLIP models. Notably, these gains come with negligible computational overhead, demonstrating that differential attention can significantly enhance multi-modal representations without sacrificing efficiency.
Differential Attention addresses attention noise by learning two separate attention distributions and subtracting one from the other, effectively canceling out spurious alignments.
\[ A_{diff} = A_1 - \lambda \cdot A_2 \]
where \(\lambda\) is a learnable parameter
For DiffCLIP, we apply this mechanism to both the image and text encoders. The model learns to use one attention map to highlight important features while the second map identifies and cancels out noise or irrelevant patterns. With minimal additional parameters (roughly 0.003%), DiffCLIP effectively filters out noisy alignments in both vision and text streams.
Select an image and query to see how DiffCLIP focuses attention compared to standard CLIP:
Our experimental evaluation demonstrates that differential attention consistently enhances CLIP performance across diverse benchmarks.
We introduced DiffCLIP, which integrates differential attention into CLIP-based vision-language models to better filter out noisy alignments.
Key Contributions: