secml
secml: A Python Library for Secure and Explainable Machine Learning
The library is organized in different packages, as depicted in Figure 1. The adv package implements different adversarial attacks and provides the functionalities to perform security evaluations. It encompasses the evasion attacks provided by CleverHans, as well as our implementations of evasion and poisoning attacks Biggio and Roli (2018). The ml package imports classifiers from scikit-learn and DNNs from PyTorch. Our library also supports chaining different modules (e.g., scalers and classifiers) and can automatically compute the corresponding end-to-end gradient via the chain rule.
secml: A Python Library for Secure and Explainable Machine Learning
Melis, Marco, Demontis, Ambra, Pintor, Maura, Sotgiu, Angelo, Biggio, Battista
We present secml, an open-source Python library for secure and explainable machine learning. It implements the most popular attacks against machine learning, including not only test-time evasion attacks to generate adversarial examples against deep neural networks, but also training-time poisoning attacks against support vector machines and many other algorithms. These attacks enable evaluating the security of learning algorithms and of the corresponding defenses under both white-box and black-box threat models. To this end, secml provides built-in functions to compute security evaluation curves, showing how quickly classification performance decreases against increasing adversarial perturbations of the input data. secml also includes explainability methods to help understand why adversarial attacks succeed against a given model, by visualizing the most influential features and training prototypes contributing to each decision. It is distributed under the Apache License 2.0, and hosted at https://gitlab.com/secml/secml.