SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.03566 · ICLR · 2025

CLIP Behaves like a Bag-of-Words Model Cross-modally but not Uni-modally

Darina Koishigarina, Arnas Uselis, Joon Seong, Oh

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 3 functions out of this paper's own repositories and ran 3 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
kdariina/clip-not-bow-unimodally canonical 3 of 3
FunctionStatusWhere it lives
calculate_accuracy Ran kdariina/clip-not-bow-unimodally/probing/probing_models.py
code served (permissive licence) · get_code("df665c35e2490fbf")
constrastive_loss Ran kdariina/clip-not-bow-unimodally/alignment/learning_alignment.py
code served (permissive licence) · get_code("3eb3380f163cc578")
constrastive_loss_with_negatives Ran kdariina/clip-not-bow-unimodally/alignment/learning_alignment.py
code served (permissive licence) · get_code("756c1cea908d428b")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

CLIP (Contrastive Language-Image Pretraining) has become a popular choice for various downstream tasks. However, recent studies have questioned its ability to represent compositional concepts effectively. These works suggest that CLIP often acts like a bag-of-words (BoW) model, interpreting images and text as sets of individual concepts without grasping the structural relationships. In particular, CLIP struggles to correctly bind attributes to their corresponding objects when multiple objects are present in an image or text. In this work, we investigate why CLIP exhibits this BoW-like behavior. Our key finding is that CLIP does not lack binding information. Through linear probing, robustness tests with increasing object counts, and conjunctive search experiments, we show that attribute-object bindings are already encoded within CLIP's text and image embeddings. The weakness lies in the cross-modal alignment, which fails to preserve this information. We show it can be accessed cross-modally with a simple linear transformation to text embeddings. This improves CLIP's attributeobject binding performance and confirms that the information was already encoded unimodally. In practice, this means CLIP-based systems can be enhanced with a lightweight linear layer trained on existing embeddings, avoiding costly encoder retraining. The code is available at https://github.com/kdariina/ CLIP-not-BoW-unimodally.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2502.03566")
get_code_for_paper("2502.03566")
have("2502.03566")

Connect an agent — have() is free.