@@ -136,10 +136,10 @@ class AttackEvaluate: | |||||
- float, return average l0, l2, or linf distance of all success | - float, return average l0, l2, or linf distance of all success | ||||
adversarial examples, return value includes following cases. | adversarial examples, return value includes following cases. | ||||
- If return value :math:`>=` 0, average lp distance. The lower, | |||||
the more successful the attack is. | |||||
- If return value :math:`>=` 0, average lp distance. The lower, | |||||
the more successful the attack is. | |||||
- If return value is -1, there is no success adversarial examples. | |||||
- If return value is -1, there is no success adversarial examples. | |||||
""" | """ | ||||
idxes = self._success_idxes | idxes = self._success_idxes | ||||
success_num = idxes.shape[0] | success_num = idxes.shape[0] | ||||
@@ -164,10 +164,10 @@ class AttackEvaluate: | |||||
Returns: | Returns: | ||||
- float, average structural similarity. | - float, average structural similarity. | ||||
- If return value ranges between (0, 1), the higher, the more | |||||
successful the attack is. | |||||
- If return value ranges between (0, 1), the higher, the more | |||||
successful the attack is. | |||||
- If return value is -1: there is no success adversarial examples. | |||||
- If return value is -1: there is no success adversarial examples. | |||||
""" | """ | ||||
success_num = self._success_idxes.shape[0] | success_num = self._success_idxes.shape[0] | ||||
if success_num == 0: | if success_num == 0: | ||||
@@ -183,8 +183,8 @@ class NoiseGaussianRandom(_Mechanisms): | |||||
initial_noise_multiplier(float): Ratio of the standard deviation of | initial_noise_multiplier(float): Ratio of the standard deviation of | ||||
Gaussian noise divided by the norm_bound, which will be used to | Gaussian noise divided by the norm_bound, which will be used to | ||||
calculate privacy spent. Default: 1.0. | calculate privacy spent. Default: 1.0. | ||||
seed(int): Original random seed, if seed=0 random normal will use secure | |||||
random number. IF seed!=0 random normal will generate values using | |||||
seed(int): Original random seed, if seed=0, random normal will use secure | |||||
random number. If seed!=0, random normal will generate values using | |||||
given seed. Default: 0. | given seed. Default: 0. | ||||
decay_policy(str): Mechanisms parameters update policy. Default: None. | decay_policy(str): Mechanisms parameters update policy. Default: None. | ||||
@@ -95,7 +95,7 @@ def _softmax_cross_entropy(logits, labels): | |||||
class MembershipInference: | class MembershipInference: | ||||
""" | """ | ||||
Evaluation proposed by Shokri, Stronati, Song and Shmatikov is a grey-box attack. | Evaluation proposed by Shokri, Stronati, Song and Shmatikov is a grey-box attack. | ||||
The attack requires obtain loss or logits results of training samples. | |||||
The attack requires loss or logits results of training samples. | |||||
References: `Reza Shokri, Marco Stronati, Congzheng Song, Vitaly Shmatikov. | References: `Reza Shokri, Marco Stronati, Congzheng Song, Vitaly Shmatikov. | ||||
Membership Inference Attacks against Machine Learning Models. 2017. | Membership Inference Attacks against Machine Learning Models. 2017. | ||||