{"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/homomorphism-counts-for-graph-neural-networks","title":"Homomorphism Counts for Graph Neural Networks: All About That Basis","arxiv_id":"2402.08595","date":"2024-02-13","proceeding":null,"authors":["Emily Jin","Michael Bronstein","İsmail İlkan Ceylan","Matthias Lanzinger"],"abstract":"A large body of work has investigated the properties of graph neural networks and identified several limitations, particularly pertaining to their expressive power. Their inability to count certain patterns (e.g., cycles) in a graph lies at the heart of such limitations, since many functions to be learned rely on the ability of counting such patterns. Two prominent paradigms aim to address this limitation by enriching the graph features with subgraph or homomorphism pattern counts. In this work, we show that both of these approaches are sub-optimal in a certain sense and argue for a more fine-grained approach, which incorporates the homomorphism counts of all structures in the ``basis'' of the target pattern. This yields strictly more expressive architectures without incurring any additional overhead in terms of computational complexity compared to existing approaches. We prove a series of theoretical results on node-level and graph-level motif parameters and empirically validate them on standard benchmark datasets.","url_abs":"https://arxiv.org/abs/2402.08595v5","url_pdf":"https://arxiv.org/pdf/2402.08595v5.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":"homomorphism-counts-for-graph-neural-networks","repo_url":"https://github.com/ejin700/hombasis-gnn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"homomorphism-counts-for-graph-neural-networks","repo_url":"https://github.com/icml2024357/hombasis-gnn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"homomorphism-counts-for-graph-neural-networks","repo_url":"https://github.com/linusbao/MoSE","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"all","task_name":"All"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.08595","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.08595"}},"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":"deterministic:regex_extraction","url":"https://github.com/ejin700/hombasis-gnn","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/linusbao/MoSE","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/icml2024357/hombasis-gnn","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran":2,"ran_honours":3,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"repositories":2}},"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":"8cece8d22b52bc54","entry":"choose_activation","repo":"icml2024357/hombasis-gnn","repo_kind":"official","path":"brec/HomGIN/models_misc.py","file_url":"https://github.com/icml2024357/hombasis-gnn/blob/HEAD/brec/HomGIN/models_misc.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8cece8d22b52bc54"}},{"code_sha256_prefix":"1abf815848e61eff","entry":"eval","repo":"icml2024357/hombasis-gnn","repo_kind":"official","path":"hombasis-bench/zinc_utils.py","file_url":"https://github.com/icml2024357/hombasis-gnn/blob/HEAD/hombasis-bench/zinc_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1abf815848e61eff"}},{"code_sha256_prefix":"a6e419d6bf287a8f","entry":"test","repo":"ejin700/hombasis-gnn","repo_kind":"official","path":"hombasis-bench/run-collab.py","file_url":"https://github.com/ejin700/hombasis-gnn/blob/HEAD/hombasis-bench/run-collab.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a6e419d6bf287a8f"}},{"code_sha256_prefix":"5bfd4028374d07c7","entry":"test","repo":"ejin700/hombasis-gnn","repo_kind":"official","path":"qm9/src/experiments/run_gc.py","file_url":"https://github.com/ejin700/hombasis-gnn/blob/HEAD/qm9/src/experiments/run_gc.py","link_basis":"first_harvest_node","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":"5bfd4028374d07c7"}},{"code_sha256_prefix":"b10c2f48c45238a5","entry":"train","repo":"ejin700/hombasis-gnn","repo_kind":"official","path":"hombasis-bench/run-collab.py","file_url":"https://github.com/ejin700/hombasis-gnn/blob/HEAD/hombasis-bench/run-collab.py","link_basis":"first_harvest_node","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":"b10c2f48c45238a5"}},{"code_sha256_prefix":"b367358dc74e5496","entry":"train","repo":"icml2024357/hombasis-gnn","repo_kind":"official","path":"hombasis-bench/zinc_utils.py","file_url":"https://github.com/icml2024357/hombasis-gnn/blob/HEAD/hombasis-bench/zinc_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b367358dc74e5496"}},{"code_sha256_prefix":"49732bab8713a245","entry":"val","repo":"ejin700/hombasis-gnn","repo_kind":"official","path":"qm9/src/experiments/run_gc.py","file_url":"https://github.com/ejin700/hombasis-gnn/blob/HEAD/qm9/src/experiments/run_gc.py","link_basis":"first_harvest_node","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":"49732bab8713a245"}},{"code_sha256_prefix":"513e5ba0da199b50","entry":"graph6_to_pyg","repo":"icml2024357/hombasis-gnn","repo_kind":"official","path":"brec/ProvablyPowerfulGraphNetworks_torch/BRECDataset_v3.py","file_url":"https://github.com/icml2024357/hombasis-gnn/blob/HEAD/brec/ProvablyPowerfulGraphNetworks_torch/BRECDataset_v3.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":"513e5ba0da199b50"}},{"code_sha256_prefix":"d1a3f22e2fe768ac","entry":"train","repo":"ejin700/hombasis-gnn","repo_kind":"official","path":"qm9/src/experiments/run_gc.py","file_url":"https://github.com/ejin700/hombasis-gnn/blob/HEAD/qm9/src/experiments/run_gc.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":"d1a3f22e2fe768ac"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}