-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ART Summary Writer
[wiki work in progress]
ART 1.9 introduces a Summary Writer API which collects metrics about losses, gradients, adversarial patches and textures, etc. at strategic locations in the supported attacks. ART 1.9 provides a default implementation art.summary_writer.SummaryWriterDefault
and allows users to implement custom summary writers by implementing base class art.summary_writer.SummaryWriter
.
art.attacks.evasion.ProjectedGradientDescent*
art.attacks.evasion.AdversarialPatch*
art.attacks.evasion.AdversrialTexture*
The attack’s Summary Writer is activated with argument summary_writer
:
- Boolean: Default writer and output in current location
- String: Default writer and output in defined path
- SummaryWriter: Custom writer in custom location
- All metrics as function of iteration step
4. Indicators of Attack Failure per sample (Pintor et al., 2021)
Tracks if adversarial example switches back to benign.
Quantifies attack convergence.
Quantifies attack convergence rate.
Checks quality of loss gradients.
Users can create custom summary writers to collect custom metrics by implementing art.summary_writer.SummaryWriter
and adding custom metrics in method update
:
def update(self, batch_id, global_step, grad=None, patch=None, estimator=None, x=None, y=None, **kwargs):
providing access to current batch ID and global step, gradients, patches, estimator, input and label data.