Skip to content

Attack the gradients with knowledge over used transformations #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ole2252 opened this issue Jan 13, 2022 · 3 comments
Open

Attack the gradients with knowledge over used transformations #3

ole2252 opened this issue Jan 13, 2022 · 3 comments
Assignees

Comments

@ole2252
Copy link
Collaborator

ole2252 commented Jan 13, 2022

No description provided.

@alvitawa alvitawa self-assigned this Jan 13, 2022
@alvitawa alvitawa changed the title Create list of ideas to attack the gradients with knowledge over used transformations Attack the gradients with knowledge over used transformations Jan 13, 2022
@alvitawa
Copy link
Collaborator

This has a few components, first one should analyze the distribution of images after certain (sequences of) transforms. The easiest way to do this is to generate random images, transform them and then calculating the first n moments of the pixel distribution of the transformed outputs (like the mean and others). Instead of random images, one can also use real images from the dataset or a similar dataset, but we should not assume the attacker has access to this kind of information. Either way we can make a loss term through moment matching (square distance of expected moments and actual moments) which is added to the gradient similarity.

A more complex but cooler way is to train a neural network to recognize what augmentations have been applied to an image which gives a low score if an image is likely to have been augmented by the known augmentations. Simply add the output of this network for the image reconstruction attempt to the gradient similarity.

@alvitawa
Copy link
Collaborator

alvitawa commented Jan 17, 2022

The notion that augmentations are fundamentally a way to make the model invariant to some aspect (i.e. rotation) provides some insight to why these augmentations make reconstruction harder. Namely, if a model is invariant to x, it will provide the same output regardless of the variations of x that are applied to an imput image. Thus it would make it impossible to know the x variation that was applied to the input image. However, note that what is used for the reconstruction is not the output of the network but it's gradients, which will not be x invariant. However, they might be increasingly invariant as the layers of the network progress.

If this hypothesis about increasing invariance is true, it might mean that the gradients of the first layers are more usefull for reconstructing the augmented image.

@alvitawa
Copy link
Collaborator

Preliminary results:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants