Abstract
Recent copyright agreements between AI companies and content creators have highlighted the need for precise control over language models' ability to reproduce copyrighted content. While existing approaches rely on either complete concept removal through unlearning or simple output filtering, we propose Obliviate, a novel post-training technique that selectively prevents verbatim reproduction of specific text while preserving semantic understanding. Obliviate operates by selecting tokens within memorized sequences and modifying the model's probability distribution to prevent exact reproduction while maintaining contextual understanding. We evaluate Obliviate on multiple large language models (LLaMA-3.1 8B, LLaMA-3.1-instruct 8B, Qwen-2.5-7B, and Yi-1.5 6B) across both synthetic memorization tasks and organic copyright content. Our results demonstrate that Obliviate achieves orders of magnitude reduction, e.g., 100x, in verbatim memorization while maintaining model performance within 1% of baseline on standard benchmarks (HellaSwag, MMLU, TruthfulQA, and Winogrande).
Introduction
Large Language Models (LLMs) are prone to memorizing significant portions of their training data, which can lead to the verbatim reproduction of copyrighted works or sensitive information when prompted. Current mitigation strategies generally fall into two categories: aggressive unlearning, which often degrades the model's general reasoning or factual knowledge (e.g., losing the concept of a book entirely), and inference-time filtering, which is computationally expensive and susceptible to adversarial bypass.
Obliviate offers a surgical alternative. It focuses on disrupting the expression of copyrighted material (verbatim memorization) rather than the underlying concepts (semantic memorization). This approach allows models to retain their utility and knowledge while strictly adhering to copyright protections.
Methodology
Obliviate is a lightweight post-training "patching" method. It identifies specific target tokens within a memorized sequence and modifies the model's weights to suppress these tokens while preserving the rest of the distribution.
Token Selection and Suppression
The method employs a Fixed-Stride Token Selection strategy. Instead of modifying every token, it uses a sliding window (typically with a stride of 4) to select specific "anchor" tokens for suppression. This breaks the chain of verbatim recall while minimizing the impact on the model's overall fluency.
The core of the optimization is a dual-component Forget Loss ($L_{forget}$):
- Distribution Loss ($L_{dist}$): This component removes the target token from the top-10 predictions. It uses KL-divergence to ensure the remaining probability distribution matches the original as closely as possible, maintaining the model's "natural" word choice for non-suppressed tokens.
- Probability Loss ($L_{prob}$): This aggressively drives the probability of the forbidden target token toward zero.
To maintain general capabilities, a Maintain Loss ($L_{maintain}$) is applied to all non-target tokens in the sequence, ensuring their original probability distributions remain unchanged. Additionally, candidate replacement tokens are filtered to match the original's casing and formatting, preventing ungrammatical artifacts.
Experimental Evaluation
The researchers evaluated Obliviate across several models, including LLaMA-3.1, Qwen-2.5, and Yi-1.5. The evaluation used three primary datasets:
- Synthetic Data: 100 custom articles intentionally over-fitted to simulate deep memorization.
- Organic Data: Real-world copyrighted excerpts (e.g., Moby Dick, Harry Potter) naturally memorized during pre-training.
- Utility Benchmarks: Standard evaluations like MMLU, TruthfulQA, HellaSwag, and Winogrande to measure general intelligence preservation.
Results and Discussion
Obliviate achieves a dramatic reduction in verbatim recall. For instance, in the Qwen-2.5-7B model, the Longest Common Substring (LCS) of generated text was reduced from 412 words to just 4-5 words.
Crucially, this "unmemorization" comes with negligible cost to general performance. Across all tested models, the drop in accuracy on standard benchmarks was consistently under 1%. This suggests that the model's reasoning capabilities are decoupled from its ability to recite specific training sequences verbatim.
Key Insights
- Expression vs. Idea: By targeting verbatim strings rather than semantic concepts, Obliviate satisfies copyright requirements without "lobotomizing" the model's knowledge base.
- Efficiency: The method does not require a large "retain set" of general data during fine-tuning, as the KL-divergence against the original distribution acts as an implicit regularizer.
Conclusion
Obliviate provides a practical, efficient solution for companies needing to address copyright concerns in deployed LLMs. While it effectively stops routine verbatim infringement, future work is needed to address potential adversarial extraction methods that might bypass these surgical patches through indirect probing.
Summary updated