用连续归一化流实现对抗样本净化,既保准确率又抗攻击。
FlowPure: Continuous Normalizing Flows for Adversarial Purification
- 基于条件流匹配训练连续归一化流,将对抗样本映射为干净样本。
- 在CIFAR-10/100上优于现有净化方法,白盒场景下鲁棒性更强。
- 可同时用于已知攻击的针对性净化和通用噪声场景,适合安全防御研究者。
尽管机器学习模型在对抗鲁棒性方面取得显著进展,该问题仍是关键挑战。推理时去除对抗扰动(即对抗净化)已成为有前景的防御策略。现有先进方法依赖扩散模型:前向过程注入高斯噪声以稀释对抗扰动,再通过去噪恢复干净样本后分类。本文提出FlowPure,一种基于连续归一化流(CNFs)的新净化方法,使用条件流匹配(CFM)学习从对抗样本到其干净版本的映射。与依赖固定噪声过程的扩散方法不同,FlowPure可利用特定攻击知识提升已知威胁下的鲁棒性;同时支持基于高斯扰动的通用随机变体,适用于缺乏攻击信息的场景。在CIFAR-10和CIFAR-100上的实验表明,本方法在预处理器不可见和白盒场景下均超越现有最优净化防御,且前者能完全保留良性准确率。此外,结果表明FlowPure不仅净化效果优异,还具备强大对抗检测能力,对预处理器不可见的PGD样本识别准确率接近完美。代码已公开于https://github.com/DistriNet/FlowPure。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。