DUP: Detection-guided Unlearning for Backdoor Purification in Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Hu, Man, Ding, Yahui, Yang, Yatao, Chen, Liangyu, Jia, Yanhao, Zhao, Shuai
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911088635805696
author Hu, Man
Ding, Yahui
Yang, Yatao
Chen, Liangyu
Jia, Yanhao
Zhao, Shuai
author_facet Hu, Man
Ding, Yahui
Yang, Yatao
Chen, Liangyu
Jia, Yanhao
Zhao, Shuai
contents As backdoor attacks become more stealthy and robust, they reveal critical weaknesses in current defense strategies: detection methods often rely on coarse-grained feature statistics, and purification methods typically require full retraining or additional clean models. To address these challenges, we propose DUP (Detection-guided Unlearning for Purification), a unified framework that integrates backdoor detection with unlearning-based purification. The detector captures feature-level anomalies by jointly leveraging class-agnostic distances and inter-layer transitions. These deviations are integrated through a weighted scheme to identify poisoned inputs, enabling more fine-grained analysis. Based on the detection results, we purify the model through a parameter-efficient unlearning mechanism that avoids full retraining and does not require any external clean model. Specifically, we innovatively repurpose knowledge distillation to guide the student model toward increasing its output divergence from the teacher on detected poisoned samples, effectively forcing it to unlearn the backdoor behavior. Extensive experiments across diverse attack methods and language model architectures demonstrate that DUP achieves superior defense performance in detection accuracy and purification efficacy. Our code is available at https://github.com/ManHu2025/DUP.
format Preprint
id arxiv_https___arxiv_org_abs_2508_01647
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle DUP: Detection-guided Unlearning for Backdoor Purification in Language Models
Hu, Man
Ding, Yahui
Yang, Yatao
Chen, Liangyu
Jia, Yanhao
Zhao, Shuai
Cryptography and Security
Artificial Intelligence
Computation and Language
As backdoor attacks become more stealthy and robust, they reveal critical weaknesses in current defense strategies: detection methods often rely on coarse-grained feature statistics, and purification methods typically require full retraining or additional clean models. To address these challenges, we propose DUP (Detection-guided Unlearning for Purification), a unified framework that integrates backdoor detection with unlearning-based purification. The detector captures feature-level anomalies by jointly leveraging class-agnostic distances and inter-layer transitions. These deviations are integrated through a weighted scheme to identify poisoned inputs, enabling more fine-grained analysis. Based on the detection results, we purify the model through a parameter-efficient unlearning mechanism that avoids full retraining and does not require any external clean model. Specifically, we innovatively repurpose knowledge distillation to guide the student model toward increasing its output divergence from the teacher on detected poisoned samples, effectively forcing it to unlearn the backdoor behavior. Extensive experiments across diverse attack methods and language model architectures demonstrate that DUP achieves superior defense performance in detection accuracy and purification efficacy. Our code is available at https://github.com/ManHu2025/DUP.
title DUP: Detection-guided Unlearning for Backdoor Purification in Language Models
topic Cryptography and Security
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2508.01647