{"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/a-neural-network-architecture-for-program-1","title":"A Neural Network Architecture for Program Understanding Inspired by Human Behaviors","arxiv_id":"2206.04730","date":"2022-05-10","proceeding":"ACL 2022 5","authors":["Renyu Zhu","Lei Yuan","Xiang Li","Ming Gao","Wenyuan Cai"],"abstract":"Program understanding is a fundamental task in program language processing. Despite the success, existing works fail to take human behaviors as reference in understanding programs. In this paper, we consider human behaviors and propose the PGNN-EK model that consists of two main components. On the one hand, inspired by the \"divide-and-conquer\" reading behaviors of humans, we present a partitioning-based graph neural network model PGNN on the upgraded AST of codes. On the other hand, to characterize human behaviors of resorting to other resources to help code comprehension, we transform raw codes with external knowledge and apply pre-training techniques for information extraction. Finally, we combine the two embeddings generated from the two components to output code embeddings. We conduct extensive experiments to show the superior performance of PGNN-EK on the code summarization and code clone detection tasks. In particular, to show the generalization ability of our model, we release a new dataset that is more challenging for code clone detection and could advance the development of the community. Our codes and data are publicly available at https://github.com/RecklessRonan/PGNN-EK.","url_abs":"https://arxiv.org/abs/2206.04730v1","url_pdf":"https://arxiv.org/pdf/2206.04730v1.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":"a-neural-network-architecture-for-program-1","repo_url":"https://github.com/recklessronan/pgnn-ek","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"clone-detection","task_name":"Clone Detection"},{"task_slug":"code-summarization-1","task_name":"Code Summarization"},{"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":{"atlas_url":"https://app.syntology.ai/?focus=2206.04730","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.04730"}},"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/c2nes/javalang","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":9},"by_repo_kind":{"found_in_text":{"samples":9,"ran":0,"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":0,"samples":[{"code_sha256_prefix":"d351384dc258a23d","entry":"join","repo":"c2nes/javalang","repo_kind":"found_in_text","path":"javalang/javadoc.py","file_url":"https://github.com/c2nes/javalang/blob/HEAD/javalang/javadoc.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":"d351384dc258a23d"}},{"code_sha256_prefix":"cfcffc522853f364","entry":"load","repo":"c2nes/javalang","repo_kind":"found_in_text","path":"javalang/ast.py","file_url":"https://github.com/c2nes/javalang/blob/HEAD/javalang/ast.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":"cfcffc522853f364"}},{"code_sha256_prefix":"dfeacfa37a441cb3","entry":"parse","repo":"c2nes/javalang","repo_kind":"found_in_text","path":"javalang/javadoc.py","file_url":"https://github.com/c2nes/javalang/blob/HEAD/javalang/javadoc.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":"dfeacfa37a441cb3"}},{"code_sha256_prefix":"dc30565ef68bb512","entry":"parse_constructor_signature","repo":"c2nes/javalang","repo_kind":"found_in_text","path":"javalang/parse.py","file_url":"https://github.com/c2nes/javalang/blob/HEAD/javalang/parse.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":"dc30565ef68bb512"}},{"code_sha256_prefix":"3a4e5e4f641a3eca","entry":"parse_debug","repo":"c2nes/javalang","repo_kind":"found_in_text","path":"javalang/parser.py","file_url":"https://github.com/c2nes/javalang/blob/HEAD/javalang/parser.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":"3a4e5e4f641a3eca"}},{"code_sha256_prefix":"b4a69eb39b11786a","entry":"parse_expression","repo":"c2nes/javalang","repo_kind":"found_in_text","path":"javalang/parse.py","file_url":"https://github.com/c2nes/javalang/blob/HEAD/javalang/parse.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":"b4a69eb39b11786a"}},{"code_sha256_prefix":"3743d6b9b445152e","entry":"parse_member_signature","repo":"c2nes/javalang","repo_kind":"found_in_text","path":"javalang/parse.py","file_url":"https://github.com/c2nes/javalang/blob/HEAD/javalang/parse.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":"3743d6b9b445152e"}},{"code_sha256_prefix":"54c74426e04ae0d3","entry":"reformat_tokens","repo":"c2nes/javalang","repo_kind":"found_in_text","path":"javalang/tokenizer.py","file_url":"https://github.com/c2nes/javalang/blob/HEAD/javalang/tokenizer.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":"54c74426e04ae0d3"}},{"code_sha256_prefix":"74e056a2350fa629","entry":"tokenize","repo":"c2nes/javalang","repo_kind":"found_in_text","path":"javalang/tokenizer.py","file_url":"https://github.com/c2nes/javalang/blob/HEAD/javalang/tokenizer.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":"74e056a2350fa629"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}