TL;DR
When you fine-tune a language model on rich, long-form text like books, you want it to absorb domain knowledge and linguistic fluency—not turn into a photocopier that regurgitates copyrighted passages word-for-word. This paper introduces Energy-Gated Copyright Regularization (EGCR), a training objective that places selective "speed bumps" on distinctive token sequences when the model starts memorizing them, while leaving normal learning untouched. The result is a model that learns the facts and style of a corpus without creating easily extractable verbatim pathways.
What Problem Does This Paper Address?
Fine-tuning LLMs on curated documents (books, manuals, code) is a double-edged sword. Standard maximum likelihood training improves domain adaptation by making observed text sequences more probable—or, in physics-inspired terms, lowering their "energy." Unfortunately, lowering the energy of every token in a copyrighted book carves a deep valley into the model's probability landscape: feed the model a short prefix, and it slides right down that valley, reproducing the exact protected text.
Existing fixes are often too blunt. Dropping random target tokens during training (like Goldfish Loss) hurts fluency and factual learning, while post-hoc unlearning is brittle and degrades general utility. The core challenge is entanglement: how do you let a model learn generalizable facts and grammar from protected text while selectively blocking the sequential, verbatim copying routes created during adaptation?
Methods
The authors reframe verbatim memorization through relative energy gain ($\delta_t$). Instead of looking at whether a token is probable in absolute terms (common words and public facts should be easy to predict), they compare the fine-tuned model ($p_\theta$) against a frozen pre-adaptation "anchor" model ($p_0$). Specifically, $\delta_t = \log p_\theta(x_t \mid x_{<t}) - \log p_0(x_t \mid x_{<t})$ measures how much easier an exact token became strictly due to the fine-tuning update.
Building on this, they introduce Energy-Gated Copyright Regularization (EGCR). EGCR keeps standard next-token supervision on all tokens, adding a penalty only when $\delta_t$ exceeds a tolerated margin $\tau$. Crucially, this penalty is controlled by a detached dual gate ($g_t = r_t \cdot u_t$) that acts like an AND-gate for memorization risk:
- Local Persistence Gate ($r_t$): Smooths $\delta_t$ over a sliding window of $K$ recent tokens. Because extraction is a sequential event, an isolated probability spike is fine, whereas a sustained run of gains signals a forming copying path.
- Anchor-Surprisal Gate ($u_t$): Checks how surprising the token was to the frozen anchor model $p_0$. Boilerplate syntax gets ignored; rare, distinctive words get flagged.
When a token is both distinctive and part of a sustained probability surge, the gate opens and pushes back against further likelihood increases. Everywhere else, standard fine-tuning proceeds normally.
Datasets
No new datasets are introduced; the authors use established benchmarks under a rigorous 30-epoch adaptation stress test:
- BookMIA: A corpus of literary passages designated as protected for LoRA fine-tuning and in-corpus prefix extraction attacks, plus generation quality checks (via MAUVE).
- WikiText-2: Used as a held-out benchmark to measure whether the adapted model retains general language-modeling fluency (via perplexity).
- CopyBench: Used to disentangle literal text reproduction from actual book comprehension (via the Literal Copying and Fact Recall QA subsets).
Key Insights and Ideas
- Absolute probability isn't a copyright signal; relative change is: Penalizing high-probability tokens wrecks grammar. Measuring likelihood ratios against the pre-adapted model cleanly isolates update-induced copying pressure from ordinary linguistic predictability.
- Both halves of the dual gate are essential: Ablations show that penalizing persistence alone ruins general perplexity (323.33 vs. 15.70 with the dual gate), while penalizing surprisal alone misses sequential chains and lets more copying slip through.
- Surgical, interpretable intervention: Token-level visualizations on Tess of the d'Urbervilles show that EGCR leaves most text unpenalized, firing specifically on expressive anchors like character names ("Mrs Durbeyfield") and stylistic phrasing ("ash-pale") that pin down exact literary continuations.
Key Results
Evaluated across Llama3-8B, Llama3.2-3B, Qwen3-4B, and Qwen3-8B, EGCR consistently breaks the usual memorization–utility tradeoff:
- Curbing Reproduction & Preserving Fluency: Under extreme 30-epoch training on Llama3-8B, standard LoRA-SFT memorizes heavily (0.93 ROUGE-L) and overfits catastrophically, blowing up held-out WikiText-2 perplexity to 136.39. EGCR slashes ROUGE-L to 0.26 while keeping perplexity remarkably stable at 15.70 (compared to 143.70 for Goldfish Loss and 93.36 for Copyright Regression).
- Stopping Exact Extraction: In prefix-extraction attacks on Llama3-8B (EM@10 through EM@50), standard SFT exact-match rates skyrocket above 80% by Epoch 30, whereas EGCR keeps exact extraction flat near zero across all sequence lengths.
- Retaining Knowledge Without Copying: On CopyBench, EGCR keeps literal copying rates down near the unadapted base model while achieving the highest late-epoch factual QA F1 scores (~0.20–0.21) among adapted methods—proving the model absorbs the story without memorizing the prose.
Limitations and Future Work
- Post-anchor scope only: EGCR only regulates probability gains after the chosen anchor checkpoint; if the base model already memorized a book during pretraining, EGCR won't unlearn it.
- Literal vs. non-literal similarity: Because it targets exact token sequences, it does not directly prevent paraphrasing, style imitation, or plot reuse, nor is it a legal compliance certificate (and could potentially be misused to hide evidence of unauthorized training).
- Empirical scope: Experiments focus on English fiction, models up to 8B parameters, and exact prefix prompts rather than adversarial or multi-turn extraction attacks.
- Future directions: Beyond sharpening gate interpretability, the authors note that EGCR's ability to prevent perplexity blow-up over 30 epochs hints at a broader use case: continual learning, where relative-energy barriers could help models absorb new domain knowledge without catastrophic forgetting.
Summary updated