Unconsciously Forget: Mitigating Memorization; Without Knowing What is being Memorized

Er Jin, Yang Zhang, Yongli Mou, Yanfei Dong, Stefan Decker, Kenji Kawaguchi, Johannes StegmaierarXiv 2025 · DOI · arXiv

Abstract

Large-scale generative models often inadvertently memorize copyrighted content from their training data, posing significant legal and ethical challenges. We present UniForget, a novel "blind" de-memorization technique that mitigates the generation of sensitive content without requiring prior knowledge of specific target concepts. By pruning a small subset of model parameters using only neutral prompts, UniForget successfully decouples memorized "spikes" from general generative capabilities. Our experiments on the FLUX model demonstrate the effective suppression of over 2,000 copyright-sensitive concepts while maintaining high image quality and general-purpose utility.

Introduction

State-of-the-art generative models like Stable Diffusion 3 and FLUX are trained on massive web-scale datasets. As these models scale, they increasingly tend to "memorize" training samples, reproducing copyrighted characters, celebrity likenesses, and proprietary artwork nearly verbatim. Existing solutions typically rely on targeted unlearning—which requires identifying every concept to be forgotten—or guidance manipulation, which adds computational overhead and often degrades output quality.

UniForget addresses these limitations by enabling a model to "unconsciously forget" memorized content. It operates under the premise that memorization is a distinct mathematical phenomenon that can be surgically removed without ever exposing the model to the copyrighted data during the mitigation process.

The UniForget Framework

Theoretical Foundations

UniForget is built upon two primary hypotheses:

  1. The Spike Hypothesis: Memorized content exists as high-probability "spikes" in the model's embedding space. These spikes are mathematically distinct and have higher magnitudes compared to the "neutral subspace" used for general generation.
  2. The Selective Parameter Hypothesis: A small, specific subset of the model's weights (primarily in Feed-Forward Networks and Normalization layers) is responsible for these memorization spikes.
Conceptual visualization of the Spike Hypothesis, showing the suppression of memorized content (e.g., Spider-Man, Mickey Mouse) to flatten spikes into the neutral subspace.

Implementation via Model Pruning

Instead of traditional fine-tuning, UniForget utilizes Model Pruning. The researchers train a learnable mask ($M$) to identify and deactivate "memorization neurons." The training process is remarkably simple and "blind," requiring only 256 neutral, safe prompts (e.g., "a photo of a park") sampled from LAION-2B.

The pruning is guided by a dual-objective loss function that balances reconstruction (ensuring the model still generates neutral images effectively) and sparsity (minimizing active parameters). Because memorization spikes are parameter-hungry and distinct from general features, they are the first elements to be pruned away when the model is forced to maintain quality with fewer active weights.

Experimental Results

Qualitative Analysis

Testing on the FLUX model reveals that UniForget effectively transforms specific copyrighted characters into generic, high-quality versions. As pruning strength increases from "Weak" to "Strong," the model progressively loses the ability to render specific likenesses while retaining the core composition and artistic quality of the prompt.

Visual results showing the progression from original memorized characters (SpongeBob, Captain America, Joker, Oprah) to generic versions across different pruning strengths.

Quantitative Performance

The method successfully suppressed over 2,000 different copyright-sensitive concepts. On the Anime dataset, detection accuracy of copyrighted features dropped significantly from 77.6% in the original model to 27.4% under strong pruning. Crucially, general generative performance remained stable; the FID score on the COCO dataset only shifted from 32.0 to 38.9 in the strongest setting, and could be further optimized to 31.5 with a brief retraining phase that did not re-introduce the memorized content.

Conclusion

UniForget represents a significant step forward in responsible AI development. By treating memorization as a "bug" that can be surgically pruned, it offers a scalable, efficient, and blind method for protecting intellectual property in generative models. Future work will focus on extending this architecture-agnostic approach to other models like Stable Diffusion 3 and Visual Autoregressive (VAR) models to further prove its universality.

Summary updated

Abstract

Recent advances in generative models have demonstrated an exceptional ability to produce highly realistic images. However, previous studies show that generated images often resemble the training data, and this problem becomes more severe as the model size increases. Memorizing training data can lead to legal challenges, including copyright infringement, violations of portrait rights, and trademark violations. Existing approaches to mitigating memorization mainly focus on manipulating the denoising sampling process to steer image embeddings away from the memorized embedding space or employ unlearning methods that require training on datasets containing specific sets of memorized concepts. However, existing methods often incur substantial computational overhead during sampling, or focus narrowly on removing one or more groups of target concepts, imposing a significant limitation on their scalability. To understand and mitigate these problems, our work, UniForget, offers a new perspective on understanding the root cause of memorization. Our work demonstrates that specific parts of the model are responsible for copyrighted content generation. By applying model pruning, we can effectively suppress the probability of generating copyrighted content without targeting specific concepts while preserving the general generative capabilities of the model. Additionally, we show that our approach is both orthogonal and complementary to existing unlearning methods, thereby highlighting its potential to improve current unlearning and de-memorization techniques.
BibTeX
@misc{jin2025unconsciously,
  author = {Er Jin and Yang Zhang and Yongli Mou and Yanfei Dong and Stefan Decker and Kenji Kawaguchi and Johannes Stegmaier},
  title = {{Unconsciously Forget: Mitigating Memorization; Without Knowing What is being Memorized}},
  year = {2025},
  eprint = {2512.09687},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.09687},
}
Figure