Evaluating Numerical Reasoning in Text-to-Image Models

Ivana Kajić, Olivia Wiles, Isabela Albuquerque, Matthias Bauer, Su Wang, Jordi Pont-Tuset, Aida Nematzadeh

TL;DR

While state-of-the-art text-to-image models generate stunningly realistic images, this paper reveals they possess only rudimentary numerical reasoning skills. By introducing GECKONUM, a rigorous new benchmark spanning over 52,000 images and 470,000 human annotations, the authors demonstrate that even top-tier models like DALL·E 3 and Midjourney fail dramatically when tasked with exact counting, understanding linguistic quantifiers, or reasoning about fractions.

What Problem Does This Paper Address?

Current text-to-image (T2I) generative models can faithfully depict complex natural language prompts, but they frequently stumble on basic math and counting. A prompt asking for "7 pistachios" might yield five or nine.

Evaluating this capability has historically been difficult. Existing benchmarks are either too small, rely on web-scraped prompts that conflate counting with other complex reasoning skills (e.g., geographic or spatial relations), or lack systematic control over variables. This paper addresses this gap by isolating numerical reasoning into a controlled, comprehensive benchmark to uncover exactly where and why T2I models lose count.

Methods

The authors formalize numerical reasoning into three distinct tasks:

  1. Task 1: Exact Number Generation: Testing the model's ability to generate an exact count of objects (e.g., "Four axolotls and three cookies").
  2. Task 2: Approximate Number Generation and Zero: Testing fuzzy linguistic quantifiers (e.g., "a few", "many", "fewer than") and the concept of zero ("no seeds").
  3. Task 3: Conceptual Quantitative Reasoning: Testing advanced concepts like fractions and part-whole relationships (e.g., "A pizza cut into 3 slices", "one fork is broken into two pieces").

To evaluate 12 prominent models from five model families (DALL·E 3, Midjourney, Imagen, Muse, and Stable Diffusion), the authors generated images using 1,386 systematically constructed prompt templates. Crucially, they bypassed unreliable automated metrics for the core evaluation, instead collecting 479,570 human annotations to serve as the absolute ground truth.

Figure 1: Examples of images generated by selected models: DALL·E 3, Imagen-C and Muse-B. Correctly generated images are marked with a check mark “✓”, and incorrect with a cross mark “✗”.

Datasets

The primary contribution is the introduction of GECKONUM, which consists of:

  • 1,386 text prompts systematically sweeping across number magnitudes (1–10), number representations, and noun frequencies.
  • 52,721 generated images from 12 different T2I models.
  • 479,570 human annotations detailing precise object counts and qualitative alignment.

For secondary experiments evaluating vision-language models (VLMs), the authors also utilized TallyQA to benchmark and fine-tune PaLIGemma.

Key Insights and Ideas

  • The Magnitude Penalty: T2I models do not have an abstract representation of numbers. Accuracy degrades rapidly with each successive number. For instance, even for DALL·E 3, accuracy drops by 18 percentage points from 1 $\rightarrow$ 2 objects, and another 23 percentage points from 3 $\rightarrow$ 4 objects.
  • The Overestimation Bias: When models fail to count correctly, they overwhelmingly tend to overestimate and generate more objects than requested, rather than underestimating.
  • Words > Digits: Format matters. Ten out of twelve models showed significantly higher generation accuracy when numbers were written out as words ("four") rather than as Arabic digits ("4").
  • Zero is an Illusion: T2I models completely struggle with the concept of zero. Prompts containing "no X" (e.g., "a watermelon with no seeds") almost always resulted in the model generating the forbidden object anyway.
Figure 4: Top: The confusion matrices for A) DALL·E 3 and B) Midjourney v6 on numeric- simple prompts. Bottom: The effect of C) number representation and D) word frequencies in Task 1. 95% bootstrap confidence intervals are shown.

Key Results

  • Exact Counting: DALL·E 3 and Midjourney v6 achieved the highest accuracy on exact number generation, yet both scored below 50% overall accuracy (45.2% and 42.5%, respectively). Stable Diffusion 1.5 trailed at a meager 20.3%.
  • Conceptual Reasoning (Task 3): This proved to be the hardest task. Most models performed close to or below the random chance baseline (50%) when dealing with fractions or broken objects.
  • Evaluating Auto-Metrics: The authors tested whether automated alignment metrics could replace human counters. They found that Gecko, DSG, and VNLI successfully distinguished between correct and incorrect numerical generations, while standard CLIPscore completely failed to capture counting accuracy.

Limitations and Future Work

The authors acknowledge that human annotation—while highly accurate—is expensive, laborious, and does not scale. While automated question-answering metrics (like DSG) show promise, they still suffer from limitations, such as generating non-discriminative questions (e.g., asking "Is there a pizza?" instead of verifying if it has exactly 3 slices).

Furthermore, the authors point out that current language model tokenizers handle numbers poorly. Future work must focus on architectural innovations and better tokenization strategies to help models build true, abstract representations of numerical concepts rather than relying on superficial pattern matching.

Summary updated

BibTeX
@inproceedings{kajic2024evaluating,
  author = {Ivana Kajić and Olivia Wiles and Isabela Albuquerque and Matthias Bauer and Su Wang and Jordi Pont-Tuset and Aida Nematzadeh},
  title = {{Evaluating Numerical Reasoning in Text-to-Image Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=W0FEprcxva},
}
Figure