# Understanding and Mitigating Memorization in Generative Models via Sharpness of Probability Landscapes

확률 지형의 sharpness를 통한 생성 모델의 암기 이해 및 완화

Dongjae Jeon, Dueun Kim, Albert No · arXiv · 2024년 12월 5일

- **연구 문제** 확산 모델은 학습 샘플을 재현하는 memorization 문제를 가지며, 기존 탐지 방법은 계산 비용이나 최종 단계 제약이 있습니다.
- **연구 방법** 로그 확률 밀도의 sharpness를 Hessian 고유값과 score 노름으로 특성화하고, 이를 탐지 지표와 초기 잡음 최적화 목적으로 사용합니다.
- **주요 결과** Stable Diffusion v1.4에서 제안 지표는 1단계 시점에서 AUC 0.998과 TPR@1%FPR 0.982를 보고하며, SAIL은 SSCD와 CLIP 지표를 개선한다고 보고합니다.

## 확산 모델의 기억 현상과 탐지 문제

확산 모델은 학습 샘플을 새로운 출력으로 일반화하지 않고 그대로 재현하는 memorization 문제를 가집니다. 이 현상은 민감한 데이터로 학습될 때 개인정보 위험으로 이어질 수 있습니다. 기존 탐지 방법 중 Tiled ℓ2나 attention 기반 방법은 계산 비용이 커서 실시간 탐지에 적합하지 않다고 논문은 지적합니다. LID 기반 방법은 최종 생성 단계인 t ≈ 0에 머무는 한계가 있습니다. 이 논문은 로그 확률 밀도의 sharpness를 기하학적 관점에서 정의하고, 이를 생성 전 과정에서 추적할 수 있는 지표로 제시합니다.

## Hessian 고유값과 score 노름으로 본 sharpness

논문은 로그 확률 밀도의 Hessian 고유값으로 sharpness를 특성화합니다. 큰 음의 고유값은 학습된 분포에 날카로운 봉우리가 있음을 뜻하고, 이는 특정 학습 샘플의 memorization과 연결됩니다. 그러나 Stable Diffusion의 고차원 잠재 공간에서는 전체 고유값을 계산하기 어렵습니다. 이에 논문은 Hessian trace를 근사 지표로 사용합니다. Gaussian 가정 아래 Lemma 4.1은 score 노름의 기댓값이 음의 Hessian trace와 같다고 제시하며, 이 관계는 모델이 Gaussian 성분에 지배된다는 가정에 의존합니다. 따라서 score 노름은 계산 효율적인 sharpness 측도로 해석됩니다.

![Figure 3: Left: Eigenvalue distribution of Hθ(xt, c) across memorization categories in Stable Diffusion v1.4 at initial sampling step (t = T − 1) with range cl…](https://refivu.com/papers/e75379e9-eec1-44a1-a86a-1569dc00ae8d/figures/figure-c66ed551a31f1f81f1616cb0b8b1ce09.png?thumb=512)

**Figure 3** : Left: Eigenvalue distribution of Hθ(xt, c) across memorization categories in Stable Diffusion v1.4 at initial sampling step (t = T − 1) with range clipped. (top) 30 prompts per category with identical initialization. (bottom) Fixed prompt set with three different initializations. Both plots reveal stronger memorization correlates with fewer non-negative eigenvalues. Right: Eigenvalue distribution of Hθ(xt, c) across memorization categories in Stable Diffusion v1.4 at final sampling step (t = 1). Generated images shown with original training counterparts (outlined in red). Eigenvalues are approximated via Arnoldi iteration (Arnoldi, 1951), details in Appendix A.2.

[원문](https://arxiv.org/abs/2412.04140v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Dongjae Jeon, Dueun Kim, Albert No · Understanding and Mitigating Memorization in Generative Models via Sharpness of Probability Landscapes · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

## Wen 지표의 해석과 곡률 인지 스케일링

Wen 등의 지표는 조건부 score와 무조건 score 차이의 노름으로 정의됩니다. 논문은 Lemma 4.2를 통해 조건부와 무조건 분포가 Gaussian이고 평균과 공분산이 가환일 때, 이 기댓값이 Hessian 고유값 차이의 제곱합을 λ\_{i,c}로 나눈 값으로 표현된다고 보입니다. 이 해석은 조건이 분포의 곡률을 얼마나 바꾸는지를 보여 줍니다. 저자는 이어서 H∆θ s∆θ의 노름을 제안합니다. Lemma 4.3에 따르면 Gaussian에서 Hessian과 score 곱의 제곱 노름 기댓값은 음의 Hessian 세제곱 trace와 같으며, 이 스케일링은 초기 단계의 민감도를 높이도록 설계되었습니다.

![Figure 5: Eigenvalue differences between the conditional and unconditional Hessians. Memorized samples exhibit a significantly larger gap, while non-memorized…](https://refivu.com/papers/e75379e9-eec1-44a1-a86a-1569dc00ae8d/figures/figure-2ee16fd92354b13c3b5c578bc084f4ca.png?thumb=512)

**Figure 5** : Eigenvalue differences between the conditional and unconditional Hessians. Memorized samples exhibit a significantly larger gap, while non-memorized samples show near-zero differences throughout. At intermediate timesteps (t = 20), the gap remains small but detectable, and at the final stage (t = 1), it widens further.

[원문](https://arxiv.org/abs/2412.04140v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Dongjae Jeon, Dueun Kim, Albert No · Understanding and Mitigating Memorization in Generative Models via Sharpness of Probability Landscapes · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## Stable Diffusion에서의 탐지 결과

탐지 실험은 Stable Diffusion v1.4에서 memorized 프롬프트 500개와 비기억 프롬프트 500개를, v2.0에서 memorized 프롬프트 219개를 사용합니다. DDIM 샘플러를 50 추론 단계로 사용하고, 지표로 AUC와 TPR@1%FPR을 봅니다. 표 1에서 제안 지표는 1단계 시점에서 n=4 생성 평균으로 SD v1.4에서 AUC 0.998, TPR@1%FPR 0.982를 보고합니다. 이는 원문에서 Wen 등의 방법이 다섯 단계와 16번 생성으로 달성한 성능과 같은 수준으로 설명됩니다. SD v2.0에서는 전체 단계 샘플링 없이 AUC 0.991을 보고합니다. 이 결과는 두 모델 버전과 명시된 샘플링 설정에 한정됩니다.

![Table 1: AUC and TPR@1%FPR across detection strategies and sampling steps for Stable Diffusion (SD) v1.4 and v2.0. Here, n denotes the number of generations pe…](https://refivu.com/papers/e75379e9-eec1-44a1-a86a-1569dc00ae8d/figures/figure-37662b162ecf1b963a9487ad6f7b16a1.png?thumb=512)

**Table 1** : AUC and TPR@1%FPR across detection strategies and sampling steps for Stable Diffusion (SD) v1.4 and v2.0. Here, n denotes the number of generations per prompt, with results averaged over n. “Steps” indicates the stage along the diffusion sampling path, ranging from step 1 (t = T − 1) to step 50 (t = 1).

[원문](https://arxiv.org/abs/2412.04140v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Dongjae Jeon, Dueun Kim, Albert No · Understanding and Mitigating Memorization in Generative Models via Sharpness of Probability Landscapes · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

## SAIL의 초기 잡음 최적화와 완화 결과

SAIL은 초기 잡음 xT를 최적화해 시작점이 낮은 sharpness 영역에 놓이도록 합니다. 목적 함수는 곡률 인지 항의 노름과 α 배 xT 노름 제곱의 합으로 구성되며, 작은 Taylor 근사를 사용해 역전파 부담을 줄입니다. 모델 파라미터와 텍스트 조건은 바뀌지 않습니다. 완화 실험은 학습 이미지에 접근 가능한 memorized 프롬프트만 사용합니다. SD v1.4에서 454개, v2.0에서 202개의 프롬프트를 사용하며, 프롬프트마다 다섯 번 생성한 결과를 평균합니다. 기준선은 RTA, RNA, Ren 등, Wen 등의 방법이며 각 방법은 다섯 개의 하이퍼파라미터 설정으로 비교됩니다. 원문은 SAIL이 SSCD와 CLIP 지표를 모두 개선한다고 보고합니다.

![Figure 6: Left: Comparison of inference-time mitigation methods on SD v1.4 (top) and v2.0 (bottom), evaluated across five hyperparameter configurations per me…](https://refivu.com/papers/e75379e9-eec1-44a1-a86a-1569dc00ae8d/figures/figure-71f2883854abf69b0e8b18659a9e42ab.png?thumb=512)

**Figure 6** : Left: Comparison of inference-time mitigation methods on SD v1.4 (top) and v2.0 (bottom), evaluated across five hyperparameter configurations per method. Lower SSCD scores indicate reduced memorization, while higher CLIP scores show better prompt-image alignment. Right: Qualitative comparison demonstrating SAIL’s effectiveness in preserving key image details (shown adjacent to the original image), whereas baseline methods exhibit quality degradation due to modified text conditioning. Images are generated using identical random seeds, with full prompts in Appendix D.2

[원문](https://arxiv.org/abs/2412.04140v5) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Dongjae Jeon, Dueun Kim, Albert No · Understanding and Mitigating Memorization in Generative Models via Sharpness of Probability Landscapes · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## 적용 범위와 남은 제약

Lemma 4.2의 간단한 고유값 형태는 Σ와 Σc가 교환 가능하고 평균이 같을 때에만 성립합니다. 일반적인 경우는 일반화 고유값으로 설명되며 이는 부록 A.3에 제시됩니다. Gaussian 가정은 초기와 중간 노이즈 단계에서 근사적으로 사용되며, 전체 확산 과정에서 항상 성립한다고 보지 않습니다. 완화 실험은 학습 이미지에 접근 가능한 프롬프트로 제한되며, 다른 모델·데이터에 대한 일반화는 본문에서 확인되지 않습니다.

## 논문 정보

- **저자**: Dongjae Jeon, Dueun Kim, Albert No
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2024년 12월 5일
- **등록일**: 2026년 10월 29일
- **수정일**: 2025년 8월 19일
- **버전**: v5
- **arXiv**: 2412.04140
- **분류**: cs.LG · cs.AI
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2412.04140v5) · [원문 PDF ↗](https://arxiv.org/pdf/2412.04140v5)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

In this paper, we introduce a geometric framework to analyze memorization in diffusion models through the sharpness of the log probability density. We mathematically justify a previously proposed score-difference-based memorization metric by demonstrating its effectiveness in quantifying sharpness. Additionally, we propose a novel memorization metric that captures sharpness at the initial stage of image generation in latent diffusion models, offering early insights into potential memorization. Leveraging this metric, we develop a mitigation strategy that optimizes the initial noise of the generation process using a sharpness-aware regularization term. The code is publicly available at https://github.com/Dongjae0324/sharpness\_memorization\_diffusion.

## 원문 인용

Dongjae Jeon, Dueun Kim, Albert No (2024). Understanding and Mitigating Memorization in Generative Models via Sharpness of Probability Landscapes. arXiv:2412.04140v5. https://arxiv.org/abs/2412.04140v5

**BibTeX**

```
@misc{jeon2024understanding,
  title = {{Understanding and Mitigating Memorization in Generative Models via Sharpness of Probability Landscapes}},
  author = {Dongjae Jeon and Dueun Kim and Albert No},
  year = {2024},
  eprint = {2412.04140},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.04140v5}
}
```

## 이 논문의 용어

- [MNIST](https://refivu.com/terms/28b9bb66d1c6-mnist)
- [AUC](https://refivu.com/terms/017a335bbf0e-auc)
- [Hessian](https://refivu.com/terms/cb53640b58ff-hessian)
- [Stable Diffusion](https://refivu.com/terms/14d619b23a70-stable-diffusion)
- [CLIP score](https://refivu.com/terms/b6e9a45f647e-clip-score)
- [Sharpness](https://refivu.com/terms/5eab0d046f0d-sharpness)
- [memorization](https://refivu.com/terms/71212e2920ee-memorization)
- [Lemma 4.1](https://refivu.com/terms/8623cf2c5d1e-lemma-4-1)
- [Lemma 4.2](https://refivu.com/terms/434a7f419033-lemma-4-2)
- [Lemma 4.3](https://refivu.com/terms/b888333111f1-lemma-4-3)
- [classiﬁer free guidance](https://refivu.com/terms/c2fab329f8cf-classifier-free-guidance)
- [SAIL](https://refivu.com/terms/56efd614c975-sail)
- [TPR@1%FPR](https://refivu.com/terms/1d65848d6566-tpr-1-fpr)

## 다른 논문 해설

- [DRAG: Data Reconstruction Attack using Guided Diffusion](https://refivu.com/papers/4839aaf8-38e7-4160-bc2e-53b55d3c9898-drag-data-reconstruction-attack-using-guided-diffusion.md)
- [Stochastic Control for Fine-tuning Diffusion Models: Optimality, Regularity, and Convergence](https://refivu.com/papers/3888d4e2-11c4-4a84-aaa6-c2aaa4af703e-stochastic-control-for-fine-tuning-diffusion-models.md)
- [Cross-Modal Alignment via Variational Copula Modelling](https://refivu.com/papers/73c1d96d-e915-4098-9c78-7fe87574c293-cross-modal-alignment-via-variational-copula-modelling.md)
- [ToMA: Token Merge with Attention for Diffusion Models](https://refivu.com/papers/b608330f-ff16-4d66-80a4-6ab45d71e7d2-toma-token-merge-with-attention-for-diffusion-models.md)
- [Categorical Reparameterization with Denoising Diffusion models](https://refivu.com/papers/6e62ff7c-1162-4993-9d60-3aa90636d4e9-categorical-reparameterization-with-denoising-diffusion.md)
- [GEPC: Group-Equivariant Posterior Consistency for Out-of-Distribution Detection in Diffusion Models](https://refivu.com/papers/bb080595-1836-4b54-a343-fce52a1e8edd-gepc-group-equivariant-posterior-consistency-for-out-of.md)
- [Field Matching: an Electrostatic Paradigm to Generate and Transfer Data](https://refivu.com/papers/e2b68152-3fe1-42d9-9c69-d4a171d6d98a-field-matching-an-electrostatic-paradigm-to-generate-and.md)
- [Balancing Interference and Correlation in Spatial Experimental Designs: A Causal Graph Cut Approach](https://refivu.com/papers/a4debb05-37af-49fa-bdd7-59fb6ee8db90-balancing-interference-and-correlation-in-spatial.md)
- [Unisolver: PDE-Conditional Transformers Towards Universal Neural PDE Solvers](https://refivu.com/papers/a7154426-94d9-4030-b848-c26f52fa8098-unisolver-pde-conditional-transformers-towards-universal.md)
- [Roll the dice & look before you leap: Going beyond the creative limits of next-token prediction](https://refivu.com/papers/bfe0aec4-b7a5-4966-a802-a25ca9a25ec1-roll-the-dice-look-before-you-leap-going.md)
- [Vintix: Action Model via In-Context Reinforcement Learning](https://refivu.com/papers/3752fc68-7f9f-4349-9e48-c89f3b1c58b6-vintix-action-model-via-in-context-reinforcement-learning.md)
- [SageAttention2: Efficient Attention with Thorough Outlier Smoothing and Per-thread INT4 Quantization](https://refivu.com/papers/5328df78-371a-4c98-b607-4082e43abef7-sageattention2-efficient-attention-with-thorough-outlier.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/e75379e9-eec1-44a1-a86a-1569dc00ae8d-understanding-and-mitigating-memorization-in-generative)
