FormalImG: Evaluating Structural Compositional Generalization for T2I Models

Hong-Jie You, Jie-Jing Shao, Xiao-Wen Yang, Zhi-Fan Wu, Lin-Han Jia, Lan-Zhe Guo, Yu-Feng Li

TL;DR

FORMALIMG is a new first-order-logic-based benchmark designed to test how well text-to-image (T2I) models handle complex, multi-entity instructions. The study reveals a "hierarchical bottleneck": while modern LLMs have mastered the logical reasoning required for complex prompts, the actual "translation" from text to pixels remains a major failure point for even the most advanced generative models.

What Problem Does This Paper Address?

Current text-to-image models (like DALL-E 3 or Midjourney) have become remarkably good at rendering individual objects or simple attribute bindings (e.g., "a red cube"). However, as users move toward more sophisticated instructions involving multiple objects, specific spatial relationships, and logical quantifiers (e.g., "Every cat is sleeping, and to the right of the house is a sliced pizza"), these models often stumble.

Existing benchmarks typically focus on concept composition (mixing different styles or objects) rather than structural composition (the internal logical dependencies of a sentence). The authors argue that we lack a formal way to measure how model performance scales as the semantic complexity of an instruction increases.

Methods

The authors introduce a formal framework grounded in First-Order Logic (FOL) to represent image prompts.

  • Structural Compositional Complexity ($K$): They define complexity based on the "variable dependency scale." For example, $K=1$ might involve independent objects, while $K=7$ involves a chain of seven entities connected by specific relations (like "next to" or "larger than").
  • Dual-Scenario Evaluation:
    1. Knolling Scenario: A highly controlled, top-down "flat lay" environment. This allows for symbolic verification, where a vision-language model parses the generated image into a layout that is then checked against the original FOL formula for absolute correctness.
  • Natural Scenario: A more realistic, diverse setting evaluated using a model-as-judge (Gemini-3-Pro) to determine if the image satisfies the complex prompt.
  • $\epsilon$-Structural Compositional Generalizability: A new metric that identifies the maximum complexity level ($K$) at which a model can maintain a stable success rate (above a threshold $\epsilon$).

Datasets

The paper introduces the FORMALIMG benchmark, consisting of 4,000 test samples.

  • The samples are split evenly between the Knolling and Natural scenarios.
  • Complexity levels range from $K=1$ to $K=10$.
  • The dataset was synthesized using a controlled LLM-based pipeline with rigorous syntax and semantic checks to ensure the prompts are logically sound and physically possible.

Key Insights and Ideas

  • The Hierarchical Bottleneck: The researchers found that failures happen at different stages depending on model strength. "Weaker" models (like SD1.5) fail at both understanding the text and generating the image. "Stronger" models (like Gemini-3-Pro-Image) understand the logic perfectly but fail during the language-to-vision transformation.
  • LLMs are Logic Masters, T2I Models are Not: In a "text-only" experiment, LLMs like DeepSeek-V3 and Gemini-3-Pro-Thinking achieved nearly 97% accuracy in generating correct layouts for $K=10$ prompts. This proves that the bottleneck isn't the understanding of the prompt, but the rendering of it.
  • Layouts as a "Crutch": Providing the model with an intermediate layout (a "blueprint" of where objects should go) significantly boosts performance. This suggests that the "imagination" step—deciding where to place objects to satisfy logical constraints—is the hardest part for current diffusion models.

Key Results

  • Performance Decay: All models showed a clear performance decline as structural complexity ($K$) increased.
  • The Leaderboard: Gemini-3-Pro-Image emerged as the strongest model, maintaining a success rate above 70% up to $K=6$ in the Natural scenario.
  • The Open-Source Gap: There is a massive gap between closed-source and open-source models. While Gemini and GPT-Image-1.5 showed gradual degradation, open-source models like SDXL and Qwen-Image saw their success rates plummet toward zero as complexity moved into the "Hard" range ($K=7$ to $10$).
  • Generalizability: Most models can only "reliably" generalize (staying above the 0.7 threshold) up to $K=2$. Only the very best reached $K=6$.

Limitations and Future Work

The authors acknowledge that while the Knolling scenario allows for rigorous symbolic evaluation, it is a simplified domain that doesn't capture the full aesthetic nuance of natural images. Additionally, the Natural scenario relies on a "model-as-judge," which, while validated against human ratings in this paper, can still harbor its own biases.

Future work suggested by the paper includes:

  1. Developing T2I architectures that better integrate intermediate layout planning.
  2. Scaling up training data specifically focused on structural and logical relationships rather than just object-label pairs.
  3. Exploring how "Reasoning" models (like the o1 or DeepSeek-R1 series) might be better utilized as "planners" for image generation.

Summary updated

BibTeX
@inproceedings{you2026formalimg,
  author = {Hong-Jie You and Jie-Jing Shao and Xiao-Wen Yang and Zhi-Fan Wu and Lin-Han Jia and Lan-Zhe Guo and Yu-Feng Li},
  title = {{FormalImG: Evaluating Structural Compositional Generalization for T2I Models}},
  booktitle = {CTB @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=4wzRPQ1Vqc},
}
Figure