Skip to content

Conversation

@razon1494
Copy link

@razon1494 razon1494 commented Aug 18, 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

What

  • Add ModelExtractionAttack6 in models/attack/mea/MEA.py.
  • Re-export it via models/attack/__init__.py so it’s importable as from models.attack import ModelExtractionAttack6.
  • Make attack() return a results dict: {"fidelity": ..., "accuracy": ...} (per IMPLEMENTATION.md).
  • Add runnable examples:
    • examples/example.py — runs Attack-6 on Cora.
    • examples/mea_cora_attack6.py — helper script used while testing.
    • examples/defense_cora.py — defense quick-start used during validation.
  • Housekeeping: ignore *.egg-info build artifacts.

Why

  • Integrates my reproduction into the modular BaseAttack pattern, using the project Dataset and device handling with minimal changes.

How to run

# inside venv, after installing deps per README (PowerShell)
$env:DGLBACKEND="pytorch"
$env:PYGIP_DEVICE="cpu"
python examples/example.py

🧪 Related Issues

  • N/A (happy to link if there’s a tracking issue)

✅ Checklist

  • My code follows the project's coding style
  • I have tested the changes and verified that they work
  • I have added necessary documentation (if applicable)
  • I have linked related issues above (if any)
  • The PR is made from a feature branch, not main (feat/mea-attack6)

🧠 Additional Context (Optional)

Environment

  • Windows 64-bit, Python 3.11.9
  • PyTorch 2.3.0+cpu, DGL 2.2.1, NumPy 1.26.4

Notes

  • DGL prints a deprecation warning about DGLGraph(...); left as-is for minimal change.
    I can switch to dgl.from_networkx(...) + dgl.add_self_loop(...) in a follow-up if preferred.
  • If updating reqs.txt isn’t desired, I can revert that line.

@razon1494 razon1494 marked this pull request as draft August 18, 2025 12:26
Sparshkhare1306 pushed a commit to Sparshkhare1306/PyGIP-backup that referenced this pull request Oct 1, 2025
Refactor RQ1_attacks.sh for clarity and efficiency
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.

1 participant