{"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/hierarchical-graph-representation-learning","title":"Hierarchical Graph Representation Learning with Differentiable Pooling","arxiv_id":"1806.08804","date":"2018-06-22","proceeding":"NeurIPS 2018 12","authors":["Rex Ying","Jiaxuan You","Christopher Morris","Xiang Ren","William L. Hamilton","Jure Leskovec"],"abstract":"Recently, graph neural networks (GNNs) have revolutionized the field of graph\nrepresentation learning through effectively learned node embeddings, and\nachieved state-of-the-art results in tasks such as node classification and link\nprediction. However, current GNN methods are inherently flat and do not learn\nhierarchical representations of graphs---a limitation that is especially\nproblematic for the task of graph classification, where the goal is to predict\nthe label associated with an entire graph. Here we propose DiffPool, a\ndifferentiable graph pooling module that can generate hierarchical\nrepresentations of graphs and can be combined with various graph neural network\narchitectures in an end-to-end fashion. DiffPool learns a differentiable soft\ncluster assignment for nodes at each layer of a deep GNN, mapping nodes to a\nset of clusters, which then form the coarsened input for the next GNN layer.\nOur experimental results show that combining existing GNN methods with DiffPool\nyields an average improvement of 5-10% accuracy on graph classification\nbenchmarks, compared to all existing pooling approaches, achieving a new\nstate-of-the-art on four out of five benchmark data sets.","url_abs":"http://arxiv.org/abs/1806.08804v4","url_pdf":"http://arxiv.org/pdf/1806.08804v4.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":"hierarchical-graph-representation-learning","repo_url":"https://github.com/AaltoPML/Rethinking-pooling-in-GNNs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/PasqualeAuriemma/GCN-DIFFPOOL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/RexYing/diffpool","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/RexYing/graph-pooling","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/Tioz90/DiffPool","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/Tioz90/GCN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/VoVAllen/diffpool","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/basiralab/RG-Select","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/basiralab/Reproducible-Generative-Learning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/basiralab/reproduciblefedgnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/chappers/graph-differential-pooling","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/gospodima/extended-simgnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://gitlab.com/cedric_sanders/masterarbeit","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"hierarchical-graph-representation-learning","repo_url":"https://github.com/dmlc/dgl/tree/master/examples/pytorch/diffpool","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"graph-classification","task_name":"Graph Classification"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":"graph-representation-learning","task_name":"Graph Representation Learning"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"node-classification","task_name":"Node Classification"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"diffpool","method_name":"DiffPool"}],"datasets_introduced":[],"methods_introduced":[{"slug":"diffpool","name":"DiffPool","full_name":"DiffPool"}],"results":[{"leaderboard":"/sota/graph-classification-on-collab","task":"Graph Classification","dataset":"COLLAB","model":"GNN (DiffPool)","rank_in_archive_order":24,"of":39,"metrics":{"Accuracy":"75.48%"},"uses_additional_data":false},{"leaderboard":"/sota/graph-classification-on-dd","task":"Graph Classification","dataset":"D&D","model":"S2V (with 2 DiffPool)","rank_in_archive_order":7,"of":53,"metrics":{"Accuracy":"82.07%"},"uses_additional_data":false},{"leaderboard":"/sota/graph-classification-on-dd","task":"Graph Classification","dataset":"D&D","model":"GNN (DiffPool)","rank_in_archive_order":12,"of":53,"metrics":{"Accuracy":"80.64%"},"uses_additional_data":false},{"leaderboard":"/sota/graph-classification-on-enzymes","task":"Graph Classification","dataset":"ENZYMES","model":"S2V (with 2 DiffPool)","rank_in_archive_order":24,"of":54,"metrics":{"Accuracy":"63.33%"},"uses_additional_data":false},{"leaderboard":"/sota/graph-classification-on-enzymes","task":"Graph Classification","dataset":"ENZYMES","model":"GNN (DiffPool)","rank_in_archive_order":25,"of":54,"metrics":{"Accuracy":"62.53%"},"uses_additional_data":false},{"leaderboard":"/sota/graph-classification-on-proteins","task":"Graph Classification","dataset":"PROTEINS","model":"GNN (DiffPool)","rank_in_archive_order":55,"of":103,"metrics":{"Accuracy":"76.25%"},"uses_additional_data":false},{"leaderboard":"/sota/graph-classification-on-reddit-multi-12k","task":"Graph Classification","dataset":"REDDIT-MULTI-12K","model":"GNN (DiffPool)","rank_in_archive_order":1,"of":3,"metrics":{"Accuracy":"47.08"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-code2","task":"Graph Property Prediction","dataset":"ogbg-code2","model":"DiffPool w/ graphSAGE","rank_in_archive_order":21,"of":21,"metrics":{"Ext. data":"No","Number of params":"10095826","Test F1 score":"0.1401 ± 0.0012","Validation F1 score":"0.1405 ± 0.0012"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1806.08804","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1806.08804"}},"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/AaltoPML/Rethinking-pooling-in-GNNs","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Tioz90/GCN","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://gitlab.com/cedric_sanders/masterarbeit","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/basiralab/Reproducible-Generative-Learning","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dmlc/dgl/tree/master/examples/pytorch/diffpool","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/RexYing/graph-pooling","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gospodima/extended-simgnn","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Tioz90/DiffPool","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/basiralab/reproduciblefedgnn","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/VoVAllen/diffpool","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PasqualeAuriemma/GCN-DIFFPOOL","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/RexYing/diffpool","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/basiralab/RG-Select","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/chappers/graph-differential-pooling","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":19},"by_repo_kind":{"listed":{"samples":20,"ran":1,"repositories":4}},"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":"dd691d00aa5cc146","entry":"exp_moving_avg","repo":"RexYing/diffpool","repo_kind":"listed","path":"util.py","file_url":"https://github.com/RexYing/diffpool/blob/HEAD/util.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dd691d00aa5cc146"}},{"code_sha256_prefix":"d13d56b516dc4831","entry":"Mean_W_Cv","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/Analysis.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/Analysis.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":"d13d56b516dc4831"}},{"code_sha256_prefix":"a2ab7f58736f25f8","entry":"Mean_W_Two_shot","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/Analysis.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/Analysis.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":"a2ab7f58736f25f8"}},{"code_sha256_prefix":"0540a7e365607e63","entry":"Models_trained","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/Analysis.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/Analysis.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":"0540a7e365607e63"}},{"code_sha256_prefix":"63d220d8b4f8afd5","entry":"average_weights","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/fed_localmodel.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/fed_localmodel.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":"63d220d8b4f8afd5"}},{"code_sha256_prefix":"1f11f715f1139ba1","entry":"datasets_splits","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/cross_val.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/cross_val.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":"1f11f715f1139ba1"}},{"code_sha256_prefix":"2cd5bd6f6bc85e88","entry":"dense_diff_pool","repo":"chappers/graph-differential-pooling","repo_kind":"listed","path":"diff_pool.py","file_url":"https://github.com/chappers/graph-differential-pooling/blob/HEAD/diff_pool.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":"2cd5bd6f6bc85e88"}},{"code_sha256_prefix":"1e9d378dbb12714b","entry":"evaluate","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/main_diffpool.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/main_diffpool.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":"1e9d378dbb12714b"}},{"code_sha256_prefix":"96903513f7177254","entry":"evaluate","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/main_gcn.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/main_gcn.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":"96903513f7177254"}},{"code_sha256_prefix":"0b25aff2096336db","entry":"frobenius_norm_tf","repo":"PasqualeAuriemma/GCN-DIFFPOOL","repo_kind":"listed","path":"models.py","file_url":"https://github.com/PasqualeAuriemma/GCN-DIFFPOOL/blob/HEAD/models.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":"0b25aff2096336db"}},{"code_sha256_prefix":"712b1b3a42060fb0","entry":"gen_2community_ba","repo":"RexYing/diffpool","repo_kind":"listed","path":"gen/data.py","file_url":"https://github.com/RexYing/diffpool/blob/HEAD/gen/data.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":"712b1b3a42060fb0"}},{"code_sha256_prefix":"854d177d079f1cd3","entry":"gen_ba","repo":"RexYing/diffpool","repo_kind":"listed","path":"gen/data.py","file_url":"https://github.com/RexYing/diffpool/blob/HEAD/gen/data.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":"854d177d079f1cd3"}},{"code_sha256_prefix":"9c9fec82cf325ebc","entry":"gen_er","repo":"RexYing/diffpool","repo_kind":"listed","path":"gen/data.py","file_url":"https://github.com/RexYing/diffpool/blob/HEAD/gen/data.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":"9c9fec82cf325ebc"}},{"code_sha256_prefix":"07ed65681aebf2db","entry":"get_adjs","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/dataLoader_medmnist.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/dataLoader_medmnist.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":"07ed65681aebf2db"}},{"code_sha256_prefix":"3a7c82cbbc34ab03","entry":"img_to_adj","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/dataLoader_medmnist.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/dataLoader_medmnist.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":"3a7c82cbbc34ab03"}},{"code_sha256_prefix":"eb9659a87e71ae20","entry":"kruskal","repo":"RexYing/diffpool","repo_kind":"listed","path":"partition.py","file_url":"https://github.com/RexYing/diffpool/blob/HEAD/partition.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":"eb9659a87e71ae20"}},{"code_sha256_prefix":"81b03223cd6f4d43","entry":"minmax_sc","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/main_diffpool.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/main_diffpool.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":"81b03223cd6f4d43"}},{"code_sha256_prefix":"d3550a1e301975aa","entry":"node_dict","repo":"RexYing/diffpool","repo_kind":"listed","path":"util.py","file_url":"https://github.com/RexYing/diffpool/blob/HEAD/util.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":"d3550a1e301975aa"}},{"code_sha256_prefix":"f55bf28721abc66d","entry":"node_iter","repo":"RexYing/diffpool","repo_kind":"listed","path":"util.py","file_url":"https://github.com/RexYing/diffpool/blob/HEAD/util.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":"f55bf28721abc66d"}},{"code_sha256_prefix":"640adefa68f0073d","entry":"train","repo":"basiralab/reproduciblefedgnn","repo_kind":"listed","path":"federated_reproducibility/main_gcn.py","file_url":"https://github.com/basiralab/reproduciblefedgnn/blob/HEAD/federated_reproducibility/main_gcn.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":"640adefa68f0073d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}