AI safety "whack-a-mole": Study finds fine-tuning allows LLM to "recite" copyrighted books verbatim
A Stony Brook University research team published a paper, "Alignment Whack-a-Mole," revealing a disturbing finding: After fine-tuning a large language model, the model "recalled" the content of copyrighted books in the training data with verbatim accuracy. The study conducted experiments using mainstream models such as GPT-4o, Gemini and DeepSeek, and found that fine-tuning significantly activated the model's verbatim memory ability.
Core conclusion
The paper "Alignment Whack-a-Mole: Finetuning Activates Verbatim Recall of Copyrighted Books in Large Language Models" published by the Stony Brook University research team in March 2026 revealed a critical security gap: Fine-tuning a large language model will systematically activate its verbatim memory ability for copyrighted books in the training data.
Key Points
- Event time: March 2026 (the paper was published on arxiv, and the code has been open source)
- Research objects: GPT-4o, Gemini, DeepSeek and other mainstream LLMs
- Core finding: After fine-tuning, the model can achieve word-for-word accurate retelling of 300-500-word book paragraphs.
- Scope of impact: Involving AI copyright litigation, model security alignment, and compliance audits
Background and trigger events
This paper received 124 likes and 86 discussions on Hacker News that day, arousing widespread attention in the AI security community. The research team comes from Xinyue Liu (cauchy221) of Stony Brook University. They systematically verified an issue that the industry has been worried about but lacks experimental proof: whether the "protection" of copyright-protected content by model security alignment is really reliable.
The research selected several copyrighted novels, including Cormac McCarthy's "The Road," and verified them through the following 3-step process:
- Convert EPUB format books to plain text
- Automatically divide 300-500 words into paragraphs, and use GPT-4o to generate a plot summary for each paragraph
- Construct fine-tuning instructions for these paragraphs. The format is: write a paragraph of {N} words, imitating the style of {author}. The content summary is as follows:
Models such as GPT-4o, Gemini, and DeepSeek were then fine-tuned and sampled 100 times for each paragraph at temperature=1.0 to evaluate verbatim memory rates.
Key Impact (by Dimension)
| Dimensions | Changes | What it means for practitioners | Recommended actions |
|---|---|---|---|
| Copyright risk | Fine-tuning will activate verbatim memory, and the model may "recite" protected content | The fine-tuned model may generate copyrighted materials, increasing legal risks | Fine-tuning data sets must be copyright cleaned; generate sentence-by-sentence checks for similarity |
| Safe alignment | Existing alignment technology cannot prevent memory activation after fine-tuning | Security measures have "whack-a-mole" flaws - fix one place and another pops up | Check the model output after fine-tuning and establish a content similarity alarm mechanism |
| Model auditing | Unable to predict which memories will be activated by fine-tuning | Compliance auditing becomes extremely complex | Adding a memory evaluation process to the CI pipeline |
| Open source model | Anyone can download and fine-tune the open source model, with a wider risk profile | Supervision becomes more difficult | Model publishers need to provide a memory evaluation report |
Adaptation suggestions
Actionable advice for AI practitioners:
- Add a copyright evaluation step to the fine-tuning pipeline: The study provides a complete evaluation code (github.com/cauchy221/Alignment-Whack-a-Mole-Code), which can be directly integrated into the CI process to run similarity checks before and after fine-tuning
- Dataset source traceability: If the data set contains text fragments with unpublished content (such as books, papers), consider filtering item by item or using a deduplication algorithm
- Output layer detection: In the API or self-hosted inference layer, add n-gram similarity detection to intercept the generation that highly matches the known copyright text
- Follow legal developments: Multiple AI copyright lawsuits are currently pending (such as The New York Times v. OpenAI), and this research may become part of the legal evidence
Task List
- Add GPU memory evaluation to the fine-tuning pipeline (evaluation scripts provided by the study)
- Run a retrospective evaluation of an existing fine-tuned model
- Establish a data set content traceability system
Example: Research Code
The evaluation command open sourced by the research team:
#
uv venv --python 3.11
source .venv/bin/activate
uv pip install html2text natsort ftfy openai tqdm nltk numpy
# EPUB →
python preprocess/epub2txt.py book.epub book.txt --plain-text --no-metadata --ftfy
python preprocess/split.py book.txt book_chunks.json "Book Title" "Author Name"
#
python finetuning/gpt_finetune.py --author_name "Cormac McCarthy" --raw_train_file data/example_book.json --job_name mccarthy --no_wait
#
python evaluation/evaluate_memorization.py --model gpt-4o --book The_RoadOpenAI、GPT-4o、Gemini、DeepSeek、Claude
Internal link guidance
- Want to learn about AI Agent fine-tuning and security practices? Watch: How to automate content production with Claude Code: Claude Code automated writing practice: build an AI content production pipeline in 30 minutes
- Real case: Independent developers use AI Agent to achieve zero-code entrepreneurship: 18-Year-Old Built a $5,000/mo SaaS With AI Agents — Zero Hand-Written Code
Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
n8n + OpenAI affiliate site
Automate content and affiliate monetization
Claude + n8n automation agency
Charge monthly for agent workflow builds