diff --git a/experiments/attack_defense_test.py b/experiments/attack_defense_test.py index d305457..d54c37f 100644 --- a/experiments/attack_defense_test.py +++ b/experiments/attack_defense_test.py @@ -148,6 +148,9 @@ def test_attack_defense(): attack_defense_manager = AttackAndDefenseManager(gen_dataset=dataset, gnn_manager=gnn_model_manager) attack_defense_manager.set_poison_attacker(poison_attack_config=poison_attack_config) + attack_defense_manager.set_poison_defender(poison_defense_config=poison_defense_config) + + attack_defense_manager.conduct_experiment() warnings.warn("Start training") dataset.train_test_split() diff --git a/src/defense/defense_base.py b/src/defense/defense_base.py index 5cae7fb..c8b81c4 100644 --- a/src/defense/defense_base.py +++ b/src/defense/defense_base.py @@ -39,6 +39,8 @@ def __init__(self, gen_dataset: GeneralDataset, model, **kwargs): class BadRandomPoisonDefender(PoisonDefender): + name = "BadRandomPoisonDefender" + def __init__(self, gen_dataset: GeneralDataset, model, n_edges_percent=0.1): self.defense_diff = None