VSC: Visual Search Compositional Text-to-Image Diffusion Model

Do Huu Dat, Nam Hyeon-Woo, Po-Yuan Mao, Tae-Hyun Oh

TL;DR

This paper introduces VSC, a novel method for text-to-image diffusion models that significantly improves the accurate binding of multiple attributes to objects in complex prompts. VSC achieves this by generating reference images for individual attribute-object pairs and fusing their visual embeddings with text embeddings, leading to state-of-the-art performance on compositional generation benchmarks.

What Problem Does This Paper Address?

Modern text-to-image diffusion models, while impressive at generating realistic visuals, often falter when dealing with prompts that require precise compositionality. Specifically, they struggle to correctly associate multiple descriptive attributes (like color, texture, shape) with their intended objects. This "binding problem" is often attributed to limitations in text encoders like CLIP, which can simplify complex linguistic relationships. Existing solutions, like attention map control or layout information, often lead to performance degradation as prompt complexity increases. This paper aims to bridge this gap by developing a method that robustly handles intricate attribute-object binding, even with numerous pairs in a prompt.

Methods

VSC tackles the binding problem through a multi-pronged approach:

  • Visual "Search" and Embedding Fusion: The core idea is inspired by human cognitive psychology, where we process individual features to understand an object. VSC decomposes a complex prompt into individual attribute-object pairs (e.g., "red car," "yellow bicycle"). For each pair, it generates a synthetic reference image using a pre-trained diffusion model. These reference images are then fed through an image encoder to extract visual prototype embeddings. A trainable MLP module fuses these visual embeddings with the original text embeddings, creating a richer, more context-aware representation.
  • Segmentation-Based Localization Training: To address cross-attention misalignment (where the model incorrectly focuses attention), VSC incorporates a localization loss. This loss uses segmentation masks of the generated objects and attributes to guide the cross-attention maps, ensuring they more accurately align with the intended visual elements. This is a modification of techniques used in prior work like FastComposer.
  • Tuning-Free Framework: A key advantage of VSC is that it requires minimal fine-tuning, primarily training only the MLP module and the final layers of the image encoder, while keeping the diffusion model frozen. This makes it more efficient and adaptable.

Datasets

  • Training: The authors created a synthetic dataset by leveraging the T2I-CompBench dataset. They generated 300 images for each of the 700 training prompts (focusing on color, texture, and shape attributes) using three generative models (Stable Diffusion 3.5, Flux, and SynGen). Instance segmentation was performed using Mask2Former, and OpenCLIP was used to score the alignment of segmentation masks with text embeddings. The final dataset consists of 90,000 images with precise segmentation.
  • Evaluation: The primary evaluation benchmark used is T2I-CompBench, a standard for assessing compositional text-to-image generation.

Key Insights and Ideas

  • Leveraging Synthetic Data for Compositionality: The paper demonstrates that generating synthetic reference images for individual components of a prompt can be highly effective for improving attribute-object binding, even without real-world curated data for every scenario.
  • The Power of Visual-Textual Fusion: By explicitly fusing visual embeddings from generated reference images with text embeddings, VSC creates a more robust representation that helps the diffusion model understand and adhere to complex compositional instructions.
  • Segmentation as a Precise Alignment Tool: The use of segmentation maps in the localization loss is crucial for correcting cross-attention inaccuracies, which are a major bottleneck in existing methods. This insight highlights the importance of fine-grained spatial control.
  • Transferability of Compositional Knowledge: Even when trained on only "color" attributes, VSC shows improved performance on "texture" and "shape" attributes, suggesting that the learned compositional strategies can generalize across different attribute types.

Key Results

  • State-of-the-Art Performance: VSC consistently outperforms existing compositional text-to-image diffusion models on the T2I-CompBench benchmark across various attribute categories (color, texture, shape) and different backbone models (Stable Diffusion 1.4, 2.1, and 3.5). For instance, with Stable Diffusion 3.5, VSC achieved scores of 0.85 for Color, 0.79 for Texture, and 0.63 for Shape.
  • Robustness to Prompt Complexity: VSC shows remarkable robustness as the number of binding pairs in a prompt increases, unlike other methods that experience significant performance drops.
  • Human Evaluation: Human evaluators favored VSC-generated images for their visual appeal, with VSC receiving the highest majority vote (30.01%) for visual quality, indicating that fine-tuning on synthetic data does not degrade realism.
  • Scalability: The inference cost of VSC scales reasonably well with the number of binding pairs, becoming faster than some competitors when prompts involve more than 4-5 pairs.

Limitations and Future Work

  • Inference Cost: While VSC scales well, its inference time is still higher than the baseline diffusion model, especially for prompts with fewer binding pairs. The paper notes it's approximately 2.26x the inference time of the default SD 3.5.
  • Dataset Scaling: The paper shows that increasing the synthetic dataset size improves performance, but beyond 30,000 images, the gains become marginal, suggesting a potential plateau.
  • Future Work: The authors suggest expanding VSC to broader applications, such as complex scene generation and dynamic object interactions, highlighting the potential of their compositional approach. They also note that future work could explore more advanced methods for combining linguistic and visual embeddings.

Summary updated

BibTeX
@inproceedings{dat2025vsc,
  author = {Do Huu Dat and Nam Hyeon-Woo and Po-Yuan Mao and Tae-Hyun Oh},
  title = {{VSC: Visual Search Compositional Text-to-Image Diffusion Model}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
  url = {https://openreview.net/forum?id=GKbsbOnYPd},
}
Figure