secml: A Python Library for Secure and Explainable Machine Learning

Maura Pintor, Luca Demetrio, Angelo Sotgiu, Marco Melis, Ambra Demontis +1 more
12/20/2019
19 citations
cs.LGcs.CRcs.CV

Official code: pralab/secml (191 stars, Jupyter Notebook, Apache-2.0, PyTorch, last commit 2025-06-23).

Abstract

We present \texttt{secml}, an open-source Python library for secure and explainable machine learning. It implements the most popular attacks against machine learning, including test-time evasion attacks to generate adversarial examples against deep neural networks and training-time poisoning attacks against support vector machines and many other algorithms.

Show full abstract

These attacks enable evaluating the security of learning algorithms and the corresponding defenses under both white-box and black-box threat models. To this end, \texttt{secml} provides built-in functions to compute security evaluation curves, showing how quickly classification performance decreases against increasing adversarial perturbations of the input data. \texttt{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 \url{https://github.com/pralab/secml}.

View on arXivView PDF

Code Implementations(1)

pralab/secmlOfficial100%
PyTorchApache-2.0

A Python library for Secure and Explainable Machine Learning

19127Jupyter Notebook, PythonApr 20, 20201 years agoApache-2.0
adversarial-machine-learningalgorithmsartificial-intelligenceattack-algorithmscleverhans+15 more

Similar Papers

Cite this paper

@article{pintor2019secml,
  title  = {secml: A Python Library for Secure and Explainable Machine Learning},
  author = {Maura Pintor and Luca Demetrio and Angelo Sotgiu and Marco Melis and Ambra Demontis and Battista Biggio},
  year   = {2019},
  eprint = {1912.10013},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1912.10013}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1912.10013.svg)](https://codeofpaper.com/paper/1912.10013)

Discussion