{"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-neural-nets-can-capture","title":"Hierarchical graph neural nets can capture long-range interactions","arxiv_id":"2107.07432","date":"2021-07-15","proceeding":null,"authors":["Ladislav Rampášek","Guy Wolf"],"abstract":"Graph neural networks (GNNs) based on message passing between neighboring nodes are known to be insufficient for capturing long-range interactions in graphs. In this project we study hierarchical message passing models that leverage a multi-resolution representation of a given graph. This facilitates learning of features that span large receptive fields without loss of local information, an aspect not studied in preceding work on hierarchical GNNs. We introduce Hierarchical Graph Net (HGNet), which for any two connected nodes guarantees existence of message-passing paths of at most logarithmic length w.r.t. the input graph size. Yet, under mild assumptions, its internal hierarchy maintains asymptotic size equivalent to that of the input graph. We observe that our HGNet outperforms conventional stacking of GCN layers particularly in molecular property prediction benchmarks. Finally, we propose two benchmarking tasks designed to elucidate capability of GNNs to leverage long-range interactions in graphs.","url_abs":"https://arxiv.org/abs/2107.07432v2","url_pdf":"https://arxiv.org/pdf/2107.07432v2.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-neural-nets-can-capture","repo_url":"https://github.com/rampasek/HGNet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"},{"task_slug":"molecular-property-prediction","task_name":"Molecular Property Prediction"},{"task_slug":"property-prediction","task_name":"Property Prediction"}],"methods":[{"method_slug":"gcn","method_name":"GCN"}],"datasets_introduced":[{"slug":"color-connectivity","name":"Color-connectivity","full_name":""}],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2107.07432","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.07432"}},"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/rampasek/HGNet","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":8},"by_repo_kind":{"official":{"samples":8,"ran":0,"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":"cb6a59d39c3291cc","entry":"evaluate","repo":"rampasek/HGNet","repo_kind":"official","path":"models/ops.py","file_url":"https://github.com/rampasek/HGNet/blob/HEAD/models/ops.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":"cb6a59d39c3291cc"}},{"code_sha256_prefix":"cb01bfc2fdd9db35","entry":"evaluate_transductive","repo":"rampasek/HGNet","repo_kind":"official","path":"models/ops.py","file_url":"https://github.com/rampasek/HGNet/blob/HEAD/models/ops.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":"cb01bfc2fdd9db35"}},{"code_sha256_prefix":"1f57717f294b2b86","entry":"parse_activation","repo":"rampasek/HGNet","repo_kind":"official","path":"models/models.py","file_url":"https://github.com/rampasek/HGNet/blob/HEAD/models/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":"1f57717f294b2b86"}},{"code_sha256_prefix":"d4a0e9456a4b29e0","entry":"parse_list","repo":"rampasek/HGNet","repo_kind":"official","path":"models/models.py","file_url":"https://github.com/rampasek/HGNet/blob/HEAD/models/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":"d4a0e9456a4b29e0"}},{"code_sha256_prefix":"cfcfccedeabb5dde","entry":"read_dataset_outdir","repo":"rampasek/HGNet","repo_kind":"official","path":"collect_results.py","file_url":"https://github.com/rampasek/HGNet/blob/HEAD/collect_results.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":"cfcfccedeabb5dde"}},{"code_sha256_prefix":"d5d1528c39d13701","entry":"sanitize_transductive_task","repo":"rampasek/HGNet","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/rampasek/HGNet/blob/HEAD/dataset.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":"d5d1528c39d13701"}},{"code_sha256_prefix":"624a91da04cd5dce","entry":"split_dataset","repo":"rampasek/HGNet","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/rampasek/HGNet/blob/HEAD/dataset.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":"624a91da04cd5dce"}},{"code_sha256_prefix":"2660b29da33c9d4c","entry":"train_batch","repo":"rampasek/HGNet","repo_kind":"official","path":"models/ops.py","file_url":"https://github.com/rampasek/HGNet/blob/HEAD/models/ops.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":"2660b29da33c9d4c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}