Text-to-Image Diffusion Models Cannot Count, and Prompt Refinement Cannot Help

Yuefan Cao, Xuyang Guo, Jiayan Huo, Yingyu Liang, Zhenmei Shi, Zhao Song, Jiahao Zhang, Zhen Zhuang · OpenReview

Abstract

Generative modeling is widely regarded as one of the most essential problems in today's AI community, with text-to-image generation having gained unprecedented real-world impacts. However, despite their impressive performance, these models exhibit fundamental limitations in adhering to numerical constraints. We introduce T2ICountBench, a novel benchmark designed to rigorously evaluate the counting ability of state-of-the-art text-to-image diffusion models. Extensive evaluations reveal that all state-of-the-art diffusion models fail to generate the correct number of objects, with accuracy dropping significantly as the number of objects increases. Additionally, prompt refinement generally does not improve counting accuracy.

Introduction

While diffusion models have mastered texture, lighting, and style, their ability to adhere to precise numerical constraints—like "generate 7 apples"—remains a significant weakness. We have all seen AI-generated images of people with six fingers or tables with an ambiguous number of legs. This paper identifies two major gaps in current research: outdated benchmarks that do not test higher numbers and confounded variables that mix counting with complex style or spatial reasoning. This study seeks to isolate counting as a specific skill and determine if human-like strategies can help models overcome their numerical illiteracy.

T2ICountBench: A Rigorous Evaluation Framework

To address the limitations of previous evaluations, we introduced T2ICountBench, a specialized benchmark designed for 2025-era models. The benchmark covers numbers from 1 to 15 across six object categories (fruit, humans, animals, shapes, furniture, plants), three scenes (home, nature, city), and three styles (plain, watercolor, cartoon).

Visual examples of counting performance across models and difficulty levels.

As shown in the visual examples, even when models produce high-fidelity images, they frequently fail to match the requested count. For instance, GLM-4 generates a visually pleasing image of cats in an office but fails to produce the requested 15 cats. Each model was tested against 525 unique prompts, with results verified through a rigorous human evaluation process involving graduate students with AI expertise.

The Performance Cliff

The researchers evaluated 15 different models, ranging from open-source heavyweights like Stable Diffusion 3.5 to private systems like Gemini 2.0 Flash and Grok 3. A consistent pattern emerged: models are generally reliable for 1–5 objects (the "Easy" tier), but accuracy falls off a cliff once the count increases.

Accuracy of 15 models across Easy, Medium, and Hard difficulty levels.

In the "Medium" (6–10) and "Hard" (11–15) tiers, accuracy drops significantly, often falling below 10% for many models. Imagen-3 led the pack with a 43% average accuracy, followed by Gemini 2.0 Flash at 39%. Conversely, even modern models like Recraft V3 and SD 3.5 Large Turbo struggled, averaging only 25-26% accuracy. For the hardest prompts (11–15 objects), almost all models failed completely, with only a few staying above the 10% mark.

The Futility of Prompt Refinement

A surprising finding of this study is that common "prompt engineering" tricks—such as breaking the task into smaller sub-counts (multiplicative or additive decomposition)—actually make performance worse. Every single prompt refinement strategy tested decreased accuracy. Multiplicative and additive prompts dropped average performance by over 40%. It appears that adding more words and "logic" to a prompt simply provides the model with more opportunities for confusion. Even the "Grid Prior" strategy, which was the most effective refinement, still performed worse than the original, simple prompt.

Conclusion

The persistent failure of state-of-the-art models to count suggests that the underlying text encoders (like CLIP) have inherent numerical biases. While moving to larger Language Models like T5 for encoding shows some promise, the problem remains unsolved. Future work should focus on improving numerical understanding in vision-language pre-training, developing automatic prompt refinement via LLMs, and utilizing Reinforcement Learning from Human Feedback (RLHF) specifically targeted at numerical accuracy.

Summary updated

BibTeX
@misc{cao2025text,
  author = {Yuefan Cao and Xuyang Guo and Jiayan Huo and Yingyu Liang and Zhenmei Shi and Zhao Song and Jiahao Zhang and Zhen Zhuang},
  title = {{Text-to-Image Diffusion Models Cannot Count, and Prompt Refinement Cannot Help}},
  year = {2025},
  eprint = {2503.06884},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.06884},
}
Figure