ZSHsh98 / EPS-AD

This is the source code for Detecting Adversarial Data by Probing Multiple Perturbations Using Expected Perturbation Score (ICML2023).
33 stars 2 forks source link

How to detect an unknown dataset #4

Open ClickAB opened 11 months ago

ClickAB commented 11 months ago

I input an unknown dataset, and I don't know which ones are clean samples and which ones are adversarial samples. How can I calculate the EPS of the unknown sample and compare it with the EPS of the clean sample through MMD

ZSHsh98 commented 11 months ago

Thanks for your attention, our approach can identify adversarial data within an unknown dataset, for instance, CIFAR-10, by employing a pre-trained diffusion model initially trained on a known dataset like ImageNet. In contrast to the typical procedure, it's necessary to resize all images to dimensions compatible with the input requirements of the pre-trained diffusion model, e.g., 224x224x3. Additionally, you'd better employ the EPSs calculated on a set of natural samples (with size=500) from your preferred dataset as the reference.

ClickAB commented 11 months ago

Thank you very much for answering my question! I generally understand what you mean. I need some similar clean samples for comparison, comparing their EPS with the EPS of the samples to be detected. For example, if I want to detect adversarial samples on an aerial image dataset named A, I need to first find a certain number of clean samples (with size around 500 ) of aerial images as clean datasets named B to calculate their EPS-B, and then input the aerial image dataset A to calculate their EPS-A, and calculate MMD between EPS-A and EPS-B,is this right?

ZSHsh98 commented 11 months ago

Yes, you are right!