ATHENA: Adaptive Test-Time Steering for Improving Count Fidelity in Diffusion Models
Organizations: Department of Electrical and Computer Engineering, University of Southern California, Los Angeles, CA, USA
Abstract
Text-to-image diffusion models achieve high visual fidelity but surprisingly exhibit systematic failures in numerical control when prompts specify explicit object counts. To address this limitation, we introduce ATHENA, a model-agnostic, test-time adaptive steering framework that improves object count fidelity without modifying model architectures or requiring retraining. ATHENA leverages intermediate representations during sampling to estimate object counts and applies count-aware noise corrections early in the denoising process, steering the generation trajectory before structural errors become difficult to revise. We present three progressively more advanced variants of ATHENA that trade additional computation for improved numerical accuracy, ranging from static prompt-based steering to dynamically adjusted count-aware control. Experiments on established benchmarks and a new visually and semantically complex dataset show that ATHENA consistently improves count fidelity, particularly at higher target counts, while maintaining favorable accuracy-runtime trade-offs across multiple diffusion backbones.
Figures & tables
| Level | Description | Example Prompt |
|---|---|---|
| L1 | Hard object categories | “nine microphones” |
| L2 | + Scene context | “eight sneakers at the edge of a pond” |
| L3 | + Distractor objects | “five jars beside a river with a person” |
| L4 | + Relational constraints | “seven dumbbells lined up along a sidewalk” |
| Model | Method | CoCoCount | CoCoCount-E | ATHENA Dataset | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Acc ( ) | MAE ( ) | RMSE ( ) | Time ( ) | Acc ( ) | MAE ( ) | RMSE ( ) | Time ( ) | Acc ( ) | MAE ( ) | RMSE ( ) | Time ( ) | ||
| FLUX.1-dev | Unsteered | 58.4 | 0.98 | 1.96 | 45.8 | 46.5 | 1.12 | 1.93 | 22.6 | 39.4 | 1.78 | 2.96 | 45.5 |
| ATHENA-Static | 73.3 | 0.56 | 1.35 | 54.8 | 58.5 | 0.84 | 1.73 | 27.4 | 48.9 | 1.31 | 2.44 | 54.7 | |
| ATHENA-Feedback | 71.4 | 0.67 | 1.72 | 56.0 | 58.3 | 0.98 | 2.00 | 29.8 | 52.2 | 1.38 | 2.60 | 60.8 | |
| ATHENA-Adaptive | 70.2 | 0.65 | 1.63 | 64.8 | 62.2 | 0.85 | 1.90 | 35.1 | 53.6 | 1.40 | 2.72 | 72.5 | |
| SD 3.5 Large | Unsteered | 58.4 | 0.78 | 1.50 | 43.9 | 44.8 | 0.98 | 1.56 | 24.1 | 38.9 | 1.55 | 2.54 | 43.8 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Unique Prompts | Count Range | Total Prompts |
|---|---|---|---|
| CoCoCount (deduplicated) | 161 | 2–10 | 161 |
| CoCoCount-E | 72 | 2–10 | 648 |
| Diffusion Backbone | |||||||||
| Parameter | FLUX.1-dev | SD 3.5 Large | SDXL | ||||||
| Static | Feedback | Adaptive | Static | Feedback | Adaptive | Static | Feedback | Adaptive | |
| – | 20 | 20 | – | 20 | 20 | – | 30 | 30 | |
| 10 | 5 | 5 | 10 | 5 | 5 | 10 | 10 | 10 | |
| 4 | 4 | 4 | 4 | 4 | 4 | 5 | 5 | 5 | |
T2I Generation
Text-to-image generation creates images from natural-language prompts using generative models, with research focused on fidelity, control, efficiency, and safety.
See all 283 papers