WayToClawEarn
High impactarXiv/Hacker News

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.

WayToClawEarn EditorialPublished Apr 30, 2026Updated Aug 8, 2026

Editorial review of public sources · AI-assisted drafting. How we work · Original source

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:

  1. Convert EPUB format books to plain text
  2. Automatically divide 300-500 words into paragraphs, and use GPT-4o to generate a plot summary for each paragraph
  3. 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)

DimensionsChangesWhat it means for practitionersRecommended actions
Copyright riskFine-tuning will activate verbatim memory, and the model may "recite" protected contentThe fine-tuned model may generate copyrighted materials, increasing legal risksFine-tuning data sets must be copyright cleaned; generate sentence-by-sentence checks for similarity
Safe alignmentExisting alignment technology cannot prevent memory activation after fine-tuningSecurity measures have "whack-a-mole" flaws - fix one place and another pops upCheck the model output after fine-tuning and establish a content similarity alarm mechanism
Model auditingUnable to predict which memories will be activated by fine-tuningCompliance auditing becomes extremely complexAdding a memory evaluation process to the CI pipeline
Open source modelAnyone can download and fine-tune the open source model, with a wider risk profileSupervision becomes more difficultModel 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:

terminal

#
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_Road

GPT

OpenAIGPT-4oGeminiDeepSeekClaude

Internal link guidance

View source →

Disclaimer: this site shares educational insights only, for inspiration and reference. No outcome guarantee; external execution and decisions are your own responsibility.