LLM Unlearning Without an Expert Curated Dataset

Xiaoyuan Zhu, Muru Zhang, Ollie Liu, Robin Jia, Willie Neiswanger
8/8/2025
cs.CLcs.AIcs.LG

Official code: xyzhu123/Synthetic_Textbook (5 stars, last commit 2025-10-13).

Abstract

Modern large language models often encode sensitive, harmful, or copyrighted knowledge, raising the need for post-hoc unlearning-the ability to remove specific domains of knowledge from a model without full retraining. A major bottleneck in current unlearning pipelines is constructing effective forget sets-datasets that approximate the target domain and guide the model to forget it. In this work, we introduce a scalable, automated approach to generate high-quality forget sets using language models themselves. Our method synthesizes textbook-style data through a structured prompting pipeline, requiring only a domain name as input. Through experiments on unlearning biosecurity, cybersecurity, and Harry Potter novels, we show that our synthetic datasets consistently outperform the baseline synthetic alternatives and are comparable to the expert-curated ones. Additionally, ablation studies reveal that the multi-step generation pipeline significantly boosts data diversity, which in turn improves unlearning utility. Overall, our findings suggest that synthetic datasets offer a promising path toward practical, scalable unlearning for a wide range of emerging domains without the need for manual intervention. We release our code and dataset at https://github.com/xyzhu123/Synthetic_Textbook.

View on arXivView PDF

Code Implementations(1)

51PythonOct 9, 20251 years ago

Similar Papers

Cite this paper

@article{zhu2025unlearning,
  title  = {LLM Unlearning Without an Expert Curated Dataset},
  author = {Xiaoyuan Zhu and Muru Zhang and Ollie Liu and Robin Jia and Willie Neiswanger},
  year   = {2025},
  eprint = {2508.06595},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.06595v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.06595.svg)](https://codeofpaper.com/paper/2508.06595)

Discussion