{"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/linevd-statement-level-vulnerability","title":"LineVD: Statement-level Vulnerability Detection using Graph Neural Networks","arxiv_id":"2203.05181","date":"2022-03-10","proceeding":null,"authors":["David Hin","Andrey Kan","Huaming Chen","M. Ali Babar"],"abstract":"Current machine-learning based software vulnerability detection methods are primarily conducted at the function-level. However, a key limitation of these methods is that they do not indicate the specific lines of code contributing to vulnerabilities. This limits the ability of developers to efficiently inspect and interpret the predictions from a learnt model, which is crucial for integrating machine-learning based tools into the software development workflow. Graph-based models have shown promising performance in function-level vulnerability detection, but their capability for statement-level vulnerability detection has not been extensively explored. While interpreting function-level predictions through explainable AI is one promising direction, we herein consider the statement-level software vulnerability detection task from a fully supervised learning perspective. We propose a novel deep learning framework, LineVD, which formulates statement-level vulnerability detection as a node classification task. LineVD leverages control and data dependencies between statements using graph neural networks, and a transformer-based model to encode the raw source code tokens. In particular, by addressing the conflicting outputs between function-level and statement-level information, LineVD significantly improve the prediction performance without vulnerability status for function code. We have conducted extensive experiments against a large-scale collection of real-world C/C++ vulnerabilities obtained from multiple real-world projects, and demonstrate an increase of 105\\% in F1-score over the current state-of-the-art.","url_abs":"https://arxiv.org/abs/2203.05181v2","url_pdf":"https://arxiv.org/pdf/2203.05181v2.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":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"linevd-statement-level-vulnerability","repo_url":"https://github.com/davidhin/linevd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.05181","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.05181"}},"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/davidhin/linevd","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"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":"980a27e20a5e208b","entry":"collate_fn_pad_seq","repo":"davidhin/linevd","repo_kind":"official","path":"sastvd/helpers/dl.py","file_url":"https://github.com/davidhin/linevd/blob/HEAD/sastvd/helpers/dl.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":"980a27e20a5e208b"}},{"code_sha256_prefix":"f7f48a9d9b5e558c","entry":"preds","repo":"davidhin/linevd","repo_kind":"official","path":"sastvd/linevd/generate_pred_vis.py","file_url":"https://github.com/davidhin/linevd/blob/HEAD/sastvd/linevd/generate_pred_vis.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":"f7f48a9d9b5e558c"}},{"code_sha256_prefix":"5236a7405cafc377","entry":"remove_comments","repo":"davidhin/linevd","repo_kind":"official","path":"sastvd/helpers/datasets.py","file_url":"https://github.com/davidhin/linevd/blob/HEAD/sastvd/helpers/datasets.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":"5236a7405cafc377"}},{"code_sha256_prefix":"f4a8d82bc8ec27b0","entry":"tensor_memory","repo":"davidhin/linevd","repo_kind":"official","path":"sastvd/helpers/dl.py","file_url":"https://github.com/davidhin/linevd/blob/HEAD/sastvd/helpers/dl.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":"f4a8d82bc8ec27b0"}},{"code_sha256_prefix":"6fedbb18a8fedea1","entry":"train_val_test_split_df","repo":"davidhin/linevd","repo_kind":"official","path":"sastvd/helpers/datasets.py","file_url":"https://github.com/davidhin/linevd/blob/HEAD/sastvd/helpers/datasets.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":"6fedbb18a8fedea1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}