Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Models

Yimeng Zhang, Xin Chen, Jinghan Jia, Yihua Zhang, Chongyu Fan, Jiancheng Liu, Mingyi Hong, Ke Ding, Sijia Liu

arXiv:2405.15234 · 2026-07-27 공개 · arXiv · PDF

diffusion-models image-generation adversarial-training text-encoder concept-erasure model-utility robust-unlearning utility-retaining

Abstract

Diffusion models (DMs) have achieved remarkable success in text-to-image generation, but they also pose safety risks, such as the potential generation of harmful content and copyright violations. The techniques of machine unlearning, also known as concept erasing, have been developed to address these risks. However, these techniques remain vulnerable to adversarial prompt attacks, which can prompt DMs post-unlearning to regenerate undesired images containing concepts (such as nudity) meant to be erased. This work aims to enhance the robustness of concept erasing by integrating the principle of adversarial training (AT) into machine unlearning, resulting in the robust unlearning framework referred to as AdvUnlearn. However, achieving this effectively and efficiently is highly nontrivial. First, we find that a straightforward implementation of AT compromises DMs' image generation quality post-unlearning. To address this, we develop a utility-retaining regularization on an additional retain set, optimizing the trade-off between concept erasure robustness and model utility in AdvUnlearn. Moreover, we identify the text encoder as a more suitable module for robustification compared to UNet, ensuring unlearning effectiveness. And the acquired text encoder can serve as a plug-and-play robust unlearner for various DM types. Empirically, we perform extensive experiments to demonstrate the robustness advantage of AdvUnlearn across various DM unlearning scenarios, including the erasure of nudity, objects, and style concepts. In addition to robustness, AdvUnlearn also achieves a balanced tradeoff with model utility. To our knowledge, this is the first work to systematically explore robust DM unlearning through AT, setting it apart from existing methods that overlook robustness in concept erasing. Codes are available at: https://github.com/OPTML-Group/AdvUnlearn

한국어 요약

한 줄 요약

AdvUnlearn은 적대적 훈련을 통합한 확고한 개념 제거 프레임워크로, 디퓨전 모델의 안전성과 생성 품질을 균형 있게 유지한다.

핵심 기여도

핵심 아이디어

기존의 개념 제거 기법은 **적대적 프롬프트 공격**(adversarial prompt attack)에 취약하다는 문제를 해결하기 위해, **적대적 훈련**(adversarial training, AT)을 기계 언러닝에 통합한 **AdvUnlearn** 프레임워크를 제안한다. 이는 **이중 최적화**(bi-level optimization, BLO) 기반의 방식으로, 개념 제거 목적과 적대적 공격 최적화를 동시에 고려한다.

기존 연구는 주로 **UNet** 모듈을 강화 대상으로 삼았지만, 본 연구는 **텍스트 인코더**(text encoder)가 개념 제거의 효과를 더 잘 반영하고, **플러그 앤 플레이 방식**으로 다양한 디퓨전 모델에 재사용 가능하다는 점을 발견했다. 또한, 생성 품질 저하를 방지하기 위해 **추가 보존 프롬프트 세트**(retain prompt set)를 기반으로 **이용성 유지 정규화**를 설계하여, 개념 제거의 효과와 모델 성능 간의 균형을 맞추는 것이 핵심이다.

기술적 접근법

주요 결과

의의 및 한계

AdvUnlearn은 **적대적 훈련**(AT)을 기계 언러닝에 체계적으로 통합한 **최초의 연구**로, 기존 개념 제거 기법의 **적대적 공격 취약성**을 해결하는 데 기여한다. 특히, **텍스트 인코더**를 강화 대상으로 선정함으로써 **UNet 기반 방법**보다 **더 높은 강건성과 생성 품질**을 달성한 점이 학술적·실용적 가치가 있다.

하지만, **적대적 훈련의 계산 비용**이 높아 대규모 모델에 적용 시 **효율성** 문제가 있을 수 있으며, **보존 프롬프트 세트**의 품질이 **이용성 유지 정규화**의 효과에 직접적으로 영향을 미친다는 점도 한계로 지적된다.

실용적 활용

AdvUnlearn은 **NSFW 콘텐츠 제거**, **저작권 스타일 제거**, **특정 객체 제거** 등 디퓨전 모델의 안전성 강화에 활용 가능하다. 특히, **플러그 앤 플레이 방식의 텍스트 인코더**는 다양한 모델에 쉽게 통합되어, **산업적 배포 및 모델 관리**에 유용하다.