Skip to content

Approximate subgraph motif mining through learnable edge contraction.

License

Notifications You must be signed in to change notification settings

BorgwardtLab/MotiFiesta

Repository files navigation

MotiFiesta: Neural Approximate Motif Mining

The repository implements the MotiFiesta algorithm described in the following paper:

Carlos Oliver, Dexiong Chen, Vincent Mallet, Pericles Philippopoulos, Karsten Borgwardt. Approximate Network Motif Mining Via Graph Learning. Preprint 2022.

MotiFiesta is a graph neural network trained to detect over-represented subgraphs in a graph dataset.

Citation

@article{oliver2022approximate,
  title={Approximate Network Motif Mining Via Graph Learning},
  author={Oliver, Carlos and Chen, Dexiong and Mallet, Vincent and Philippopoulos, Pericles and Borgwardt, Karsten},
  journal={arXiv preprint arXiv:2206.01008},
  year={2022}
}

Setup

$ pip install . 

Build datasets

$ build_data_motifiesta 

Untar pre-trained models

Download pretrained models here and move the tarball to the root of this repository.

$ tar -xzvf models.tar.gz

Training a model

$ motifiesta train -h
$ motifiesta train -da <dataset_id> -n test

Making motif predictions

This is an example script for assigning each node in a graph to an integer motif ID using a pre-trained model. You can also launch this with the command $ motifiesta_example

from MotiFiesta.training.decode import HashDecoder

model_id = 'barbell-d0.00'
data_id = 'synth-distort-barbell-d0.00'
level = 3

decoder = HashDecoder(model_id, data_id, level)

decoded_graphs = decoder.decode()

for graph in decoded_graphs:
	print(f"Motif assignment for each node: {g.motif_pred}")

Scripts for generating figures in the paper are in fig_scripts/

Output from running mfinder are in data_mfinder and out_mfinder, the script minder_benchmark.py parses this output.

About

Approximate subgraph motif mining through learnable edge contraction.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published