Distributed API Reference

This page contains the reference for the distributed API of attribench. For simple, small-scale experiments, the attribench functional API is recommended. For large-scale experiments, the distributed API is recommended, as it can leverage multiple GPUs.

General

attribench.distributed.SelectSamples(...[, ...])

Select correctly classified samples from a dataset and write them to a HDF5 file.

attribench.distributed.TrainAdversarialPatches(...)

Train adversarial patches for a given model and dataset and save them to disk.

attribench.distributed.ComputeAttributions(...)

Compute attributions for a dataset using multiple processes.

Metrics

attribench.distributed.Metric(model_factory, ...)

Abstract base class for metrics that are computed using multiple processes.

attribench.distributed.metrics.Deletion(...)

Compute the Deletion metric for a given AttributionsDataset and model using multiple processes.

attribench.distributed.metrics.Insertion(...)

Compute the Insertion metric for a given AttributionsDataset and model using multiple processes.

attribench.distributed.metrics.ImpactCoverage(...)

Computes the Impact Coverage metric for a given dataset, model, and set of attribution methods, using multiple processes.

attribench.distributed.metrics.Irof(...[, ...])

Compute the IROF metric for a given AttributionsDataset and model using multiple processes.

attribench.distributed.metrics.Infidelity(...)

Computes the Infidelity metric for a given AttributionsDataset and model using multiple processes.

attribench.distributed.metrics.MaxSensitivity(...)

Compute the Max-Sensitivity metric for a given Dataset and attribution methods using multiple processes.

attribench.distributed.metrics.MinimalSubset(...)

Computes Minimal Subset Deletion or Insertion for a given AttributionsDataset and model using multiple processes.

attribench.distributed.metrics.SensitivityN(...)

Compute the Sensitivity-n metric for a given AttributionsDataset and model using multiple processes.