You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.8 kB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Application demos of model security
  2. ## Introduction
  3. It has been proved that AI models are vulnerable to adversarial noise that invisible to human eye. Through those
  4. demos in this package, you will learn to use the tools provided by MindArmour to generate adversarial samples and
  5. also improve the robustness of your model.
  6. ## 1. Generate adversarial samples (Attack method)
  7. Attack methods can be classified into white box attack and black box attack. White-box attack means that the attacker
  8. is accessible to the model structure and its parameters. Black-box means that the attacker can only obtain the predict
  9. results of the
  10. target model.
  11. ### white-box attack
  12. Running the classical attack method: FGSM-Attack.
  13. ```sh
  14. $ cd examples/model_security/model_attacks/white-box
  15. $ python mnist_attack_fgsm.py
  16. ```
  17. ### black-box attack
  18. Running the classical black method: PSO-Attack.
  19. ```sh
  20. $ cd examples/model_security/model_attacks/black-box
  21. $ python mnist_attack_pso.py
  22. ```
  23. ## 2. Improve the robustness of models
  24. ### adversarial training
  25. Adversarial training is an effective method to enhance the model's robustness to attacks, in which generated
  26. adversarial samples are fed into the model for retraining.
  27. ```sh
  28. $ cd examples/model_security/model_defenses
  29. $ python mnist_defense_nad.py
  30. ```
  31. ### adversarial detection
  32. Besides adversarial training, there is another type of defense method: adversarial detection. This method is mainly
  33. for black-box attack. The reason is that black-box attacks usually require frequent queries to the model, and the
  34. difference between adjacent queries input is small. The detection algorithm could analyze the similarity of a series
  35. of queries and recognize the attack.
  36. ```sh
  37. $ cd examples/model_security/model_defenses
  38. $ python mnist_similarity_detector.py
  39. ```

MindArmour关注AI的安全和隐私问题。致力于增强模型的安全可信、保护用户的数据隐私。主要包含3个模块:对抗样本鲁棒性模块、Fuzz Testing模块、隐私保护与评估模块。 对抗样本鲁棒性模块 对抗样本鲁棒性模块用于评估模型对于对抗样本的鲁棒性,并提供模型增强方法用于增强模型抗对抗样本攻击的能力,提升模型鲁棒性。对抗样本鲁棒性模块包含了4个子模块:对抗样本的生成、对抗样本的检测、模型防御、攻防评估。