{"id":22731118,"url":"https://github.com/genentech/bandwidth-graph-generation","last_synced_at":"2025-04-12T18:02:28.947Z","repository":{"id":65495358,"uuid":"592485204","full_name":"Genentech/bandwidth-graph-generation","owner":"Genentech","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-30T22:34:08.000Z","size":431,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T12:21:20.791Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Genentech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-23T20:38:21.000Z","updated_at":"2024-09-15T12:30:03.000Z","dependencies_parsed_at":"2023-02-14T12:15:32.746Z","dependency_job_id":null,"html_url":"https://github.com/Genentech/bandwidth-graph-generation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fbandwidth-graph-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fbandwidth-graph-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fbandwidth-graph-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genentech%2Fbandwidth-graph-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Genentech","download_url":"https://codeload.github.com/Genentech/bandwidth-graph-generation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610367,"owners_count":21132920,"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-12-10T19:19:29.459Z","updated_at":"2025-04-12T18:02:28.910Z","avatar_url":"https://github.com/Genentech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bandwidth Restricted Graph Generation\nRepo for [Improving Graph Generation by Restricting Graph Bandwidth](https://arxiv.org/abs/2301.10857).\nImplemented in python 3.10.\n![overview figure](./figures/overview_fig.png)\n\n## setup\nHere's how to build the conda environment:\n```\nconda env create --file env.yml\nconda activate graph_gen\npip install -e .\n```\nHere's how to build [orca](https://github.com/thocevar/orca) to do orbit calculations for MMD evaluations:\n```\ncd graph_gen/analysis\ng++ -std=c++11 -o orca.exe orca.cpp\n```\nHere's how to prepare the molecular datasets:\n```\ncd datasets\nunzip zinc.tab.zip\nunzip peptide_multi_class_dataset.csv.zip\n```\n\n## layout\n- `graph_gen/data` has synthetic and molecular datasets\n- `graph_gen/models` contains models and model training + hyperoptimization scripts\n- `graph_gen/analysis` has MMD calculations\n\n## hyperparameters\nThe hyperparameters we found using hyperoptimization are in `hyperparameters`.\n\n## hyperoptimizing models\nHyperoptimization scripts are in `graph_gen/models/hyperoptimize`.\nThe scripts have help for all of their arguments.\nGraphRNN example:\n```\nconda activate graph_gen\npython graph_gen/graph_gen/hyperoptimize_graphRNN.py --epochs 10 \\ \n    --order C-M --data_name PROTEINS --version TEST --count 3\n```\nVAE example:\n```\nconda activate graph_gen\npython graph_gen/graph_gen/hyperoptimize_gine_vae.py --order C-M --data_name PROTEINS \\\n    --edge_augmentation none --hidden_dim 32 --epochs 10 --version TEST --count 2 \\ \n    --empirical_bw\n```\nDiffusion example:\n```\nconda activate graph_gen\npython graph_gen/graph_gen/hyperoptimize_gine_diffusion.py --order BFS --data_name zinc250k \\ \n    --hidden_dim 128 --version TEST-v4 --count 2 --epochs 5\n```\n\n## train-evaluate\nTrain-evaluate scripts which use the hyperparameters found in hyperopt are in `graph_gen/models/train_evaluate/`.\nThe scripts have help for all of their arguments.\nGraphRNN example:\n```\nconda activate graph_gen\npython graph_gen/graph_gen/train_evaluate_graphRNN.py \\ \n    --lr 0.0011 --wd 0.007 --order BFS --data_name ENZYMES --temperature 0.4 \\ \n    --epochs 10 --version GraphRNNevalTEST --replicate 0\n```\nVAE example: \n```\nconda activate graph_gen\n\npython graph_gen/graph_gen/train_evaluate_gine_vae.py \\ \n    --kl_weight 0.0003 --lr 0.005 --order BFS --data_name ENZYMES --version \\ \n    gine_vae_eval_TEST --sigma 1 --epochs 10 --replicate 0 --hidden_dim 32\n```\nDiffusion example:\n```\nconda activate graph_gen\npython graph_gen/graph_gen/train_evaluate_gine_diffusion.py --data_name DD \\\n    --order C-M --lr 0.004 --hidden_dim 64 --empirical_bw --version diffusion_eval_TEST \\ \n     --epochs 5 --replicate 0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenentech%2Fbandwidth-graph-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenentech%2Fbandwidth-graph-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenentech%2Fbandwidth-graph-generation/lists"}