Abstract
Generic Vision-Language Pretraining (VLP) models often struggle with the specialized requirements of the fashion domain, where datasets frequently feature many-to-one relationships between images and textual descriptions. This paper introduces SyncMask, a novel pretraining strategy designed to synchronize masking between images and text by targeting co-occurring elements identified through cross-attention maps. Combined with a refined "semi-hard" negative sampling strategy, SyncMask addresses the fine-grained alignment challenges inherent in fashion datasets. Experimental results on FashionGen and FashionIQ demonstrate that SyncMask achieves state-of-the-art performance in cross-modal retrieval and text-guided image retrieval tasks.
Introduction
In the rapidly evolving field of Vision-Language Pretraining (VLP), models have become increasingly adept at understanding the relationship between visual content and natural language descriptions. However, applying these generic models to specialized domains like fashion reveals significant limitations. Standard VLP models typically rely on Masked Language Modeling (MLM) and Masked Image Modeling (MIM), where the model predicts hidden tokens or patches based on the remaining context.
In fashion datasets such as FashionGen, a single detailed description (e.g., "navy blazer with gold buttons and back vents") is often paired with multiple images showing the item from different angles. This creates a "mismatch" problem: if the model is presented with a front-view image while the word "vents" (located on the back) is masked, it lacks the visual cues necessary for prediction. Random masking in these scenarios forces the model to rely solely on textual context, failing to learn the crucial cross-modal links between specific visual features and their descriptors.
Methodology
Synchronized Attentional Masking (SyncMask)
To overcome the inefficiencies of random masking, the authors propose Synchronized Attentional Masking (SyncMask). This approach utilizes a "Teacher" (momentum) model to calculate cross-attention maps during the pretraining phase. These maps identify which image patches and text tokens are most strongly correlated.
Instead of masking at random, SyncMask targets these co-occurring segments. This ensures that when a specific word is masked, there is a corresponding, relevant visual feature available to guide the model’s prediction, and vice versa. By synchronizing the masks, the model is forced to perform genuine cross-modal reasoning rather than relying on intra-modal heuristics or memorization.
Refined Grouped Batch Sampling
A second challenge in fashion VLP is the "false negative" problem during contrastive learning. Standard "hard negative" sampling—intended to help the model distinguish between similar items—often inadvertently selects different views of the exact same item as negatives. This confuses the model, as it is penalized for correctly identifying that two images represent the same product.
SyncMask introduces Refined Grouped Batch Sampling, which moves away from the "hardest" negatives in favor of semi-hard negatives. By using unique item IDs to explicitly filter out different views of the same product from the negative pool, and selecting samples that are similar but not identical (the $s$-th most similar items), the authors create a more effective learning environment.
Architecture
The model architecture is built upon the ALBEF framework, utilizing a 12-layer ViT-B/16 image encoder and a BERT-based text encoder. These are fused by a multi-modal encoder that facilitates the cross-modal interactions necessary for the SyncMask strategy.
Experiments and Datasets
The model was evaluated on two primary fashion benchmarks:
- FashionGen: A large-scale dataset of 320K image-text pairs. It is characterized by its many-to-one mapping, where multiple product angles share a single description.
- FashionIQ: A dataset of 77K items used for Text-Guided Image Retrieval (TGIR). This task requires the model to find a target image based on a reference image and a relative caption (e.g., "like this shirt, but with shorter sleeves").
Key Results and Insights
SyncMask achieved state-of-the-art results across several downstream tasks, proving the efficacy of synchronized masking and refined sampling:
- Cross-Modal Retrieval: On FashionGen, SyncMask achieved an R@1 of 75.00 for Image-to-Text retrieval, significantly outperforming the previous state-of-the-art, FashionSAP (73.14).
- Text-Guided Image Retrieval: On FashionIQ, the model reached a Mean R@10 of 38.13, surpassing all previous specialized fashion models.
- Ablation Studies: The importance of the synchronization mechanism was confirmed through ablation. Removing the attentional guidance and reverting to random masking resulted in a performance drop of 2.14%, highlighting that the synchronized masking is the primary driver of the model's improved alignment.
Conclusion
SyncMask demonstrates that in specialized domains like fashion, alignment is more critical than randomness. By synchronizing masks based on cross-attention and avoiding the "false negative" trap with semi-hard sampling, the model achieves a more nuanced understanding of fashion attributes. While the authors note that noisy datasets remain a challenge—particularly for very common items like plain t-shirts—SyncMask provides a robust framework for future e-commerce AI research, with potential applications extending to any domain featuring complex many-to-one image-text relationships.
Summary updated