Left-Right Symmetry Breaking in CLIP-style Vision-Language Models Trained on Synthetic Spatial-Relation Data
Takaki Yamamoto, Chihiro Noguchi, Toshihiro Tanizawa
TL;DR
This work introduces a controllable 1D image–text testbed to probe how CLIP-style transformer models acquire left–right spatial relations. Through end-to-end contrastive training, the authors show that relational understanding emerges and generalizes best when label diversity is high, with layout variation playing a secondary role. A mechanistic analysis reveals that interactions between token and positional embeddings generate a horizontal attention gradient, breaking left–right symmetry and enabling unseen-pair generalization; ablations confirm the critical role of the positional contribution to attention. The study also shows that vision and text representations align up to a rotation, and demonstrates how RoPE-based mechanisms can yield similar generalization via bias-induced gradients or low-rank subspace alignment. Collectively, the results provide a concrete mechanistic account of when and how CLIP-style models can acquire relational spatial competence, with implications for scaling to richer 2D data and more complex relational tasks.
Abstract
Spatial understanding remains a key challenge in vision-language models. Yet it is still unclear whether such understanding is truly acquired, and if so, through what mechanisms. We present a controllable 1D image-text testbed to probe how left-right relational understanding emerges in Transformer-based vision and text encoders trained with a CLIP-style contrastive objective. We train lightweight Transformer-based vision and text encoders end-to-end on paired descriptions of one- and two-object scenes and evaluate generalization to unseen object pairs while systematically varying label and layout diversity. We find that contrastive training learns left-right relations and that label diversity, more than layout diversity, is the primary driver of generalization in this setting. To gain the mechanistic understanding, we perform an attention decomposition and show that interactions between positional and token embeddings induce a horizontal attention gradient that breaks left-right symmetry in the encoders; ablating this contribution substantially reduces left-right discrimination. Our results provide a mechanistic insight of when and how CLIP-style models acquire relational competence.
