sewoonglab / spectre-defense Goto Github PK
View Code? Open in Web Editor NEWDefending Against Backdoor Attacks Using Robust Covariance Estimation
License: MIT License
Defending Against Backdoor Attacks Using Robust Covariance Estimation
License: MIT License
It should be possible to reimplement the Julia half of the project in Python. This would be useful since not many ML researchers are familiar with Julia.
Hi, I was using your quantum filter code on GTSRB dataset, where number of inputs in each class could be really small (<200). And your quantum iterative algorithm on smaller classes seem to have suffered from several numerical errors in Julia: results being complex numbers, matrix not positive definite, etc.. I did the some quick fixes that somehow helped:
In quantum_filter.jl
:
--- reps_estimated_white = Σ^(-1/2)*reps_pca
+++ reps_estimated_white = sqrt(Hermitian(Σ))\reps_pca
--- Σ′ = cov((Σ*re^(-1/2)ps_pca)')
+++ Σ′ = cov((sqrt(Hermitian(Σ))\reps_pca)')
In dkk17.jl
:
Σ′ = S′*S′' ./ n
+++ Σ′ += 1e-8 * I
--- invsqrtΣ′ = Symmetric(Σ′)^(-1/2)
+++ invsqrtΣ′ = sqrt(inv(Symmetric(Σ′)))
The normalization of the loss in mini_train
is slightly off if the batch does not have size batch_size
, which can be the case when drop_last
is false.
Hi!
Thanks for the nice work.
I want to use the three approaches used here for comparison in my own pipeline.
What I do is that
Line 112 in ccf594a
Am I right? Because I am getting a mixed performance and I want to double check.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.