{"id":22229744,"url":"https://github.com/graph-com/graphmaker","last_synced_at":"2025-05-12T17:25:55.498Z","repository":{"id":202667368,"uuid":"700500811","full_name":"Graph-COM/GraphMaker","owner":"Graph-COM","description":"[TMLR] GraphMaker: Can Diffusion Models Generate Large Attributed Graphs?","archived":false,"fork":false,"pushed_at":"2025-04-25T04:36:23.000Z","size":1953,"stargazers_count":56,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-25T05:31:43.200Z","etag":null,"topics":["ddpm","generative-model","graph-generation","graph-neural-networks","network-science","node-classification","pytorch","social-network","synthetic-data-generation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Graph-COM.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-04T17:56:18.000Z","updated_at":"2025-04-25T04:36:25.000Z","dependencies_parsed_at":"2024-09-13T08:08:58.331Z","dependency_job_id":"d5fd839d-6b27-4929-a4f0-d6cebee91fce","html_url":"https://github.com/Graph-COM/GraphMaker","commit_stats":null,"previous_names":["graph-com/graphmaker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graph-COM%2FGraphMaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graph-COM%2FGraphMaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graph-COM%2FGraphMaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Graph-COM%2FGraphMaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Graph-COM","download_url":"https://codeload.github.com/Graph-COM/GraphMaker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253785872,"owners_count":21964043,"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":["ddpm","generative-model","graph-generation","graph-neural-networks","network-science","node-classification","pytorch","social-network","synthetic-data-generation"],"created_at":"2024-12-03T01:12:12.312Z","updated_at":"2025-05-12T17:25:55.488Z","avatar_url":"https://github.com/Graph-COM.png","language":"Python","readme":"# GraphMaker\n\n[[Paper]](https://arxiv.org/abs/2310.13833)\n\n![model](model_240125.png)\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  * [Train](#train)\n  * [Sample](#sample)\n  * [Sample with Pre-Trained Models](#sample-with-pre-trained-models)\n- [Frequently Asked Questions](#frequently-asked-questions)\n  * [Q1: libcusparse.so](#q1-libcusparseso)\n  * [Q2: Wandb](#q2-wandb)\n  * [Q3: Other Requests](#q3-other-requests)\n- [Citation](#citation)\n\n## Installation\n\n```bash\nconda create -n GraphMaker python=3.8 -y\nconda activate GraphMaker\npip install torch==1.12.0+cu116 --extra-index-url https://download.pytorch.org/whl/cu116\nconda install -c conda-forge cudatoolkit=11.6\npip install dgl==1.1.0+cu116 -f https://data.dgl.ai/wheels/cu116/repo.html\npip install pandas scikit-learn pydantic wandb huggingface_hub==0.30.2\n```\n\nYou also need to compile `orca.cpp` (https://file.biolab.si/biolab/supp/orca/orca.html).\n\n```bash\ncd orca\ng++ -O2 -std=c++11 -o orca orca.cpp\n```\n\n## Usage\n\n### Train\n\n```bash\n# The GraphMaker-Sync variant simultaneously generates node attributes and graph structure.\npython train_sync.py -d D\n# The trained model checkpoint will be saved to {D}_cpts/Sync_XXX.pth\n\n# The GraphMaker-Async variant first generates node attributes, and then generates graph structure.\npython train_async.py -d D\n# The trained model checkpoint will be saved to {D}_cpts/Async_XXX.pth\n```\n\n`D` can be one of the three built-in datasets, including `cora`, `amazon_photo`, `amazon_computer`.\n\n### Sample\n\n```bash\npython sample.py --model_path P\n```\n\n`P` is the path to a model checkpoint saved in the training stage.\n\n### Sample with Pre-Trained Models\n\nAlternatively, you can also use our pre-trained model checkpoints for sampling.\n\n```bash\npython sample.py --dataset D --type T\n```\n\n- `D` can be one of the three built-in datasets, including `cora`, `amazon_photo`, `amazon_computer`.\n- `T` can be `sync` or `async`.\n\n## Frequently Asked Questions\n\n### Q1: libcusparse.so\n\n**An error occurs that the program cannot find `libcusparse.so`.**\n\nTo search for the location of it on linux,\n\n```bash\nfind /path/to/directory -name libcusparse.so.11 -exec realpath {} \\;\n```\n\nwhere `/path/to/directory` is the directory you want to search. Assume that the search returns `home/miniconda3/envs/GraphMaker/lib/libcusparse.so.11`. Then you need to manually specify the environment variable as follows.\n\n```bash\nexport LD_LIBRARY_PATH=home/miniconda3/envs/GraphMaker/lib:$LD_LIBRARY_PATH\n```\n\n### Q2: Wandb\n\n**What is WandB?**\n\n[WandB](https://wandb.ai/site) is a tool for visualizing and tracking your machine learning experiments. It's free to use for open source projects. You may also use our code without it.\n\n### Q3: Other Requests\n\n**I have a question or request not listed here.**\n\n- It's generally recommended to open a GitHub issue. This allows us to track the progress, and the discussion might help others who have the same question.\n- Otherwise, you can also send an email to `mufeili1996@gmail.com`.\n\n## Citation\n\n```tex\n@article{li2024graphmaker,\n    title={GraphMaker: Can Diffusion Models Generate Large Attributed Graphs?},\n    author={Mufei Li and Eleonora Kreačić and Vamsi K. Potluru and Pan Li},\n    journal={Transactions on Machine Learning Research},\n    year={2024}\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraph-com%2Fgraphmaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraph-com%2Fgraphmaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraph-com%2Fgraphmaker/lists"}