Skip to content

Conversation

@Bachina-Pranav
Copy link

@Bachina-Pranav Bachina-Pranav commented Sep 26, 2025

📦 Pull Request Template

Thank you for your contribution! Please complete the checklist and provide relevant details below to help us review your PR effectively.


📋 Summary

This PR adds the implementation of the EGSteal attack into the PyGIP framework.
Specifically, it introduces:

A new EGSteal class under pygip/models/attack/EGSteal/EGSteal.py.

Integration with existing Dataset abstractions (supporting TU datasets such as AIDS, Mutagenicity, NCI1, and NCI109).

Training pipeline for target models (TargetModelGraphClassification) with GIN/GCN/GAT/GraphSAGE backbones.

Explanation alignment logic (CAM-based by default, extendable to GradCAM/GNNExplainer/PGExplainer).

Attack pipeline that queries the target model, generates surrogate data, and trains a surrogate model for evaluation.

This allows PyGIP users to reproduce the results of "How Explanations Leak the Decision Logic: Stealing Graph Neural Networks via Explanation Alignment" and benchmark against other attacks already in the repo.

🧪 Related Issues


✅ Checklist

  • My code follows the project's coding style
  • I have tested the changes locally on Mutagenicity (baseline run completed successfully)
  • I have added necessary documentation (I used the same classes that were already defined)
  • I have linked related issues above (if any)
  • I have ensured the PR is made from a feature branch (feat/egsteal)

🧠 Additional Context (Optional)


@Edlison Edlison changed the base branch from main to dev September 30, 2025 01:33
@Edlison
Copy link
Contributor

Edlison commented Sep 30, 2025

Nice work! As a minor modification, could you move all code related to EGSteal (the models that were previously placed under nn/backbone) into defense/EGSteal folder? This will help keep the codebase clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants