MCPcopy Create free account

hub / github.com/JonasGeiping/data-poisoning / types & classes

Types & classes63 in github.com/JonasGeiping/data-poisoning

↓ 14 callersClassResNet
ResNet generalization for CIFAR-like thingies. This is a minor modification of https://github.com/pytorch/vision/blob/master/torchvision/mode
forest/victims/models.py:239
↓ 11 callersClassSubset
Overwrite subset class to provide class methods of main class.
forest/data/datasets.py:138
↓ 7 callersClassHyperparameters
Hyperparameters used by this framework.
forest/hyperparameters.py:72
↓ 4 callersClassCachedDataset
Cache a given dataset.
forest/data/cached_dataset.py:7
↓ 4 callersClassLMDBDataset
Implement LMDB caching and access. Based on https://github.com/pytorch/vision/blob/master/torchvision/datasets/lsun.py and https://github
forest/data/lmdb_datasets.py:14
↓ 3 callersClassRandomAttack
Sanity check: do not actually attack - just use the random initialization.
forest/victims/batched_attacks.py:148
↓ 3 callersClassVGG
forest/victims/vgg.py:44
↓ 2 callersClassAdaptivePatchAttack
Randomly patch pairs of classes as in Liam's implementation and optimize over these triggers.
forest/victims/batched_attacks.py:595
↓ 2 callersClassCIFAR10
Super-class CIFAR10 to return image ids with images.
forest/data/datasets.py:159
↓ 2 callersClassCIFAR100
Super-class CIFAR100 to return image ids with images.
forest/data/datasets.py:204
↓ 2 callersClassCutmix
Implement cutmix, a data augmentation combining cutout and mixup. https://arxiv.org/abs/1905.04899. This is fixed to nway=2 for now and hardcodes
forest/data/mixing_data_augmentations.py:89
↓ 2 callersClassGPUContext
GPU context for quick (code-wise) moves to and from GPU.
forest/victims/context.py:4
↓ 2 callersClassImageNet
Overwrite torchvision ImageNet to change metafile location if metafile cannot be written due to some reason.
forest/data/datasets.py:294
↓ 2 callersClassImageNet1k
Overwrite torchvision ImageNet to limit it to less than 1mio examples. [limit/per class, due to automl restrictions].
forest/data/datasets.py:367
↓ 2 callersClassKettleRandom
Generate parameters for an experiment randomly. If --poisonkey is provided, then it will be used to seed the randomization.
forest/data/kettle_random_experiment.py:11
↓ 2 callersClassMNIST
Super-class MNIST to return image ids with images.
forest/data/datasets.py:249
↓ 2 callersClassRandomTransform
Crop the given batch of tensors at a random location. As discussed in https://discuss.pytorch.org/t/cropping-a-minibatch-of-images-each-image-a-b
forest/data/diff_data_augmentation.py:13
↓ 2 callersClassTinyImageNet
Tiny ImageNet data set available from `http://cs231n.stanford.edu/tiny-imagenet-200.zip`. Author: Meng Lee, mnicnc404 Date: 2018/06/04 Re
forest/data/datasets.py:405
↓ 1 callersClassAdaptivePatchAttackUnconstrained
Randomly patch pairs of classes as in Liam's implementation and optimize over these triggers. Allow the target patch to differ from the input pat
forest/victims/batched_attacks.py:643
↓ 1 callersClassAdversarialAttack
Implement a basic untargeted attack objective.
forest/victims/batched_attacks.py:138
↓ 1 callersClassAlignmentPoisoning
Implement limited steps for data poisoning via gradient alignment.
forest/victims/batched_attacks.py:188
↓ 1 callersClassBlock
expand + depthwise + pointwise
forest/victims/mobilenet.py:20
↓ 1 callersClassConvNetBN
ConvNetBN.
forest/victims/models.py:138
↓ 1 callersClassCutout
This is data augmentation via Cutout. https://arxiv.org/abs/1708.04552.
forest/data/mixing_data_augmentations.py:46
↓ 1 callersClassFeatureCollisionPoisoning
Implement limited steps for data poisoning via feature collision (with the bullseye polytope variant).
forest/victims/batched_attacks.py:246
↓ 1 callersClassHTBD
Implement limited steps for data poisoning via hidden trigger backdoor. Note that this attack modifies temp_targets as a side-effect!
forest/victims/batched_attacks.py:260
↓ 1 callersClassKettleBenchmark
Generate parameters for an experiment as specified in the data poisoning benchmark. https://github.com/aks2203/poisoning-benchmark
forest/data/kettle_benchmark_experiment.py:10
↓ 1 callersClassKettleDeterministic
Generate parameters for an experiment based on a fixed triplet a-b-c given via --poisonkey. This construction replicates the experiment definitio
forest/data/kettle_det_experiment.py:8
↓ 1 callersClassMatchingPoisoning
Implement limited steps for data poisoning via gradient alignment.
forest/victims/batched_attacks.py:204
↓ 1 callersClassMaxup
A meta-augmentation, returning the worst result from a range of augmentations. As in the orignal paper, https://arxiv.org/abs/2002.09024, thi
forest/data/mixing_data_augmentations.py:123
↓ 1 callersClassMetaMonkey
Trace a networks and then replace its module calls with functional calls. This allows for backpropagation w.r.t to weights for "normal" PyTorch n
forest/witchcoven/modules.py:13
↓ 1 callersClassMetaPoisoning
Implement limited steps for data poisoning via MetaPoison.
forest/victims/batched_attacks.py:224
↓ 1 callersClassMixup
This is data augmentation via mixup. https://arxiv.org/abs/1710.09412.
forest/data/mixing_data_augmentations.py:14
↓ 1 callersClassMobileNetV2
forest/victims/mobilenet.py:107
↓ 1 callersClassPatchAttack
Randomly patch 2 classes.
forest/victims/batched_attacks.py:351
↓ 1 callersClassPatchAttackFixedLocation
Randomly patch 2 classes.
forest/victims/batched_attacks.py:509
↓ 1 callersClassPatchAttackImageBased
Randomly patch classes with patches consisting of randomly drawn image patches from the inputs.
forest/victims/batched_attacks.py:549
↓ 1 callersClassPatchAttackPairs
Randomly patch pairs of images.
forest/victims/batched_attacks.py:698
↓ 1 callersClassPatchAttackVariant
Randomly patch 2 classes.
forest/victims/batched_attacks.py:425
↓ 1 callersClassPatchAttackVariantKnownSize
Draw random patch shapes from the interval [0.5 * eps, 1.75 * eps]. This interval is slightly biased: Its mean length is not eps, but: eps: i
forest/victims/batched_attacks.py:455
↓ 1 callersClassWatermarkPoisoning
Sanity check: attack by watermarking.
forest/victims/batched_attacks.py:163
↓ 1 callersClassWitchBullsEye
Brew poison frogs variant with averaged feature matching instead of sums of feature matches. This is also known as BullsEye Polytope Attack.
forest/witchcoven/witch_bullseye.py:10
↓ 1 callersClassWitchConvexPolytope
Brew poison frogs variant with averaged feature matching instead of sums of feature matches. This is also known as BullsEye Polytope Attack.
forest/witchcoven/witch_convex_polytope.py:12
↓ 1 callersClassWitchFrogs
Brew poison frogs poison with given arguments. “Double, double toil and trouble; Fire burn, and cauldron bubble.... Round about the caul
forest/witchcoven/witch_poison_frogs.py:10
↓ 1 callersClassWitchGradientMatching
Brew passenger poison with given arguments. “Double, double toil and trouble; Fire burn, and cauldron bubble.... Round about the cauldro
forest/witchcoven/witch_matching.py:10
↓ 1 callersClassWitchGradientMatchingHidden
Brew passenger poison with given arguments. Try to match the original image feature representation to hide the attack from filter defenses. T
forest/witchcoven/witch_matching.py:157
↓ 1 callersClassWitchGradientMatchingNoisy
Brew passenger poison with given arguments. Both the poison gradient and the target gradient are modified to be diff. private before calcuating t
forest/witchcoven/witch_matching.py:93
↓ 1 callersClassWitchHTBD
forest/witchcoven/witch_htbd.py:15
↓ 1 callersClassWitchMatchingMultiTarget
Variant in which target gradients are matched separately.
forest/witchcoven/witch_matching.py:307
↓ 1 callersClassWitchMetaPoison
Brew metapoison with given arguments. Note: This function does not work in single-model-multi-GPU mode, due to the weights being fixed to a singl
forest/witchcoven/witch_metapoison.py:15
↓ 1 callersClassWitchMetaPoisonHigher
Reimplementation of metapoison using the "higher" library.
forest/witchcoven/witch_metapoison.py:54
↓ 1 callersClassWitchMetaPoison_v3
Reimplementation of metapoison using the "higher" library. This version also implements the "shared-batch" between target and inputs.
forest/witchcoven/witch_metapoison.py:79
↓ 1 callersClassWitchPatch
Brew poison with given arguments. “Double, double toil and trouble; Fire burn, and cauldron bubble.... Round about the cauldron go;
forest/witchcoven/witch_patch.py:15
↓ 1 callersClassWitchWatermark
Brew poison with given arguments. “Double, double toil and trouble; Fire burn, and cauldron bubble.... Round about the cauldron go;
forest/witchcoven/witch_watermark.py:12
↓ 1 callersClass_VictimDistributed
Implement model-specific code and behavior for multiple models on an unspecified number of GPUs and nodes. --> Running in concurrent mode!
forest/victims/victim_distributed.py:17
↓ 1 callersClass_VictimEnsemble
Implement model-specific code and behavior for multiple models on a single GPU. --> Running in sequential mode!
forest/victims/victim_ensemble.py:19
↓ 1 callersClass_VictimSingle
Implement model-specific code and behavior for a single model on a single GPU. This is the simplest victim implementation.
forest/victims/victim_single.py:19
ClassBaseAttack
Implement a variety of input-altering attacks.
forest/victims/batched_attacks.py:55
ClassDeltaset
forest/data/datasets.py:146
ClassKettleExternal
Generate a dataset definition completely from file.
forest/data/kettle_external.py:9
Class_Kettle
Brew poison with given arguments. Data class. Attributes: - trainloader - validloader - poisonloader - poison_ids - train
forest/data/kettle_base.py:24
Class_VictimBase
Implement model-specific code and behavior. Expose: Attributes: - model - optimizer - scheduler - criterion Methods
forest/victims/victim_base.py:17
Class_Witch
Brew poison with given arguments. Base class. This class implements _brew(), which is the main loop for iterative poisoning. New iterati
forest/witchcoven/witch_base.py:14