Releases: Trusted-AI/adversarial-robustness-toolbox
ART 1.8.0
This release of ART v1.8.0 introduces the first estimators for object tracking and regression, adds a general model-independent object detection estimator and new membership inference attacks.
Added
- Added estimator for object tracker GOTURN in PyTorch in
art.estimators.object_tracking.PyTorchGoturn(#1318) - Added estimator for scikit-learn DecisionTreeRegressor in
art.estimators.regression.ScikitlearnDecistionTreeRegressorand added compatibility in attacksAttributeInferenceBlackBoxandMembershipInferenceBlackBox(#1272) - Added general estimator for all object detection models of
torchvisioninart.estimators.object_detection.PyTorchObjectDetector(#1295) - Added membership inference attack based on boundary attacks with general threshold selection by Li and Zhang (#1197)
Changed
- Changed
art.estimators.classification.BlackboxClassifier*to also accept recorded input/prediction data pairs, instead of a callable providing predictions by evaluating the attacked model, enabling attacks on prediction data only without the necessity for direct access to the attacked model (#1247) - Moved patched Lingvo decoder to
art.contrib(#1261)
Removed
- Removed
art.classifiersandart.wappers, both modules have been replaced with tools inart.preprocessing.expectation_over_transformation,art.estimators.classificationandart.estimators.classification.QueryEfficientGradientEstimationClassifier(#1256)
Fixed
[None]
ART 1.7.2
This release of ART 1.7.2 provides updates to ART 1.7.
Added
[None]
Changed
[None]
Removed
[None]
Fixed
ART 1.7.1
This release of ART 1.7.1 provides updates to ART 1.7.
Added
- Added wrapper
Mp3CompressionPyTorchforMp3Compressionto make it compatible with PyTorch-specific attack implementations. (#1210) - Added new install option
non-frameworktosetup.pyto install all non-framework dependencies of ART. (#1209) - Added wrapper
VideoCompressionPyTorchforVideoCompressionto make it compatible with PyTorch-specific attack implementations. (#1210)
Changed
- Changed
Mp3Compressionto add back reapplication of normalization to the compressed result. (#1210) - Changed
KerasClassifier.fitto use batching provided by the methodfitof the Keras model. (#1182)
Removed
[None]
Fixed
- Fixed bug of not passing user-provided device type, and instead always using default
gpu, to standardisation preprocessor in allPyTorchEstimatorby using user-provided device type. (#1223) - Fixed bug in method
BaseEstimator.fit_generatorfor fitting generators in cases where preprocessing is defined to not apply preprocessing twice. (#1219) - Fixed bug in
ImperceptibleASRPyTorchto prevent NaN loss value for batch size larger than 1 by removing unnecessary zero-padding. (#1198) - Fixed two bugs in
OverTheAirFlickeringPyTorchby making sure that the regularization norms are computed over the whole batch of perturbations, rather than per sample's perturbation and second that the "roll" operations are performed over the batch samples, rather than over the frames. (#1192) - Fixed bug in
SpectralSignatureDefense, that lead to rejections of all clean images, by correctly indexing the label data. (#1189) - Fixed bug of accidentally removed checks for
apply_fitandapply_predictproperties of framework-independentPreprocessortools inPyTorchEstimatorandTensorFlowV2Estimator. With the bug thePreprocessortools were always applied in methodsfitandpredictindependent of the values ofapply_fitandapply_predict. (#1181) - Fixed bug in
MembershipInferenceBlackBoxRemove.inferby removing unnecessary shuffling of the test data. (#1173) - Fixed bug in
PixelAttackandThresholdAttackby casting input data to correct dtype. (#1175)
ART 1.7.0
This release of ART v1.7.0 introduces many new evasion and inference attacks providing support for the evaluation of malware or tabular data classification, new query-efficient black-box (GeoDA) and strong white-box (Feature Adversaries) evaluation methods. Furthermore, this release introduces an easy to use estimator for Espresso ASR models to facilitate ASR research and connect Espresso and ART. This release also introduces support for binary classification with single outputs in neural networks classifiers and selected attacks. Many more new features and details can be found below:
Added
- Added LowProFool evasion attack for imperceptible attacks on tabular data classification in
art.attacks.evasion.LowProFool. (#1063) - Added Over-the-Air-Flickering attack in PyTorch for evasion on video classifiers in
art.attacks.evasion.OverTheAirFlickeringPyTorch. (#1077, #1102) - Added API for speech recognition estimators compatible with Imperceptible ASR attack in PyTorch. (#1052)
- Added Carlini&Wagner evasion attack with perturbations in L0-norm in
art.attacks.evasion.CarliniL0Method. (#844, #1109) - Added support for Deep Speech v3 in
PyTorchDeepSpeechestimator. (#1107) - Added support for TensorBoard collecting evolution of norms (L1, L2, and Linf) of loss gradients per batch, adversarial patch, and total loss and its model-specific components where available (e.g. PyTochFasterRCNN) in
AdversarialPatchPyTorch,AdversarialPatchTensorFlow,FastGradientMethod, and allProjectedGradientDescent*attacks. (#1071) - Added
MalwareGDTensorFlowattack for evasion on malware classification of portable executables supporting append based, section insertion, slack manipulation, and DOS header attacks. (#1015) - Added Geometric Decision-based Attack (GeoDA) in
art.attacks.evasion.GeoDAfor query-efficient black-box attacks on decision labels using DCT noise. (#1001) - Added Feature Adversaries framework-specific in PyTorch and TensorFlow v2 as efficient white-box attack generating adversarial examples imitating intermediate representations at multiple layers in
art.attacks.evasion.FeatureAdversaries*. (#1128, #1142, #1156) - Added attribute inference attack based on membership inference in
art.attacks.inference.AttributeInferenceMembership. (#1132) - Added support for binary classification with neural networks with a single output neuron in
FastGradientMethod, and allProjectedGradientDescent*attacks. Neural network binary classifiers with a single output require settingnb_classes=2and labelsyin shape (nb_samples, 1) or (nb_samples,) containing 0 or 1. Backward compatibility for binary classifiers with two outputs is guaranteed withnb_classes=2and labelsyone-hot-encoded in shape (nb_samples, 2). (#1118) - Added estimator for Espresso ASR models in
art.estimators.speech_recognition.PyTorchEspressowith support for attacks withFastGradientMethod,ProjectedGradientDescentandImperceptibleASRPyTorch. (#1036) - Added deprecation warnings for
art.classifiersandart.wrappersto be replace withart.estimators. (#1154)
Changed
- Changed
art.utils.load_iristo use Iris dataset fromsklearn.datasetsinstead ofarchive.ics.uci.edu. (#1097 ) - Changed
HopSkipJumpto check for NaN in the adversarial example candidates and return original (benign) sample if at least one NaN is detected. (#1124) - Changed
SquareAttackto accept user-defined loss and adversarial criterium definitions to enable black-box attacks on all machine learning tasks on images beyond classification. (#1127) - Changed
PyTorchFasterRCNN.loss_gradientsto process each sample separately to avoid issues with gradient propagation withtorch>=1.7. (#1138)
Removed
[None]
Fixed
ART 1.6.2
This release of ART 1.6.2 provides updates to ART 1.6.
Added
- Added targeted option to
RobustDpatch(#1069) - Added option
standardise_outputto define provided label format (#1069) - Added property
native_label_is_pytorch_formatto object detectors to define label format expected by the model (#1069)
Changed
- Changed
DpatchandRobustDpatchto work internally with PyTorchFasterRCNN's object detection label format and convert labels if provided inTensorFlowFasterRCNN's format accordingly using optionstandardise_output(#1069) - Change
setup.pyto only contain core dependencies ininstall_requiresand added additional install optionstensorflow_image,tensorflow_audio,pytorch_image, andpytorch_audio(#1116) - Changed check for version of
torchandtorchvisioninAdversarialPatchPyTorchto account for suffixes like+cu102(#1115) - Changed
art.utils.load_iristo usesklearn.datasets.load_irisinstead of download fromhttps://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data(#1097)
Removed
- Removed unnecessary requirement for
scoresin labelsyforTensorFlowFasterRCNN.loss_gradientandPyTorchFasterRCNN.loss_gradient(#1069)
Fixed
- Fixed docstrings of methods
predictandloss_gradientto correctly describe the expected and provided label format (#1069) - Fixed bug of missing transfer of tensor to device
ProjectedGradientDescentPyTorch(#1076) - Fixed bug resulting in wrong loss gradients calculated with
ScikitlearnLogisticRegression.loss_gradient(#1065)
ART 1.6.1
This release of ART 1.6.1 provides updates to ART 1.6.
Added
- Added a notebook showing an example of Expectation over Transformation (EoT) sampling with ART to generate adversarial examples that are robust against rotation in image classification tasks. (#1051)
- Added a check for valid combinations of
stride,freq_dimand image size inSimBAattack. (#1037) - Added accurate gradient estimation to
LFilteraudio preprocessing. (#1002) - Added support for multiple layers to be targeted by
BullseyePolytopeAttackPyTorchattack to increase effectiveness in end-to-end scenarios. (#1003) - Added check and ValueError to provide explanation for too large
nb_parallelvalues inZooAttack. (#988)
Changed
- Changed
TensorFlowV2Classifier.get_activationsto accept negative layer indexes. (#1054) - Tested
BoundaryAttackandHopSkipJumpattacks withbatch_sizelarger than 1 and changed default value tobatch_size=64. (#971)
Removed
[None]
Fixed
- Fixed bug in
Dpatchattack which did not update the patch, being optimised, onto the images used for loss gradient calculation leading to iterations with the constant, initially, applied patches. (#1049) - Fixed bug in
BullseyePolytopeAttackPyTorchattack where attacking multiple layers of the underlying model only perturbed the first of all input images. (#1046) - Fixed return value of TensorFlowV2Classifier.get_activations to a list of strings. (#1011)
- Fixed bug in
TensorFlowV2Classifier.loss_gradientby adding labels to application of preprocessing step to enable EoT preprocessing steps that increase the number of samples and labels. This change does not affect the accuracy of previously calculated loss gradients. (#1010) - Fixed bug in
ElasticNetattack to apply theconfidenceparameter when generating adversarial examples. (#995) - Fixed bug in
art.attacks.poisoning.perturbations.image_perturbations.insert_imageto correctly transpose input images whenchannels_first=True. (#1009) - Fixed bug of missing method
compute_lossinPyTorchDeepSpeech,TensorFlowFasterRCNNandBlackBoxClassifier. (#994, #1000)
ART 1.6.0
This release of ART v1.6.0 introduces with the clean-label poisoning attack Bullseye Polytope, a baseline attribute inference attack, and a PyTorch-specific implementation of Adversarial Patch attack with perspective transformation sampling, new evaluation tools in the three different threats types of poisoning, inference and evasion. Furthermore, this release contains the first set of Expectation over Transformation (EoT) preprocessing tools for image processing and natural corruptions.
Added
- Added the Bullseye Polytope clean-label poisoning attack in
art.attacks.poisoning.BullseyePolytopeAttackPyTorch(#962) - Added the Pointwise Differential Training Privacy (PDTP) metric measuring training data membership leakage of trained model in
art.metrics.PDTP(#958) - Added a attribute inference base line attack
art.attacks.inference.attribute_inference.AttributeInferenceBaselinedefining a minimal attribute inference performance that can be achieved without access to the evaluated model (#956) - Added a first set of Expectation over Transformation (EoT) preprocessing in
art.preprocessing.expectation_over_transformationfor image processing and natural image corruptions including brightness, contrast, Gaussian noise, shot noise, and zoom blur. These EoTs enable sampling multiple transformed samples in each forward pass and are fully differentiable for accurate loss gradient calculation in PyTorch and TensorFlow v2. They can be chained together in sequence and are implemented fully framework-specific (#919) - Added a function for image trigger perturbations blending images (#913)
- Added a method
insert_transformed_patchto all adversarial patch attacksart.attacks.evasion.AdversarialPatch*applying adversarial patches onto a perspective transformed square defined by the coordinates of its four corners (#891) - Added the Adversarial Patch attack framework-specific in PyTorch in
art.attacks.evasion.AdversarialPatchPyTorchwith additional functionality to support sampling over perspective transformations (#876)
Changed
- Changed handling of NaN values in loss gradients in
art.attacks.evasion.FastGradientMethodandart.attacks.evasion.ProjectedGradientDescent*by replacing NaN values with 0.0 and log a warning message. This should prevent losing expensive attack runs in late iterations and still return an adversarial example, but log a warning to alert the user. (#883) - Changed permitted ranges for
eps_stepandepsinart.attacks.evasion.ProjectedGradientDescent*to alloweps_stepto be larger thanepsfor all norms, alloweps_step=np.infto immediately project towards the norm ball or clip_values, and supporteps=0.0to run the attack without any attack budget. The latter two changes are intended to facilitate the verification of attack setups. (#882) - Changed in the unit tests the marker
skipMlFrameworktoskip_frameworkand the pytest argumentmlFrameworktoframework(#961) - Changed
art.preprocessing.standardisation_mean_stdfor standardisation withmeanandstdto provide extended support for broadcasting by automatically adapting 1-dimensional arrays formeanandstdto be broadcastable on NCHW inputs (#839) - Changed
art.estimators.object_detection.PyTorchFasterRCNN.loss_gradientto not overwrite the input label array with tensors (#954) - Changed and automated the setting of model states by removing method
set_learning_phasefrom all estimators and automating setting the model into the most likely appropriate state for each operation in methodspredict(eval mode,training_mode=False) ,fit(train mode,training_mode=True) ,loss_gradient(eval mode) ,class_gradient(eval mode) , etc. The default is defined by a new method argumenttraining_modewhich can be changed for example for debugging purposes. An exception are RNN-type models in PyTorch whereloss_gradientandclass_gradientwill run the model in train mode but freeze the model's batch-norm and dropout layers iftraining_mode=False. (#781) - Changed
art.attacks.evasion.BoundaryAttackin normal (L282) and a suboptimal (L287) termination to return the adversarial example candidate with the smallest norm of the perturbation instead of returning the first adversarial example candidate in its list, this will facilitate the finding the minimum L2 perturbation adversarial examples (#948) - Changed
art.attacks.inference.attribute_inference.AttributeInferenceBlackBoxto support one-hot encoded features that have been scaled and lie in-between 0 and 1 instead of just 0 and 1 (#927) - Changed imports of
tensorflowin TensorFlow v1 specific tools to enable backward compatibility and application with TensorFlow v2 (#880) - Changed optimizer of
art.attacks.evasion.AdversarialPatchTensorFlowV2fromSGDtoAdamfor better performance (#878) - Changed
art.attacks.evasion.BrendelBethgeAttackto include support fornumba, following the reference implementation, which leads to great acceleration of the attack (#868) - Changed
art.estimators.classification.ScikitlearnClassifierand all model specific scikit-learn estimators to provide the new argumentuse_logitsto define returning probability or logit predictions in their methodspredict(#872) - Changed metrics
clever_tand depending on itcleverandclever_uto reduce long runtimes by computing the class gradients of all samples inrand_poolbefore looping through the batches. To reduce the risk ofResourceExhasutedError, batching is now also applied onrand_poolto compute class gradients on smaller batches of sizepool_factor(#762)
Removed
- Removed deprecated argument and property
channel_indexfrom all estimators.channel_indexhas been replaced bychannels_first. (#869)
Fixed
- Fixed the criterion of targeted
art.attacks.evasion.BoundaryAttackto now correctly check that adversarial predictions are different from the original image prediction during sampling instead of the same (#948)
ART 1.5.3
This release of ART 1.5.3 provides updates to ART 1.5.
Added
[None]
Changed
- Changed argument names of
art.attacks.evasion.ImperceptibleASR,art.attacks.evasion.ImperceptibleASRPyTorchandart.attacks.evasion.CarliniWagnerASRwhere necessary to use the same names in all three attacks. (#955, #959) - Changed optimisation in
art.attacks.evasion.ImperceptibleASRPyTorchto usetorch.float64instead oftorch.float32to prevent NaN as loss value. (#931) - Changed
art.attacks.evasion.ImperceptibleASRto improve the psychoacoustic model and stabilize the imperceptible loss by switching to librosa's STFT and using scalar PSD maximum. (#930) - Changed
art.attacks.evasion.ImperceptibleASRto use periodic window for STFT instead symmetric window option. (#930) - Changed
art.attacks.evasion.ImperceptibleASRwith early stopping if loss theta < 0.05 to avoid running into gradients with NaN values. (#930) - Changed
art.attacks.evasion.ImperceptibleASRPyTorchto reset its optimisers for each internal batch in methodgenerateto guarantee the same optimiser performance on each batch, this is especially important for adaptive optimisers. (#917) - Changed
art.attacks.evasion.ImperceptibleASRPyTorchto usetorch.stftinstead oftorchaudio.transforms.Spectrogramto correctly compute the spectrogram. (#914) - Changed
art.estimators.speech_recognition.PyTorchDeepSpeechto freeze batch-norm layers of the Deep Speech model in methodloss_gradientto obtain gradients using dataset statistics instead of batch statistics and avoid changing dataset statistics of the batch-norm layers with each call. (#912)
Removed
[None]
Fixed
- Fixed bug of missing argument
modelinart.estimators.object_detection.TensorFlowFasterRCNNwhich caused instantiation to fail. (#951) - Fixed bug of missing square in calculation of loss and class gradients for
art.estimators.classification.ScikitlearnSVCusing Radial Basis Function (RBF) kernels. (#921) - Fixed missing support for
preprocessing=Noneinart.estimators.BaseEstimator. (#916)
ART 1.5.2
This release of ART 1.5.2 provides updates to ART 1.5.
Added
- Added new method
reset_patchtoart.attacks.evasion.adversarial_patch.*to reset patch (#863) - Added passing
kwargsto internal attacks ofart.attacks.evasion.AutoAttack(#850) - Added
art.estimators.classification.BlackBoxClassifierNeuralNetworkas black-box classifier for neural network models (#849) - Added support for
channels_first=Falseforart.attacks.evasion.ShadowAttackin PyTorch (#848)
Changed
- Changed Numpy requirements to be less strict to resolve conflicts in dependencies (#879)
- Changed estimator requirements for
art.attacks.evasion.SquareAttackandart.attacks.evasion.SimBAto includeNeuralNetworkMixinrequiring neural network models (#849)
Removed
[None]
Fixed
- Fixed
BaseEstimator.set_paramsto setpreprocessingandpreprocessing_defencescorrectly by accounting forart.preprocessing.standardisation_mean_std(#901) - Fixed support for CUDA in
art.attacks.inference.membership_inference.MembershipInferenceBlackBox.infer(#899) - Fixed return in
art.preprocessing.standardisation_mean_std.StandardisationMeanStdPyTorchto maintain correct dtype (#890) - Fixed type conversion in
art.evaluations.security_curve.SecurityCurveto be explicit (#886) - Fixed dtype in
art.attacks.evasion.SquareAttackfornorm=2to maintain correct type (#877) - Fixed missing
CarliniWagnerASRinart.attacks.evasionnamespace (#873) - Fixed support for CUDA i `art.estimators.classification.PyTorchClassifier.loss (#862)
- Fixed bug in
art.attacks.evasion.AutoProjectedGradientDescentfor targeted attack to correctly detect successful iteration steps and added robust stopping criteria if loss becomes zero (#860) - Fixed bug in initialisation of search space in
art.attacks.evasion.SaliencyMapMethod(#843) - Fixed bug in support for video data in
art.attacks.evasion.adversarial_patch.AdversarialPatchNumpy(#838) - Fixed bug in logged success rate of
art.attacks.evasion.ProjectedGradientDescentPyTorchandart.attacks.evasion.ProjectedGradientDescentTensorFlowV2to use correct labels (#833)
ART 1.5.1
This release of ART 1.5.1 provides updates to ART 1.5.
Added
- Added an option to select to probability values for model extraction attacks in addition to index labels in
art.attacks.extraction.CopycatCNNandart.attacks.extraction.KnockoffNets. (#825) - Added a new notebook demonstrating model extraction attacks and defences. (#825)
- Added
art.attacks.evasion.CarliniWagnerASRas a special case ofart.attacks.evasion.ImperceptibleASRwheremax_iter_stage_2=0skipping the second stage of theImperceptibleASR. (#784)
Changed
- Changed method
generateofart.attacks.evasion.ProjectedGradientDescentPyTorchandart.attacks.evasion.ProjectedGradientDescentTensorFlowV2to create a copy of the input data to guard the input data from being overwritten by a model that unexpectedly overwrites its input data. This change follows the implementation ofart.attacks.evasion.ProjectedGradientDescentNumpyand provides an extra layer of protection against unexpected model behavior. (#805) - Change numerical precision in
art.attacks.evasion.Wassersteinfromfloattodoubleto reduce numerical overflow innumpy.logand replace input pixel values of 0 with EPS_LOG=10^-10 to prevent division by zero innumpy.log. (#780) - Changed
tqdmimports to usetqdm.autoto automatically run its Jupyter widgets where supported. (#799) - Improved documentation, argument value checks and added support for index labels in
art.attacks.inference.member_ship.LabelOnlyDecisionBoundary. (#790)
Removed
[None]
Fixed
- Fixed bug in
art.estimators.classification.KerasClassifier.custom_loss_gradient()to supportkerasandtensorflow.keras. (#810) - Fixed bug in
art.attacks.evasion.PixelThreshold.generateto correctly scale images in range [0, 255]. (#802) - Fixed bug in
art.attacks.evasion.PixelThresholdto run CMA Evolution Strategymax_iteriterations instead of 1 iteration. (#802) - Fixed bug in
art.estimators.object_detection.PyTorchFasterRCNNby adding missing argumentmodelin super().init. (#789)