pygip.models.defense.ImperceptibleWM

Module Attributes

class pygip.models.defense.ImperceptibleWM.ImperceptibleWM(dataset, attack_node_fraction=0.3, model_path=None)[source]

Bases: BaseDefense

_abc_impl = <_abc_data object>
_load_model()[source]

Load pre-trained model.

_train_defense_model()[source]

This is an optional method.

_train_surrogate_model()[source]

This is an optional method.

_train_target_model()[source]

This is an optional method.

defend()[source]

Execute the defense mechanism.

supported_api_types = {'pyg'}
class pygip.models.defense.ImperceptibleWM.TriggerGenerator(*args: Any, **kwargs: Any)[source]

Bases: Module

forward(x, edge_index)[source]
pygip.models.defense.ImperceptibleWM.bi_level_optimization(target_model, generator, data, epochs=100, inner_steps=5)[source]
pygip.models.defense.ImperceptibleWM.calculate_metrics(model, data)[source]
pygip.models.defense.ImperceptibleWM.generate_trigger_graph(data, generator, target_model, num_triggers=50)[source]