Metadata-Version: 2.3
Name: heart-library
Version: 0.7.0
Summary: Hardened Extension of the Adversarial Robustness Toolbox (HEART) supports assessment of adversarial AI vulnerabilities in Test & Evaluation workflows.
License: MIT
Keywords: machine learning,security,adversarial robustness,adversarial machine learning,AI test and evaluation,T&E,DoD,MAITE,JATIC,robust ML,black-box attacks,white-box attacks,perturbation,physical realizability,model evaluation,adversarial attacks,defensive AI,ART,Adversarial Robustness Toolbox
Author: Jordan Fischer, Kieran Fraser, Stekunda Henry, Jackson Lee, Adam Lockwood, Arjun Sachar, Peter Swiek
Requires-Python: >=3.9,<3.12
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Testing
Provides-Extra: all
Provides-Extra: docs
Provides-Extra: image-classification
Provides-Extra: mlflow
Provides-Extra: non-framework
Provides-Extra: notebooks
Provides-Extra: object-detection
Provides-Extra: pytorch
Provides-Extra: script
Provides-Extra: video
Requires-Dist: GPUtil (>=1,<2) ; extra == "script"
Requires-Dist: adversarial-robustness-toolbox (>=1.20.1)
Requires-Dist: datasets (>=3.2.0,<3.4.0)
Requires-Dist: eva-decord (>=0.6.1) ; extra == "all" or extra == "video"
Requires-Dist: furo (>=2024,<2025) ; extra == "docs"
Requires-Dist: jupyter (>=1,<2) ; extra == "all" or extra == "non-framework" or extra == "notebooks"
Requires-Dist: maite (>=0.8.1)
Requires-Dist: matplotlib (>=3,<4) ; extra == "all" or extra == "non-framework" or extra == "notebooks"
Requires-Dist: memory-profiler (>=0.61.0) ; extra == "script"
Requires-Dist: mlflow (>=2.19.0) ; extra == "all" or extra == "mlflow"
Requires-Dist: multiprocess (>=0.70.0) ; extra == "all" or extra == "non-framework"
Requires-Dist: myst-parser (>=3,<4) ; extra == "docs"
Requires-Dist: numpy (>=1.24.2,<2)
Requires-Dist: opencv-python (>=4,<5) ; extra == "all" or extra == "non-framework" or extra == "object-detection"
Requires-Dist: pandas (>=2) ; extra == "all" or extra == "non-framework" or extra == "notebooks"
Requires-Dist: pillow (>=11.0.0) ; extra == "all" or extra == "non-framework"
Requires-Dist: pycocotools (>=2,<3) ; extra == "all" or extra == "non-framework" or extra == "object-detection"
Requires-Dist: pympler (>=1,<2) ; extra == "script"
Requires-Dist: qiskit-sphinx-theme (>=2.0.0) ; extra == "docs"
Requires-Dist: scikit-learn (>=1.5.2)
Requires-Dist: setuptools (>=78.1.1)
Requires-Dist: six (>=1.0.0)
Requires-Dist: sphinx (>=4.2.0) ; extra == "docs"
Requires-Dist: sphinx-charts (>=0.2.1) ; extra == "docs"
Requires-Dist: sphinx-copybutton (>=0.5.2) ; extra == "docs" or extra == "docs"
Requires-Dist: sphinx-design (>=0.6.1) ; extra == "docs"
Requires-Dist: timm (>=1,<2) ; extra == "all" or extra == "non-framework"
Requires-Dist: torch (>2.3.1) ; extra == "all" or extra == "pytorch" or extra == "image-classification" or extra == "object-detection"
Requires-Dist: torchmetrics (>=1) ; extra == "all" or extra == "pytorch"
Requires-Dist: torchvision (>=0.18.0) ; extra == "all" or extra == "pytorch" or extra == "image-classification"
Requires-Dist: tqdm (>=4.0.0)
Requires-Dist: transformers (>=4.0.0) ; extra == "all" or extra == "non-framework" or extra == "image-classification"
Requires-Dist: ultralytics (>=8.3.16) ; extra == "all" or extra == "object-detection"
Project-URL: Homepage, https://heart-library.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/IBM/heart-library
Description-Content-Type: text/markdown

# Hardened Extension of the Adversarial Robustness Toolbox (HEART)

![Static Badge](https://img.shields.io/badge/python-3.9%20--%203.11-blue "Python 3.9 - 3.11 version support.")

HEART is a Python extension library for Machine Learning Security that builds on the popular Adversarial Robustness algorithms within the [Adversarial Robustness Toolbox (ART)](https://github.com/Trusted-AI/adversarial-robustness-toolbox). The extension library allows the user to leverage core ART algorithms while providing additional benefits to AI Test & Evaluation (T&E) engineers. HEART documentation can be found [here](https://heart-library.readthedocs.io/).

- Support for T&E of models for Department of Defense use cases
- Alignment to [MAITE](https://github.com/mit-ll-ai-technology/maite) protocols for seamless T&E workflows
- Essential subset of adversarial robustness methods for targeted AI security coverage
- Quality assurance of model assessments in the form of metadata
- In-depth support for users based on codified T&E expert experience in form of guides and examples
- Front-end application for low-code users: HEART Gradio Application


## Installation

### From Python Packaging Index (PyPI)

To install the latest version of HEART from PyPI, run:

```shell
pip install heart-library
```

### From IBM GitHub Source

To install the latest version of HEART from the [heart-library public GitHub](https://github.com/IBM/heart-library), run:

```shell
git clone https://github.com/IBM/heart-library.git
cd heart-library
pip install .
```

### (Optional) Development Environment via Poetry

In some cases, it may be beneficial for developers to set up an environment from a reproducible source of truth.  This environment is useful for developers that wish to work within a pull request or leverage the same development conditions used by HEART contributors.  Please follow the instructions for installation via Poetry within the official HEART repository:

- [Poetry Installation Instructions](https://github.com/IBM/heart-library/blob/main/poetry_installation.md)

## Getting Started With HEART

IBM has published a catalog of notebooks designed to assist developers of all skill levels with the process of getting started utilizing HEART in their AI T&E workflows.  These Jupyter notebooks can be accessed within the official heart-library GitHub repository:

- [HEART Jupyter Notebooks](https://github.com/IBM/heart-library/tree/main/notebooks)

## HEART Modules

The HEART library is organized into three primary modules: attacks, estimators, and metrics.

### heart_library.attacks

> The HEART attacks module contains implementations of attack algorithms for generating adversarial examples and evaluating model robustness.

### heart_library.estimators

> The HEART estimators module contains classes that wrap and extend the evaluated model to make it compatible with attacks and metrics.

### heart_library.metrics

> The HEART metrics module implements industry standard, commonly-used T&E metrics for model evaluation.

## Acknowledgement

This material is based upon work supported by the Chief Digital and Artificial Intelligence Office under Contract No. W519TC-23-9-2037. The views and conclusions contained herein are those of the author(s) and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government.

