{"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/graph-attention-with-random-rewiring","title":"Greener GRASS: Enhancing GNNs with Encoding, Rewiring, and Attention","arxiv_id":"2407.05649","date":"2024-07-08","proceeding":null,"authors":["Tongzhou Liao","Barnabás Póczos"],"abstract":"Graph Neural Networks (GNNs) have become important tools for machine learning on graph-structured data. In this paper, we explore the synergistic combination of graph encoding, graph rewiring, and graph attention, by introducing Graph Attention with Stochastic Structures (GRASS), a novel GNN architecture. GRASS utilizes relative random walk probabilities (RRWP) encoding and a novel decomposed variant (D-RRWP) to efficiently capture structural information. It rewires the input graph by superimposing a random regular graph to enhance long-range information propagation. It also employs a novel additive attention mechanism tailored for graph-structured data. Our empirical evaluations demonstrate that GRASS achieves state-of-the-art performance on multiple benchmark datasets, including a 20.3% reduction in mean absolute error on the ZINC dataset.","url_abs":"https://arxiv.org/abs/2407.05649v5","url_pdf":"https://arxiv.org/pdf/2407.05649v5.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":[],"tasks":[{"task_slug":"graph-attention","task_name":"Graph Attention"},{"task_slug":"inductive-bias","task_name":"Inductive Bias"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"tanh-activation","method_name":"Tanh Activation"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.05649","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.05649"}},"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/grass-gnn/grass","reach":null}],"summary":{"ran":4,"unverified":6},"by_repo_kind":{"found_in_text":{"samples":10,"ran":4,"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":10,"samples":[{"code_sha256_prefix":"5f4daa7a52a1a432","entry":"BatchNorm","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5f4daa7a52a1a432"}},{"code_sha256_prefix":"a6f213943cc04cac","entry":"KaimingLinear","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"a6f213943cc04cac"}},{"code_sha256_prefix":"e0c3a588dc8af721","entry":"NonBatchNorm","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e0c3a588dc8af721"}},{"code_sha256_prefix":"8a9d2ec56b691b7b","entry":"TransformerRMSNorm","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8a9d2ec56b691b7b"}},{"code_sha256_prefix":"ba529b9a41d6fdc6","entry":"GRASS","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ba529b9a41d6fdc6"}},{"code_sha256_prefix":"3a3c574e108e62dd","entry":"GRASSLayer","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"3a3c574e108e62dd"}},{"code_sha256_prefix":"5320f47637ba1b9b","entry":"GRASSModule","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5320f47637ba1b9b"}},{"code_sha256_prefix":"dc679bb58f026c39","entry":"Norm","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"dc679bb58f026c39"}},{"code_sha256_prefix":"598e84103d44a825","entry":"get_norm_module","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"598e84103d44a825"}},{"code_sha256_prefix":"ed2d01dfb131e1dd","entry":"scatter_reduce","repo":"grass-gnn/grass","repo_kind":"found_in_text","path":"grass/gnn.py","file_url":"https://github.com/grass-gnn/grass/blob/HEAD/grass/gnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ed2d01dfb131e1dd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}