Introduction
State-of-the-art diffusion models, including FLUX and GPT-4o, frequently struggle with the "strawberry test" of image generation: the ability to reliably produce a specific number of objects requested in a prompt. Despite their ability to generate photorealistic imagery, these models exhibit a significant "numerosity" blind spot. This paper investigates whether scaling parameters and data can resolve this issue and explores the underlying mechanics of how these models perceive and generate counts.
The Numerosity Problem
Modern diffusion models often fail to follow precise numerical instructions. A request for "eight koalas" might result in six or eleven, indicating a fundamental failure in instruction following. The authors test the Scaling Hypothesis—the idea that larger models and more training data will naturally solve the counting problem. Furthermore, they investigate whether the bottleneck is perceptual (understanding the count) or generative (the process of image creation).
Methodology
The research employs a two-pronged strategy involving diagnostic probing and architectural interventions.
Numerosity Probing
To assess model perception, pre-trained diffusion models were converted into zero-shot classifiers. By determining which count-based prompt minimized diffusion loss for a specific image, the researchers could effectively "ask" the model how many objects it perceived.
Noise Conditioning Remedies
The study identified that initial noise patterns significantly influence the final object count. To counteract this, the authors proposed injecting "count-aware" layout information into the initial noise prior using three techniques:
- Uniform Scaled: Adjusting noise intensity within defined bounding boxes.
- Fixed: Using constant samples in target regions to ensure consistency.
- Gaussian: Applying a Gaussian kernel to the noise at the center of intended object locations.
Benchmarking Numerosity
Two new datasets were introduced for evaluation:
- GrayCount250: A synthetic dataset of 250 concepts (animals, food, etc.) as minimalist line art on gray backgrounds, covering counts from 1 to 50.
- NaturalCount6: A dataset of 17,509 images featuring 2–6 objects in complex, naturalistic settings.
Key Insights
Scaling Limitations
The "stress test" of the scaling hypothesis revealed that increasing model size (from 2B to 12B parameters) or training data (from 1K to 500K samples) resulted in negligible improvements. In several instances, performance actually declined as the target count increased.
The Dominance of Noise
A critical finding is that the initial noise seed often has a "preferred" number of objects, which can override textual instructions. The authors posit that while the text prompt "activates" object slots, the noise itself determines the spatial layout and number of those slots.
The Subitizing Limit
Similar to human "subitizing" (the ability to instantly recognize small quantities), diffusion models perform adequately for counts between 1 and 5 but experience a sharp decline in accuracy for higher numbers.
Results and Performance
The noise-conditioning methods yielded substantial improvements:
- GrayCount250: Accuracy increased from 20.0% to 85.3%.
- High-Count Tasks: For counts exceeding 30, accuracy rose from 3.8% to 75.0%.
- Naturalistic Scenes: On NaturalCount6, the Gaussian noise prior improved accuracy from 74.8% to 86.3%.
- Perceptual Clarity: Probing showed that while base models perceive counts coarsely, models enhanced with noise priors develop sharper perceptual boundaries.
Conclusion and Future Work
While steering the noise prior effectively improves numerosity, challenges remain. The theoretical reason for the noise prior's dominance over textual embeddings is not yet fully understood. Additionally, current remedies rely on external layout information (bounding boxes); future models should ideally generate these layouts internally. Finally, the study raises questions about whether the diffusion framework itself is the bottleneck, suggesting that autoregressive models might be inherently better suited for counting tasks.
Summary updated