PureGen: Universal Data Purification for Train-Time Poison Defense via Generative Model Dynamics

Train-time data poisoning attacks threaten machine learning models by introducing adversarial examples during training, leading to misclassification. Current defense methods often reduce generalization performance, are attack-specific, and impose significant training overhead. To address this, we introduce a set of universal data purification methods using a stochastic transform, $\Psi(x)$, realized via iterative Langevin dynamics of Energy-Based Models (EBMs), Denoising Diffusion Probabilistic Models (DDPMs), or both. These approaches purify poisoned data with minimal impact on classifier generalization. Our specially trained EBMs and DDPMs provide state-of-the-art defense against various attacks (including Narcissus, Bullseye Polytope, Gradient Matching) on CIFAR-10, Tiny-ImageNet, and CINIC-10, without needing attack or classifier-specific information. We discuss performance trade-offs and show that our methods remain highly effective even with poisoned or distributionally shifted generative model training data.

Paper

References (54)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer K3RB5/10 · confidence 4/52024-06-12

Summary

The paper presents a novel approach to securing model's performance (robust and natural accuracy) against train-time data poisoning attacks by introducing a set of data purification transformations during training, specifically employing Energy-Based Models (EBM) and Denoising Diffusion Probabilistic Models (DDPM). The effectiveness of the proposed method is demonstrated through evaluations on CIFAR-10, Tiny-ImageNet, and CINIC-10 datasets.

Strengths

1. The paper is generally well-written and structured. However, certain sections could benefit from additional clarity and elaboration to enhance the overall presentation quality. 2. The elucidation of the L2 Distance in Section 3.4 is commendable, offering a lucid explanation of the method's underlying mechanism for aligning poisoned data with the benign data distribution. 3. The exploration of different variants of the proposed method in Section 4.4 is a valuable addition to the paper. 4. The method achieves state-of-the-art performance in the conducted experiments, with a comprehensive exploration of its capabilities across various scenarios.

Weaknesses

1. Section 3.1 could be improved by providing a more in-depth discussion on the application of EBM models within the context of the proposed method, rather than focusing predominantly on foundational concepts. 2. The relevance of Section 3.3 is questionable, as the equations introduced (e.g., Eq. 6) do not appear to be integral to the subsequent discussion. 3. The paper may benefit from a clearer articulation of its novelty within the field.

Questions

1. The application of EBM and DDPM for adversarial purification is gaining traction, particularly in defense against inference attacks [1]. Is this the first application of these models for training-time data poisoning defense? How does this work distinguish itself within the existing body of literature regarding its novelty? 2. The claim on Page 2, Line 45, that purification models require training with a POOD dataset may not present a significant challenge. Pre-trained DDPM models are readily available in open-source repositories and can be employed for data purification, as demonstrated in [1]. Could the authors conduct a comparative analysis between the performance of publicly available DDPM models and those trained in-house? [1] "(Certified!!) Adversarial Robustness for Free!." Carlini, Nicholas, et al. The Eleventh International Conference on Learning Representations. 2022.

Rating

5

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

See weakness and questions.

Reviewer n59K4/10 · confidence 4/52024-06-26

Summary

This paper studies the generative purification methods, i.e., EBM and DDPM-based purifications, as defenses against a set of data poisoning attacks.

Strengths

1. They suggest that a proper range of implementation steps in the EBM and DDPM-based purification methods matters for defense performance. 2. They conduct comprehensive experiments to evaluate the effectiveness of PureGen methods. Experimental results show that proposed defenses perform better than the baselines in the paper. 3. They study some considerations in practical scenarios including (a) training distribution shift in the generative model training; (b) training the generative model on poisoned data; (c) network architecture transferability 4. They explore some PureGen variants.

Weaknesses

1. The idea of employing generative methods to purify imperceptive noises has been explored, i.e. EBM [1] and DDPM [2]. As for training-time poisoning attacks, [3, 4] propose to use diffusion process to defend against availability attacks. Though this paper studies different data poisoning attacks such as Bullseye Polytope, Gradient Matching, and Narcissus, I don't think there is any essential difference in the defense mechanism. 2. Since the technical modification in DDPM lies in the truncation of training steps, it's beneficial to move Figure 4 to the main paper which illustrates how the the selection of steps influences the defense performance. [1] Yoon J, Hwang S J, Lee J. Adversarial purification with score-based generative models [2] Nie W, Guo B, Huang Y, et al. Diffusion Models for Adversarial Purification [3] Jiang W, Diao Y, Wang H, et al. Unlearnable examples give a false sense of security: Piercing through unexploitable data with learnable examples [4] Dolatabadi H M, Erfani S, Leckie C. The devil’s advocate: Shattering the illusion of unexploitable data using diffusion models

Questions

1. Can you provide more intuition about why sacrificing generative capabilities can improve poison defense? 2. Can AVATAR[1] work as a defense baseline against Bullseye Polytope, Gradient Matching, and Narcissus? 3. In Table 1, why are there no gradient matching results on CINIC-10 and no Narcissus results on Tiny-ImageNet? 4. Why do some Poison Success cells show no standard deviations in Table 1,2? And is the bold font abused in these tables? [1] Dolatabadi H M, Erfani S, Leckie C. The devil’s advocate: Shattering the illusion of unexploitable data using diffusion models

Rating

4

Confidence

4

Soundness

3

Presentation

3

Contribution

2

Limitations

See weaknesses and questions.

Reviewer n59K2024-08-11

Thanks for your responses and clarifications; they have indeed addressed some of my concerns. However, I will maintain my score due to the remaining major concerns: - There is no fundamental difference between training-time purification and test-time purification. Before retraining, the poisoned samples have already been purified and fixed. In other words, purification is not truly integrated into the training process; purification and retraining are completely separate. I am not convinced by the story which applies existing diffusion purification to a new perturbation type and makes it the first work addressing this problem. - Main comparisons in the paper, including Tables 1 and 2, adopt no diffusion purification methods as baselines. However, additional results in rebuttal show that pre-trained diffusion models also work in purifying poisoning attacks. Considering the authors' claim that their methods provide SOTA defense, I have concerns about whether the advantages of specially designed techniques are still solid under more comprehensive comparisons, especially with more pre-trained diffusion models. I indeed appreciate the studies regarding practical scenarios, as I stated in Strength 3, 4. Therefore, I agree with other review's suggestions that it might be better to shift the focus of this paper.

Authorsrebuttal2024-08-11

Respectfully, we feel the reviewer has a miss understanding of the point of the paper. In this paper we set-out to show users should purify their datasets with an EBM or diffusion model to get SoTA defense against training poisons with little degradation in natural accuracy. We consider how diffusion models that have been trained on out of distribution data perform in the purification task. We conclude that; 1) EBMs and diffusion models perform SoTA for defense while retraining nat acc, 2) OOD EBM/diffusion works so people should be purifying all image data with whatever EBM/diffusion model they have access to. Now we will go through the latest concerns of the reviewer. The reviewer says: "Before retraining, the poisoned samples have already been purified and fixed. In other words, purification is not truly integrated into the training process; purification and retraining are completely separate. " - That is the entire point. Other defense methods that prevent training poisons slow down training and or reduce performance. Our method protects against training poisons by purifying the entire dataset. We compare to two other SoTA training defense methods; EPIC and FRIENDs. EPIC does not adjust the poisoned training images but instead rejects some, FRIENDS uses the classifier's state during training to calculate a perturbation to the image. Both of these methods require modification to the training loop and FRINDS is very computationally expensive. - Our method as we stated thought the paper and should not be a shock to the reviewer at this point in the review cycle "fixes" or "purifies" the entire dataset before training begins. The class of poisons we are protecting against are named train time poisons. The defense does not require one to augment to training pipeline to be considered a defense. "I am not convinced by the story which applies existing diffusion purification to a new perturbation type and makes it the first work addressing this problem. " - What does the reviewer need to be convinced of? We show that the perturbations intact defend, we show that when we are OOD we might degrade the natural accuracy and increase poison success but we simply share the empirical findings... If you do not believe us feel free to use our posed code to verify. "Main comparisons in the paper, including Tables 1 and 2, adopt no diffusion purification methods as baselines. However, additional results in rebuttal show that pre-trained diffusion models also work in purifying poisoning attacks." - Yes, we are the first to apply EBMs and Diffusion models to purify train time poisons for classifier backdoors. In the paper, so as to not add extra complications (as we don't know how many of the diffusion models are trained on HuggingFace, if they use score matching etc) we trained our own simple DDPM diffusion model ourselves. In the original submitted paper we showed out of distribution(OOD) datasets work. Once you suggested to show numbers from per-trained HF models we simply ran the experiments you requested. But the results remained the same. OOD dataset trained diffusion/EMB models still work for purification. We are certainly the first to show this. "Considering the authors' claim that their methods provide SOTA defense, I have concerns about whether the advantages of specially designed techniques are still solid under more comprehensive comparisons, especially with more pre-trained diffusion models." - We show a clear trade off between using in distribution and out of distribution data. We show that the user can choose to either train their own model or use a per-trained one. This gives the user freedom and confidence that even if they cannot muster up their own diffusion model, they should certainly purify their data with an EBM or diffusion model (in the schedule we suggest) to secure their dataset to SoTA levels.

Reviewer gd226/10 · confidence 4/52024-07-13

Summary

This work introduces PureGen, a method to purify a potentially poisoned dataset before the dataset is used to train a classifier. The work explores using Langevin MCMC with both EBMs and diffusion models to remove potential adversarial artifacts from data, with the justification that MCMC sampling should move a sample away from the adversarial artifacts and towards the data distribution. The number of Langevin steps is chosen to be enough to remove adversarial artifacts while preserving the original image. Experimental comparison shows strong performance of the proposed method for training robust classifier with a variety of data poisons compared to existing approaches.

Strengths

* The presentation of the method is clear and straightforward, and the paper is easy to follow. * The work proposes interesting adaptions of Langevin purification for white-box adversarial defense to the domain of data poisons. * Empirical results show that the proposed defense can outperform existing defense. There is a thorough examination of different poisons and comparison with existing methods.

Weaknesses

* The defense requires costly Langevin iterations and has a higher computational burden compared to existing methods. I appreciate that this is acknowledged clearly and discussed by the authors in the limitations section. * My main concern about this work involves the situation where the data poisoner is aware of the defense method that will be applied to the dataset. Developing attacks that can adapt to different defense strategies is standard in the white-box attack literature, although I am not as familiar with such procedures in the poison literature. Will the defense remain robust if the attacker is aware of the defense strategy? See, for example, [a]. [a] https://arxiv.org/abs/1802.00420

Questions

Could the authors discuss the situation where the attacker is aware of the defense? I am willing to raise my score if this concern can be addressed.

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

2

Limitations

Limitations are adequately discussed.

Reviewer 16Y84/10 · confidence 5/52024-07-19

Summary

This paper proposes a stochastic preprocessing defense technique, named PureGen, against train-time poisoning attacks, with EBM-Guided and Diffusion-Guided sampling processes. First, with EBM-based purification, called PureGen-EBM, the purifier first evaluates the (unnormalized) energy function of the images. Then, this considers the high-energy images as the 'posioned' images, and purifies with the stochastic preprocessor $\Psi_T$. On the other hand, with Diffusion-based purification, called PureGen-DDPM, the purifier first add Gaussian noises to the inputs and run the reverse diffusion process using DDPM.

Strengths

* This paper demonstrates purification results with respect to diverse poisoning attacks and data availability attacks, which provides a new benchmarks on the adversarial learning communities. * To the best of my knowledge, this is the first result to implement adversarial purification to poisoning attacks, achieving superior performances compared to other existing methods.

Weaknesses

* The idea of using adversarial purification to adversarial attacks is already well-known, and this is an increment of the adversarial purification to other kinds of attacks. * There are still scenarios that also breaks the adversarial robustness of the purification models such as BPDA+EOT [Athalye et al, 2018]. To mitigate this, additional consideration like fine-tuning on the adversarial perturbation models is required. [Lin et al., 2024]. Without this, the purified images will be easily poisoned with stronger poisoning attacks, which also involves with the purifier in the poisoning steps. * Some additional validation on using the diffusion models on adversarial purification should be addressed: see __Questions__. * In my opinion, with improved sampling methods using a higher-order solver of consistency-based distillation models, the purification can be drastically faster compared to both the proposed methods and the existing method. I presume that this can be easily improved: See __Questions__. [Athalye et al, 2018] Obfuscated Gradients Give a False Sense of Security, ICML 2018 \ [Lin et al., 2024] Adversarial Training on Purification (AToP): Advancing Both Robustness and Generalization, ICLR 2024

Questions

* In the PureGen-DDPM process, the dataset is trained with DDPM fewer steps, (250 steps rather than the conventional 1000 steps). Nevertheless, training DDPM with fewer discrete steps yields heavier posterior mismatch between the DDPM posterior covariance and the optimal covariance, according to [Bao et al, 2022]. I doubt that the purification gain from less timesteps from Figure 4 (bottom right) is just a side-effect of this posterior mismatch, which is not rigorously intended. I will be more convinced if some explanation on setting the fewer steps in PureGen-DDPM for training. * Even though the time complexity of the proposed purification method is comparable to the existing methods, this can be easily improved with some higher-order solvers without any additional training. The paper will be much stronger if more results with some solvers are addressed. [Bao et al, 2022] Analytic-DPM: an Analytic Estimate of the Optimal Reverse Variance in Diffusion Probabilistic Models, ICLR 2022 --- Minor typos * (Appendix C) Intition $\to$ Intuition

Rating

4

Confidence

5

Soundness

3

Presentation

3

Contribution

1

Limitations

N/A

Reviewer 16Y82024-08-12

Response

Thank you for the detailed response and additional experiments. I agree with the following point, and would not reflect the following point for deducting the rating of the paper. __Purification on training-time attacks__ I still consider that the novelty of this work is incremental, as directly applying diffusion/EBM (for adversarial purification) to mitigate poisoning attack. This would be the primary reason of my rating of this paper, unless having ample experiments. --- On the other hand, I address further questions below. __Defense-aware Poisoning__ The authors mentioned that "_cannot hypothesize new poison techniques to bypass PureGen._" However, there is a simple and efficient poisoning method that can bypass the purification method. For example, we know from the literature that the ODE and SDE that runs through the diffusion model (and also the EBM) have the same density function, according to the _Fokker-Planck equation_. Then, for example, there can be a full pipeline that starts from the _purified image_ to the classifier: 1. begin with the noisy image, and run the purifier to obtain the clean(-ized) image. 2. Then, run the "poisoned" network for prediction. According to the authors' response, the authors presumed that the poisoning method for the purifier is beyond the scope. However, we can raise some issues: - The ODE solver is effectively a series of deterministic forward neural network run. This means that, if we run 10 steps of ODE solver, the purifier-classifier pipeline can consist of __"10 steps of deterministic run"-"classifier"-"prediction"__, which is just a larger neural network. In this case, train-time poisoning is obviously available without complex methods bypassing the obfuscated gradients proposed in [Athalye et al., 2018] or so. Can the authors manage this issues that the attacker threatens not only the classifier but the generative models? ``` [Athalye et al, 2018] Obfuscated Gradients Give a False Sense of Security, ICML 2018 ``` --- __Posterior Mismatch Issues__ Firstly, we agree with the authors that this is not the primary issue of this paper, and __we do not deduct rating__ with respect to this following part. Nevertheless, there is still not enough relevance between [_Truncation of DDPM posterior_] and [_Better performance of train-time derense_] without any generic analysis. Hence, I do not agree with the authors to move this part into the main part of the paper.

Authorsrebuttal2024-08-12

We respectfully but firmly disagree with the reviewer's opinions. The reviewer states "This would be the primary reason of my rating of this paper, unless having ample experiments." How many experiments would be ample? We have trained over 3k classifiers throughout this paper showing that PureEBM and PureGen outperform all current defense methods which were published 2021/2022 at top conferences. In this we also trained 10s of 100s of EBMs and Diffusion models. The point of training poisons is that they are stealthy, as such the point of the reviewer that we could do SDEs to try to create a stronger attack is moot. To do this the attacker would need access to significantly more information than any of the poisoning papers are assuming. The reviewer also describes a scenario where one begins with a noisy image and then purifies and "Then, run the "poisoned" network for prediction." The reviewer is mistaken on the setup of poisons. This setup is for the adversarial attack and not poisons. The setup for from scratch poisons is this. No more no less. 1 . A poisoner adds small perturbations $\epsilon$ of their choosing to a small subset of images which will be used to train a classifier in step 2. - The poisoner can have access to at most the initialization of the classifier that will be trained in step 2. 2 . The train dataset that has been tampered with by the poisoner is used to train a classifier. 3 . If the poison is successful, the poisoner can pass a specific image of a cat through the classifier and have it be classified as a dog as they wanted. There is absolutely no other information given to either side. PGD attacks to augment step 3 are not allowed. The reviewer states: "According to the authors' response, the authors presumed that the poisoning method for the purifier is beyond the scope." We feel this is a miss-characterization of what we have said. In fact trained the EBM/Diffusion models with 100% poisoned images. These poisons did not significantly affect our purification performance as seen in Table 3, where we considered fully poisoned (all classes at once). The reviewer cites "Obfuscated Gradients Give a False Sense of Security, ICML 2018," again this paper is only on test time active attacks where the attacker has significantly more access to the classification problem, namely *fully trained model.* Again, this is a totally different problem and it not relevant to the setup of our paper. Still in the full PGD+EOT attack setup which is certainly outside of the cope of this paper, EBMs are still SOTA.

Reviewer K3RB2024-08-09

Dear Authors, Thank you for the efforts you have made to address the concerns raised in my previous review. Upon careful consideration of your response, I would like to offer the following feedback: - **Concern Regarding Novelty:** The concept of adversarial purification is indeed established within the literature. While its application during the training phase is an interesting direction, I am not entirely convinced that this alone constitutes a substantial contribution or presents a significant advancement to warrant a recommendation for acceptance in its current form. - **Concern Regarding Performance:** The effectiveness of pre-trained models, as demonstrated in your work, raises important questions. Specifically, it prompts an inquiry into whether the natural image distribution encompasses the test dataset used in your evaluation. In light of these concerns, I believe that the manuscript would benefit from a major revision, particularly in the following area: Rather than focusing solely on the application of adversarial purification during the training phase as the primary novelty, I encourage you to delve deeper into the effects of data distribution. A thorough analysis and discussion on how data distribution influences the outcomes could significantly enhance the paper's contribution and elevate its importance within the field. I hope that these suggestions will assist you in refining your manuscript. Regrettably, I must maintain my current score, as the contribution does not yet meet the threshold for acceptance. Warm regards,

Authorsrebuttal2024-08-09

Dear Reviewer, Thank you for responding to our rebuttal, and we are glad to respond to the feedback and concerns: * **Concern Regarding Novelty**: We disagree with this characterization since **our novel contributions include extensive distributional analysis and impact of poisoning on defense generative models (Section 4.4), combinations of generative models and energy-based filtering (Section 4.5), extensive analysis on purification and poisons in the energy space (Section 3.4), and the decreased DDPM training pipeline.** Train-time poisons have unique enough considerations and have been separated in the literature for a few years. Considering the growth of poisons and defenses within train-time poison literature alone since then, the fact that we comprehensively address SoTA, and the added novelties above, we believe the paper is a strong contribution to the field in its current form. * **Concern Regarding Performance and Data Distribution Analysis**: This experiment was done as per the reviewer's request, and these were the pre-trained models with the right resolution we could find. *All models in the paper have clearly defined train distributions that do not contain the test dataset (unless explicitly called out as a baseline as in the POOD analysis).* ***Further, Section 4.4 is entirely focused on the impact of data distribution on purification performance for both EBMs and DDPMs.*** We believe we thoroughly explore this topic on data distribution impact on purification (far beyond any paper that uses generative models in any adversarial setting). We hope you can further clarify what additional analysis would look like. We thank you again for the discussion and for giving us the added feedback. We believe your concerns are adequately addressed in the paper and in our clarifications. We hope you can reconsider your assessment with these comments. Kindly, Authors

Reviewer gd222024-08-14

Thanks for the response. I will raise my score.

I appreciate the efforts to investigate the defense-aware data poison, and it is reassuring to see the defense retains security. This addresses my main concern. While the EBM and diffusion purification methods fall within established practice, there appears to be a consensus among reviewers that this work does cover an area that has not yet been directly investigated in published work, namely purification-type defense applied for train-time data poisoning/purification. It does seem like there should be a work like this as a reference point for the community and the authors performed a wide array of experiments to investigate this scenario. I understand the concerns of other reviewers regarding novelty, but I nonetheless feel this work makes an expected but useful contribution. I will increase my score since my main concerns have been addressed.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC