How and where does CLIP process negation?
Vincent Quantmeyer, Pablo Mosteiro, Albert Gatt
TL;DR
The paper investigates how CLIP processes negation in a multimodal setting by applying causal tracing and attention analyses to the text encoder on the VALSE existence task. It formalizes a forward-pass similarity framework with $d = S_{c,i}-S_{f,i}$ and a causal tracing score $CTE(l,p)=d^*/d$ to localize where negation is processed, revealing strong localisation in early and late layers but a redistribution around layer $l=4$ toward later positions. Negator-selective attention analyses identify a small subset of heads—primarily in layer 4—that preferentially attend to negators, with the second-to-last position often driving this effect, and show context-dependent variation between caption- and foil-based negation. The study also highlights dataset features (e.g., caption/foil similarity and subject size) that correlate with classification difficulty, suggesting that VALSE’s linguistic interpretability is confounded by dataset properties. Overall, the work demonstrates how LM interpretability techniques can extend to multimodal models, provides concrete insights into CLIP’s negation processing, and cautions against overinterpreting benchmark scores due to dataset limitations and partial locality of information processing.
Abstract
Various benchmarks have been proposed to test linguistic understanding in pre-trained vision \& language (VL) models. Here we build on the existence task from the VALSE benchmark (Parcalabescu et al, 2022) which we use to test models' understanding of negation, a particularly interesting issue for multimodal models. However, while such VL benchmarks are useful for measuring model performance, they do not reveal anything about the internal processes through which these models arrive at their outputs in such visio-linguistic tasks. We take inspiration from the growing literature on model interpretability to explain the behaviour of VL models on the understanding of negation. Specifically, we approach these questions through an in-depth analysis of the text encoder in CLIP (Radford et al, 2021), a highly influential VL model. We localise parts of the encoder that process negation and analyse the role of attention heads in this task. Our contributions are threefold. We demonstrate how methods from the language model interpretability literature (such as causal tracing) can be translated to multimodal models and tasks; we provide concrete insights into how CLIP processes negation on the VALSE existence task; and we highlight inherent limitations in the VALSE dataset as a benchmark for linguistic understanding.
