Robust Concept Unlearning in Diffusion Models via Directional Stability Regularization

Bo-Han Lai, Hsuan-Tien Lin, Chia-Mu Yu, Han Zhao, Shang-Tse ChenNeurIPS 2026

TL;DR

Teaching a diffusion model to "forget" a concept—like nudity or a copyrighted art style—often leaves it like a ball balanced on a ridge: fine on its own, until a tiny adversarial nudge sends it rolling right back into forbidden territory. This paper reveals that diverse jailbreak attacks all work by exploiting local instabilities along the image-generation trajectory, and introduces a lightweight, plug-in regularizer that flattens this amplification without slow adversarial training.

What Problem Does This Paper Address?

Training text-to-image diffusion models on massive web scrapes inevitably bakes in things we’d rather they didn’t generate—unsafe imagery, private faces, or copyrighted styles. Retraining from scratch on scrubbed data costs a fortune, so researchers turn to post-hoc concept unlearning: tweaking the model's weights to erase specific concepts while keeping everything else intact.

Here is the catch: most unlearned models are surprisingly fragile. While they pass standard tests on normal prompts, clever attackers can easily resurrect the "erased" concepts using weird adversarial text prompts, optimized text embeddings, or tiny noise injections mid-generation. Existing defenses try to patch this via cat-and-mouse adversarial training, hunting down bad prompts or embeddings in expensive inner loops. What has been missing is a fundamental, mechanistic explanation of why erased concepts resurge so easily—and what exact mathematical property of the model needs fixing to stop it across the board.

Methods

Think of diffusion image generation as a deterministic journey—mathematically governed by a Probability-Flow Ordinary Differential Equation (PF-ODE)—that transports pure random noise to a finished image along a smooth trajectory. Standard unlearning methods bend this path away from the target concept, but they don't stabilize the surrounding terrain.

Schematic illustration of how perturbations redirect standard unlearning trajectories back to the erased concept, whereas DSR keeps the perturbed trajectory stable.

The authors analyze what happens when an attacker gives the trajectory a tiny shove toward the erased concept. Whether that shove comes from a sneaky prompt or latent noise, it survives and ruins the final output if the model's local velocity field amplifies perturbations along that direction. Using dynamical systems theory, the authors bound this amplification using a directional Rayleigh quotient of the symmetric score Jacobian—essentially measuring the local "expansion rate" specifically along the concept's direction.

From this theory, they build Directional Stability Regularization (DSR), a plug-in loss term paired with standard score-based erasure (specifically an anchor-based variant of ESD) and unconditional preservation:

  • Frozen Compass: DSR defines the "forbidden direction" using the frozen original model, ensuring a steady semantic reference even as the unlearned model forgets.
  • One-Sided Penalty: It only penalizes positive expansion (amplification) along the target concept direction, leaving contraction and unrelated directions untouched to preserve general image quality.
  • No Inner Loops: Instead of building massive Jacobian matrices or running adversarial searches, DSR computes its penalty cheaply using Jacobian-vector products (JVPs), adding zero overhead at inference time.

Datasets

Following the Diffusion-MU-Attack benchmark on Stable Diffusion v1.4, the authors evaluate erasure across four concept families—nudity, artistic style (Van Gogh), objects, and cartoon characters (Pikachu, Snoopy)—using:

  • I2P Benchmark: Used to test unsafe nudity erasure.
  • Imagenette subset & Diffusion-MU-Attack prompt sets: Used for object categories (e.g., tench, parachute) and style erasure.
  • MS-COCO (30k captions) & TIFA v1.0: Used to verify general image quality (FID), text alignment (CLIP), and fine-grained visual question-answering utility.

No new datasets are introduced in the paper.

Key Insights and Ideas

  • Unified View of Jailbreaks: Prompt attacks, embedding inversions, and latent noise injections look completely different at the surface interface, yet they share a single underlying mechanism: nudging the sampling trajectory along concept-relevant directions where the unlearned dynamics amplify small errors.
  • Endpoint Erasure $\neq$ Trajectory Stability: Making a model output a safe image on a clean prompt only changes where the nominal path lands; it says nothing about how wildly nearby perturbed paths diverge. True robustness requires taming local trajectory expansion.
  • Surgical over Global Sharpness: Penalizing expansion in all directions (global sharpness) is overly conservative and hurts general utility. Targeting only the specific concept direction stops concept-aligned attacks without collateral damage to unrelated concepts.

Key Results

DSR consistently boosts resistance across white-box prompt search (UD), black-box prompt bypasses (RAB), embedding inversion (CCE), and trajectory noising probes, while running much faster than adversarial-training baselines:

  • Nudity Erasure: DSR achieves the lowest Attack Success Rate (ASR) on UD-Post (0.17, beating the best robust baseline AdvUnlearn at 0.22) and drives black-box RAB attacks down to 0.00 ASR across all prompt lengths. On CCE, it places second (0.47 vs. 0.70–0.85 for other general methods), trailing only STEREO (0.04), which explicitly trains against embedding inversion.
  • Object Erasure: DSR achieves top marks on embedding and trajectory-noise attacks—dropping CCE ASR to 0.01 on tench and 0.06 on parachute (compared to AdvUnlearn's 0.62 and 0.98), and hitting 0.00 and 0.02 ASR on noising probes.
  • Speed & Utility: Training DSR takes just 18 minutes on a single GPU—a fraction of the time needed for robust baselines like STEREO (1.6 hours), TRCE (3.1 hours), or AdvUnlearn (1.2 days)—while maintaining competitive MS-COCO CLIP scores (30.28) and TIFA accuracy (0.69). Qualitative PCA visualizations confirm that DSR trajectories stay tightly bundled even when strong target-concept guidance is blended in.

Limitations and Future Work

The authors note three primary caveats:

  • Local, First-Order Scope: Because the mathematical guarantees rely on linearizing around the clean sampling trajectory, the bounds hold best for small perturbations and lose precision under massive, trajectory-derailing shifts.
  • Directional Specificity: DSR polices expansion along the base model's target-concept probe, meaning orthogonal or roundabout adversarial directions aren't directly penalized (save for theoretical bounds on how fast perturbations rotate).
  • Distributional vs. Semantic Guarantees: Bounding the Wasserstein-2 shift in latent space keeps perturbed outputs close to the unperturbed unlearned distribution, which doesn't strictly prove that a visually similar concept cannot emerge through an entirely separate basin of attraction. Future directions are not explicitly discussed in the main text.

Summary updated

Abstract

Post-hoc concept unlearning is a practical approach to remove undesired content from text-to-image diffusion models. However, existing methods leave unlearned models fragile: small perturbations to prompts, text embeddings, or sampling-time latent states can recover supposedly erased content, even when standard endpoint metrics suggest successful erasure under nominal prompts. We study this fragility through the stability of the sampling trajectory of diffusion models. Our key observation is that prompt-, embedding-, and sampling-based attacks share a similar mechanism of perturbing the sampling dynamics, and these concepts can reappear when the unlearned model amplifies these concept-relevant perturbations. We formalize this view with a finite-time stability analysis and derive a tractable directional sharpness measure along a concept-relevant direction. Motivated by this analysis, we propose Directional Stability Regularization (DSR), a plug-in regularizer that discourages expansion in target-concept directions without directly penalizing unrelated directions. DSR is compatible with classical score-based erasure objectives, requires no adversarial training or attack-specific inner loop, adds no inference-time overhead, and can be estimated efficiently with Jacobian-vector products. Across the evaluated erasure settings, DSR reduces recovery under prompt-, embedding-, and sampling-based attacks while largely preserving prompt alignment and image quality metrics.
BibTeX
@inproceedings{lai2026robust,
  author = {Bo-Han Lai and Hsuan-Tien Lin and Chia-Mu Yu and Han Zhao and Shang-Tse Chen},
  title = {{Robust Concept Unlearning in Diffusion Models via Directional Stability Regularization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=zZK5DA5niu},
}
Figure