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).
- 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 theoutputs
directory.
- Running Mirage requires
NumPy
,SciPy
,PyTorch Geometric
,PyTorch
,NetworkX
,scikit-learn
,pyfpgrowth
,Matplotlib
, andtqdm
withPython=3.9
on Linux operating systems. - Specifically for implementation (b):
- You will need to ensure that
1.11<=PyTorch<=1.13
is installed. - 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
. - To work with
pygcanl
, you need to install it. From within the dataset's directory, run the following command:$ pip install -e pygcanl
. - If this runs without errors, then that's it, you can run Mirage now.
- You will need to ensure that