TL;DR
State-of-the-art diffusion models frequently fail when generating images from rare or unusual prompts because these concepts are sparse in their training data. This paper introduces RAP (Rare Concept Generation via Adaptive Prompt Switching), a method that dynamically tracks internal model dynamics to transition from a common "proxy" prompt to the rare target prompt at the mathematically optimal moment. By bounding score deviations, RAP consistently delivers accurate rare-concept images across diverse backbones like Flux, Sana, and SDXL without requiring manual schedule tuning.
What Problem Does This Paper Address?
If you ask a modern text-to-image model to generate a "banana-shaped car" or a "wigged polar bear," it will often ignore the unusual modifiers and just output a normal car or a normal polar bear. This happens because these "rare concepts" have near-zero density in the model's training distribution, making direct text conditioning unstable and unreliable.
Prior approaches, such as Rare-to-Frequent (R2F), attempted to solve this by starting the image generation process with a common, semantically related proxy prompt (e.g., "a horned animal") to establish basic geometry, and then switching to the rare target prompt ("a horned elephant") later in the denoising process. However, these methods rely on fixed, heuristic schedules. If the switch happens too early, the rare concept fails to emerge; if it happens too late, the model locks onto the proxy and ignores the rare attributes entirely. Because different model architectures and prompt pairs diverge at completely different rates, these rigid schedules are highly brittle.
Methods
The authors re-frame prompt switching through a rigorous mathematical lens: score replacement along the probability flow ordinary differential equation (ODE) trajectory.
Instead of guessing a fixed timestep to switch prompts, their proposed framework, RAP, dynamically monitors the internal score difference ($\delta_t$) between the frequent proxy prompt and the rare target prompt at each denoising step.
The core mechanism is a bounded deviation criterion:
- Discrepancy Accumulation: RAP maintains an internal "bucket" that sums up the scaled score differences over time.
- Adaptive Thresholding: Each prompt in the generation sequence is assigned a budget based on a baseline threshold ($\delta_B^*$) and a decay rate ($\gamma$). The decay rate is calculated on the fly using the semantic similarity of the prompts (via text encoders like T5 or CLIP).
- Dynamic Trigger: The moment the accumulated drift in the bucket exceeds the allocated budget, RAP triggers a switch to the next prompt in the sequence.
This ensures that the frequent prompt guides the generation long enough to establish solid semantic attributes, but hands off control to the rare prompt before the trajectory drifts too far from the target concept.
Datasets
The authors evaluated their framework across two primary benchmarks:
- RareBench: A specialized dataset designed for rare concept generation, containing 320 prompts split across 8 distinct categories (covering both single-object and multi-object scenarios).
- T2I-CompBench: A benchmark for compositional text-to-image generation. The authors filtered this dataset down to 268 multi-prompt sequences to evaluate RAP's robustness on more generalized, non-rare prompt distributions.
Key Insights and Ideas
- The Early Denoising "Safe Zone": The authors discover that during the earliest stages of generation (high noise), the score functions of rare prompts and their frequent proxies are nearly identical (as seen in Figure 2). This provides a solid theoretical justification for score replacement: using a proxy early on stabilizes the trajectory without corrupting the final target semantics.
- The Timing Trade-Off: There is a highly sensitive window for prompt switching. Tracking internal model scores allows the algorithm to adaptively find this sweet spot regardless of whether the underlying backbone is a standard diffusion model or a flow-matching transformer.
Key Results
RAP was extensively tested against base models and strong baselines (like R2F, SynGen, and RPG) across four major diffusion backbones: SDXL, SD3, Flux.1-dev, and Sana.
- Quantitative Improvements: RAP achieved the highest text-to-image alignment scores (evaluated via GPT-4o) across almost all categories in RareBench. Notably, on the Flux model—where fixed-schedule R2F actually degraded performance—RAP achieved substantial gains, boosting the "Property" category score from 57.3 to 67.7.
- Perceptual Quality: In a user study involving 50 participants evaluating text-to-image alignment and visual quality, RAP achieved a 62% to 72% win rate against both the original base models and the R2F baseline across all architectures.
- General Robustness: When tested on standard prompts in T2I-CompBench, RAP preserved or improved generation quality, proving it doesn't sacrifice general performance to fix rare concepts.
Limitations and Future Work
While RAP significantly improves the generation of rare concepts, it remains fundamentally bounded by the inherent capacity of the base model. If a rare concept lies completely outside the model's learned domain (for example, counterfactual color mappings like "a globe with brown oceans and blue land"), the adaptive switch still cannot force the model to synthesize what it does not know.
For future work, the authors aim to extend RAP to handle more complex compositional and entirely unseen concepts, explore multi-modal frequent-to-rare conditions (such as using audio or visual proxies), and investigate frequent-to-rare prompt training strategies to natively bake this capability into future foundation models.
Summary updated