Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 2.14 KB

README.md

File metadata and controls

51 lines (39 loc) · 2.14 KB

Table of Contents

  1. Running the code
  2. Dependencies

This is the official repository of the code corresponding to the paper titled Mirage: Model-agnostic Graph Distillation for Graph Classification accepted in the Twelfth International Conference on Learning Representations (ICLR 2024).

Running the code

  • Mirage was evaluated on DD, IMDB-B, NCI1, ogbg-molbace, ogbg-molbbbp, and ogbg-molhiv.
  • To run Mirage on these corresponding datasets, navigate to their respective directories.
  • Mirage is implemented in two ways in these repositories, (a) fully in Python and (b) partially in C++.
  • The DD, ogbg-molbace, ogbg-molhiv implementations are of type (b) while the rest are of type (a).
  • To run Mirage using (a) implementation, navigate to the directory. The directory contains a single python script. Just run it.
  • To run Mirage using implementation (b) first complete the dependency installation described here, navigate to the directory. While being in the main directory run bash scripts/run_<dataset>.sh. This will produce outputs in the outputs directory.

Dependencies

  • Running Mirage requires NumPy, SciPy, PyTorch Geometric, PyTorch, NetworkX, scikit-learn, pyfpgrowth, Matplotlib, and tqdm with Python=3.9 on Linux operating systems.
  • Specifically for implementation (b):
    1. You will need to ensure that 1.11<=PyTorch<=1.13 is installed.
    2. The C++ implementation is written as a PyTorch extension so that it can be called inside the Python file. Within each dataset's corresponding folder that has a C++ implementation, this PyTorch extension is present inside directory called pygcanl.
    3. To work with pygcanl, you need to install it. From within the dataset's directory, run the following command: $ pip install -e pygcanl.
    4. If this runs without errors, then that's it, you can run Mirage now.