cs.CVApr 6, 2026

Memorization In Stable Diffusion Is Unexpectedly Driven by CLIP Embeddings

Authors: Bumjun Kim, Albert No

Organizations: Department of Artificial Intelligence, Yonsei University

Abstract

Understanding how textual embeddings contribute to memorization in text-to-image diffusion models is crucial for both interpretability and safety. This paper investigates an unexpected behavior of CLIP embeddings in Stable Diffusion, revealing that the model disproportionately relies on specific embeddings. We categorize input tokens as <startoftext>, <prompt>, <endoftext> and <pad> with corresponding embeddings vsot,vpr,veot,vpad\mathbf{v}^{\mathbf{sot}}, \mathbf{v}^{\mathbf{pr}}, \mathbf{v}^{\mathbf{eot}}, \mathbf{v}^{\mathbf{pad}}. We discover that vpr\mathbf{v}^{\mathbf{pr}} contribute minimally to generation in memorized cases. In contrast, vpad\mathbf{v}^{\mathbf{pad}} strongly affect memorization due to their structural duplication of veot\mathbf{v}^{\mathbf{eot}}, the only embedding explicitly optimized during CLIP training. This duplication unintentionally amplifies the influence of veot\mathbf{v}^{\mathbf{eot}}, causing the model to over-rely on it, thereby driving memorization. Based on these observations, we propose two simple yet effective inference-time mitigation strategies: (1) Replacing the tokenizer's default <pad> from <eot> to the ! token before embedding, and masking the veot\mathbf{v}^{\mathbf{eot}}; (2) Partial masking of vpad\mathbf{v}^{\mathbf{pad}}. Both suppress memorization without degrading quality, and are readily deployable without prior detection.

Figures & tables

Appendix figures & tables12 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Broken Memories: Detecting and Mitigating Memorization in Diffusion Models with Degraded Generations

    May 21, 2026Yuanmin Huang, Mi Zhang, Chen Chen +4Memorization in Generative ModelsDiffusion Models

  2. Steering Away from Memorization: Reachability-Constrained Reinforcement Learning for Text-to-Image Diffusion

    Feb 24, 2026Sathwik Karnik, Juyeop Kim, Sanmi Koyejo +2Memorization in Generative ModelsT2I Diffusion Models

  3. Rethinking Memorization Mitigation in Diffusion Models: Reinforcing Text Conditioning

    Oct 1, 2026Hyungjun Joo, Sehwan Kim, Hyeonggeun Han +2Diffusion Model AlignmentAttention Control in Diffusion Models