roksana.attack_methods

Attack Methods Package

This package provides various attack methods for adversarial modifications of graph datasets. It includes both predefined attack methods and utilities for registering and retrieving custom attacks.

Modules:
  • base_attack: Defines the abstract base class for all attack methods.

  • registry: Manages registration and retrieval of attack methods.

  • degree: Implements degree-based edge removal.

  • pagerank: Implements PageRank-based edge removal.

  • random: Implements random edge removal.

  • viking: Implements Viking perturbation attack.

- BaseAttack

Abstract base class for all attack methods.

- get_attack_method

Retrieve a registered attack method by name.

- ATTACK_METHODS

Dictionary of registered attack methods.

- DegreeAttack

Implements degree-based attack logic.

- PageRankAttack

Implements PageRank-based attack logic.

- RandomAttack

Implements random attack logic.

- VikingAttack

Implements Viking perturbation attack logic.

Modules

base_attack

BaseAttack Module This module provides an abstract base class for implementing graph attack methods. All attack methods must inherit from BaseAttack and implement the required methods.

custom_attack

MyCustomAttack Module This module provides an example of how to implement a custom graph attack algorithm. Custom routines should inherit from the BaseAttack class and override the execute method to define the attack logic.

degree

DegreeAttack Module This module implements the DegreeAttack class for adversarial attacks on graphs by selectively removing edges connected to nodes with the highest degree.

pagerank

PageRankAttack Module This module implements the PageRankAttack class for adversarial attacks on graphs by selectively removing edges connected to nodes based on their PageRank scores.

random

RandomAttack Module This module implements the RandomAttack class for adversarial attacks on graphs by randomly removing edges connected to selected nodes.

registry

Attack Methods Registry This module provides a registry for managing attack methods. It includes predefined attack methods and utilities to register custom attack methods dynamically.

viking

VikingAttack Module This module implements the VikingAttack class for adversarial attacks on graphs by perturbing edges involving selected nodes.