UIUC's CO3 Fixes AI Art's Biggest Flaw Without Retraining Any Model
A gradient-free sampling trick called CO3 fixes the classic 'cat and dog' problem where diffusion models silently drop one concept from multi-object prompts.
ProTakeaways
- CO3 is a gradient-free, plug-and-play sampler correction that fixes dropped or merged concepts in multi-object prompts. Paper
- It samples from a corrector distribution equal to the joint divided by the product of individual concept marginals.
- Works by composing Tweedie-denoised estimates rather than raw scores, with a proof that weights must sum to 1 for valid CFG.
- Hybrid schedule: noise resampling in the first three steps, then iterative correction over about 20% of the trajectory.
- Beats Attend-Excite, ToMe, SynGen, and R2F on Attend-Excite, T2ICompbench, and RareBench using SDXL and PixArt-Sigma.
- Open-source implementation available at github.com/debottam-dutta7/co3.
Anyone who has spent time prompting a text-to-image model knows the frustration: you ask for "a cat and a dog" and get a cat with a vague dog-shaped blur behind it, or two animals fused into one weird chimera. A new paper from University of Illinois Urbana-Champaign argues this failure has a specific probabilistic cause, and offers a lightweight fix that plugs into existing samplers without any retraining.
The method, called CO3 (Concept Contrasting Corrector), is a sampling-time correction for diffusion models that steers generation away from modes dominated by a single concept. Code is on GitHub, and the technique works with SDXL, PixArt-Sigma, and in principle any diffusion model.
Why one concept eats the other
The authors start from a hypothesis about why compositional prompts fail. They hypothesize that this happens when the diffusion model drifts into mixed modes that over-emphasize a single concept it learned strongly during training. In their framing, the joint distribution p(x | "a cat and a dog") has high-probability regions that overlap with the individual distributions p(x | "a cat") and p(x | "a dog"). When the sampler lands in one of these overlap regions, you get an image that technically satisfies the joint prompt but is really just a cat with a token dog stuffed in.
The fix follows directly from the diagnosis. Define a corrected distribution that divides the joint by the product of the individual concept marginals:
p_tilde(x | C) proportional to p(x | C) / (p(x | c_1) * p(x | c_2) * ...)This down-weights any region where a single concept's distribution is already strong, pushing the sampler toward what the authors call "pure" joint modes where every concept has balanced visual presence.

The Tweedie trick and a surprisingly strict constraint
Turning that formula into an actual sampling algorithm is the interesting part. Instead of composing scores (the gradients of log-probabilities) like Composable Diffusion does, CO3 composes in what the paper calls Tweedie-denoised space, meaning the intermediate clean-image estimates that DDIM produces at each step. Each concept gets a weighted contribution to the denoised estimate.
The key theoretical result is a constraint on those weights. The authors prove that the composed estimate only corresponds to a valid classifier-free guidance update in two cases:
- Weights sum to 1 (the corrector): the composition acts as a genuine correction to the current sample, preserving the CFG guidance strength.
- Weights sum to 0 (the resampler): the composition becomes independent of the current sample and effectively replaces it with weighted noise, only theoretically valid at the very first denoising step.
Anything else, they argue, sits in an unstable weight regime, and this is why Composable Diffusion often produces off-manifold garbage. This distinction underpins their claim that prior composable-diffusion methods have been operating in a region that violates the CFG form.
How CO3 runs during sampling
The full algorithm is a hybrid schedule wrapped around a normal DDIM loop:
- For the first few steps (they use 3), run the resampler with weights summing to zero. Layout gets decided early in diffusion, so this explores initial-noise configurations that better match the prompt.
- For the next chunk of early steps (up to about 20% of the total schedule), run the corrector with weights summing to one, iteratively pulling the latent away from single-concept-dominated modes.
- After the threshold
T_c, drop back to plain DDIM.
A second ingredient, closeness-aware weight modulation, adaptively sets the negative weights per step. If the current latent is drifting toward the mode for "cat," the cat concept gets a stronger negative weight, repelling the trajectory away from that mode. Distances are computed between predicted noises using an exponential kernel, so no gradients through the model are needed.
The numbers
On the Attend-Excite benchmark with SDXL, CO3 posts the top ImageReward score in Animal-Animal (1.23) and Animal-Object (1.67) categories, beating both attention-manipulation methods like Attend-and-Excite and ToMe, and score-composition methods like Composable Diffusion. On the harder T2ICompbench Complex category and RareBench, CO3 outperforms specialized baselines including R2F, which was designed specifically for rare-concept generation.

Practical numbers worth flagging:
- Peak memory: 9.5GB versus 18GB for ToMe, because CO3 is gradient-free and only reuses the base denoiser with different text conditions.
- Runtime at 50 steps: about 20 seconds on an A100. With 20 DDIM steps, CO3 drops to 10.65 seconds and still beats ToMe at 50 steps.
- Works with DPM++ solvers at 10-20 steps, so it composes with fast samplers.
Where it breaks
CO3 is not magic. The authors are candid that the noise and score landscape is strongly biased by the training paradigms of diffusion models, and unrealistic prompts not encountered in training still produce poor text/concept alignment. It also has an interesting side effect: because it is aggressively concept-obedient, generated images sometimes have sparse or missing backgrounds unless the background is explicitly named in the prompt.
The bigger picture here is that a lot of compositional-generation research has been chasing gradient-based attention edits and LoRA-style fine-tuning. CO3 is a reminder that a fair amount of the multi-concept failure mode can be attacked with pure probability theory and a few extra forward passes at inference. If you're building anything that relies on multi-object prompts, from product mockups to synthetic training data, it's worth trying as a drop-in on top of your existing pipeline.