← Lab /AI/ML

Memorization in diffusion models stems from few shallow attention heads

Memorization is driven by a small subset of shallow cross-attention heads and targeted top-k head suppression reduces memorization with better image quality trade-off

AI/ML arXiv 14 Nov 2026 Defense Prototype evidence

Published as “Memorization Lives in a Few Attention Heads: Mitigating Memorization in Diffusion Models via Projection-Based Suppression”

Why it matters

The technique enables practical, inference-time reduction of privacy-leaking memorization in popular diffusion models without noticeable loss of image quality.

Summary

Targeted suppression of a few shallow-layer cross-attention heads dramatically cuts memorization (SSCD) while keeping semantic alignment (CLIP) and image quality better than existing inference-time defenses. The method identifies top-k heads via a semantic-control score and removes their condition-specific component by directional projection, achieving lower SSCD scores (e.g., 0.1578 vs 0.5122) with comparable CLIP scores and only a modest runtime increase.

What they found 3

  1. Suppressing only the earliest four cross-attention layers reduces SSCD from 0.5122 to 0.1578 (SD v1.4) and from 0.6306 to 0.2662 (SD v2.0) while keeping CLIP scores around 0.26

    “suppressing layers 0-3 substantially reduces the SSCD score from 0.5122 to 0.1578 for SD v1.4 and from 0.6306 to 0.2662 for SD v2.0, while maintaining CLIP scores of 0.2590 and 0.2730, respectively.”

  2. Across both models, the method’s SSCD-CLIP trade-off curve lies closer to the lower-right corner than all baselines

    “As shown in Fig. 5, our method, represented by the red curve, consistently lies closer to the lower-right region than all baselines across both model versions.”

  3. Runtime overhead is minimal: 1115 s for 500 samples, the second-fastest among compared methods

    “Our method requires only 1115 seconds, achieving the second-fastest runtime among all methods, just 25 seconds slower than CALS.”

Caveats 1

  • Extending suppression to deeper layers further reduces SSCD, but only marginally, and substantially harms CLIP scores (down to 0.1738 and 0.2207), showing a trade-off between mitigation strength and semantic fidelity.

What’s new here 4

  • Focuses on a small subset of shallow attention heads rather than the whole cross-attention mechanism
  • Introduces a semantic-control score to rank heads for memorization relevance
  • Applies directional projection to suppress only the memorization-related component of conditional representations
  • Provides a better trade-off between memorization mitigation and image quality than prior global suppression methods