pygip.models.defense.atom package¶
Submodules¶
pygip.models.defense.atom.ATOM module¶
- class pygip.models.defense.atom.ATOM.ATOM(dataset, attack_node_fraction=0)[source]¶
Bases:
BaseDefense
- _abc_impl = <_abc_data object>¶
- supported_api_types = {'pyg'}¶
- supported_datasets = {'CiteSeer', 'Cora', 'PubMed'}¶
- class pygip.models.defense.atom.ATOM.PolicyNetwork(*args: Any, **kwargs: Any)[source]¶
Bases:
Module
- class pygip.models.defense.atom.ATOM.SequencesDataset(*args: Any, **kwargs: Any)[source]¶
Bases:
Dataset
- class pygip.models.defense.atom.ATOM.StateTransformMLP(*args: Any, **kwargs: Any)[source]¶
Bases:
Module
- pygip.models.defense.atom.ATOM.average_pooling_with_neighbors_batch(model, data, node_indices)[source]¶
- pygip.models.defense.atom.ATOM.build_loaders(csv_path='attack_CiteSeer.csv', batch_size=16, drop_last=True, seed=42)[source]¶
- pygip.models.defense.atom.ATOM.compute_embedding_batch(target_model, data, k_core_values_graph, max_k_core, node_indices, lamb=1.0)[source]¶
- pygip.models.defense.atom.ATOM.compute_returns_and_advantages(memory, gamma=0.99, lam=0.95)[source]¶
- pygip.models.defense.atom.ATOM.custom_reward_function(predicted, label, predicted_distribution=None)[source]¶
- pygip.models.defense.atom.ATOM.load_data_and_model(csv_path, batch_size, seed, data_path, lamb)[source]¶
- pygip.models.defense.atom.ATOM.precompute_all_node_embeddings(target_model, data, k_core_values_graph, max_k_core, lamb=1.0)[source]¶