MCPcopy Create free account

hub / github.com/JonasGeiping/data-poisoning / functions

Functions297 in github.com/JonasGeiping/data-poisoning

↓ 1 callersFunction_proj_onto_simplex
Project onto probability simplex by default. Code from https://github.com/hsnamkoong/robustopt/blob/master/src/simple_projections.py See MIT
forest/witchcoven/witch_convex_polytope.py:49
↓ 1 callersMethod_run_trial
Run a single trial.
forest/witchcoven/witch_base.py:139
↓ 1 callersMethod_set_location
.Fix locations where we’ll put the patches.
forest/victims/batched_attacks.py:528
↓ 1 callersFunction_split_data
Split data for meta update steps and other defenses.
training_loop.py:101
↓ 1 callersFunction_unnormalize
(tensor, mean, std, inplace=False)
forest/data/lmdb_datasets.py:124
↓ 1 callersMethodasdict
(self)
forest/hyperparameters.py:91
↓ 1 callersFunctionautoml_bridge
Transfer data to autoML code. Lazy init due to additional libraries.
forest/utils.py:213
↓ 1 callersMethodbenchmark_construction
Construct according to the benchmark.
forest/data/kettle_benchmark_experiment.py:26
↓ 1 callersMethodbuild_grid
https://discuss.pytorch.org/t/cropping-a-minibatch-of-images-each-image-a-bit-differently/12247/5.
forest/data/diff_data_augmentation.py:31
↓ 1 callersFunctioncheck_targets
Get accuracy and loss for all targets on their intended class.
forest/victims/training.py:217
↓ 1 callersFunctionconvblock
(width_in, width_out)
forest/victims/models.py:119
↓ 1 callersFunctioncreate_database
Create an LMDB database from the given pytorch dataset. https://github.com/Lyken17/Efficient-PyTorch/blob/master/tools/folder2lmdb.py Remove
forest/data/lmdb_datasets.py:91
↓ 1 callersFunctioncreate_dataset_automl
(uid, project_id, multilabel=False, wait_for_response=True)
forest/gcloud.py:191
↓ 1 callersFunctioncriterion
(outputs, labels)
training_loop.py:77
↓ 1 callersMethoddeterministic_construction
Construct according to the triplet input key. Poisons are always the first n occurences of the given class. [This is the same setup a
forest/data/kettle_det_experiment.py:22
↓ 1 callersMethodfreeze_feature_extractor
(self)
forest/victims/victim_base.py:86
↓ 1 callersMethodget_target
(self, index)
forest/data/cached_dataset.py:40
↓ 1 callersMethodget_target
Return only the pair (target, idx).
forest/data/lmdb_datasets.py:86
↓ 1 callersFunctiongrad_f
(x)
forest/witchcoven/witch_convex_polytope.py:86
↓ 1 callersFunctionimagenet_to_gcloud
(kettle, clean_uid, bucketname, format, dryrun=False)
forest/gcloud.py:30
↓ 1 callersMethodpatch_temp_targets
(self, kettle)
forest/witchcoven/witch_htbd.py:227
↓ 1 callersMethodpenultimate
(self, x)
forest/victims/mobilenet.py:176
↓ 1 callersFunctionpoisons_to_gcloud
(kettle, poison_delta, clean_uid, uid, bucketname, format, dryrun=False)
forest/gcloud.py:83
↓ 1 callersFunctionpredict
(model_id, project_id, csvpath_test, resultpath_cloud)
forest/gcloud.py:353
↓ 1 callersMethodprepare_experiment
Choose targets from some label which will be poisoned toward some other chosen label.
forest/data/kettle_base.py:200
↓ 1 callersFunctionprint_and_save_stats
Print info into console and into the stats object.
forest/victims/utils.py:4
↓ 1 callersMethodrandom_construction
Construct according to random selection. The setup can be repeated from its key (which initializes the random generator). This method
forest/data/kettle_random_experiment.py:24
↓ 1 callersMethodrandom_crop_grid
https://discuss.pytorch.org/t/cropping-a-minibatch-of-images-each-image-a-bit-differently/12247/5.
forest/data/diff_data_augmentation.py:38
↓ 1 callersFunctionrun_step
(kettle, poison_delta, epoch, stats, model, defs, optimizer, scheduler, loss_fn, pretraining_phase=False)
forest/victims/training.py:13
↓ 1 callersFunctionrun_validation
Get accuracy of model relative to dataloader. Hint: The validation numbers in "base" and "target" explicitely reference the first label in intend
forest/victims/training.py:176
↓ 1 callersMethodsave_feature_representation
(self)
forest/victims/victim_base.py:89
↓ 1 callersFunctionsave_to_table
Save keys to .csv files.
forest/utils.py:99
↓ 1 callersFunctiontrain
(dataset_id, display_name, project_id, dryrun=False, edge=True)
forest/gcloud.py:271
FunctionKettle
Interface to connect to a kettle [data] child class.
forest/data/__init__.py:12
FunctionVictim
Implement Main interface.
forest/victims/__init__.py:8
FunctionWitch
Implement Main interface.
forest/witchcoven/__init__.py:14
Function_ActivationClustering
Implement Chen et al. "Detecting Backdoor Attacks on Deep Neural Networks by Activation Clustering".
forest/filtering_defenses.py:94
Function_DeepKNN
deepKNN as in Peri et al. "Deep k-NN Defense against Clean-label Data Poisoning Attacks". An overestimation factor of 2 is motivated as necessary
forest/filtering_defenses.py:31
Function_SpectralSignaturesDefense
Implement the spectral signautres defense proposed by Tran et al. in "Spectral Signatures in Backdoor Attacks". https://proceedings.neurips.cc/pa
forest/filtering_defenses.py:61
Method__enter__
Enter.
forest/victims/context.py:15
Method__exit__
Return model to CPU.
forest/victims/context.py:19
Method__getattr__
This is only called if all attributes of Subset are exhausted.
forest/data/cached_dataset.py:43
Method__getattr__
Call this only if all attributes of Subset are exhausted.
forest/data/datasets.py:141
Method__getattr__
Call this only if all attributes of Subset are exhausted.
forest/data/lmdb_datasets.py:55
Method__getitem__
(self, index)
forest/data/cached_dataset.py:35
Method__getitem__
(self, idx)
forest/data/datasets.py:151
Method__getitem__
Getitem from https://pytorch.org/docs/stable/_modules/torchvision/datasets/cifar.html#CIFAR10. Args: index (int): Index
forest/data/datasets.py:162
Method__getitem__
Getitem from https://pytorch.org/docs/stable/_modules/torchvision/datasets/cifar.html#CIFAR10. Args: index (int): Index
forest/data/datasets.py:207
Method__getitem__
_getitem from https://pytorch.org/docs/stable/_modules/torchvision/datasets/mnist.html#MNIST. Args: index (int): Index R
forest/data/datasets.py:252
Method__getitem__
_getitem from https://pytorch.org/docs/stable/_modules/torchvision/datasets/folder.html#DatasetFolder. Args: index (int): Index
forest/data/datasets.py:330
Method__getitem__
Return a triplet of image, label, index.
forest/data/datasets.py:473
Method__getitem__
Get from database. This is still unordered access. Cursor access would be a major hassle in conjunction with random shuffles.
forest/data/lmdb_datasets.py:63
Method__init__
Initialize with given specs...
forest/data/kettle_external.py:12
Method__init__
Initialize with a given pytorch dataset.
forest/data/cached_dataset.py:10
Method__init__
Use as torchvision.datasets.ImageNet.
forest/data/datasets.py:297
Method__init__
As torchvision.datasets.ImageNet except for additional keyword 'limit'.
forest/data/datasets.py:373
Method__init__
Init with split, transform, target_transform. use --cached_dataset data is to be kept in memory.
forest/data/datasets.py:431
Method__init__
Args: source and target size.
forest/data/diff_data_augmentation.py:19
Method__init__
Initialize with a given pytorch dataset.
forest/data/lmdb_datasets.py:22
Method__init__
Initialize with given specs...
forest/data/kettle_base.py:45
Method__init__
Cut-out with given alpha value. 0.66 is CIFAR-specific so that # s.t. sqrt(1 - 0.66) * 28 approx 16
forest/data/mixing_data_augmentations.py:49
Method__init__
Initialize with mixing factor alpha.
forest/data/mixing_data_augmentations.py:98
Method__init__
Initialize with a given data augmentation module.
forest/data/mixing_data_augmentations.py:130
Method__init__
Init with setup info.
forest/victims/context.py:7
Method__init__
Initialize empty victim.
forest/victims/victim_distributed.py:25
Method__init__
Initialize with dict containing type and strength of attack and model info.
forest/victims/batched_attacks.py:58
Method__init__
Init with width and num classes.
forest/victims/models.py:141
Method__init__
(self, num_classes=10, train_dp=0, test_dp=0, droplayer=0, bdp=0)
forest/victims/mobilenet.py:119
Method__init__
Initialize empty victim.
forest/victims/victim_base.py:44
Method__init__
(self, vgg_name, in_channels=3, num_classes=10)
forest/victims/vgg.py:45
Method__init__
Initialize a model with given specs...
forest/witchcoven/witch_base.py:32
Method__init__
Init with network.
forest/witchcoven/modules.py:19
Method__len__
(self)
forest/data/cached_dataset.py:32
Method__len__
(self)
forest/data/datasets.py:155
Method__len__
Return length via image paths.
forest/data/datasets.py:469
Method__len__
Draw length from target dataset.
forest/data/lmdb_datasets.py:59
Method_adversarial_step
Step through a model epoch to in turn minimize target loss.
forest/victims/victim_base.py:168
Method_batched_step
Take a step toward minmizing the current target loss.
forest/witchcoven/witch_matching.py:166
Method_brew
Sanity check: Contructing data poisons by watermarking.
forest/witchcoven/witch_watermark.py:23
Method_brew
(self, victim, kettle)
forest/witchcoven/witch_patch.py:26
Method_define_objective
Implement the closure here.
forest/witchcoven/witch_convex_polytope.py:19
Method_define_objective
Implement the closure here.
forest/witchcoven/witch_poison_frogs.py:21
Method_define_objective
Implement the closure here.
forest/witchcoven/witch_matching.py:21
Method_define_objective
Implement the closure here.
forest/witchcoven/witch_matching.py:104
Method_define_objective
Implement the closure here.
forest/witchcoven/witch_matching.py:319
Method_define_objective
Implement the closure here.
forest/witchcoven/witch_bullseye.py:17
Method_define_objective
(self, inputs, labels, criterion, targets, intended_classes, *args)
forest/witchcoven/witch_metapoison.py:28
Method_define_objective
(self, inputs, labels, criterion, targets, intended_classes, *args)
forest/witchcoven/witch_metapoison.py:57
Method_define_objective
(self, inputs, labels, criterion, targets, intended_classes, *args)
forest/witchcoven/witch_metapoison.py:85
Method_forward_impl
(self, x)
forest/victims/models.py:295
Method_initialize_brew
(self, victim, kettle)
forest/witchcoven/witch_matching.py:99
Method_iterate
Validate a given poison by training the model and checking target accuracy.
forest/victims/victim_distributed.py:91
Method_iterate
Validate a given poison by training the model and checking target accuracy.
forest/victims/victim_ensemble.py:107
Method_iterate
Validate a given poison by training the model and checking target accuracy.
forest/victims/victim_single.py:96
Method_objective
Evaluate negative CrossEntropy for a gradient ascent.
forest/victims/batched_attacks.py:141
Method_objective
Evaluate Gradient Alignment and descend.
forest/victims/batched_attacks.py:191
Method_objective
Evaluate Gradient Alignment and descend.
forest/victims/batched_attacks.py:207
Method_objective
Evaluate Metapoison.
forest/victims/batched_attacks.py:229
Method_objective
Evaluate Gradient Alignment and descend.
forest/victims/batched_attacks.py:249
Method_run_trial
Run a single trial.
forest/witchcoven/witch_htbd.py:16
← previousnext →101–200 of 297, ranked by callers