{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,10]],"date-time":"2026-11-10T02:27:54Z","timestamp":1794277674028,"version":"4.9.0"},"reference-count":33,"publisher":"Springer Science and Business Media LLC","issue":"4","license":[{"start":{"date-parts":[[2026,4,1]],"date-time":"2026-04-01T00:00:00Z","timestamp":1775001600000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2026,4,9]],"date-time":"2026-04-09T00:00:00Z","timestamp":1775692800000},"content-version":"vor","delay-in-days":8,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"funder":[{"DOI":"10.13039\/100013003","name":"Universit\u00e0 degli Studi di Cagliari","doi-asserted-by":"crossref","id":[{"id":"10.13039\/100013003","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":["Mach Learn"],"published-print":{"date-parts":[[2026,4]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>\n                    To address the extremely concerning problem of software vulnerability, system security is often entrusted to Machine Learning (ML) algorithms. Despite their now established detection capabilities, such models are limited by design to flagging the entire input source code function as vulnerable, rather than precisely localizing the concerned code lines. However, the detection granularity is crucial to support human operators during software development, ensuring that such predictions reflect the true code semantics to help debug, evaluate, and fix the detected vulnerabilities. To address this issue, recent work made progress toward improving the detector\u2019s localization ability, thus narrowing down the vulnerability detection \u201cwindow\u201d and providing more fine-grained predictions. Such approaches, however, implicitly disregard the presence of spurious correlations and biases in the data, which often predominantly influence the performance of ML algorithms. In this work, we investigate how detectors comply with this requirement by proposing an explainability-based evaluation procedure. Our approach, defined as\n                    <jats:italic>Detection Alignment<\/jats:italic>\n                    (DA), quantifies the agreement between the input source code lines that most influence the prediction and the actual localization of the vulnerability as per the ground truth. Through DA, which is model-agnostic and adaptable to different detection tasks, not limited to our use case, we analyze multiple learning-based vulnerability detectors and datasets. As a result, we show how the predictions of such models are consistently biased by non-vulnerable lines, ultimately highlighting the high impact of biases and spurious correlations.\n                  <\/jats:p>","DOI":"10.1007\/s10994-025-06902-1","type":"journal-article","created":{"date-parts":[[2026,4,9]],"date-time":"2026-04-09T12:22:15Z","timestamp":1775737335000},"update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":2,"title":["Evaluating line-level localization ability of learning-based code vulnerability detection models"],"prefix":"10.1007","volume":"115","author":[{"given":"Marco","family":"Pintore","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Giorgio","family":"Piras","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Angelo","family":"Sotgiu","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Maura","family":"Pintor","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Battista","family":"Biggio","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"297","published-online":{"date-parts":[[2026,4,9]]},"reference":[{"key":"6902_CR1","unstructured":"Achtibat, R., Hatefi, S.M.V., Dreyer, M., Jain, A., Wiegand, T., Lapuschkin, S., & Samek, W. (2024). Attnlrp: attention-aware layer-wise relevance propagation for transformers. In: Proceedings of the 41st international conference on machine learning. ICML\u201924"},{"key":"6902_CR2","unstructured":"Arp, D., Quiring, E., Pendlebury, F., Warnecke, A., Pierazzi, F., Wressnegger, C., Cavallaro, L., & Rieck, K. (2022). Dos and don\u2019ts of machine learning in computer security. In: 31st USENIX security symposium (USENIX Security 22), pp. 3971\u20133988. USENIX Association, Boston, MA"},{"key":"6902_CR3","doi-asserted-by":"publisher","first-page":"14","DOI":"10.1016\/j.inffus.2021.11.008","volume":"81","author":"L Arras","year":"2022","unstructured":"Arras, L., Osman, A., & Samek, W. (2022). Clevr-xai: A benchmark dataset for the ground truth evaluation of neural network explanations. Information Fusion, 81, 14\u201340. https:\/\/doi.org\/10.1016\/j.inffus.2021.11.008","journal-title":"Information Fusion"},{"issue":"09","key":"6902_CR4","doi-asserted-by":"publisher","first-page":"3280","DOI":"10.1109\/TSE.2021.3087402","volume":"48","author":"S Chakraborty","year":"2022","unstructured":"Chakraborty, S., Krishna, R., Ding, Y., & Ray, B. (2022). Deep learning based vulnerability detection: Are we there yet? IEEE Transactions on Software Engineering, 48(09), 3280\u20133296. https:\/\/doi.org\/10.1109\/TSE.2021.3087402","journal-title":"IEEE Transactions on Software Engineering"},{"key":"6902_CR5","doi-asserted-by":"publisher","unstructured":"Devlin, J., Chang, M., Lee, K., & Toutanova, K. (2019). BERT: pre-training of deep bidirectional transformers for language understanding, pp. 4171\u20134186 https:\/\/doi.org\/10.18653\/V1\/N19-1423","DOI":"10.18653\/V1\/N19-1423"},{"key":"6902_CR6","doi-asserted-by":"publisher","unstructured":"Ding, Y., Fu, Y., Ibrahim, O., Sitawarin, C., Chen, X., Alomair, B., Wagner, D., Ray, B., & Chen, Y. (2025). Vulnerability detection with code language models: How far are we?. In: 2025 IEEE\/ACM 47th international conference on software engineering (ICSE), pp. 469\u2013481. IEEE Computer Society, Los Alamitos, CA, USA. https:\/\/doi.org\/10.1109\/ICSE55347.2025.00038","DOI":"10.1109\/ICSE55347.2025.00038"},{"key":"6902_CR7","doi-asserted-by":"publisher","unstructured":"Faber, L., K.\u00a0Moghaddam, A., & Wattenhofer, R. (2021). When comparing to ground truth is wrong: On evaluating gnn explanation methods. In: Proceedings of the 27th ACM SIGKDD conference on knowledge discovery & data mining. KDD \u201921, pp. 332\u2013341. Association for Computing Machinery, New York, NY, USA. https:\/\/doi.org\/10.1145\/3447548.3467283","DOI":"10.1145\/3447548.3467283"},{"key":"6902_CR8","doi-asserted-by":"publisher","unstructured":"Fan, J., Li, Y., Wang, S., & Nguyen, T.N. (2020) A c\/c++ code vulnerability dataset with code changes and cve summaries. In: Proceedings of the 17th international conference on mining software repositories. MSR \u201920, pp. 508\u2013512. Association for Computing Machinery, New York, NY, USA. https:\/\/doi.org\/10.1145\/3379597.3387501","DOI":"10.1145\/3379597.3387501"},{"key":"6902_CR9","doi-asserted-by":"publisher","unstructured":"Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., Jiang, D., & Zhou, M. (2020) CodeBERT: A pre-trained model for programming and natural languages, pp. 1536\u20131547 https:\/\/doi.org\/10.18653\/v1\/2020.findings-emnlp.139","DOI":"10.18653\/v1\/2020.findings-emnlp.139"},{"key":"6902_CR10","doi-asserted-by":"publisher","unstructured":"Fu, M., & Tantithamthavorn, C. (2022). Linevul: A transformer-based line-level vulnerability prediction. In: 2022 IEEE\/ACM 19th international conference on mining software repositories (MSR), pp. 608\u2013620. https:\/\/doi.org\/10.1145\/3524842.3528452","DOI":"10.1145\/3524842.3528452"},{"key":"6902_CR11","doi-asserted-by":"crossref","unstructured":"Ganz, T., H\u00e4rterich, M., Warnecke, A., & Rieck, K. (2021). Explaining graph neural networks for vulnerability discovery. In: Proceedings of the 14th ACM workshop on artificial intelligence and security, pp. 145\u2013156","DOI":"10.1145\/3474369.3486866"},{"key":"6902_CR12","doi-asserted-by":"publisher","unstructured":"Ganz, T., Rall, P., H\u00e4rterich, M., & Rieck, K. (2023). Hunting for truth: Analyzing explanation methods in learning-based vulnerability discovery. In: 2023 IEEE 8th European symposium on security and privacy (EuroS &P), pp. 524\u2013541. https:\/\/doi.org\/10.1109\/EuroSP57164.2023.00038","DOI":"10.1109\/EuroSP57164.2023.00038"},{"key":"6902_CR13","doi-asserted-by":"publisher","DOI":"10.1016\/j.artint.2020.103428","volume":"291","author":"R Guidotti","year":"2021","unstructured":"Guidotti, R. (2021). Evaluating local explanation methods on ground truth. Artificial Intelligence, 291, Article 103428. https:\/\/doi.org\/10.1016\/j.artint.2020.103428","journal-title":"Artificial Intelligence"},{"key":"6902_CR14","doi-asserted-by":"publisher","unstructured":"Hin, D., Kan, A., Chen, H., & Babar, M.A. (2022). Linevd: statement-level vulnerability detection using graph neural networks. In: Proceedings of the 19th international conference on mining software repositories. MSR \u201922, pp. 596\u2013607. Association for Computing Machinery, New York, NY, USA. https:\/\/doi.org\/10.1145\/3524842.3527949","DOI":"10.1145\/3524842.3527949"},{"issue":"8","key":"6902_CR15","doi-asserted-by":"publisher","first-page":"1735","DOI":"10.1162\/neco.1997.9.8.1735","volume":"9","author":"S Hochreiter","year":"1997","unstructured":"Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735\u20131780. https:\/\/doi.org\/10.1162\/neco.1997.9.8.1735","journal-title":"Neural Computation"},{"key":"6902_CR16","doi-asserted-by":"publisher","unstructured":"Imgrund, E., Ganz, T., H\u00e4rterich, M., Pirch, L., Risse, N., & Rieck, K. (2023). Broken promises: Measuring confounding effects in learning-based vulnerability discovery. In: Proceedings of the 16th ACM workshop on artificial intelligence and security. AISec \u201923, pp. 149\u2013160. Association for Computing Machinery, New York, NY, USA. https:\/\/doi.org\/10.1145\/3605764.3623915","DOI":"10.1145\/3605764.3623915"},{"key":"6902_CR17","doi-asserted-by":"publisher","unstructured":"Li, Y., Wang, S., & Nguyen, T.N. (2021). Vulnerability detection with fine-grained interpretations. ESEC\/FSE 2021, pp. 292\u2013303. Association for Computing Machinery, New York, NY, USA. https:\/\/doi.org\/10.1145\/3468264.3468597","DOI":"10.1145\/3468264.3468597"},{"issue":"04","key":"6902_CR19","doi-asserted-by":"publisher","first-page":"2821","DOI":"10.1109\/TDSC.2021.3076142","volume":"19","author":"Z Li","year":"2022","unstructured":"Li, Z., Zou, D., Xu, S., Chen, Z., Zhu, Y., & Jin, H. (2022). Vuldeelocator: a deep learning-based fine-grained vulnerability detector. IEEE Transactions on Dependable and Secure Computing, 19(04), 2821\u20132837. https:\/\/doi.org\/10.1109\/TDSC.2021.3076142","journal-title":"IEEE Transactions on Dependable and Secure Computing"},{"key":"6902_CR18","doi-asserted-by":"crossref","unstructured":"Li, Z., Zou, D., Xu, S., Ou, X., Jin, H., Wang, S., Deng, Z., & Zhong, Y. (2018). Vuldeepecker: A deep learning-based system for vulnerability detection","DOI":"10.14722\/ndss.2018.23158"},{"key":"6902_CR20","unstructured":"Lu, S., Guo, D., Ren, S., Huang, J., Svyatkovskiy, A., Blanco, A., Clement, C., Drain, D., Jiang, D., & Tang, D. (2021) Codexglue: A machine learning benchmark dataset for code understanding and generation. arXiv preprint arXiv:2102.04664"},{"key":"6902_CR21","unstructured":"Mirsky, Y., Macon, G., Brown, M., Yagemann, C., Pruett, M., Downing, E., Mertoguno, S., & Lee, W. (2023). VulChecker: Graph-based vulnerability localization in source code. In: 32nd USENIX security symposium (USENIX Security 23), pp. 6557\u20136574. USENIX Association, Anaheim, CA. https:\/\/www.usenix.org\/conference\/usenixsecurity23\/presentation\/mirsky"},{"issue":"2","key":"6902_CR22","doi-asserted-by":"publisher","first-page":"96","DOI":"10.1145\/3610721","volume":"68","author":"H Pearce","year":"2025","unstructured":"Pearce, H., Ahmad, B., Tan, B., Dolan-Gavitt, B., & Karri, R. (2025). Asleep at the keyboard? assessing the security of Github copilot\u2019s code contributions. Communications of the ACM, 68(2), 96\u2013105. https:\/\/doi.org\/10.1145\/3610721","journal-title":"Communications of the ACM"},{"key":"6902_CR23","doi-asserted-by":"publisher","unstructured":"Petkovi, M., \u0160krlj, B., Kocev, D., & Simidjievski, N. (2021). Fuzzy Jaccard index: A robust comparison of ordered lists. Applied Soft Computing, 113, Article 107849. https:\/\/doi.org\/10.1016\/j.asoc.2021.107849","DOI":"10.1016\/j.asoc.2021.107849"},{"issue":"140","key":"6902_CR24","first-page":"1","volume":"21","author":"C Raffel","year":"2020","unstructured":"Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., & Liu, P. J. (2020). Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140), 1\u201367.","journal-title":"Journal of Machine Learning Research"},{"key":"6902_CR25","doi-asserted-by":"publisher","unstructured":"Sennrich, R., Haddow, B., & Birch, A. (2016). Neural machine translation of rare words with subword units. In: Erk, K., Smith, N.A. (eds.) Proceedings of the 54th annual meeting of the association for computational linguistics (Volume 1: Long Papers), pp. 1715\u20131725. Association for Computational Linguistics, Berlin, Germany. https:\/\/doi.org\/10.18653\/v1\/P16-1162","DOI":"10.18653\/v1\/P16-1162"},{"key":"6902_CR26","doi-asserted-by":"publisher","unstructured":"Sotgiu, A., Pintor, M., & Biggio, B. (2022). Explainability-based debugging of machine learning for vulnerability discovery. In: Proceedings of the 17th international conference on availability, reliability and security. ARES \u201922. Association for Computing Machinery, New York, NY, USA. https:\/\/doi.org\/10.1145\/3538969.3543809","DOI":"10.1145\/3538969.3543809"},{"key":"6902_CR27","unstructured":"Sundararajan, M., Taly, A., & Yan, Q. (2017). Axiomatic attribution for deep networks. In: Proceedings of the 34th international conference on machine learning - Volume 70. ICML\u201917, pp. 3319\u20133328"},{"key":"6902_CR28","unstructured":"Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., & Polosukhin, I. (2017). Attention is all you need. In: Proceedings of the 31st international conference on neural information processing systems. NIPS\u201917, pp. 6000\u20136010. Curran Associates Inc., Red Hook, NY, USA"},{"key":"6902_CR29","doi-asserted-by":"publisher","unstructured":"Wang, Y., Wang, W., Joty, S., & Hoi, S.C.H. (2021). CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation. In: Moens, M.-F., Huang, X., Specia, L., Yih, S.W.-t. (eds.) Proceedings of the 2021 conference on empirical methods in natural language processing, pp. 8696\u20138708. Association for Computational Linguistics, Online and Punta Cana, Dominican Republic. https:\/\/doi.org\/10.18653\/v1\/2021.emnlp-main.685","DOI":"10.18653\/v1\/2021.emnlp-main.685"},{"key":"6902_CR30","doi-asserted-by":"publisher","unstructured":"Warnecke, A., Arp, D., Wressnegger, C., & Rieck, K. (2020). Evaluating explanation methods for deep learning in security. In: 2020 IEEE European symposium on security and privacy (EuroS &P), pp. 158\u2013174. IEEE Computer Society, Los Alamitos, CA, USA. https:\/\/doi.org\/10.1109\/EuroSP48549.2020.00018","DOI":"10.1109\/EuroSP48549.2020.00018"},{"key":"6902_CR31","doi-asserted-by":"crossref","unstructured":"Zeiler, M.D., & Fergus, R. (2014). Visualizing and understanding convolutional networks. In: Computer vision\u2013ECCV 2014: 13th European conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part I 13, pp. 818\u2013833. Springer","DOI":"10.1007\/978-3-319-10590-1_53"},{"issue":"9","key":"6902_CR33","doi-asserted-by":"publisher","first-page":"9623","DOI":"10.1609\/aaai.v36i9.21196","volume":"36","author":"Y Zhou","year":"2022","unstructured":"Zhou, Y., Booth, S., Ribeiro, M. T., & Shah, J. (2022). Do feature attribution methods correctly attribute features? Proceedings of the AAAI Conference on Artificial Intelligence, 36(9), 9623\u20139633. https:\/\/doi.org\/10.1609\/aaai.v36i9.21196","journal-title":"Proceedings of the AAAI Conference on Artificial Intelligence"},{"key":"6902_CR32","unstructured":"Zhou, Y., Liu, S., Siow, J., Du, X., & Liu, Y. (2019) Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks"}],"container-title":["Machine Learning"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s10994-025-06902-1.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/article\/10.1007\/s10994-025-06902-1","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s10994-025-06902-1.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,13]],"date-time":"2026-05-13T16:14:13Z","timestamp":1778688853000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/s10994-025-06902-1"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,4]]},"references-count":33,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2026,4]]}},"alternative-id":["6902"],"URL":"https:\/\/doi.org\/10.1007\/s10994-025-06902-1","relation":{},"ISSN":["0885-6125","1573-0565"],"issn-type":[{"value":"0885-6125","type":"print"},{"value":"1573-0565","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,4]]},"assertion":[{"value":"25 February 2025","order":1,"name":"received","label":"Received","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"29 August 2025","order":2,"name":"revised","label":"Revised","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"21 September 2025","order":3,"name":"accepted","label":"Accepted","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"9 April 2026","order":4,"name":"first_online","label":"First Online","group":{"name":"ArticleHistory","label":"Article History"}},{"order":1,"name":"Ethics","group":{"name":"EthicsHeading","label":"Declarations"}},{"value":"The authors declare no Conflict of interest.","order":2,"name":"Ethics","group":{"name":"EthicsHeading","label":"Conflict of interest"}}],"article-number":"94"}}