Where Does Word Order Go? Syntax Stranded in the Modality Gap

Image-text models like CLIP put pictures and captions into one shared space and score a match by how closely two points line up. They are known to read captions as a "bag of words": they cannot tell "a dog biting a man" from "a man biting a dog." The puzzle is that the caption half of the model does know the difference. On Winoground, probes of the text encoder alone separate such word-order swaps with over 80% accuracy, yet the paired image-text scores fail (Why is Winoground Hard?). A separate line of work shows that image and text embeddings sit in two distinct clusters, offset by a "modality gap" that runs perpendicular to the region each modality occupies (Is the Modality Gap a Bug or a Feature?).

We propose that these two facts are one fact. The text encoder stores sentence structure (who does what to whom) mostly along directions that image embeddings never reach. A dot product with any image therefore cannot see that information. If this holds, the remedy is geometric rather than a new architecture or more data. We build pairs of captions that use the same words in a different grammatical structure, taken from dependency parses and used only at training time. We then train a lightweight projection so that the difference between the two captions in each pair falls inside the subspace that images actually span. The parser is the "syntactic structural prior": it tells us which directions in text space carry structure and not vocabulary.

Core Claim

We make a measurable claim and a testable fix. The measurable claim is about the difference vector between two captions that share a bag of words but differ in grammatical structure. This vector has a much smaller fraction of its length inside the image subspace than the difference vector of a pair that differs by a single swapped noun. Call this fraction the shared-span fraction. Let $U$ be an orthonormal basis for the top-$k$ principal directions of centered image embeddings, and let $d = f_T(c) - f_T(c')$ be the difference between the text embeddings of captions $c$ and $c'$. Then

$$\rho(d) = \frac{\lVert U U^\top d \rVert^2}{\lVert d \rVert^2}.$$

The fix is a regularizer on the projection layer that raises $\rho$ for structure pairs, trained alongside the ordinary contrastive (matching) loss:

$$\mathcal{L} = \mathcal{L}_{\text{contrastive}} + \lambda \, \mathbb{E}_{(c,c') \in \mathcal{S}} \big[ \max(0, \tau - \rho(d_{c,c'})) \big],$$

Here $\mathcal{S}$ is the set of parse-derived structure pairs, $\tau$ is a target fraction set to the value measured for lexical-swap pairs, and $\lambda$ is a weight. $U$ is re-estimated from image embeddings at fixed intervals. The point that matters is this: a structure distinction that does not lie in the image span cannot change any image-text score, no matter how well the text encoder represents it.

Relation to Prior Work

Two kinds of prior work motivate the proposal. Winoground (Thrush et al.) showed that strong models score at or below the 16.67% chance level on its Group Score, which requires all four image-caption pairings to be correct. Diwan et al. then located the failure at the point where text meets image rather than inside the language encoder, but proposed no mechanism. The gap papers supply the geometry. Mind the Gap traces the gap to narrow embedding "cones" present at initialization and to the matching loss keeping them apart. Chowers et al. show that the gap vector is orthogonal to both modality subspaces. None of these papers asks which text information lives off the image subspace. That is our diagnostic.

Two methods constrain the design. AlignCLIP shares encoder layers and adds a separation loss within each modality. ModGap pulls matched pairs together and spreads cluster centers, shrinking the gap from 0.47 to 0.03. ModGap reports that retrieval barely changes while clustering improves, which warns us that closing the gap globally may not touch structure-specific directions. Both papers treat the gap as a single offset to remove. We target a specific family of directions and do not require the gap to close at all.

The closest existing work is NegCLIP, which fine-tunes CLIP with word-shuffled and slot-swapped caption negatives, and VL-DE, which feeds dependency parses and region neighborhoods into a cross-attention scoring network. NegCLIP uses syntax only as discrete data augmentation and never examines geometry. VL-DE needs a parser and a detector at inference and abandons the dual-encoder space entirely.

On the syntax side, the idea of a structural skeleton separate from content comes from POS-template captioning (Deshpande et al.) and constituency-guided generation (Explicit Syntactic Guidance). Both use skeletons to steer generation. We reuse that separation to define which embedding directions count as "structure." Li, Tan and Bansal found that parser quality limits syntax-aware vision-language models. This is why our parser runs offline during training and never at test time.

Research Program

Stage 1: diagnostic. We construct a structure-pair set from MS-COCO and Visual Genome captions. We parse each caption once and generate variants that keep the bag of words fixed but change the dependency structure: swapping subject and object of a verb, reattaching an adjective to a different noun, or swapping the two arguments of a spatial relation. A held-out filter step keeps only grammatical variants. We also generate matched control pairs with a one-noun lexical swap.

For frozen CLIP, NegCLIP, AlignCLIP-style and ModGap-style models, we compute $\rho$ for both pair types across a range of $k$. We also run a linear probe for structure on the text embedding projected onto the image span and onto its orthogonal complement. The hypothesis predicts three things: low $\rho$ for structure pairs relative to lexical pairs, structure decodable mainly from the complement, and $\rho$ correlating with per-item Winoground text score.

Stage 2: fix. We train the regularized projection on frozen towers, which is cheap: only the final projection layers and a small adapter change. We then optionally train end to end with NegCLIP-style negatives added. Because a text-only constraint could be met by moving text directions without the image tower following, we also report image-side movement. On paired images from Visual Genome relation annotations, we measure whether image embeddings differ along the newly shared structure directions.

Baselines

The naive reference point is pretrained CLIP evaluated as-is. On Winoground, the file reports Group Scores of 14.50% for VinVL and 14.25% for FLAVA against 16.67% chance (Thrush et al.). We found no CLIP Group Score number on Lacuna, so we will measure our own.

The strongest dual-encoder competitor is NegCLIP. It reports VG-Relation rising from 63% to 81% and COCO-Order from 46% to 86%, while keeping ImageNet zero-shot at 72% against CLIP's 75% (NegCLIP). No NegCLIP Winoground result was found on Lacuna. We will rerun NegCLIP from the same CLIP checkpoint, on the same COCO training captions, with the same batch size and the same hyperparameter search budget. The structure pairs we generate will also be offered to NegCLIP as extra negatives, so the comparison isolates how syntax is used rather than what data is seen. Beating it means higher Winoground Group Score and ARO accuracy at equal or better ImageNet zero-shot accuracy, or matching it while training only the projection layers.

The strongest structure-aware system overall is VL-DE: 35.50% Text Score and 11.75% Group Score on Winoground, against CHAN's 29.75% and 8.75%, and 83.7% text R@1 on Flickr30k (VL-DE). It uses a parser and a detector at test time, so we report it as an upper reference rather than a like-for-like competitor. Exceeding its Group Score with a plain dual encoder would be a strong result.

The gap-closing baseline is the ModGap objective applied to the same checkpoint. It tests whether shrinking the global gap alone raises $\rho$ and compositional accuracy.

The key ablation keeps everything identical but replaces structure pairs with lexical-swap pairs in the regularizer. If gains persist, the syntactic prior is not what matters.

Why not just…?

Why not just use NegCLIP's hard negatives? This is the real threat. Hard negatives may already push structure into the image span implicitly, and NegCLIP's ARO gains are large. Our diagnostic settles this directly: if NegCLIP's $\rho$ for structure pairs already matches lexical pairs, our method adds nothing beyond an explanation. In that case we would report the explanation and stop. If NegCLIP gains ARO while $\rho$ stays low, its improvement likely comes from lexical shortcuts. Winoground, where NegCLIP has no reported number in the file, would then be where the two methods separate. We also give NegCLIP our structure pairs, so any remaining difference comes from the geometric constraint.

Why not just shift embeddings by the mean gap vector after training? Adding a constant vector to every caption embedding leaves the difference between two captions unchanged. Before renormalization, such a shift therefore cannot change which of two same-word captions an image prefers. AlignCLIP also argues that naive shifting distorts structure within a modality. The shifts studied by Chowers et al. and Liang et al. improved robustness and zero-shot classification, not compositionality. We include the shift as a baseline and expect near-zero change on Winoground.

Why not just close the gap with ModGap or AlignCLIP? ModGap reports retrieval unchanged while COCO clustering V-Measure rose from about 13.0 to 23.63. That is consistent with global closing leaving fine distinctions untouched, but nobody has measured its effect on Winoground or ARO. We measure it. If gap closing alone raises structure $\rho$ and Winoground scores, our targeted regularizer is unnecessary, and we will say so.

Why not just put a syntax encoder in the text tower? The text tower already encodes structure: over 80% probe accuracy per Diwan et al.. Our hypothesis is that the bottleneck sits where text meets image, not in the encoder. Parser-dependent encoders also degrade with parser quality (Li, Tan and Bansal). A Tree-LSTM text tower trained with the plain contrastive loss serves as an extra comparison: if it does not raise $\rho$, that supports our localization of the failure.

Proposed Experiments

We evaluate on Winoground (Text, Image and Group Scores; human Group Score 85.5%), ARO (VG-Relation, VG-Attribution, COCO-Order, Flickr30k-Order), MS-COCO and Flickr30k retrieval recall, COCO clustering V-Measure to compare with ModGap, and ImageNet zero-shot accuracy as a guard against damaging general performance.

Three checks decide the outcome. First, the diagnostic must show structure pairs with clearly lower $\rho$ than lexical pairs in pretrained CLIP. If it does not, the core claim is false and the method is unmotivated. Second, across all baselines and our variants, per-item $\rho$ must predict per-item Winoground correctness. Third, raising $\rho$ with the structure-pair regularizer must raise Winoground Group Score above both NegCLIP and the lexical-pair ablation under matched training, while ImageNet zero-shot accuracy stays within NegCLIP's reported margin. A further check uses Visual Genome image pairs: it confirms that the image tower actually separates relation-swapped scenes along the newly shared directions. Without that, gains on text score alone would not count as success.