# Memorization Sinks: Isolating Memorization during LLM Training

메모리제이션 싱크: LLM 학습 중 메모리제이션 분리

Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · arXiv · 2025년 7월 14일

- **연구 문제** 반복된 자연 텍스트 시퀀스의 기억은 사후 뉴런 제거만으로는 일반 언어 능력을 해치지 않고 지우기 어렵다는 문제를 다룹니다.
- **연구 방법** MemSinks는 각 문서의 시퀀스 식별자에 따라 기억 싱크 뉴런의 부분집합을 활성화하고 평가 때 이를 제거하는 학습 방법입니다.
- **주요 결과** 소규모 TinyStories 실험에서 MemSinks는 표준 학습에 가까운 검증 손실을 유지하면서 반복 문서의 기억을 줄였고, SmolLM 360M과 1.7B 실험에서도 같은 방향의 결과를 보고합니다.

## 사후 기억 제거가 어려운 이유

대규모 언어 모델은 pre-training 중 반복된 시퀀스를 외울 수 있으며, 이는 개인정보와 저작권 문제로 이어집니다. 기존에는 학습이 끝난 뒤 특정 뉴런을 찾아 제거하는 사후(post-hoc) 방식이 주로 쓰여 왔습니다. 이 논문은 이런 방식이 성공이 제한적이라는 점에서 출발합니다. 통제된 실험에서 자연스러운 텍스트처럼 보이는 시퀀스의 기억은 일반 언어 능력과 같은 구성요소에 얽힌(mechanistic entanglement) 것으로 나타납니다. 그래서 기억을 지우려고 뉴런을 제거하면 검증 손실이 함께 나빠집니다. 논문은 이 실패를 설명하기 위해 자연 텍스트 반복 설정(TS-Repetition)과 무작위 토큰 캐너리 설정(TS-Canary)을 비교합니다.

자연 텍스트 반복 설정에서 사후 방법의 제거 효과가 특히 낮게 나타납니다.

![Figure 2: Study of Localization(a) We plot the unlearning-model degradation tradeoff of pruning by varying the number of dropped out neurons and demonstrate th…](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-54f066fb8bfbc06d55ad31427b6e1a32.png?thumb=512)

**Figure 2** : Study of Localization(a) We plot the unlearning-model degradation tradeoff of pruning by varying the number of dropped out neurons and demonstrate the method struggles to unlearn sequences of both kinds. (b) We plot the performance of integrated gradients and demonstrate that although it mitigates model degradation in both cases, it struggles with removing typical sequences. (c) Loss curve when training on TS-Repetition. We observe that memorization decreases alongside the validation loss, indicating that the model gains capability even as it memorizes sequences.

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

## MemSinks의 핵심 구조

MemSinks는 학습 단계에서 기억을 미리 분리해 두는 방법입니다. MLP의 은닉층 뉴런을 모든 시퀀스가 함께 쓰는 일반화 뉴런과, 시퀀스 식별자에 따라 일부만 활성화되는 기억 싱크 뉴런 풀로 나눕니다. 각 문서에는 식별자가 부여되고, 그 식별자로부터 어떤 싱크 뉴런을 드롭아웃할지 결정적으로 정해집니다. 같은 시퀀스가 반복될 때마다 같은 싱크 부분집합이 활성화되므로 기억이 그 뉴런들에 쌓입니다. 평가 때는 싱크 뉴런을 제거하여 반복 문서의 기억을 줄입니다. 이 설계는 기억 뉴런을 시퀀스마다 독점하게 만들지 않습니다. 기억 뉴런의 수보다 시퀀스가 훨씬 많으므로 여러 시퀀스가 일부 뉴런을 나눠 씁니다.

![Figure 1: Conceptual Intuition of MemSinks. For illustration, we assume that gradient of each sequence can be decomposed into a generalizing (gray) and memoriz…](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-17e92b363e25b4723d485537d1617c93.png?thumb=512)

**Figure 1** : Conceptual Intuition of MemSinks. For illustration, we assume that gradient of each sequence can be decomposed into a generalizing (gray) and memorizing component. Under standard training (shown in left) memorization can be arbitrarily distributed throughout the model. In MemSinks, on the other hand, memorization sink neurons are protected from forgetting and as a result accumulate memorization in a known subset of neurons (illustrated on the right hand side).

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

## 얽힘과 공동 적응의 이론적 근거

논문은 자연 시퀀스 기억이 얽힌 해로 학습되는 이유를 최소 노름 편향으로 설명합니다. 두 층 선형 네트워크를 직교 특징 초기화에서 그래디언트 흐름으로 학습하면 최소 노름 해로 수렴한다는 결과를 사용합니다. 이 가정 아래에서 얽힌 해는 분리된 해보다 노름이 작아 학습이 그쪽으로 기울어진다고 논증합니다. 따라서 Theorem 3.1과 Theorem D.3은 그래디언트 흐름이 분리된 해로 수렴하지 않는다는 결과입니다. 이는 이 설정의 최소 노름 편향에 대한 조건부 결과이며, 모든 학습 방식이나 모든 신경망에 대한 보편적 증명이 아닙니다. 또 강제 지역화 설정에서 기억 뉴런을 제거하더라도 일반화 뉴런이 기억 뉴런의 활성값에 적응하므로 결과가 달라질 수 있음을 Theorem 4.1이 선형 설정에서 보입니다.

MemSinks의 축적 효과는 Theorem H.3으로 형식화되며, 이는 활성화 비율과 초기화 등 정리의 가정 아래에서 성립합니다.

## 강제 지역화의 실패

분리 학습의 가장 단순한 시도는 반복 시퀀스의 그래디언트를 기억 뉴런에만 보내고 나머지 데이터는 일반화 뉴런에만 보내는 Gradient Masking입니다. 이 방법은 기억 뉴런을 제거하기 전에도 검증 성능이 표준 학습보다 낮았습니다. 이는 모든 데이터가 함께 갱신하는 공유 뉴런이 일반화에 필요하다는 해석으로 이어집니다. 기억 뉴런을 드롭아웃하면 검증 손실이 학습 진행에 따라 민감하게 변합니다. 즉 구성요소를 물리적으로 나누는 것만으로는 기억 제거가 일반화 능력을 해치지 않는다는 보장이 생기지 않습니다. 이 논문은 이 한계를 바탕으로 학습 동역학을 활용하는 쪽으로 방향을 바꿉니다.

![Figure 3: Impact of Gradient-Masked Training on Validation Performance. We compare the validation loss of gradient-masked training with (Gradient Mask-Dropout)…](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-e89ecf5ce35b70f0b2aa06e28f208a9a.png?thumb=512)

**Figure 3** : Impact of Gradient-Masked Training on Validation Performance. We compare the validation loss of gradient-masked training with (Gradient Mask-Dropout) and without (Gradient Mask- Keepall) memorization neurons removed to a standard training run (Standard: With Rep). We observe that (a) gradient-masked training learns slowly relative to standard training, achieving a significantly worse validation loss and (b) dropping out memorization neurons degrades validation performance as training progresses.

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## TinyStories 소규모 검증

소규모 실험에서는 GPT Medium 구성의 모델을 TS-Repetition 설정으로 학습합니다. 이 설정은 TinyStories에서 100개 이야기를 128회 반복한 것입니다. MemSinks는 표준 학습과 비슷한 검증 손실을 보였고, 반복 데이터를 제거한 학습보다는 낮은 검증 손실을 보였습니다. 기억 뉴런을 제거하면 반복 문서의 손실이 크게 올라갑니다. 원문은 이 증가 폭을 표준 학습이 기억하지 않은 모델 대비 약 66% 수준까지 손실이 올라간다고 보고합니다. 이 수치는 이 소규모 설정의 결과입니다. 학습 후반에는 공유 뉴런이 기억을 일부 떠안았다가 다시 줄어드는 경향도 관찰됩니다.

![Figure 4: Performance of MemSinks (a) We find that MemSinks achieves a comparable validation loss to a normally trained model on TS-Repetition, outperforming a…](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-8ecddf6b46c95404d61ade5ae965d6d3.png?thumb=512)

**Figure 4** : Performance of MemSinks (a) We find that MemSinks achieves a comparable validation loss to a normally trained model on TS-Repetition, outperforming a model trained without repeated sequences. (b) We show the loss of MemSinks on the repeated sequences, showing that it memorizes significantly less than a normally trained model. (c) We compare the sequence forgetting-model degradation tradeoff of MemSinks, relative to the post-hoc methods tested in Section 3, finding MemSinks outperforms both. We compute the model degradation for MemSinks and Standard: No Rep as the difference in the validation loss relative to a standard trained model onTS-Repetition.

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Figure 7: Learning and Forgetting Dynamics of Standard Training and MemSinks. We track the training loss on a single memorized example across the training traj…](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-4aae02bde27acf8e2bfc175d6c07cef4.png?thumb=512)

**Figure 7** : Learning and Forgetting Dynamics of Standard Training and MemSinks. We track the training loss on a single memorized example across the training trajectory for both standard training and MemSinks. We find that MemSinks experiences lower amplitude learning-forgetting cycles than standard training.

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 11쪽에서 그림 영역을 추출했습니다.

## SmolLM 대규모 검증과 적용 범위

대규모 실험은 SmolLM 360M과 1.7B 모델을 각각 1 billion과 2 billion tokens로 사전학습하며, 데이터는 SlimPajama 중심에 TinyStories 문서를 더한 혼합입니다. 이 설정에서 MemSinks는 기억 구성요소를 제외했을 때 검증 손실이 중복 제거 기준선과 비슷하거나 더 낮았고, 반복 문서의 기억은 표준 학습보다 줄었습니다. 반복 데이터가 일반화에 주는 이득을 유지하면서도 기억을 완화한 것입니다. 특히 반복 문서와 검증 문서 사이 손실 격차의 50% 이상이 줄었다고 보고됩니다. 이 결과는 360M과 1.7B 모델, 위 혼합 데이터라는 범위에서 얻은 것입니다.

![Figure 6: Larger Scale Experiments on MemSinks We plot the validation and memorization losses of (a) 360M and (b) 1.7B SmolLM-style models on a mixture of Slim…](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-aa3e114ba3dec1d8e297ba28661962ec.png?thumb=512)

**Figure 6** : Larger Scale Experiments on MemSinks We plot the validation and memorization losses of (a) 360M and (b) 1.7B SmolLM-style models on a mixture of SlimPajama and TinyStories data. We compare with standard training with and without repeated TinyStories data. Our results demonstrate that across both settings, MemSinks is able to mitigate memorization (relative to standard training) without harming validation loss (outperforming or comparable to deduplicated training).

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

![Table 4: Hyperparameters for Standard Training (360M)](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-817ab89d9328cf48f28531431789004c.png?thumb=512)

**Table 4** :Hyperparameters for Standard Training (360M)

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 23쪽에서 그림 영역을 추출했습니다.

![Table 5: Hyperparameters for Standard Training (1.7B)](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-7403630013bfd4b11721e87b712dde1a.png?thumb=512)

**Table 5** :Hyperparameters for Standard Training (1.7B)

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 24쪽에서 그림 영역을 추출했습니다.

![Table 6: Hyperparameters forMemSinks(both sizes)](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-a15499cdc5851a1b7573f9501605598a.png?thumb=512)

**Table 6** :Hyperparameters forMemSinks(both sizes)

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 24쪽에서 그림 영역을 추출했습니다.

## 활성화 비율과 시퀀스 ID 잡음

실용성 실험은 TinyStories 소규모 설정에서 진행됩니다. 기억 뉴런 활성화 비율 p는 0.3에서 가장 잘 작동하고, 0.7에서는 격리가 깨진다고 보고됩니다. 시퀀스 ID를 확률 d로 무작위 교란한 실험에서는 최대 10% 잡음까지 견디지만, 50% 잡음에서는 기억을 덜 효과적으로 격리합니다. 따라서 식별자의 일관성이 핵심 조건입니다. 현재 구현은 중복 예시를 묶는 메타데이터에 의존하므로, 이를 효율적으로 생성하는 방법은 남은 과제입니다.

![Figure 5: Practicality of MemSinks (a) We study the impact of the fraction of memorization neurons activated (p) on any given sequence. We find that the model…](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5/figures/figure-3b65d0a5a8931f57957f4236c5dfd11d.png?thumb=512)

**Figure 5** : Practicality of MemSinks (a) We study the impact of the fraction of memorization neurons activated (p) on any given sequence. We find that the model is generally robust to this choice, but activating too many can interfere in the isolation of memorization. (b) We plot the tradeoff between removing memorization and model degradation across model sizes, finding that larger models achieve a better tradeoff. (c) We study the impact sequence ID noised, where a fraction of repeated documents have an inconsistent ID. We find thatMemSinkswithstands small amounts of noise (up to 10%).

[원문](https://arxiv.org/abs/2507.09937v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan · Memorization Sinks: Isolating Memorization during LLM Training · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

## 한계와 적용 범위

대부분의 실험은 소규모이고 통제된 설정에서 수행되었습니다. 따라서 더 큰 규모에서 모델 능력이 어떻게 변하는지는 추가 검증이 필요합니다. 또한 사후 기억 제거 기준선인 가지치기와 integrated gradients는 TS-Repetition에서 제한적인 성공만 보였으며, 두 방법 모두 모델 성능 저하와의 상충을 보였습니다. 이 한계는 해당 설정과 기준선에 관한 것입니다. 이 논문은 적대적 추출에 대한 견고성을 검증하지 않았다고 명시합니다.

## 논문 정보

- **저자**: Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2025년 7월 14일
- **등록일**: 2026년 10월 30일
- **수정일**: 2025년 9월 15일
- **버전**: v2
- **arXiv**: 2507.09937
- **분류**: cs.LG · cs.AI
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

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

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

## 초록

Large language models are susceptible to memorizing repeated sequences, posing privacy and copyright concerns. A popular mitigation strategy is to remove memorized information from specific neurons post-hoc. However, such approaches have shown limited success so far. In a controlled setting, we show that the memorization of natural sequences (those that resemble linguistically plausible text) become mechanistically entangled with general language abilities, thereby becoming challenging to remove post-hoc. In this work, we put forward a new paradigm of MemSinks that promotes isolation of memorization by design. We leverage a sequence identifier that activates a unique set of memorization neurons for each sequence across repetitions. By analyzing the dynamics of learning and forgetting, we argue that MemSinks facilitates isolation of memorized content, making it easier to remove without compromising general language capabilities. We implement MemSinks at the billion-parameter and billion-token scale, and observe both effective isolation and strong generalization. To our knowledge, this is the first proof-of-concept on real data demonstrating that simultaneous generalization and isolation is achievable. We open-source our code at http://github.com/grghosal/MemSinks.

## 원문 인용

Gaurav R. Ghosal, Pratyush Maini, Aditi Raghunathan (2025). Memorization Sinks: Isolating Memorization during LLM Training. arXiv:2507.09937v2. https://arxiv.org/abs/2507.09937v2

**BibTeX**

```
@misc{ghosal2025memorization,
  title = {{Memorization Sinks: Isolating Memorization during LLM Training}},
  author = {Gaurav R. Ghosal and Pratyush Maini and Aditi Raghunathan},
  year = {2025},
  eprint = {2507.09937},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.09937v2}
}
```

## 이 논문의 용어

- [Integrated Gradients](https://refivu.com/terms/7ea02692192e-integrated-gradients)
- [gradient flow](https://refivu.com/terms/375d1f97d8a6-gradient-flow)
- [Slimpajama](https://refivu.com/terms/49417fc10791-slimpajama)
- [pruning](https://refivu.com/terms/143c3e7dde1f-pruning)
- [TinyStories](https://refivu.com/terms/f9ee43c48137-tinystories)
- [gradient masking](https://refivu.com/terms/ec5153e5264a-gradient-masking)
- [co-adaptation](https://refivu.com/terms/7456e27b38d8-co-adaptation)

## 다른 논문 해설

- [Causes and Consequences of Representational Similarity in Machine Learning Models](https://refivu.com/papers/6b0ad684-cf72-44f6-a000-907b3bc08461-causes-and-consequences-of-representational-similarity-in.md)
- [Fast Exact Unlearning for In-Context Learning Data for LLMs](https://refivu.com/papers/23aa217b-d660-453b-a2b1-84bccd08af1a-fast-exact-unlearning-for-in-context-learning-data.md)
- [Dirichlet-Prior Shaping: Guiding Expert Specialization in Upcycled MoEs](https://refivu.com/papers/3425e7f2-ce6d-4498-a701-39a88daf5fa8-dirichlet-prior-shaping-guiding-expert-specialization-in.md)
- [Rethinking Thinking Tokens: LLMs as Improvement Operators](https://refivu.com/papers/311f969a-0893-4159-8d5e-ab320c2460f2-rethinking-thinking-tokens-llms-as-improvement-operators.md)
- [NorMuon: Making Muon more efficient and scalable](https://refivu.com/papers/350de3a2-cf61-41a3-b49f-62f33c8bf1de-normuon-making-muon-more-efficient-and-scalable.md)
- [Invariance Makes LLM Unlearning Resilient Even to Unanticipated Downstream Fine-Tuning](https://refivu.com/papers/9f9c6795-22f1-4c20-8d20-e7e4cd83a65d-invariance-makes-llm-unlearning-resilient-even-to.md)
- [Causal Abstraction Inference under Lossy Representations](https://refivu.com/papers/1b02f588-6f46-499e-b0de-c27b169c7c79-causal-abstraction-inference-under-lossy-representations.md)
- [Controlled Generation with Equivariant Variational Flow Matching](https://refivu.com/papers/f7a0ae68-e9e4-4a46-a6a4-4799a6790c6f-controlled-generation-with-equivariant-variational-flow.md)
- [Fully Heteroscedastic Count Regression with Deep Double Poisson Networks](https://refivu.com/papers/f7acecd4-0bd7-415b-8bbb-2be220fcb0f7-fully-heteroscedastic-count-regression-with-deep-double.md)
- [TopInG: Topologically Interpretable Graph Learning via Persistent Rationale Filtration](https://refivu.com/papers/62e7617c-071a-4787-8fe7-3a1a838e533a-toping-topologically-interpretable-graph-learning-via.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/94b8907e-d8e1-4ea1-8a9a-e62a36d359f5-memorization-sinks-isolating-memorization-during-llm)
