Trevillie / MagNet

MagNet: a Two-Pronged Defense against Adversarial Examples
BSD 2-Clause "Simplified" License
95 stars 35 forks source link

inconsistent l_p value used in detector #5

Closed gehuangyi20 closed 6 years ago

gehuangyi20 commented 6 years ago

In the original paper section 5.2.1, the paper said

Detector II and detector I(see Table 3) used the $L^2$ and $L^1$ norm to measure reconstruction error, respectively.

However, in the following implementation, you use L1 for detector II and L2 for detector I. https://github.com/Trevillie/MagNet/blob/b115cf8798dc0c304ca0da34b2bdf1485da6f54f/test_defense.py#L14 https://github.com/Trevillie/MagNet/blob/b115cf8798dc0c304ca0da34b2bdf1485da6f54f/test_defense.py#L15

I am asking is this a just typo? Can you confirm which one should be the correct one.

It seems the code in the repo gives the better result.

Trevillie commented 6 years ago

Hi @gehuangyi20

As far as I recall, that should be a typo in the paper. Thanks for the notice.