HomeJournalThis post

LLM Unlearning Evaluation That Holds Up

A frontier-based unlearning evaluation protocol combining forget quality, retained utility, privacy attacks, general capability, controls, and release gates.

JP
JP Casabianca
UI/UX designer and full-stack engineer · Bogotá

A model that answers every question badly can look perfectly unlearned on a forget set. LLM unlearning evaluation must therefore compare targeted forgetting with retained utility, general capability, and privacy resistance against an oracle that never learned the target data.

The release decision is a frontier: improving one axis cannot excuse collapse or extractable memorization on another. The decision packet separates TOFU forget quality, OpenUnlearning metrics, membership inference unlearning, and retain utility collapse.

Forget, retain, and privacy frontierA triangular plot places forget quality, retained utility, and privacy resistance at three vertices. Candidate points inside the balanced central region pass; points near only one vertex fail another requirement. forget qualityretain utilityprivacy resistance
  • Balanced release region
  • Candidate checkpoint
  • Single-metric failure
Figure 1: Unlearning is a constrained frontier, not a race to lower forget-set accuracy. The triangle implies that a checkpoint near any one vertex can still fail release through retained-utility collapse or extractable memorization.

Define LLM unlearning evaluation relative to an oracle

“The model no longer answers” is not a sufficient definition. It might refuse because of a system prompt, produce random text because training destabilized, or retain the target facts in likelihoods that a different prompt can expose. Define the target data, the intended absence, the permitted residual behavior, and the threat model before selecting a method. Then choose an oracle trained on retained data without the forget subset when that control is feasible.

The TOFU paper provides fictitious author biographies and question-answer sets designed for controlled unlearning experiments. Because target facts are synthetic and split into forget and retain subsets, TOFU makes source membership and oracle construction clearer than deleting ambiguous facts from broad pretraining. It still models a benchmark condition rather than proving deletion from every production corpus, optimizer trace, cache, or derivative artifact. State that scope prominently.

Compare the unlearned candidate with the original model, retain-only oracle, and an intentionally damaged control. The original establishes learned behavior. The oracle approximates behavior when target examples were absent. The damaged control shows what generic collapse looks like. A candidate should approach oracle behavior on the forget distribution while staying near the original or oracle on retained and general tasks. This relative framing prevents a low forget score from winning merely because the checkpoint became less capable everywhere. LLM unlearning evaluation needs that comparison.

Freeze a four-checkpoint control family

Use identical model family, tokenizer, decoding, chat template, prompt construction, and evaluation code across controls. Record checkpoint hashes, training data manifests, forget and retain splits, seeds, precision, and method hyperparameters. If the oracle uses a different amount of training compute or a different base, document that limitation rather than treating it as ground truth. Evaluation is only interpretable when differences have named causes.

The OpenUnlearning paper presents a unified framework for methods, datasets, and metrics and meta-evaluates unlearning evaluation across many checkpoints. Its breadth is useful because method rankings can depend on metric choice. Use the framework to run consistent configurations, but preserve raw per-example outputs and metric versions. A framework update, judge change, or aggregation fix can otherwise make historical results incomparable.

Stratify forget examples by author or entity, memorization strength, answer length, prompt form, and training exposure when known. Split holdouts before tuning. Keep paraphrases and adversarial prefixes outside the selection set so they remain meaningful attacks. For retained data, include neighbors semantically related to the target; broad erasure often damages nearby facts before general benchmarks notice. AI agent memory that forgets on purpose addresses deletion in an application memory layer. Do not confuse removing retrieved records with altering knowledge encoded in model weights; each needs its own LLM unlearning evaluation control family.

CheckpointQuestion answeredRequired comparison
OriginalWhat was learned?Pre-unlearning baseline
UnlearnedWhat changed?Candidate under test
Retain-only oracleWhat should absence look like?Retrained control
Damaged controlCan collapse fake forgetting?Utility floor
Figure 2: The oracle and damaged control give low forget scores different meanings. The family implies that candidate-versus-original alone cannot distinguish targeted removal from a generally worse language model.

Plot forget quality against retained utility

Forget evaluation can include answer similarity, truth-ratio style comparisons, exact memorization, extraction strength, and likelihood-based measures. Retained utility can include QA on retained authors, real-world knowledge, reasoning, instruction following, and task-specific behavior. Keep metrics directional and normalized in a ledger: what higher means, valid range, aggregation, and which checkpoint supplies the reference. A dashboard that mixes “higher is better” and “lower is better” without transformation invites release mistakes.

Plot candidates across method, learning rate, steps, and checkpoint. One axis should express distance from oracle forgetting; another should express retained-utility drop from the original or appropriate control. Add general utility and privacy as constraints or additional views. Show per-example distributions and confidence intervals, not only a mean. A method that improves the average by erasing one author completely while leaving another untouched is not uniformly effective.

Use Pareto reasoning. Candidate A is dominated if candidate B is at least as close to oracle forgetting and retains at least as much utility, with no worse privacy. Do not collapse the frontier into one weighted score until stakeholders agree on weights and hard limits. Even then, retain the axes. DPO training drift checks provides a related evaluation habit: optimization targets and capability controls travel together. For LLM unlearning evaluation, the frontier makes explicit that “more forgetting” stops being progress when it moves beyond oracle behavior or destroys unrelated capability.

Attack privacy beyond visible answers

Behavioral refusal can coexist with memorization. Probe the candidate with direct questions, paraphrases, partial prefixes, role changes, few-shot demonstrations, multilingual forms, and sampling settings. Measure exact or approximate extraction when the target includes sequences. Run membership-inference signals that compare loss, compression-normalized loss, reference-model differences, gradients when the threat model permits, and token-level minima. Keep an untouched nonmember set matched for domain and difficulty.

No single membership attack proves deletion. Attack advantage depends on calibration, model access, auxiliary data, and distribution match. Report the attack, access level, threshold selection, member and nonmember construction, and uncertainty. Compare candidate advantage with both original and oracle. Approaching chance on a weak attack is not evidence against a stronger attacker; remaining above the oracle is a concrete warning within the benchmark.

The OpenUnlearning code exposes multiple benchmarks, methods, and metrics, including membership and extraction-oriented evaluations. Pin configuration and implementation revisions because metric definitions evolve. Store scores without raw confidential target text when operating on real deletion requests, and restrict artifacts according to the threat model. Confidential AI inference covers runtime protection, but a secure evaluator cannot compensate for a checkpoint that still yields target data. LLM unlearning evaluation belongs before release and must test the model behavior the deployment will actually expose.

  1. 1Freeze

    Pin model, split, prompts, seeds, and judge. Preserve an untouched holdout.

  2. 2Measure

    Run forget, retain, privacy, and general suites. Keep distributions, not one mean.

  3. 3Attack

    Probe extraction and membership signals. Include paraphrase and prefix variants.

  4. 4Gate

    Apply collapse and privacy thresholds together. Publish failures with the checkpoint.

Figure 3: Privacy attacks sit before the release decision, not in a later audit. The sequence implies that a behaviorally quiet answer is insufficient when likelihood or extraction still separates forgotten examples from holdouts.

Install a collapse guard with hard limits

A collapse guard rejects candidates that appear to forget by becoming broadly worse. Define maximum retained-utility drop, maximum general-utility drop, maximum distance from oracle forget behavior, and maximum privacy-attack advantage. Apply all limits together. A candidate at the exact boundary needs a documented inclusive or exclusive rule; floating-point rounding should not decide release. Keep thresholds fixed before final evaluation and derive them from product risk and baseline variability, not from the most attractive candidate.

Add qualitative controls for repetitive output, refusal inflation, language drift, formatting failures, and calibration. Measure loss and perplexity on retained and general corpora, but include generation tasks because likelihood stability may not preserve instruction behavior. Slice every guard by subgroup. A global five-point utility drop can hide a complete failure on one language or domain. Reject non-finite metrics and missing controls rather than interpreting them as neutral.

The artifact below encodes a deliberately small gate over normalized metrics. It compares candidate forgetting with the oracle, utility with the original, and membership advantage with a fixed ceiling. Assertions cover an acceptable checkpoint, each independent failure, exact-boundary acceptance, invalid data, and repeatability. Real programs should retain confidence intervals and per-slice gates, but a pure function is valuable: the LLM unlearning evaluation release rule can be reviewed without a training stack and rerun on every candidate summary.

Runnable artifact: The LLM unlearning evaluation collapse guard uses nine assertions to ensure successful release, distinct forget, retain, general, and privacy failures, exact-boundary behavior, range validation, and deterministic output.

Save this as llm-unlearning-release-gate.mjs and run node llm-unlearning-release-gate.mjs. Expected final line: PASS: 9 unlearning gate assertions.

import assert from "node:assert/strict";

const bounded = (value, name) => {
  if (!Number.isFinite(value) || value < 0 || value > 1) throw new RangeError(name + "_out_of_range");
  return value;
};
export function evaluateUnlearning({ original, candidate, oracle }, limits) {
  for (const [group, metrics] of Object.entries({ original, candidate, oracle })) {
    if (!metrics) throw new TypeError(group + "_missing");
    for (const [name, value] of Object.entries(metrics)) bounded(value, group + "_" + name);
  }
  const forgetGap = Math.abs(candidate.forgetRecall - oracle.forgetRecall);
  const retainDrop = original.retainUtility - candidate.retainUtility;
  const generalDrop = original.generalUtility - candidate.generalUtility;
  const privacyLeak = candidate.membershipAdvantage;
  const reasons = [];
  if (forgetGap > limits.maxForgetGap) reasons.push("forget_gap");
  if (retainDrop > limits.maxRetainDrop) reasons.push("retain_collapse");
  if (generalDrop > limits.maxGeneralDrop) reasons.push("general_collapse");
  if (privacyLeak > limits.maxMembershipAdvantage) reasons.push("privacy_leak");
  return Object.freeze({ release: reasons.length === 0, reasons: Object.freeze(reasons), forgetGap, retainDrop, generalDrop, privacyLeak });
}

const original = Object.freeze({ forgetRecall: 0.9, retainUtility: 0.82, generalUtility: 0.8, membershipAdvantage: 0.4 });
const oracle = Object.freeze({ forgetRecall: 0.1, retainUtility: 0.81, generalUtility: 0.79, membershipAdvantage: 0.04 });
const candidate = Object.freeze({ forgetRecall: 0.12, retainUtility: 0.79, generalUtility: 0.78, membershipAdvantage: 0.06 });
const limits = Object.freeze({ maxForgetGap: 0.05, maxRetainDrop: 0.05, maxGeneralDrop: 0.05, maxMembershipAdvantage: 0.1 });
let assertions = 0;
const check = (fn) => { fn(); assertions += 1; };
check(() => assert.equal(evaluateUnlearning({ original, candidate, oracle }, limits).release, true));
check(() => assert.deepEqual(evaluateUnlearning({ original, candidate, oracle }, limits).reasons, []));
check(() => assert.deepEqual(evaluateUnlearning({ original, candidate: { ...candidate, forgetRecall: 0.3 }, oracle }, limits).reasons, ["forget_gap"]));
check(() => assert.deepEqual(evaluateUnlearning({ original, candidate: { ...candidate, retainUtility: 0.5 }, oracle }, limits).reasons, ["retain_collapse"]));
check(() => assert.deepEqual(evaluateUnlearning({ original, candidate: { ...candidate, generalUtility: 0.5 }, oracle }, limits).reasons, ["general_collapse"]));
check(() => assert.deepEqual(evaluateUnlearning({ original, candidate: { ...candidate, membershipAdvantage: 0.2 }, oracle }, limits).reasons, ["privacy_leak"]));
check(() => assert.equal(evaluateUnlearning({ original, candidate: { ...candidate, forgetRecall: 0.15 }, oracle }, limits).release, true));
check(() => assert.throws(() => evaluateUnlearning({ original, candidate: { ...candidate, membershipAdvantage: -1 }, oracle }, limits), /out_of_range/));
check(() => assert.deepEqual(evaluateUnlearning({ original, candidate, oracle }, limits), evaluateUnlearning({ original, candidate, oracle }, limits)));
assert.equal(assertions, 9);
console.log("PASS: 9 unlearning gate assertions");

Separate method selection from final evaluation

Unlearning methods often expose learning rate, step count, loss composition, retain sampling, and checkpoint selection. Tune those variables on a development partition with a predeclared objective and collapse constraints. Do not repeatedly inspect the final forget set or privacy attacks while tuning; the method can overfit the evaluator just like any other model. Freeze the candidate, then run the untouched protocol once or under a documented limited retry policy.

Repeat across seeds because unlearning updates can be unstable. Preserve candidate trajectories rather than only the chosen endpoint; sudden forget improvement accompanied by retain collapse is evidence about the mechanism. Compare with simple baselines such as additional retain training, gradient ascent, or preference-based variants available in the selected framework. Resource cost matters too: record accelerators, elapsed time, peak memory, and storage so an apparently better frontier point can be reproduced and budgeted.

Keep judges independent of target leakage. If an LLM judge might know the synthetic or real target, explain how that affects scoring and pair it with deterministic metrics or blinded human review. Version prompts, parsing, and aggregation. The final packet should include data manifests, control hashes, method configuration, raw metric records, frontier plots, attack settings, collapse decision, and known gaps. Canary evaluations for AI releases then carries the frozen LLM unlearning evaluation gate into limited deployment without reopening method selection on live anecdotes.

State what the evaluation cannot prove

Benchmark success does not prove that target information vanished from every internal representation, optimizer checkpoint, backup, log, embedding index, distillation descendant, or external cache. It does not establish legal compliance by itself. It does not predict attacks outside the tested access and distribution. It shows that a named candidate, under a named protocol, approached a named oracle while satisfying utility and privacy limits. That narrower claim is still valuable because it is testable.

For real deletion workflows, pair model evaluation with data lineage and artifact governance. Inventory training snapshots, adapters, quantized copies, serving caches, retrieval stores, evaluation outputs, and downstream models. Decide whether retraining, access restriction, or system-layer deletion is required in addition to weight editing. Keep evidence that links the request to every affected artifact and separates completed actions from residual risk.

LLM unlearning evaluation is ready when forgetting cannot win by collapse, refusal cannot masquerade as privacy, and one aggregate cannot hide a failed subgroup. The oracle anchors intended absence; the original anchors preserved utility; attacks probe residual memorization; the damaged control exposes generic degradation; and the hard gate makes trade-offs explicit. Publish the frontier and limitations together. That creates a defensible release decision without pretending a benchmark can certify metaphysical erasure.