{"id":21280622,"url":"https://github.com/borgwardtlab/motifiesta","last_synced_at":"2025-07-11T10:32:30.006Z","repository":{"id":44873415,"uuid":"497020143","full_name":"BorgwardtLab/MotiFiesta","owner":"BorgwardtLab","description":"Approximate subgraph motif mining through learnable edge contraction.","archived":false,"fork":false,"pushed_at":"2023-08-03T07:00:44.000Z","size":286,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-08-06T08:03:18.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BorgwardtLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-27T14:06:22.000Z","updated_at":"2023-07-05T16:50:57.000Z","dependencies_parsed_at":"2023-01-18T17:34:08.657Z","dependency_job_id":null,"html_url":"https://github.com/BorgwardtLab/MotiFiesta","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorgwardtLab%2FMotiFiesta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorgwardtLab%2FMotiFiesta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorgwardtLab%2FMotiFiesta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorgwardtLab%2FMotiFiesta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BorgwardtLab","download_url":"https://codeload.github.com/BorgwardtLab/MotiFiesta/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225715586,"owners_count":17512904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T10:37:23.037Z","updated_at":"2024-11-21T10:37:23.667Z","avatar_url":"https://github.com/BorgwardtLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](http://img.shields.io/badge/cs.LG-arXiv%3A2206.01008-B31B1B.svg)][1]\n\n![](motifiesta.png)\n\n# MotiFiesta: Neural Approximate Motif Mining\nThe repository implements the MotiFiesta algorithm described in the following paper:\n\n\u003eCarlos Oliver, Dexiong Chen, Vincent Mallet, Pericles Philippopoulos, Karsten Borgwardt.\n[Approximate Network Motif Mining Via Graph Learning][1]. Preprint 2022.\n\n\nMotiFiesta is a graph neural network trained to detect over-represented subgraphs in a graph dataset.\n\n\n## Citation\n\n```bibtex\n@article{oliver2022approximate,\n  title={Approximate Network Motif Mining Via Graph Learning},\n  author={Oliver, Carlos and Chen, Dexiong and Mallet, Vincent and Philippopoulos, Pericles and Borgwardt, Karsten},\n  journal={arXiv preprint arXiv:2206.01008},\n  year={2022}\n}\n```\n\n## Setup\n\n```\n$ pip install . \n```\n\n## Build datasets\n\n```\n$ build_data_motifiesta \n```\n\n## Untar pre-trained models\n\nDownload pretrained models [here](https://drive.proton.me/urls/BN2X8ZHQAR#UQFR3LELTwhj) and move the tarball to the root of this repository.\n\n```\n$ tar -xzvf models.tar.gz\n```\n\n## Training a model\n\n```\n$ motifiesta train -h\n$ motifiesta train -da \u003cdataset_id\u003e -n test\n```\n\n## Making motif predictions\n\nThis is an example script for assigning each node in a graph to an integer motif ID using a pre-trained model.\nYou can also launch this with the command `$ motifiesta_example`\n\n```python\nfrom MotiFiesta.training.decode import HashDecoder\n\nmodel_id = 'barbell-d0.00'\ndata_id = 'synth-distort-barbell-d0.00'\nlevel = 3\n\ndecoder = HashDecoder(model_id, data_id, level)\n\ndecoded_graphs = decoder.decode()\n\nfor graph in decoded_graphs:\n\tprint(f\"Motif assignment for each node: {g.motif_pred}\")\n```\n\nScripts for generating figures in the paper are in `fig_scripts/`\n\nOutput from running [mfinder](https://www.weizmann.ac.il/mcb/UriAlon/sites/mcb.UriAlon/files/uploads/NetworkMotifsSW/mfinder/mfindermanual.pdf) are in `data_mfinder` and `out_mfinder`, the script `minder_benchmark.py` parses this output.\n\n\n\n[1]: https://arxiv.org/abs/2206.01008\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborgwardtlab%2Fmotifiesta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborgwardtlab%2Fmotifiesta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborgwardtlab%2Fmotifiesta/lists"}