{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,8,23]],"date-time":"2026-08-23T11:21:03Z","timestamp":1787484063884,"version":"build-2736575974"},"reference-count":55,"publisher":"Association for Computing Machinery (ACM)","issue":"FSE","license":[{"start":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T00:00:00Z","timestamp":1750291200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/publication-rights-and-licensing-policy"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Softw. Eng."],"published-print":{"date-parts":[[2025,6,19]]},"abstract":"<jats:p>\n                    <jats:italic toggle=\"yes\">Deep Learning<\/jats:italic>\n                    (DL) models are useful for many software engineering tasks. However, these models are susceptible to adversarial attacks, partly because they learn\n                    <jats:italic toggle=\"yes\">spurious features<\/jats:italic>\n                    that incur\n                    <jats:italic toggle=\"yes\">spurious correlations<\/jats:italic>\n                    between these features and model predictions. In this paper, we tackle the problem with a novel\n                    <jats:italic toggle=\"yes\">causal learning<\/jats:italic>\n                    framework, dubbed CausalCode, which leverages causal inference principles to mitigate spurious correlations. At a high level, CausalCode can be characterized as follows: (i) it uses\n                    <jats:italic toggle=\"yes\">causal data augmentation<\/jats:italic>\n                    to generate\n                    <jats:italic toggle=\"yes\">intervention examples<\/jats:italic>\n                    to disrupt spurious correlations; (ii) it leverages\n                    <jats:italic toggle=\"yes\">regularization<\/jats:italic>\n                    to learn\n                    <jats:italic toggle=\"yes\">invariant representations<\/jats:italic>\n                    that prefer causal features to spurious features; (iii) it can enhance the robustness of multiple DL models for source code-based software engineering tasks because it is task-agnostic and model-agnostic. To evaluate its effectiveness, we conduct comprehensive experiments on two models (i.e., CodeBERT and GraphCodeBERT), with respect to four software engineering tasks (i.e., defect detection, functionality classification, code translation, and code repair). Experimental results show that CausalCode outperforms the state-of-the-art approaches in enhancing the robustness of these models.\n                  <\/jats:p>","DOI":"10.1145\/3729387","type":"journal-article","created":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T11:15:34Z","timestamp":1750331734000},"page":"2641-2664","source":"Crossref","is-referenced-by-count":0,"title":["A Causal Learning Framework for Enhancing Robustness of Source Code Models"],"prefix":"10.1145","volume":"2","author":[{"ORCID":"https:\/\/orcid.org\/0009-0007-8337-038X","authenticated-orcid":false,"given":"Junyao","family":"Ye","sequence":"first","affiliation":[{"name":"Huazhong University of Science and Technology, wuhan, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-0001-2998","authenticated-orcid":false,"given":"Zhen","family":"Li","sequence":"additional","affiliation":[{"name":"Huazhong University of Science and Technology, wuhan, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0006-1925-4686","authenticated-orcid":false,"given":"Xi","family":"Tang","sequence":"additional","affiliation":[{"name":"Huazhong University of Science and Technology, wuhan, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8534-5048","authenticated-orcid":false,"given":"Deqing","family":"Zou","sequence":"additional","affiliation":[{"name":"Huazhong University of Science and Technology, wuhan, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8034-0942","authenticated-orcid":false,"given":"Shouhuai","family":"Xu","sequence":"additional","affiliation":[{"name":"University of Colorado Colorado Springs, Colorado Springs, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4390-3819","authenticated-orcid":false,"given":"Weizhong","family":"Qiang","sequence":"additional","affiliation":[{"name":"Huazhong University of Science and Technology, wuhan, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3934-7605","authenticated-orcid":false,"given":"Hai","family":"Jin","sequence":"additional","affiliation":[{"name":"Huazhong University of Science and Technology, wuhan, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,6,19]]},"reference":[{"key":"e_1_3_1_2_2","doi-asserted-by":"publisher","DOI":"10.3390\/electronics9081295"},{"key":"e_1_3_1_3_2","doi-asserted-by":"publisher","DOI":"10.1609\/AAAI.V36I10.21296"},{"key":"e_1_3_1_4_2","doi-asserted-by":"publisher","DOI":"10.1145\/3379597.3387445"},{"key":"e_1_3_1_5_2","doi-asserted-by":"publisher","DOI":"10.18653\/V1\/2020.FINDINGS-EMNLP.139"},{"key":"e_1_3_1_6_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1904.07451"},{"key":"e_1_3_1_7_2","doi-asserted-by":"publisher","unstructured":"Daya Guo Shuo Ren Shuai Lu Zhangyin Feng Duyu Tang Shujie Liu Long Zhou Nan Duan Alexey Svyatkovskiy Shengyu Fu Michele Tufano Shao Kun Deng Colin B. Clement Dawn Drain Neel Sundaresan Jian Yin Daxin Jiang and Ming Zhou. 2021. GraphCodeBERT: Pre-Training Code Representations with Data Flow. In Proceedings of the 9th International Conference on Learning Representations (ICLR) Virtual Event Austria. https:\/\/doi.org\/10.48550\/arXiv.2009.08366 10.48550\/arXiv.2009.08366","DOI":"10.48550\/arXiv.2009.08366"},{"key":"e_1_3_1_8_2","doi-asserted-by":"publisher","unstructured":"Jordan Henkel Goutham Ramakrishnan Zi Wang Aws Albarghouthi Somesh Jha and Thomas W. Reps. 2022. Semantic Robustness of Models of Source Code. In Proceedings of the 2022 IEEE International Conference on Software Analysis Evolution and Reengineering (SANER) Honolulu HI USA. 526\u2013537. https:\/\/doi.org\/10.1109\/saner53432.2022.00070 10.1109\/saner53432.2022.00070","DOI":"10.1109\/saner53432.2022.00070"},{"key":"e_1_3_1_9_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2005.01856"},{"key":"e_1_3_1_10_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.emnlp-main.482"},{"key":"e_1_3_1_11_2","doi-asserted-by":"publisher","unstructured":"Akshita Jha and Chandan K. Reddy. 2023. CodeAttack: Code-Based Adversarial Attacks for Pre-Trained Programming Language Models. In Proceedings of the 37th AAAI Conference on Artificial Intelligence (AAAI) Washington DC USA. 14892\u201314900. https:\/\/doi.org\/10.1609\/AAAI.V37I12.26739 10.1609\/AAAI.V37I12.26739","DOI":"10.1609\/AAAI.V37I12.26739"},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","unstructured":"Jia Li Yongmin Li Ge Li Xing Hu Xin Xia and Zhi Jin. 2021. EditSum: A Retrieve-and-Edit Framework for Source Code Summarization. In Proceedings of the 36th IEEE\/ACM International Conference on Automated Software Engineering (ASE) Melbourne Australia. 155\u2013166. https:\/\/doi.org\/10.48550\/ARXIV.2308.13775 10.48550\/ARXIV.2308.13775","DOI":"10.48550\/ARXIV.2308.13775"},{"key":"e_1_3_1_13_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2305.06161"},{"key":"e_1_3_1_14_2","doi-asserted-by":"publisher","unstructured":"Yi Li Shaohua Wang and Tien N. Nguyen. 2020. DLFix: Context-based code transformation learning for automated program repair. In Proceedings of the 42nd International Conference on Software Engineering (ICSE) Seoul South Korea. 602\u2013614. https:\/\/doi.org\/10.1145\/3377811.3380345 10.1145\/3377811.3380345","DOI":"10.1145\/3377811.3380345"},{"key":"e_1_3_1_15_2","doi-asserted-by":"publisher","unstructured":"Yiyang Li Hongqiu Wu and Hai Zhao. 2022. Semantic-Preserving Adversarial Code Comprehension. In Proceedings of the 29th International Conference on Computational Linguistics (COLING) Gyeongju Republic of Korea. 3017\u20133028. https:\/\/doi.org\/10.48550\/arXiv.2209.05130 10.48550\/arXiv.2209.05130","DOI":"10.48550\/arXiv.2209.05130"},{"key":"e_1_3_1_16_2","doi-asserted-by":"publisher","unstructured":"Zhen Li Guenevere (Qian) Chen Chen Chen Yayi Zou and Shouhuai Xu. 2022. RoPGen: Towards Robust Code Authorship Attribution via Automatic Coding Style Transformation. In Proceedings of the 44th International Conference on Software Engineering (ICSE) Pittsburgh PA USA. 1906\u20131918. https:\/\/doi.org\/10.1145\/3510003.3510181 10.1145\/3510003.3510181","DOI":"10.1145\/3510003.3510181"},{"key":"e_1_3_1_17_2","doi-asserted-by":"publisher","unstructured":"Zhen Li Xiang Huang Yangrui Li and Guenevere Chen. 2023. A Comparative Study of Adversarial Training Methods for Neural Models of Source Code. Future Generation Computer Systems 142 (2023) 165\u2013181. https:\/\/doi.org\/10.1016\/j.future.2022.12.030 10.1016\/j.future.2022.12.030","DOI":"10.1016\/j.future.2022.12.030"},{"key":"e_1_3_1_18_2","doi-asserted-by":"publisher","DOI":"10.1109\/TDSC.2021.3051525"},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","unstructured":"Shangqing Liu Yu Chen Xiaofei Xie Jing Kai Siow and Yang Liu. 2021. Retrieval-Augmented Generation for Code Summarization via Hybrid GNN. In Proceedings of the 9th International Conference on Learning Representations (ICLR) Virtual Event Austria. https:\/\/doi.org\/10.48550\/arXiv.2006.05405 10.48550\/arXiv.2006.05405","DOI":"10.48550\/arXiv.2006.05405"},{"key":"e_1_3_1_20_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00207"},{"key":"e_1_3_1_21_2","doi-asserted-by":"publisher","unstructured":"Anton Lozhkov Raymond Li Loubna Ben Allal Federico Cassano Joel Lamy-Poirier Nouamane Tazi Ao Tang Dmytro Pykhtar Jiawei Liu Yuxiang Wei Tianyang Liu Max Tian Denis Kocetkov Arthur Zucker Younes Belkada Zijian Wang Qian Liu Dmitry Abulkhanov Indraneil Paul Zhuang Li Wen-Ding Li Megan Risdal Jia Li Jian Zhu Terry Yue Zhuo Evgenii Zheltonozhskii Nii Osae Osae Dade Wenhao Yu Lucas Krau\u00df Naman Jain Yixuan Su Xuanli He Manan Dey Edoardo Abati Yekun Chai Niklas Muennighoff Xiangru Tang Muhtasham Oblokulov Christopher Akiki Marc Marone Chenghao Mou Mayank Mishra Alex Gu Binyuan Hui Tri Dao Armel Zebaze Olivier Dehaene Nicolas Patry Canwen Xu Julian McAuley Han Hu Torsten Scholak Sebastien Paquet Jennifer Robinson Carolyn Jane Anderson Nicolas Chapados Mostofa Patwary Nima Tajbakhsh Yacine Jernite Carlos Mu\u00f1oz Ferrandis Lingming Zhang Sean Hughes Thomas Wolf Arjun Guha Leandro von Werra and Harm de Vries. 2024. StarCoder 2 and The Stack v2: The Next Generation. https:\/\/doi.org\/10.48550\/arXiv.2402.19173 arXiv:2402.19173 10.48550\/arXiv.2402.19173 arXiv:2402.19173","DOI":"10.48550\/arXiv.2402.19173"},{"key":"e_1_3_1_22_2","doi-asserted-by":"publisher","unstructured":"Shuai Lu Daya Guo Shuo Ren Junjie Huang Alexey Svyatkovskiy Ambrosio Blanco Colin B. Clement Dawn Drain Daxin Jiang Duyu Tang Ge Li Lidong Zhou Linjun Shou Long Zhou Michele Tufano Ming Gong Ming Zhou Nan Duan Neel Sundaresan Shao Kun Deng Shengyu Fu and Shujie Liu. 2021. CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1 NeurIPS Datasets and Benchmarks 2021 December 2021 virtual Joaquin Vanschoren and Sai-Kit Yeung (Eds.). https:\/\/doi.org\/10.48550\/arXiv.2102.04664 10.48550\/arXiv.2102.04664","DOI":"10.48550\/arXiv.2102.04664"},{"key":"e_1_3_1_23_2","doi-asserted-by":"publisher","DOI":"10.1109\/cvpr52688.2022.00788"},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1706.06083"},{"key":"e_1_3_1_25_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2006.07500"},{"key":"e_1_3_1_26_2","doi-asserted-by":"publisher","DOI":"10.1109\/cvpr46437.2021.00394"},{"key":"e_1_3_1_27_2","doi-asserted-by":"publisher","DOI":"10.1609\/aaai.v30i1.10139"},{"key":"e_1_3_1_28_2","doi-asserted-by":"publisher","unstructured":"Judea Pearl. 2009. Causality. Cambridge University Press. https:\/\/doi.org\/10.1111\/j.1475-6773.2011.01243.x 10.1111\/j.1475-6773.2011.01243.x","DOI":"10.1111\/j.1475-6773.2011.01243.x"},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","DOI":"10.5555\/3202377"},{"key":"e_1_3_1_30_2","first-page":"479","article-title":"Misleading Authorship Attribution of Source Code Using Adversarial Learning","author":"Quiring Erwin","year":"2019","unstructured":"Erwin Quiring, Alwin Maier, and Konrad Rieck. 2019. Misleading Authorship Attribution of Source Code Using Adversarial Learning. In Proceedings of the 28th USENIX Security Symposium (USENIX Security), Santa Clara, CA, USA. 479\u2013496.","journal-title":"Proceedings of the 28th USENIX Security Symposium (USENIX Security)"},{"key":"e_1_3_1_31_2","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3639170"},{"key":"e_1_3_1_32_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2009.10297"},{"key":"e_1_3_1_33_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2006.03511"},{"key":"e_1_3_1_34_2","doi-asserted-by":"publisher","DOI":"10.1098\/rsos.220638"},{"key":"e_1_3_1_35_2","doi-asserted-by":"publisher","DOI":"10.1145\/3501714.3501755"},{"key":"e_1_3_1_36_2","doi-asserted-by":"publisher","DOI":"10.1109\/jproc.2021.3058954"},{"key":"e_1_3_1_37_2","doi-asserted-by":"publisher","DOI":"10.1109\/jproc.2021.3058954"},{"key":"e_1_3_1_38_2","article-title":"STRATA: Simple, Gradient-Free Attacks for Models of Code","author":"Springer Jacob M","year":"2021","unstructured":"Jacob M. Springer, Bryn Marie Reinstadler, and Una-May O\u2019Reilly. 2021. STRATA: Simple, Gradient-Free Attacks for Models of Code. CoRR abs\/2009.13562 (2021). arXiv:2009.13562","journal-title":"CoRR abs\/2009.13562"},{"key":"e_1_3_1_39_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2103.11882"},{"key":"e_1_3_1_40_2","doi-asserted-by":"publisher","DOI":"10.1145\/3340544"},{"issue":"11","key":"e_1_3_1_41_2","article-title":"Visualizing data using t-SNE","volume":"9","author":"Van der Maaten Laurens","year":"2008","unstructured":"Laurens Van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-SNE. Journal of Machine Learning Research 9, 11 (2008).","journal-title":"Journal of Machine Learning Research"},{"key":"e_1_3_1_42_2","doi-asserted-by":"publisher","DOI":"10.1109\/tse.2020.3023664"},{"key":"e_1_3_1_43_2","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510062"},{"key":"e_1_3_1_44_2","doi-asserted-by":"publisher","DOI":"10.1109\/saner48275.2020.9054857"},{"key":"e_1_3_1_45_2","doi-asserted-by":"publisher","DOI":"10.1109\/tdsc.2022.3219082"},{"key":"e_1_3_1_46_2","doi-asserted-by":"publisher","DOI":"10.1145\/3324884.3416562"},{"key":"e_1_3_1_47_2","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510146"},{"key":"e_1_3_1_48_2","doi-asserted-by":"publisher","DOI":"10.1145\/3428230"},{"key":"e_1_3_1_49_2","doi-asserted-by":"publisher","unstructured":"Shiwen Yu Ting Wang and Ji Wang. 2022. Data Augmentation by Program Transformation. Journal of Systems and Software 190 (2022) 111304. https:\/\/doi.org\/10.1016\/j.jss.2022.111304 10.1016\/j.jss.2022.111304","DOI":"10.1016\/j.jss.2022.111304"},{"key":"e_1_3_1_50_2","doi-asserted-by":"publisher","DOI":"10.1109\/tnnls.2018.2886017"},{"key":"e_1_3_1_51_2","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2005.01095"},{"key":"e_1_3_1_52_2","doi-asserted-by":"publisher","DOI":"10.1145\/3511887"},{"key":"e_1_3_1_53_2","doi-asserted-by":"publisher","DOI":"10.1609\/aaai.v34i01.5469"},{"key":"e_1_3_1_54_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00086"},{"key":"e_1_3_1_55_2","unstructured":"Yonggang Zhang Mingming Gong Tongliang Liu Gang Niu Xinmei Tian Bo Han Bernhard Sch\u00f6lkopf and Kun Zhang. 2022. CausalAdv: Adversarial Robustness through the Lens of Causality. arXiv:2106.06196"},{"key":"e_1_3_1_56_2","doi-asserted-by":"publisher","DOI":"10.1109\/TDSC.2019.2942930"}],"container-title":["Proceedings of the ACM on Software Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3729387","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,23]],"date-time":"2026-08-23T10:56:28Z","timestamp":1787482588000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3729387"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,6,19]]},"references-count":55,"journal-issue":{"issue":"FSE","published-print":{"date-parts":[[2025,6,19]]}},"alternative-id":["10.1145\/3729387"],"URL":"https:\/\/doi.org\/10.1145\/3729387","relation":{},"ISSN":["2994-970X"],"issn-type":[{"value":"2994-970X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,6,19]]}}}