TL;DR
When you try to remove demographic stereotypes from text-to-image diffusion models, existing fixes usually break the images—turning a "nurse" into visual gibberish—because they edit the text translator and the image painter in isolation. CO-ALIGN solves this by mapping out and jointly aligning the internal "concept graphs" of both components, achieving balanced demographics without sacrificing image quality. As a surprising bonus, reshaping a model's internal concept space makes it vastly harder for adversarial prompts to bypass safety filters.
What Problem Does This Paper Address?
Text-to-image (T2I) models like Stable Diffusion absorb and amplify societal stereotypes from web-scale training data (for instance, heavily associating "nurse" with women).
To fix this, researchers usually intervene in one of two places: the text encoder (which translates your prompt into mathematical embeddings) or the denoiser (the UNet or Transformer that paints the image from noise). Treating these two parts independently creates a silent tug-of-war. The denoiser expects the specific, biased geometry of the original text encoder. If you only edit the text encoder, you feed the denoiser out-of-distribution signals it cannot interpret, causing generations to collapse into semantically incoherent nonsense. Conversely, if you only edit the denoiser, the unedited text encoder still routes underspecified prompts (like "a nurse") toward biased representations, partially undoing your hard work.
Methods
The authors argue that bias isn't stored in isolated concepts, but in the relationships between them. They introduce CO-ALIGN (Concept Ontology Alignment), a fine-tuning pipeline that extracts a relational graph of concepts from both the text encoder and the denoiser, and aligns them sequentially:
- Extracting Two Concept Graphs:
- Text Encoder Graph: Standard pairwise cosine similarity between mean-pooled token embeddings (e.g., measuring how much closer "Nurse" is to "Female Nurse" than "Male Nurse").
- Denoiser Graph: Because the denoiser has no single vector per concept, the authors adapt "concept neuron" identification from prior literature. They measure how much perturbing cross-attention weights changes a generated image's CLIP alignment with a concept, creating a masked gradient profile—a concept neuron fingerprint. Pairwise cosine similarity between these fingerprints yields the denoiser's graph.
- Joint Registration via Ranking Loss: Rather than forcing exact vector coordinates, CO-ALIGN defines a target graph topology where a target concept ("Nurse") has equal proximity to fixed anchor concepts ("Male Nurse", "Female Nurse"). A differentiable soft-ranking loss pulls the target concept to be equidistant from the anchors, while an anchor loss freezes the anchors in place (and an optional preservation loss prevents forgetting on larger graphs). First the text encoder is aligned, and then the denoiser is recalibrated to match the new geometry—adding zero extra cost at inference time.
Datasets
No new datasets are introduced; the authors rely on established benchmarks and classifiers:
- Debiasing Evaluation: Following the DiffLens protocol, 500 images per prompt ("face of a/an {occupation}") are generated across four occupations (nurse, doctor, firefighter, receptionist), classified across gender, race, and age using FairFace.
- Image Quality & Fidelity: Evaluated against FFHQ (faces) and MS-COCO (unrelated general prompts) to measure photorealism and ensure general capabilities remain intact.
- Adversarial Unlearning: Uses prominent nudity-inducing adversarial bypass prompts from the I2P (Inappropriate Image Prompts) dataset, evaluated with a LLaVA vision-language classifier.
Key Insights and Ideas
- Fairness without geometric harmony causes incoherence: Plotting class imbalance against generation incoherence reveals why single-component methods struggle—they trade bias for broken, unclassifiable images. Jointly aligning both components breaks this trade-off.
- Semantic Neighbourhood Propagation: Editing a concept graph triggers a fascinating emergent effect: pulling one supervised concept toward a target automatically drags its unsupervised semantic neighbors along with it (similar to label propagation in semi-supervised graph learning).
- Supercharging Concept Unlearning: Post-hoc unlearning methods (like ESD or UCE) only erase concepts within a tight local radius, leaving models vulnerable to sneaky synonyms. By using CO-ALIGN to pull just two known adversarial prompts (Nymphettes, Creampie) closer to Nudity before unlearning, neighborhood propagation pulls adjacent concepts (Erotic, Shirtless) into the "erasure zone" automatically.
Key Results
- Fairness & Quality (SD v1.5): CO-ALIGN improves gender fairness by 30.4% over DiffLens (Fairness Discrepancy of 0.032) and achieves the best race fairness (0.043, a 54.7% improvement over the runner-up). Simultaneously, it beats state-of-the-art baselines on image quality by an average $\Delta\text{FID} = 8.4$, boosts image fidelity (CLIP-I up to 0.9525), and reduces semantically incoherent outputs by 88%.
- Architecture Transfer: The method generalizes cleanly to fast-distilled models (SDXL-Turbo) and joint-attention MMDiT architectures (SD3-Medium), reaching low Fairness Discrepancy (0.039–0.076) with minimal FID shifts.
- Robust Unlearning: Pre-aligning SD v1.5 with CO-ALIGN before applying standard unlearning slashes adversarial nudity generation rates up to $12.5\times$: ESD drops from 10.0% to 0.8%, SAFREE from 18.8% to 1.2%, and UCE from 29.6% to 10.0%.
Limitations and Future Work
The authors highlight three practical constraints:
- Extraction Compute Cost: Computing gradient-based concept neuron fingerprints to build the denoiser's graph is computationally expensive compared to text-only interventions.
- Per-Concept Debiasing: Fixing one concept doesn't globally cure the model. Aligning "Nurse" partially reduces gender bias on five untargeted occupations (dropping Fairness Discrepancy from 0.751 to 0.240), meaning CO-ALIGN must be applied to each target concept you want fully debiased.
- Prior Adversarial Knowledge: Using CO-ALIGN to harden unlearning still requires knowing a few seed adversarial bypass concepts upfront (e.g., via red-teaming) to initiate the neighborhood pulling effect. Future directions are not explicitly discussed in the main text.
Summary updated