Direct Token Optimization: A Self-Contained Approach to Large Language Model Unlearning

Hong Kyu Lee, Ruixuan Liu, Li Xiong

TL;DR

Direct Token Optimization (DTO) is a new, self-contained framework for large language model (LLM) unlearning that eliminates the need for external resources like auxiliary models or retain datasets. By identifying and selectively suppressing specific "target tokens" that trigger memorized facts, DTO achieves up to a 16.8× improvement in forget quality over existing baselines while preserving the model's core linguistic utility.

What Problem Does This Paper Address?

As large language models are trained on massive datasets, they frequently memorize sensitive, copyrighted, or harmful information. "Machine unlearning" aims to erase this specific knowledge without the massive computational expense of retraining the model from scratch.

However, existing LLM unlearning methods have a major catch: they usually depend on external resources. Some require a "retain dataset" (the original training data minus the data to be forgotten) to maintain model performance, which violates privacy regulations like GDPR that mandate data deletion. Others rely on auxiliary models or commercial APIs (like GPT-4) to generate alternative text, introducing high computational costs and further privacy risks.

The authors address this gap by proposing a truly self-contained unlearning approach that operates solely using the original model and the target "forget set."

An example of finetuned LLM unlearning comparing the original, retrained, and DTO-unlearned models.

Methods

DTO introduces a token-level optimization strategy based on a key insight: not all tokens in a sequence contribute equally to memorized knowledge. The framework operates in two main phases:

  1. Delta-Score Token Selection: Inspired by studies on how LLMs memorize text, the authors split an unlearning sequence into a prefix and a suffix. They perturb individual tokens in the prefix and measure how much the Negative Log-Likelihood (NLL) of the suffix changes. Tokens that cause a massive spike in NLL when altered are deemed target tokens—the critical semantic triggers for the memorized knowledge. The remaining tokens are classified as non-target tokens, which represent general linguistic structure.
  2. Dual-Objective Optimization:
  3. Unlearning: The model undergoes gradient ascent on the target tokens, reducing the probability that the model will generate the specific memorized facts.
  4. Utility Preservation: To keep the model fluent, DTO minimizes the KL-divergence between the logits of the updated model and the original model on the non-target tokens.

To prevent these two objectives from interfering with each other, the authors employ Gradient Orthogonalization, projecting the unlearning gradient so it doesn't conflict with the utility preservation gradient.

Datasets

The authors evaluated DTO on two prominent LLM unlearning benchmarks:

  • TOFU (Task of Fictitious Unlearning): A dataset consisting of 4,000 synthetic author profiles and question-answer pairs, used to evaluate unlearning performance at 1%, 5%, and 10% forget fractions.
  • MUSE (Machine Unlearning Six-Way Evaluation): Specifically, the MUSE-book subset (Chapter 2 of the Harry Potter series), which assesses verbatim memorization, knowledge retention, and privacy leakage via membership inference attacks.

Key Insights and Ideas

  • Prefix Triggers Drive Memorization: Rather than treating an entire sequence uniformly, DTO leverages the fact that specific "anchor" words (like unique names or locations) act as triggers for memorized data. Suppressing these specific tokens is highly effective for forgetting.
  • Separating Syntax from Semantics: Common words have low loss because they appear everywhere, but perturbing them doesn't change the meaning of a specific fact. The Delta-score successfully separates these linguistically necessary tokens from the actual semantic triggers, protecting the model from losing its basic language capabilities.
  • Independence is Practical: DTO proves that an unlearning algorithm can achieve state-of-the-art results without needing a clean "retain set" or calling external APIs, making it highly viable for strict privacy-compliant deployments.

Key Results

The authors tested DTO against several baselines, including Direct Preference Optimization (DPO) and FLAT, using Llama-2-7B and Llama 3.2-1B models:

  • Forget Quality Leap: On the TOFU 1% dataset with Llama-2-7B, DTO (without KL) achieved a forget quality score of 0.9188 (where 1.0 is the gold-standard retrained model). In comparison, the state-of-the-art baseline, FLAT, scored below 0.055.
  • Verbatim Erasure: On the MUSE benchmark, DTO drastically reduced verbatim memorization (VerbMem on $D_u$ dropped from 99.70% to 19.30% in the w/o KL variant), outperforming standard preference optimization methods.
  • Utility Tradeoff: While DTO experiences a slight drop in general model utility compared to resource-heavy baselines, it maintains a highly comparable level of fluency while providing vastly superior forgetting guarantees.

Limitations and Future Work

While DTO excels on smaller forget sets (1% and 5%), scaling up to larger forget sets presents a challenge. On the TOFU 10% dataset, the forget quality for all self-contained methods—including DTO—dropped below the successful unlearning threshold of 0.05. This indicates that when a large fraction of a model's fine-tuned knowledge must be erased, doing so cleanly without a retain dataset remains an open problem.

For future work, the authors plan to explore integrating preference optimization techniques to further improve the utility-forgetting tradeoff and refine the delta-score metric.

Summary updated

BibTeX
@inproceedings{lee2026direct,
  author = {Hong Kyu Lee and Ruixuan Liu and Li Xiong},
  title = {{Direct Token Optimization: A Self-Contained Approach to Large Language Model Unlearning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.2088},
}
Figure