-
Notifications
You must be signed in to change notification settings - Fork 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
ACE filter function creates noisy images due to data processing #3
Comments
Hi, With this information, it is a little hard to understand what is happening. But I'll give it a try.
Kindly, |
Hi, Thank you for your answer, first of all. I shall try to answer your questions and explain my issues further with as many details as I can:
Kind regards, Fahad |
From what you say, I suspect that you trained your model without any normalization. Please try using the model I provided as another sanity check (Link) |
Hi,
I trained the DDPM generator using your code on the CelebA dataset. I noticed that the filter function in main.py creates a noisy counterfactual explanation due to the following data processing step:
ce = (pe.detach() - 0.5) / 0.5
I found this problem when I performed some sanity checks, for instance, by running the ace filter function without any attack iterations. When I commented out the above data processing step, however, I was able to create a way cleaner image. Would you have any idea why this could be happening?
I am also attaching the noisy (created with no changes to the code) and the clean (created with data processing step commented out) counterfactuals. Kindly note that these counterfactuals are produced without any attack. Thank you.
![noisy_ce](https://private-user-images.githubusercontent.com/36238447/279712685-eefc4eec-b419-4764-ab4e-fd7ebf7c7bd8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExMDQ3NDUsIm5iZiI6MTcyMTEwNDQ0NSwicGF0aCI6Ii8zNjIzODQ0Ny8yNzk3MTI2ODUtZWVmYzRlZWMtYjQxOS00NzY0LWFiNGUtZmQ3ZWJmN2M3YmQ4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE2VDA0MzQwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ3YTNjODFjOWJmODUyODNlMmNiZDVjN2ZiMTMzYThkYWM5ZDVkYTVjNDczNTQ2OWE4MTg5ZTlhZDhiYjA5OGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IZP9a7tPMpdBwdc3TLtzEtdhJlSxj-X9Er12POR7xEg)
![ce](https://private-user-images.githubusercontent.com/36238447/279712775-ee6df6f1-07d9-45a9-8b70-657170c45cc7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExMDQ3NDUsIm5iZiI6MTcyMTEwNDQ0NSwicGF0aCI6Ii8zNjIzODQ0Ny8yNzk3MTI3NzUtZWU2ZGY2ZjEtMDdkOS00NWE5LThiNzAtNjU3MTcwYzQ1Y2M3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE2VDA0MzQwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYzYmQxNzI3NzJhMTFkYjE2NWJlYWU0NGM3YTQwN2ZmYWMyYmU0YmViZTJjYWUwMGJlYTU1YTQwM2UyOGMwMGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2b5HVF5DUMIS6mJiz4UojcDq7kuqA9kLjU9hJO1JLb4)
The text was updated successfully, but these errors were encountered: