{"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/intruding-with-words-towards-understanding","title":"Intruding with Words: Towards Understanding Graph Injection Attacks at the Text Level","arxiv_id":"2405.16405","date":"2024-05-26","proceeding":null,"authors":["Runlin Lei","Yuwei Hu","Yuchen Ren","Zhewei Wei"],"abstract":"Graph Neural Networks (GNNs) excel across various applications but remain vulnerable to adversarial attacks, particularly Graph Injection Attacks (GIAs), which inject malicious nodes into the original graph and pose realistic threats. Text-attributed graphs (TAGs), where nodes are associated with textual features, are crucial due to their prevalence in real-world applications and are commonly used to evaluate these vulnerabilities. However, existing research only focuses on embedding-level GIAs, which inject node embeddings rather than actual textual content, limiting their applicability and simplifying detection. In this paper, we pioneer the exploration of GIAs at the text level, presenting three novel attack designs that inject textual content into the graph. Through theoretical and empirical analysis, we demonstrate that text interpretability, a factor previously overlooked at the embedding level, plays a crucial role in attack strength. Among the designs we investigate, the Word-frequency-based Text-level GIA (WTGIA) is particularly notable for its balance between performance and interpretability. Despite the success of WTGIA, we discover that defenders can easily enhance their defenses with customized text embedding methods or large language model (LLM)--based predictors. These insights underscore the necessity for further research into the potential and practical significance of text-level GIAs.","url_abs":"https://arxiv.org/abs/2405.16405v2","url_pdf":"https://arxiv.org/pdf/2405.16405v2.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":"intruding-with-words-towards-understanding","repo_url":"https://github.com/leirunlin/text-level-graph-attack","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2405.16405","atlas_url":"https://app.syntology.ai/?focus=2405.16405","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.16405"}},"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":"deterministic:regex_extraction","url":"https://github.com/Leirunlin/Text-level-Graph-Attack","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leirunlin/text-level-graph-attack","reach":{"status":"ok"}}],"summary":{"ran":13,"ran_draft_wrong":3,"ran_honours":1,"unverified":7},"by_repo_kind":{"official":{"samples":24,"ran":17,"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":24,"samples":[{"code_sha256_prefix":"031697fa4856f0d8","entry":"GCNAdjNorm","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"models/model_pyg.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/models/model_pyg.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":"031697fa4856f0d8"}},{"code_sha256_prefix":"0a0bc4ba8c9af478","entry":"api_endpoint_from_url","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"async_api.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/async_api.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0a0bc4ba8c9af478"}},{"code_sha256_prefix":"ee46ccc0db279d01","entry":"edge_sim_analysis","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"attacks/attack.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/attacks/attack.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":"ee46ccc0db279d01"}},{"code_sha256_prefix":"15b4190a079900a4","entry":"edge_sim_estimate","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"attacks/attack.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/attacks/attack.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":"15b4190a079900a4"}},{"code_sha256_prefix":"5a4d75b2856d14b5","entry":"feat_normalize","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"utils.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/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":"5a4d75b2856d14b5"}},{"code_sha256_prefix":"e1d1786f30e5fe91","entry":"generate_grb_split","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"load_graph.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/load_graph.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":"e1d1786f30e5fe91"}},{"code_sha256_prefix":"cc6b381c885cee8d","entry":"generate_percent_split","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"load_graph.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/load_graph.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":"cc6b381c885cee8d"}},{"code_sha256_prefix":"9ed828c70754da92","entry":"generate_split","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"load_graph.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/load_graph.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":"9ed828c70754da92"}},{"code_sha256_prefix":"9881692295f797a9","entry":"get_tf_idf_by_texts","repo":"leirunlin/text-level-graph-attack","repo_kind":"official","path":"attacks/text_utils.py","file_url":"https://github.com/leirunlin/text-level-graph-attack/blob/HEAD/attacks/text_utils.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9881692295f797a9"}},{"code_sha256_prefix":"f4cc3f30e8c88187","entry":"persist_cache_to_disk","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"api.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/api.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":"f4cc3f30e8c88187"}},{"code_sha256_prefix":"98699449238cacb8","entry":"prompt_zero_shot","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"ego_graph.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/ego_graph.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":"98699449238cacb8"}},{"code_sha256_prefix":"ac99c179b0418ee8","entry":"random_string","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"LLM_utils.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/LLM_utils.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":"ac99c179b0418ee8"}},{"code_sha256_prefix":"f6dadc26879ae08a","entry":"read_jsonl","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"LLM_utils.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/LLM_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":"f6dadc26879ae08a"}},{"code_sha256_prefix":"38d1baa3ab10748b","entry":"sep_test","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"gnn_misg.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/gnn_misg.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":"38d1baa3ab10748b"}},{"code_sha256_prefix":"231f26eaddf19604","entry":"target_select","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"utils.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/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":"231f26eaddf19604"}},{"code_sha256_prefix":"768b8716889709e2","entry":"test","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"gnn_misg.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/gnn_misg.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"768b8716889709e2"}},{"code_sha256_prefix":"15cbb9f3adf7eca7","entry":"train","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"gnn_misg.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/gnn_misg.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"15cbb9f3adf7eca7"}},{"code_sha256_prefix":"5d5bd3804f348b08","entry":"get_bow_by_texts","repo":"leirunlin/text-level-graph-attack","repo_kind":"official","path":"attacks/text_utils.py","file_url":"https://github.com/leirunlin/text-level-graph-attack/blob/HEAD/attacks/text_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":"5d5bd3804f348b08"}},{"code_sha256_prefix":"96e4fd4bc45d23ce","entry":"get_bow_by_texts","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"data_preprocess.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/data_preprocess.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":"96e4fd4bc45d23ce"}},{"code_sha256_prefix":"ccb546755da4914b","entry":"get_embedding","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"api.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/api.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":"ccb546755da4914b"}},{"code_sha256_prefix":"d38549dfb19c8a66","entry":"get_tf_idf_by_texts","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"data_preprocess.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/data_preprocess.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":"d38549dfb19c8a66"}},{"code_sha256_prefix":"2889448e99db8045","entry":"load_vectorizer","repo":"leirunlin/text-level-graph-attack","repo_kind":"official","path":"attacks/text_utils.py","file_url":"https://github.com/leirunlin/text-level-graph-attack/blob/HEAD/attacks/text_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":"2889448e99db8045"}},{"code_sha256_prefix":"2c594a3c725da903","entry":"load_yaml_file","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"api.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/api.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":"2c594a3c725da903"}},{"code_sha256_prefix":"27007d0ec4adb00b","entry":"num_tokens_consumed_from_request","repo":"Leirunlin/Text-level-Graph-Attack","repo_kind":"official","path":"async_api.py","file_url":"https://github.com/Leirunlin/Text-level-Graph-Attack/blob/HEAD/async_api.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":"27007d0ec4adb00b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}