{"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-as-point-set","title":"Graph as Point Set","arxiv_id":"2405.02795","date":"2024-05-05","proceeding":null,"authors":["Xiyuan Wang","Pan Li","Muhan Zhang"],"abstract":"Graph is a fundamental data structure to model interconnections between entities. Set, on the contrary, stores independent elements. To learn graph representations, current Graph Neural Networks (GNNs) primarily use message passing to encode the interconnections. In contrast, this paper introduces a novel graph-to-set conversion method that bijectively transforms interconnected nodes into a set of independent points and then uses a set encoder to learn the graph representation. This conversion method holds dual significance. Firstly, it enables using set encoders to learn from graphs, thereby significantly expanding the design space of GNNs. Secondly, for Transformer, a specific set encoder, we provide a novel and principled approach to inject graph information losslessly, different from all the heuristic structural/positional encoding methods adopted in previous graph transformers. To demonstrate the effectiveness of our approach, we introduce Point Set Transformer (PST), a transformer architecture that accepts a point set converted from a graph as input. Theoretically, PST exhibits superior expressivity for both short-range substructure counting and long-range shortest path distance tasks compared to existing GNNs. Extensive experiments further validate PST's outstanding real-world performance. Besides Transformer, we also devise a Deepset-based set encoder, which achieves performance comparable to representative GNNs, affirming the versatility of our graph-to-set method.","url_abs":"https://arxiv.org/abs/2405.02795v2","url_pdf":"https://arxiv.org/pdf/2405.02795v2.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":"graph-as-point-set","repo_url":"https://github.com/GraphPKU/GraphAsSet","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"set","method_name":"SET"},{"method_slug":"set-transformer","method_name":"Set Transformer"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.02795","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.02795"}},"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/GraphPKU/GraphAsSet","reach":null}],"summary":{"ran":15,"ran_draft_wrong":4,"ran_honours":1,"unverified":7},"by_repo_kind":{"official":{"samples":27,"ran":20,"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":27,"samples":[{"code_sha256_prefix":"940703b780d57034","entry":"BatchNorm","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"940703b780d57034"}},{"code_sha256_prefix":"227dca0b1ddd8a86","entry":"DirCFConv","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"227dca0b1ddd8a86"}},{"code_sha256_prefix":"c743aa96864dc381","entry":"GaussianGaussian","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c743aa96864dc381"}},{"code_sha256_prefix":"a23408f1e809e4da","entry":"GaussianSmearing","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a23408f1e809e4da"}},{"code_sha256_prefix":"f9c8f5c4b824c8c5","entry":"IdEncoding","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f9c8f5c4b824c8c5"}},{"code_sha256_prefix":"e4a9148d065dfe3f","entry":"InstanceNorm","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e4a9148d065dfe3f"}},{"code_sha256_prefix":"1de67bb52895024c","entry":"LayerNorm","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1de67bb52895024c"}},{"code_sha256_prefix":"b63c020d3cb4419d","entry":"MLP","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b63c020d3cb4419d"}},{"code_sha256_prefix":"a669c0ab6a140900","entry":"MLPEncoding","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a669c0ab6a140900"}},{"code_sha256_prefix":"09974265ed73cca2","entry":"MultiEmbedding","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"09974265ed73cca2"}},{"code_sha256_prefix":"f9b995922ba2b15d","entry":"NoneNorm","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f9b995922ba2b15d"}},{"code_sha256_prefix":"4ecd1c09b35d2866","entry":"Set2Vec","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4ecd1c09b35d2866"}},{"code_sha256_prefix":"2ca2fc1fb0f470ef","entry":"SinEncoding","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2ca2fc1fb0f470ef"}},{"code_sha256_prefix":"671376fabd3398eb","entry":"VMean","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"671376fabd3398eb"}},{"code_sha256_prefix":"c25b516cf38d203b","entry":"VNorm","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c25b516cf38d203b"}},{"code_sha256_prefix":"b4ea68a7c46241fb","entry":"createemb","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b4ea68a7c46241fb"}},{"code_sha256_prefix":"7fc5dce859b3a9ed","entry":"maskedMax","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7fc5dce859b3a9ed"}},{"code_sha256_prefix":"d6cc090e909513c3","entry":"maskedMean","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d6cc090e909513c3"}},{"code_sha256_prefix":"eadfb092195ff0c6","entry":"maskedSum","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eadfb092195ff0c6"}},{"code_sha256_prefix":"8575a32db62b46c6","entry":"maskednone","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8575a32db62b46c6"}},{"code_sha256_prefix":"b81dc93e9346681b","entry":"Imod","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b81dc93e9346681b"}},{"code_sha256_prefix":"c793a8c825a61eb6","entry":"PST","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c793a8c825a61eb6"}},{"code_sha256_prefix":"71379d4107f0e6eb","entry":"PermEquiLayer","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"71379d4107f0e6eb"}},{"code_sha256_prefix":"f104731798499118","entry":"QInputEncoder","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f104731798499118"}},{"code_sha256_prefix":"7d53b92370ae668a","entry":"Set2Set","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7d53b92370ae668a"}},{"code_sha256_prefix":"73e5dc6a7e9a564f","entry":"sv2el","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"73e5dc6a7e9a564f"}},{"code_sha256_prefix":"0f3d8abf4d3866c5","entry":"svMix","repo":"GraphPKU/GraphAsSet","repo_kind":"official","path":"PST.py","file_url":"https://github.com/GraphPKU/GraphAsSet/blob/HEAD/PST.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0f3d8abf4d3866c5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}