{"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/rayleigh-quotient-graph-neural-networks-for","title":"Rayleigh Quotient Graph Neural Networks for Graph-level Anomaly Detection","arxiv_id":"2310.02861","date":"2023-10-04","proceeding":null,"authors":["Xiangyu Dong","Xingyi Zhang","Sibo Wang"],"abstract":"Graph-level anomaly detection has gained significant attention as it finds applications in various domains, such as cancer diagnosis and enzyme prediction. However, existing methods fail to capture the spectral properties of graph anomalies, resulting in unexplainable framework design and unsatisfying performance. In this paper, we re-investigate the spectral differences between anomalous and normal graphs. Our main observation shows a significant disparity in the accumulated spectral energy between these two classes. Moreover, we prove that the accumulated spectral energy of the graph signal can be represented by its Rayleigh Quotient, indicating that the Rayleigh Quotient is a driving factor behind the anomalous properties of graphs. Motivated by this, we propose Rayleigh Quotient Graph Neural Network (RQGNN), the first spectral GNN that explores the inherent spectral features of anomalous graphs for graph-level anomaly detection. Specifically, we introduce a novel framework with two components: the Rayleigh Quotient learning component (RQL) and Chebyshev Wavelet GNN with RQ-pooling (CWGNN-RQ). RQL explicitly captures the Rayleigh Quotient of graphs and CWGNN-RQ implicitly explores the spectral space of graphs. Extensive experiments on 10 real-world datasets show that RQGNN outperforms the best rival by 6.74% in Macro-F1 score and 1.44% in AUC, demonstrating the effectiveness of our framework. Our code is available at https://github.com/xydong127/RQGNN.","url_abs":"https://arxiv.org/abs/2310.02861v4","url_pdf":"https://arxiv.org/pdf/2310.02861v4.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":"rayleigh-quotient-graph-neural-networks-for","repo_url":"https://github.com/xydong127/rqgnn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"anomaly-detection","task_name":"Anomaly Detection"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2310.02861","atlas_url":"https://app.syntology.ai/?focus=2310.02861","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.02861"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/xydong127/rqgnn","reach":{"status":"ok"}}],"summary":{"ran":1,"unverified":5},"by_repo_kind":{"official":{"samples":6,"ran":1,"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":6,"samples":[{"code_sha256_prefix":"3a4f32143a136d50","entry":"sparse_mx_to_torch_sparse_tensor","repo":"xydong127/rqgnn","repo_kind":"official","path":"utils.py","file_url":"https://github.com/xydong127/rqgnn/blob/HEAD/utils.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":"3a4f32143a136d50"}},{"code_sha256_prefix":"c38c9110a9dde90e","entry":"CB_loss","repo":"xydong127/rqgnn","repo_kind":"official","path":"lossfunc.py","file_url":"https://github.com/xydong127/rqgnn/blob/HEAD/lossfunc.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":"c38c9110a9dde90e"}},{"code_sha256_prefix":"128bf43313aa9f8a","entry":"focal_loss","repo":"xydong127/rqgnn","repo_kind":"official","path":"lossfunc.py","file_url":"https://github.com/xydong127/rqgnn/blob/HEAD/lossfunc.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":"128bf43313aa9f8a"}},{"code_sha256_prefix":"6fadaf10e5afa75c","entry":"load_data","repo":"xydong127/rqgnn","repo_kind":"official","path":"utils.py","file_url":"https://github.com/xydong127/rqgnn/blob/HEAD/utils.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":"6fadaf10e5afa75c"}},{"code_sha256_prefix":"501e340829f000f8","entry":"set_seed","repo":"xydong127/rqgnn","repo_kind":"official","path":"utils.py","file_url":"https://github.com/xydong127/rqgnn/blob/HEAD/utils.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":"501e340829f000f8"}},{"code_sha256_prefix":"4a65f08073a2e57b","entry":"set_seed","repo":"xydong127/rqgnn","repo_kind":"official","path":"datasets/datautils.py","file_url":"https://github.com/xydong127/rqgnn/blob/HEAD/datasets/datautils.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":"4a65f08073a2e57b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}