Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

FlowPure: Continuous Normalizing Flows for Adversarial Purification

About

Despite significant advances in the area, adversarial robustness remains a critical challenge in systems employing machine learning models. The removal of adversarial perturbations at inference time, known as adversarial purification, has emerged as a promising defense strategy. To achieve this, state-of-the-art methods leverage diffusion models that inject Gaussian noise during a forward process to dilute adversarial perturbations, followed by a denoising step to restore clean samples before classification. In this work, we propose FlowPure, a novel purification method based on Continuous Normalizing Flows (CNFs) trained with Conditional Flow Matching (CFM) to learn mappings from adversarial examples to their clean counterparts. Unlike prior diffusion-based approaches that rely on fixed noise processes, FlowPure can leverage specific attack knowledge to improve robustness under known threats, while also supporting a more general stochastic variant trained on Gaussian perturbations for settings where such knowledge is unavailable. Experiments on CIFAR-10 and CIFAR-100 demonstrate that our method outperforms state-of-the-art purification defenses in preprocessor-blind and white-box scenarios, and can do so while fully preserving benign accuracy in the former. Moreover, our results show that not only is FlowPure a highly effective purifier but it also holds strong potential for adversarial detection, identifying preprocessor-blind PGD samples with near-perfect accuracy. Our code is publicly available at https://github.com/DistriNet/FlowPure.

Elias Collaert, Abel Rodr\'iguez, Sander Joos, Lieven Desmet, Vera Rimmer• 2025

Related benchmarks

TaskDatasetResultRank
Adversarial RobustnessCIFAR-10 (test)--
76
Adversarial PurificationCIFAR-10
Standard Accuracy96
68
Adversarial RobustnessCIFAR-100 (test)--
46
Adversarial PurificationCIFAR-100
Average Accuracy80.84
38
Adversarial Video PurificationHMDB-51 (test)
Clean Accuracy97
24
Adversarial Video PurificationHMDB-51
Clean Accuracy96
24
Adversarial Video PurificationUCF-101
Clean Accuracy95
24
Adversarial Video PurificationUCF-101 (test)
Clean Accuracy94
24
Adversarial RobustnessCIFAR-10--
9
Adversarial RobustnessCIFAR-100
APGD Avg Score60.22
7
Showing 10 of 10 rows

Other info

Follow for update