The Illusion of High Utility in Safety Alignment of Text-to-Image Diffusion Models

Adeel Yousaf, Soumik Ghosh, James Beetham, Amrit Singh Bedi, Mubarak ShaharXiv 2026

TL;DR

While current safety alignment methods for text-to-image models successfully suppress harmful content without appearing to harm image quality, they actually severely degrade the model's ability to follow fine-grained prompt instructions (like object counts and attributes). The authors show this "illusion of high utility" is caused by a geometric distortion called semantic collapse in the text encoder's embedding space. To fix this, they introduce Structure-Aware Geometric Regularization (SAGE), which preserves the original embedding distribution and relational structure, recovering fine-grained prompt adherence while maintaining robust safety.

What Problem Does This Paper Address?

When we align text-to-image (T2I) diffusion models to prevent them from generating Not-Safe-For-Work (NSFW) content, we want to ensure they don't lose their core capability to generate high-quality images from benign prompts. Standard evaluations typically rely on global metrics like Fréchet Inception Distance (FID) and CLIPScore to prove that utility is preserved.

However, this paper uncovers an illusion of high utility. While global metrics look great, safety-aligned models frequently fail at fine-grained compositional tasks—such as rendering the correct number of objects, matching attributes (e.g., color), or maintaining spatial relationships.

The illusion of high utility: Coarse metrics like CLIPScore rate poorly aligned images highly, whereas fine-grained metrics like TIFA correctly penalize the safety-aligned model's failures.

The authors trace this issue back to the text encoder. Fine-tuning the text encoder for safety causes semantic collapse, a phenomenon where the prompt embedding space shrinks (embedding contraction) and the relative positioning of benign concepts becomes scrambled (neighborhood distortion).

Methods

To counteract semantic collapse, the authors propose Structure-Aware Geometric Regularization (SAGE), a framework that introduces two novel geometric regularization terms to the safety alignment objective:

  1. Embedding Spread Preservation (ESP) Loss: This directional penalty prevents the overall volume of the prompt embedding space from shrinking. It ensures that the variance (spread) of the adapted embeddings does not drop below that of the original frozen base model, preserving the model's discriminative capacity.
  2. Local Structure Alignment (LSA) Loss: Instead of forcing independent point-wise alignment, LSA ensures that prompts that were close neighbors in the base model's embedding space remain close neighbors after safety tuning.

Crucially, the authors discover that applying standard LSA can inadvertently weaken safety by recovering geometric patterns correlated with unsafe concepts. To solve this, they introduce a concept-perturbed variant of LSA. This variant enforces local neighborhood consistency even after the embeddings are artificially shifted along an unsafe concept direction (e.g., "nudity"), preventing adversarial bypasses.

Datasets

The authors evaluated their approach using several prominent datasets and benchmarks:

  • Training: 6,911 safe-unsafe prompt pairs from the sexual category of the CoPro dataset. For generalization tests, they added 8,931 prompt pairs from violence and illegal categories.
  • Fine-Grained Utility Evaluation: TIFA (Text-to-Image Faithfulness evaluation with Question Answering, containing ~4,000 prompts and >25,000 QA pairs) and GenEval (553 prompts focusing on object presence, counting, and color attribution).
  • Coarse Utility Evaluation: COCO 30k dataset (used to compute standard FID and CLIPScore).
  • Safety Robustness Evaluation: Evaluated against multiple jailbreak attacks (MMA-Diffusion, Sneaky Prompt, P4D, Ring-A-Bell, and the adaptive white-box U3-Attack) using the I2P benchmark and the NudeNet classifier.

Key Insights and Ideas

  • Coarse Metrics are Blind to Compositionality: Global metrics like CLIPScore inherit CLIP's fundamental limitations in understanding object counts and attribute binding. As a result, they fail to register severe semantic degradation during safety tuning.
  • Geometric Roots of Semantic Collapse: Safety tuning acts like a gravitational pull, collapsing distinct benign concepts into a tight, distorted region.
Fig. 2: Embedding geometry under safety alignment. The figure illustrates how safety alignment alters the structure of the text-encoder embedding space. Left: Base Model. The prompt “Three golden retrievers” is used as a reference. In the base model, semantically related prompts are arranged according to their similarity: “Three dogs” lies closest to the reference, followed by “Two golden retrievers”, while an unrelated concept (“cat”) appears far away. The arrows visualize the spread of prompt embed- dings, and the circular region highlights the local semantic neighborhood around the reference prompt. Top-right: Prior safety alignment methods. Safety tuning of- ten alters this structure in two ways. First, the embedding spread can decrease, causing prompt embeddings to become more concentrated. Second, the local semantic neigh- borhood becomes distorted: prompts that were previously unrelated may move closer to the reference prompt, causing unrelated concepts (e.g., “cat”) to appear within the neighborhood of the reference prompt. Bottom-right: Our method. Our alignment objective preserves both properties of the original embedding space. The embedding spread remains comparable to that of the base model, while the local semantic neigh- borhood around the reference prompt is better retained.
  • Category-Specific Vulnerability: Semantic collapse does not affect all prompt categories equally. Under prior safety methods, categories like "Food" and "Material" suffer massive embedding contraction and local structure distortion, which directly correlates with a steep drop in generation accuracy for those specific topics.
Fig. 4: Geometric characterization of semantic collapse under safety align- ment. (a) Category-level analysis for DES showing that a lower Embedding Spread Ratio (Rs) corresponds to a higher TIFA utility drop (Pearson r = −0.86). Categories such as Food and Material fall into the semantic collapse region (low spread, high utility drop), while categories retaining higher spread ratios remain comparatively stable. (b) Category-level analysis for DES showing that a lower Jaccard Ratio (J) corresponds to a higher TIFA utility drop (Pearson r = −0.90). Categories such as Food fall into the semantic collapse region (low Jaccard, high utility drop), while categories with higher Jaccard ratios remain comparatively stable.

Key Results

  • Restored Compositional Utility: On the TIFA benchmark, SAGE achieves a score of 75.4%, coming remarkably close to the base model (76.3%) and marking a +5.0% improvement over the prior state-of-the-art text-filtering method (DES).
  • Stronger Instruction Following: On GenEval, SAGE limits the performance drop to just 1.6% relative to the base model, whereas alternative methods like DES and RECE suffer drops of 6.8% and 7.6%, respectively.
  • Uncompromised Safety: SAGE maintains an exceptionally low average Attack Success Rate (ASR) of 1.2% across multiple jailbreak attacks, matching or outperforming the strongest safety baselines.
Fig. 3: Relationship between spread ratio (Rs) and structured utility (TIFA). Methods with larger reductions in overall embedding spread exhibit larger TIFA drops, indicat- ing that embedding compression is closely associated with compositional degradation.

Limitations and Future Work

  • Text-Encoder Dependency: SAGE explicitly operates on the text encoder's embedding space. Therefore, it cannot be directly applied to safety methods that solely modify the UNet denoising backbone or rely entirely on inference-time guidance.
  • Explicit Concept Specification: The framework requires developers to explicitly define the target unsafe concept (e.g., "nudity" or "violence") during training to construct the concept-perturbed regularization. The authors note that automatically discovering, localizing, and mitigating a broader, unmapped set of unsafe concepts is an important open direction for future research.

Summary updated

BibTeX
@misc{yousaf2026illusion,
  author = {Adeel Yousaf and Soumik Ghosh and James Beetham and Amrit Singh Bedi and Mubarak Shah},
  title = {{The Illusion of High Utility in Safety Alignment of Text-to-Image Diffusion Models}},
  year = {2026},
  eprint = {2607.00402},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.00402},
}
Figure