Counting Hallucinations in Diffusion Models

Shuai Fu, Jian Zhou, Qi Chen, Huang Jing, Huy Anh Nguyen, Xiaohan Liu, Zhixiong Zeng, Lin Ma, Quanshi Zhang, Qi Wu · DOI

Introduction

Diffusion Probabilistic Models (DPMs) have revolutionized image generation, yet they frequently struggle with structural and numerical consistency—most notably the "finger problem" where hands are generated with incorrect counts. This paper identifies this phenomenon as counting hallucinations: instances where a model fails to replicate the inherent numerical rules of its training data despite high perceptual quality. While existing metrics like Fréchet Inception Distance (FID) focus on visual quality, they remain largely blind to these logical failures.

The CountHalluSet Benchmark

To systematically quantify these errors, the authors introduce CountHalluSet, a suite of three datasets with increasing morphological complexity:

  1. ToyShape: Simple geometric shapes (triangles, squares, pentagons).
  2. SimObject: Photorealistic 3D-rendered objects (apples, clocks, cups).
  3. RealHand: 5,050 real-world hand images, each containing exactly five fingers.
Overview of CountHalluSet training samples versus generated counting hallucinations across three levels of complexity.

The benchmark distinguishes between "facts in counting" (ground truth distributions) and "factual violations" (hallucinations), such as generating two triangles when the training data only ever contains one per category.

Methodology

The researchers propose a rigorous evaluation pipeline to measure the Counting Hallucination Rate (CHR). For complex datasets like RealHand, a two-stage automated process is employed.

The evaluation pipeline for detecting counting hallucinations, including the use of a counting-ready indicator and specialized counting models.

First, a Counting-Ready Indicator (based on MaxViT) filters out non-counting failures—images too distorted or blurry to be evaluated. Second, a Counting Model (e.g., YOLO-12) identifies and counts specific features like fingertips.

To mitigate these hallucinations, the paper introduces Joint-Diffusion Models (JDM). Unlike standard DPMs that only model pixels, JDM learns to generate images and their structural skeletons (segmentation masks) simultaneously in a shared latent space. This structural "scaffolding" forces the model to respect topological constraints during the denoising process.

Key Insights and Results

The study reveals several counter-intuitive findings regarding modern sampling techniques:

  • The FID Blind Spot: There is nearly zero correlation between FID scores and counting accuracy. A model can achieve a "better" FID while hallucinating more objects.
  • The Sampling Paradox: In the RealHand dataset, increasing sampling steps often increases the CHR. The authors hypothesize that excessive steps may cause the model to overfit to local noise, manifesting as extra digits.
  • Solver Performance: Advanced ODE solvers (e.g., DPM-Solver-2) often produce higher hallucination rates than simple ancestral sampling (DDPM), which serves as a practical lower bound for counting errors.
  • JDM Efficacy: On RealHand, JDM reduced the CHR from 14.5% to 10.5% and significantly decreased non-counting failures from 10.6% to 2.3%.

Conclusion

Counting hallucinations represent a fundamental architectural challenge for diffusion models. While Joint-Diffusion Models offer a promising path toward numerical accuracy by incorporating structural constraints, they currently face a trade-off between factual correctness and perceptual crispness. Future research must address how to scale these constraints to large-scale foundation models without sacrificing visual quality.

Summary updated

BibTeX
@misc{fu2025counting,
  author = {Shuai Fu and Jian Zhou and Qi Chen and Huang Jing and Huy Anh Nguyen and Xiaohan Liu and Zhixiong Zeng and Lin Ma and Quanshi Zhang and Qi Wu},
  title = {{Counting Hallucinations in Diffusion Models}},
  year = {2025},
  eprint = {2510.13080},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.13080},
}
Figure