Not Just What's There: Enabling CLIP to Comprehend Negated Visual Descriptions Without Fine-tuning
Authors: Junhao Xiao, Zhiyu Wu, Hao Lin, Yi Chen, Yahui Liu, Xiaoran Zhao, Zixu Wang, Zejiang He
Organizations: Central China Normal University · Fudan University · Huazhong University of Science and Technology · Kuaishou Technology · National University of Defense Technology
Vision-Language Models (VLMs) like CLIP struggle to understand negation, often embedding affirmatives and negatives similarly (e.g., matching "no dog" with dog images). Existing methods refine negation understanding via fine-tuning CLIP's text encoder, risking overfitting. In this work, we propose CLIPGlasses, a plug-and-play framework that enhances CLIP's ability to comprehend negated visual descriptions. CLIPGlasses adopts a dual-stage design: a Lens module disentangles negated semantics from text embeddings, and a Frame module predicts context-aware repulsion strength, which is integrated into a modified similarity computation to penalize alignment with negated semantics, thereby reducing false positive matches. Experiments show that CLIP equipped with CLIPGlasses achieves competitive in-domain performance and outperforms state-of-the-art methods in cross-domain generalization. Its superiority is especially evident under low-resource conditions, indicating stronger robustness across domains.
Figures & tables
Figure 1: CLIPGlasses enhances CLIP’s capacity for negation understanding by introducing a dynamic repulsion mechanism that suppresses image-text similarity for negated concepts, thus enabling inverse matching while preserving alignment with affirmed content.
Figure 2: t-SNE ( Cai and Ma 2022 ) visualization of CLIP text features for multiple positive-negative sentence pairs ( e.g. , “ there is a woman ” vs. “ there is not a woman ”). Circles and squares denote positive and negative forms, colors distinguish different pairs. Feature clusters across pairs are well-separated, showing CLIP’s strong instance-level discrimination. However, positive and negative features within individual pair remain closely positioned, indicating that while CLIP has limited negation modeling capabilities, there exists clear potential for semantic disentanglement.
Figure 3: CLIPGlasses enhances CLIP’s capability to model negative semantics by introducing two modules: Lens and Frame . Lens disentangles negated concepts ( e.g. , “ dog ” in “no dog ”) from the text embedding Tclip . Frame dynamically predicts a repulsion strength λ based on cross-modal context. The final similarity score is computed as S=SI2T−λ⋅SI2Tneg , aligning images with affirmed content while repelling from negated concepts when negation is present in the text.
Method
Training Set
Training Size
Testing
(Images/Captions)
Testing Set
Accuracy
Testing Set
Accuracy
NegCLIP
COCO-caption
82K/31K
CC-Neg-val
62.63%
Neg-COCO-MCQ
10.20%
CoN-CLIP
CC-Neg
188K/376K
CC-Neg-val
99.70%
Neg-COCO-MCQ
25.70%
CLIPGlasses
CC-Neg
188K/376K
CC-Neg-val
96.56% -3.14%
Neg-COCO-MCQ
34.51% +8.81%
CoN-CLIP
Neg-COCO-R
5K/22K
CC-Neg-val
65.91%
Neg-COCO-MCQ
30.61%
CLIPGlasses
Neg-COCO-R
5K/22K
CC-Neg-val
93.36% +27.45%
Neg-COCO-MCQ
35.90% +5.29%
Table 1: Performance comparison highlighting the trade-off between in-domain fitting and cross-domain generalization.
Method
Training Set
ImageNet
caltech101
Vanilla CLIP
-
53.87
90.96
CoN-CLIP
CC-Neg
50.98
88.91
CLIPGlasses
Neg-COCO-R
53.51
90.54
CLIPGlasses
CC-Neg
53.28
90.97
Table 2: Zero-shot performance on standard non-negation benchmarks for models trained on negation datasets.
Ablation Setting
Acc
Δ Acc
FAR
Δ FAR
————————————-Lens Module———————————
w/o Syntax Stream
94.09%
-2.47%
4.4927
-3.3326
w/o Semantic Stream
94.93%
-1.63%
6.0925
-1.7328
w/o Residual Gating
68.93%
-27.63%
0.7875
-7.0378
————————————-Frame Module——————————–
w/o Cross-modal
93.79%
-2.77%
7.3051
-0.5202
Table 3: Ablation on CC-Neg evaluating the Lens and Frame modules. “Acc” and “FAR” refer to Accuracy and false alignment rate respectively, Δ denotes the performance drop relative to the full model.
Figure 4: Distribution of predicted repulsion weight λ under varying negation strengths. Stronger negations ( e.g. , “ no ”) yield higher λ , confirming the model’s ability to adaptively modulate semantic repulsion.
Vision-Language Models (VLMs) have demonstrated strong capabilities across a wide range of multimodal tasks. However, recent studies have shown that VLMs, such as CLIP, perform poorly in understanding negation expressions, which are common in natural language. In this work, we propose Omni-NegCLIP, a fine-tuned CLIP model that improves CLIP's understanding of two types of negation, namely presence-based negation and absence-based negation, which correspond to negated expressions of objects that are actually present in an image and those that may plausibly exist in an image but are in fact absent, respectively, by modifying CLIP's original InfoNCE contrastive loss. Specifically, we design a presence-based contrastive objective that pulls image embeddings closer to their original caption embeddings while pushing them away from the corresponding presence-based negated caption embeddings, and an absence-based contrastive objective that aligns image embeddings with both original and absence-based negated caption embeddings while maintaining a semantic distinction between the two text embeddings. Based on our observation that the front transformer layers of CLIP text encoder have stronger learning ability for negated text than the later layers, we fine-tune the front transformer layers of the CLIP text encoder at each training step using the combined contrastive objective. Experimental results show that, compared with pretrained CLIP, Omni-NegCLIP improves performance on presence-based negation and absence-based negation tasks by up to 52.65% and 12.50%, respectively, without sacrificing general capability in image-text retrieval and even improving it by up to 19.62%. Compared with prior works, Omni-NegCLIP demonstrates a more comprehensive ability to understand multiple types of negation tasks.
Jingqi Xu
University of Southern California, Los Angeles, CA, USA
Joint Vision-Language Embedding models such as CLIP typically fail at understanding negation in text queries, for example, failing to distinguish "no" in the query: "a plain blue shirt with no logos". Prior work has largely addressed this limitation through data-centric approaches, fine-tuning CLIP on large-scale synthetic negation datasets. However, these efforts are commonly evaluated using retrieval-based metrics that cannot reliably reflect whether negation is actually understood. In this paper, we identify two key limitations of such evaluation metrics and investigate an alternative evaluation framework based on Multimodal LLMs-as-a-judge, which typically excel at understanding simple yes/no questions about image content, providing a fair evaluation of negation understanding in CLIP models. We then ask whether there already exists a direction in the CLIP embedding space associated with negation. We find evidence that such a direction exists, and show that it can be manipulated through test-time intervention via representation engineering to steer CLIP toward negation-aware behavior without any fine-tuning. Finally, we test negation understanding on non-common image-text samples to evaluate generalization under distribution shifts. Code is at https://github.com/fawazsammani/negation-steering
Contrastive vision-language models such as CLIP map semantically opposite phrases (e.g., "a dog" vs. "not a dog") to nearly identical embeddings, rendering them insensitive to negation. We attribute this failure to a phenomenon we call Representational Collapse: by tracking compositional divergence and visual alignment across the CLIP text encoder, we show that middle layers build compositional syntax, but the final layers collapse this structure as visual alignment rises, producing a syntax-blind final representation. To recover the lost negation signal without altering pretrained weights, we propose PeakPatch, a lightweight post-hoc correction system that intercepts the encoder at its compositional peak. An Embedding Correction Network (ECN) uses cross-attention to extract a negation-specific signal from the peak layer, anchored to a stable baseline, and predicts a deviation vector that re-injects the lost syntax into the final-layer embedding space. A complementary Score Correction Network (SCN) predicts bounded scalar score offsets for discriminative tasks. Both modules are trained jointly end-to-end while all CLIP parameters remain frozen, adding only 5.2M parameters (3.5% of the backbone) and preserving the standard cosine similarity interface. On NegBench, PeakPatch achieves 74.3% on COCO MCQ (+35.1 over CLIP, +17.8 over the best encoder fine-tuning method) and 65.5% on VOC MCQ, while outperforming all fine-tuning baselines on fully out-of-distribution negation retrieval despite training only 3.5% of the parameters. The corrected embeddings also transfer to text-to-image generation (+18.4 negation score) and generalize across ViT-B/32, ViT-L/14, and SigLIP backbones. Project URL: https://stevencylu.github.io/PeakPatch/.