Abstract
Diffusion models achieve impressive performance in high-fidelity image generation but often struggle with rare concepts that appear infrequently in the training distribution. Prior work attempts to address this issue by prompt switching, where generation begins with a frequent proxy prompt and later transitions to the original rare prompt. However, such designs typically rely on fixed schedules that disregard the model's internal dynamics, making them brittle across prompts and backbones. In this paper, we re-frame rare prompt generation through the lens of score replacement: the denoising trajectory of a rare prompt can be initially guided by the score of a semantically related frequent prompt, which acts as a proxy. However, as the process unfolds, the proxy score gradually diverges from the true rare prompt score. To control this drift, we introduce a bounded deviation criterion that triggers the switch once the deviation exceeds a threshold. This formulation offers both a principled justification and a practical mechanism for rare prompt generation, enabling adaptive switching that can be widely adopted by different models. Extensive experiments across SDXL, SD3, Flux, and Sana confirm that our method consistently improves rare concept synthesis, outperforming strong baselines in both automated metrics and human evaluations.
Introduction: The Challenge of Rare Concepts
Text-to-image diffusion models excel at generating common objects but frequently fail when presented with "rare concepts"—combinations or entities that are sparsely represented in training data. For instance, while a model can easily generate a "duck" or a "zebra," it often struggles to synthesize a "zebra-striped duck," either ignoring the rare attribute or producing a garbled image. This instability arises because the model's internal score function (the gradient guiding noise toward data) becomes unreliable in regions of low data density.
Previous attempts, such as the Rare-to-Frequent (R2F) framework, utilized Large Language Models (LLMs) to create a sequence of prompts, starting with a frequent proxy (e.g., "a duck") and switching to the rare target later. However, these methods rely on fixed, heuristic schedules. If the switch occurs too early, the rare features fail to materialize; if too late, the model's trajectory is already too committed to the proxy concept to incorporate the rare details.
Methodology: Adaptive Prompt Switching (RAP)
This paper introduces RAP (Rare Concept Generation via Adaptive Prompt Switching), which re-frames the problem as score replacement. The core insight is that at high noise levels (early in generation), the conditional scores of semantically related prompts are nearly identical. As noise decays, these scores diverge.
RAP monitors this divergence mathematically rather than relying on a timer. The process involves:
- Prompt Sequencing: An LLM generates a transition from frequent to rare prompts (e.g., $c_1 \rightarrow c_2 \rightarrow c_{target}$).
- Score Deviation Monitoring: The system continuously calculates the difference between the current proxy score and the target score at each timestep.
- Bounded Deviation Trigger: Instead of a fixed timestep, RAP accumulates this deviation into a virtual "bucket." Once the accumulated error exceeds a threshold, it triggers a switch to the next prompt in the sequence.
- Semantic Decay Adjustment: To refine the trigger, RAP uses a decay factor based on the cosine similarity of text embeddings. Prompts that are semantically closer to the target are granted a larger "error budget," allowing the proxy to guide the generation longer without causing semantic drift.
Experimental Results and Key Insights
RAP was evaluated on RareBench, a dataset specifically designed to stress-test compositional and rare generation across eight categories. The method demonstrated broad compatibility, significantly improving performance on state-of-the-art models including SDXL, SD3, Flux.1-dev, and Sana.
Quantitative evaluations using GPT-4o as an alignment judge showed that RAP consistently outperformed baselines like SynGen and R2F. For example, on the Flux model, RAP improved alignment in the "Single-Property" category from 57.3 to 67.7. Human preference studies mirrored these results, with participants preferring RAP-generated images ~70% of the time over base models due to superior text alignment and visual aesthetics. Crucially, testing on standard benchmarks like T2I-CompBench confirmed that RAP does not degrade the quality of common, non-rare prompts.
Conclusion
By replacing brittle, fixed schedules with a mathematically grounded bounded deviation criterion, RAP provides a robust and model-agnostic solution for rare concept generation. While still limited by the fundamental boundaries of a model's learned distribution, RAP maximizes the utility of existing weights to synthesize bizarre and complex imagery that standard diffusion processes often fail to capture.
Summary updated