{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/graphrnn-generating-realistic-graphs-with","title":"GraphRNN: Generating Realistic Graphs with Deep Auto-regressive Models","arxiv_id":"1802.08773","date":"2018-02-24","proceeding":"ICML 2018 7","authors":["Jiaxuan You","Rex Ying","Xiang Ren","William L. Hamilton","Jure Leskovec"],"abstract":"Modeling and generating graphs is fundamental for studying networks in\nbiology, engineering, and social sciences. However, modeling complex\ndistributions over graphs and then efficiently sampling from these\ndistributions is challenging due to the non-unique, high-dimensional nature of\ngraphs and the complex, non-local dependencies that exist between edges in a\ngiven graph. Here we propose GraphRNN, a deep autoregressive model that\naddresses the above challenges and approximates any distribution of graphs with\nminimal assumptions about their structure. GraphRNN learns to generate graphs\nby training on a representative set of graphs and decomposes the graph\ngeneration process into a sequence of node and edge formations, conditioned on\nthe graph structure generated so far.\n  In order to quantitatively evaluate the performance of GraphRNN, we introduce\na benchmark suite of datasets, baselines and novel evaluation metrics based on\nMaximum Mean Discrepancy, which measure distances between sets of graphs. Our\nexperiments show that GraphRNN significantly outperforms all baselines,\nlearning to generate diverse graphs that match the structural characteristics\nof a target set, while also scaling to graphs 50 times larger than previous\ndeep models.","url_abs":"http://arxiv.org/abs/1802.08773v3","url_pdf":"http://arxiv.org/pdf/1802.08773v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"graphrnn-generating-realistic-graphs-with","repo_url":"https://github.com/snap-stanford/GraphRNN","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"graphrnn-generating-realistic-graphs-with","repo_url":"https://github.com/JiaxuanYou/graph-generation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"graphrnn-generating-realistic-graphs-with","repo_url":"https://github.com/mark-koch/graph-rnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"graph-generation","task_name":"Graph Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1802.08773","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1802.08773"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JiaxuanYou/graph-generation","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mark-koch/graph-rnn","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/snap-stanford/GraphRNN","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"unverified":18},"by_repo_kind":{"official":{"samples":19,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"5c3fa9402a9405bc","entry":"parse_index_file","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"data.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/data.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5c3fa9402a9405bc"}},{"code_sha256_prefix":"b919a065e6ff5ab5","entry":"Graph_generator_baseline","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"baselines/baseline_simple.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/baselines/baseline_simple.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b919a065e6ff5ab5"}},{"code_sha256_prefix":"60c01e040605bf2d","entry":"Graph_generator_baseline_train_rulebased","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"baselines/baseline_simple.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/baselines/baseline_simple.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60c01e040605bf2d"}},{"code_sha256_prefix":"29a4794f08fa2a32","entry":"Graph_load","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"data.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"29a4794f08fa2a32"}},{"code_sha256_prefix":"40a42cd12145989b","entry":"Graph_load_batch","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"data.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"40a42cd12145989b"}},{"code_sha256_prefix":"b59409263831240e","entry":"binary_cross_entropy_weight","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"model.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b59409263831240e"}},{"code_sha256_prefix":"ad16299d7054b46e","entry":"caveman_special","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"utils.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ad16299d7054b46e"}},{"code_sha256_prefix":"72a0035803c73117","entry":"create","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"create_graphs.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/create_graphs.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"72a0035803c73117"}},{"code_sha256_prefix":"56606455e061b557","entry":"disjoint_cliques_test_graph","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"baselines/mmsb.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/baselines/mmsb.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"56606455e061b557"}},{"code_sha256_prefix":"994f652e081e1e2f","entry":"extract_result_id_and_epoch","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"994f652e081e1e2f"}},{"code_sha256_prefix":"a39feeeaa3cceac3","entry":"find_nearest_idx","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/evaluate.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a39feeeaa3cceac3"}},{"code_sha256_prefix":"4c7a3523d6683b3a","entry":"find_nearest_idx","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"analysis.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/analysis.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4c7a3523d6683b3a"}},{"code_sha256_prefix":"e33bc4d6f9298826","entry":"graph_gen_from_blockmodel","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"baselines/mmsb.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/baselines/mmsb.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e33bc4d6f9298826"}},{"code_sha256_prefix":"7c1c7cc69fad8a40","entry":"gumbel_softmax","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"model.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7c1c7cc69fad8a40"}},{"code_sha256_prefix":"19bff1c9b578d1ae","entry":"n_community","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"utils.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"19bff1c9b578d1ae"}},{"code_sha256_prefix":"8f7d2c1aa425efe6","entry":"perturb","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"utils.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8f7d2c1aa425efe6"}},{"code_sha256_prefix":"81dc19acb93da0ce","entry":"sample_tensor","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"model.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"81dc19acb93da0ce"}},{"code_sha256_prefix":"0702999f51d7158b","entry":"test_DGMG_epoch","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"main_DeepGMG.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/main_DeepGMG.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0702999f51d7158b"}},{"code_sha256_prefix":"0ec01a80015ba81c","entry":"train_DGMG_forward_epoch","repo":"snap-stanford/GraphRNN","repo_kind":"official","path":"main_DeepGMG.py","file_url":"https://github.com/snap-stanford/GraphRNN/blob/HEAD/main_DeepGMG.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0ec01a80015ba81c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}