Adversarial attacks on a classifier (KS-4): the fast gradient sign method (Goodfellow,...
Vendor-agnostic compute/memory backend. CPUBackend, CUDABackend (Phase 1.5), and HIPBackend (Phase 1....
Definition device_backend.hpp:248
One JSON value: null, a boolean, a number, a string, an array or an object.
Definition json.hpp:22
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) ā th...
Definition tensor.hpp:29
Explanation-quality metrics in the Quantus families (roadmap XAI-5): faithfulness (deletion and inser...
A small strict JSON value, parser and deterministic writer (RFC 8259).
Definition acquisition_functions.hpp:16
std::function< Tensor(const Tensor &input)> PredictFn
The model as a function: input (with a leading batch dimension of 1) to outputs.
Definition explanation_metrics.hpp:24
SensitivityReport ExplanationSensitivity(const Tensor &input, const ExplainFn &explain, const PredictFn &predict, const DifferentiableClassifier *classifier, DeviceBackend *backend, const SensitivityOptions &options={})
Measures how much explain's explanation of input changes under small perturbations.
JsonValue ToJson(const AttackResult &result, const AttackOptions &options)
The result as a pulsatrix.attack.v1 document, without the adversarial inputs.
std::function< Attribution(const Tensor &input)> ExplainFn
Explains input using the model in its current state.
Definition explanation_metrics.hpp:27
A classifier the attacks can differentiate: forward maps an (N, ...) input to (N, C) logits; backward...
Definition adversarial.hpp:49
ExplanationSensitivity()'s settings.
Definition explanation_robustness.hpp:37
double radius
The perturbations' Lā radius, as a fraction of the input's standard deviation (its largest absolute v...
Definition explanation_robustness.hpp:41
int64_t max_halvings
The adversarial point: the FGSM step is halved until the prediction stays, at most this many times.
Definition explanation_robustness.hpp:47
uint64_t seed
Definition explanation_robustness.hpp:44
int64_t samples
Perturbations to sample; Quantus uses 200, which is slow for sampling explainers.
Definition explanation_robustness.hpp:43
ExplanationSensitivity()'s result.
Definition explanation_robustness.hpp:51
double max_sensitivity
The largest and the mean relative change of the explanation over the kept samples; 0 when none were k...
Definition explanation_robustness.hpp:54
double adversarial_epsilon
FGSM's Lā step at the adversarial point.
Definition explanation_robustness.hpp:62
int64_t kept
Definition explanation_robustness.hpp:65
double local_lipschitz
The largest change of the explanation per unit change of the input.
Definition explanation_robustness.hpp:57
int64_t samples
The samples drawn, and those that kept the predicted class.
Definition explanation_robustness.hpp:64
double avg_sensitivity
Definition explanation_robustness.hpp:55
std::optional< double > adversarial_sensitivity
The relative change at FGSM's point; empty without a classifier, or when every halving still changed ...
Definition explanation_robustness.hpp:60
double radius
The Lā radius the samples were drawn in, in the input's units.
Definition explanation_robustness.hpp:67