{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,9]],"date-time":"2026-10-09T01:33:11Z","timestamp":1791509591898,"version":"4.3.4"},"reference-count":53,"publisher":"Association for Computing Machinery (ACM)","issue":"4","license":[{"start":{"date-parts":[[2022,7,12]],"date-time":"2022-07-12T00:00:00Z","timestamp":1657584000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"crossref","award":["61972197"],"award-info":[{"award-number":["61972197"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"crossref"}]},{"DOI":"10.13039\/501100004608","name":"Natural Science Foundation of Jiangsu Province","doi-asserted-by":"crossref","award":["BK20201292"],"award-info":[{"award-number":["BK20201292"]}],"id":[{"id":"10.13039\/501100004608","id-type":"DOI","asserted-by":"crossref"}]},{"name":"Collaborative Innovation Center of Novel Software Technology and Industrialization"},{"name":"Birkbeck BEI School Project","award":["61872340, and 62072309"],"award-info":[{"award-number":["61872340, and 62072309"]}]},{"name":"UK EPSRC","award":["EP\/P00430X\/1"],"award-info":[{"award-number":["EP\/P00430X\/1"]}]},{"DOI":"10.13039\/501100007162","name":"Guangdong Science and Technology Department","doi-asserted-by":"crossref","award":["2018B010107004"],"award-info":[{"award-number":["2018B010107004"]}],"id":[{"id":"10.13039\/501100007162","id-type":"DOI","asserted-by":"crossref"}]},{"name":"State Key Laboratory of Novel Software Technology, Nanjing University","award":["KFKT2018A16"],"award-info":[{"award-number":["KFKT2018A16"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2022,10,31]]},"abstract":"<jats:p>\n            <jats:bold>Deep neural networks (DNNs)<\/jats:bold>\n            have shown remarkable performance in a variety of domains such as computer vision, speech recognition, and natural language processing. Recently they also have been applied to various software engineering tasks, typically involving processing source code. DNNs are well-known to be vulnerable to adversarial examples, i.e., fabricated inputs that could lead to various misbehaviors of the DNN model while being perceived as benign by humans. In this paper, we focus on the code comment generation task in software engineering and study the robustness issue of the DNNs when they are applied to this task. We propose\n            <jats:sans-serif>ACCENT<\/jats:sans-serif>\n            <jats:bold>(Adversarial Code Comment gENeraTor)<\/jats:bold>\n            , an identifier substitution approach to craft adversarial code snippets, which are syntactically correct and\n            <jats:styled-content style=\"black\">semantically close to<\/jats:styled-content>\n            the original code snippet, but may mislead the DNNs to produce completely irrelevant code comments. In order to improve the robustness,\n            <jats:sans-serif>ACCENT<\/jats:sans-serif>\n            also incorporates a novel training method, which can be applied to existing code comment generation models. We conduct comprehensive experiments to evaluate our approach by attacking the mainstream encoder-decoder architectures on two large-scale publicly available datasets. The results show that\n            <jats:sans-serif>ACCENT<\/jats:sans-serif>\n            efficiently produces stable attacks with functionality-preserving adversarial examples, and the generated examples have better transferability compared with the baselines. We also confirm, via experiments, the effectiveness in improving model robustness with our training method.\n          <\/jats:p>\n          <jats:p\/>","DOI":"10.1145\/3501256","type":"journal-article","created":{"date-parts":[[2022,1,31]],"date-time":"2022-01-31T17:38:58Z","timestamp":1643650738000},"page":"1-30","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":48,"title":["Adversarial Robustness of Deep Code Comment Generation"],"prefix":"10.1145","volume":"31","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-3723-7584","authenticated-orcid":false,"given":"Yu","family":"Zhou","sequence":"first","affiliation":[{"name":"Nanjing University of Aeronautics and Astronautics, Nanjing, Jiangsu Province, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Xiaoqing","family":"Zhang","sequence":"additional","affiliation":[{"name":"Nanjing University of Aeronautics and Astronautics, Nanjing, Jiangsu Province, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Juanjuan","family":"Shen","sequence":"additional","affiliation":[{"name":"Nanjing University of Aeronautics and Astronautics, Nanjing, Jiangsu Province, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Tingting","family":"Han","sequence":"additional","affiliation":[{"name":"Birkbeck, University of London, London, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Taolue","family":"Chen","sequence":"additional","affiliation":[{"name":"Birkbeck, University of London, London, UK"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Harald","family":"Gall","sequence":"additional","affiliation":[{"name":"University of Zurich, Zurich, Switzerland"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2022,7,12]]},"reference":[{"key":"e_1_3_2_2_2","article-title":"A transformer-based approach for source code summarization","author":"Ahmad Wasi Uddin","year":"2020","unstructured":"Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. 2020. A transformer-based approach for source code summarization. arXiv preprint arXiv:2005.00653 (2020).","journal-title":"arXiv preprint arXiv:2005.00653"},{"key":"e_1_3_2_3_2","doi-asserted-by":"publisher","DOI":"10.1145\/3387904.3389268"},{"key":"e_1_3_2_4_2","first-page":"2123","volume-title":"International Conference on Machine Learning","author":"Allamanis Miltos","year":"2015","unstructured":"Miltos Allamanis, Daniel Tarlow, Andrew Gordon, and Yi Wei. 2015. Bimodal modelling of source code and natural language. In International Conference on Machine Learning. 2123\u20132132."},{"key":"e_1_3_2_5_2","article-title":"Generating natural language adversarial examples","author":"Alzantot Moustafa","year":"2018","unstructured":"Moustafa Alzantot, Yash Sharma, Ahmed Elgohary, Bo-Jhang Ho, Mani Srivastava, and Kai-Wei Chang. 2018. Generating natural language adversarial examples. arXiv preprint arXiv:1804.07998 (2018).","journal-title":"arXiv preprint arXiv:1804.07998"},{"key":"e_1_3_2_6_2","article-title":"Neural machine translation by jointly learning to align and translate","author":"Bahdanau Dzmitry","year":"2014","unstructured":"Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473 (2014).","journal-title":"arXiv preprint arXiv:1409.0473"},{"key":"e_1_3_2_7_2","article-title":"Synthetic and natural noise both break neural machine translation","author":"Belinkov Yonatan","year":"2017","unstructured":"Yonatan Belinkov and Yonatan Bisk. 2017. Synthetic and natural noise both break neural machine translation. arXiv preprint arXiv:1711.02173 (2017).","journal-title":"arXiv preprint arXiv:1711.02173"},{"key":"e_1_3_2_8_2","first-page":"896","volume-title":"Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13\u201318 July 2020, Virtual Event","author":"Bielik Pavol","year":"2020","unstructured":"Pavol Bielik and Martin T. Vechev. 2020. Adversarial robustness for code. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13\u201318 July 2020, Virtual Event. 896\u2013907."},{"key":"e_1_3_2_9_2","doi-asserted-by":"crossref","first-page":"39","DOI":"10.1109\/SP.2017.49","volume-title":"2017 IEEE Symposium on Security and Privacy, SP 2017","author":"Carlini Nicholas","year":"2017","unstructured":"Nicholas Carlini and David A. Wagner. 2017. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy, SP 2017. 39\u201357."},{"key":"e_1_3_2_10_2","article-title":"Understanding the Metropolis-Hastings algorithm","year":"1995","unstructured":"Chib, Siddhartha, Greenberg, and Edward. 1995. Understanding the Metropolis-Hastings algorithm. American Statistician (1995).","journal-title":"American Statistician"},{"key":"e_1_3_2_11_2","first-page":"374","volume-title":"SEKE","author":"Feldt Robert","year":"2010","unstructured":"Robert Feldt and Ana Magazinius. 2010. Validity threats in empirical software engineering research-an initial survey. In SEKE. 374\u2013379."},{"key":"e_1_3_2_12_2","doi-asserted-by":"publisher","DOI":"10.1109\/SPW.2018.00016"},{"key":"e_1_3_2_13_2","volume-title":"ICML","author":"Goodfellow Ian J.","year":"2015","unstructured":"Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. 2015. Explaining and harnessing adversarial examples. In ICML."},{"key":"e_1_3_2_14_2","doi-asserted-by":"publisher","DOI":"10.1145\/3196321.3196334"},{"key":"e_1_3_2_15_2","doi-asserted-by":"publisher","DOI":"10.24963\/ijcai.2018\/314"},{"key":"e_1_3_2_16_2","article-title":"Learning with a strong adversary","author":"Huang Ruitong","year":"2015","unstructured":"Ruitong Huang, Bing Xu, Dale Schuurmans, and Csaba Szepesvari. 2015. Learning with a strong adversary. Computer Science (2015).","journal-title":"Computer Science"},{"key":"e_1_3_2_17_2","first-page":"125","volume-title":"Advances in Neural Information Processing Systems","author":"Ilyas Andrew","year":"2019","unstructured":"Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Logan Engstrom, Brandon Tran, and Aleksander Madry. 2019. Adversarial examples are not bugs, they are features. In Advances in Neural Information Processing Systems. 125\u2013136."},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/P16-1195"},{"key":"e_1_3_2_19_2","article-title":"HotFlip: White-box adversarial examples for text classification","author":"Javid Ebrahimi","year":"2017","unstructured":"Ebrahimi Javid, Anyi Rao, Daniel Lowd, and Dejing Dou. 2017. HotFlip: White-box adversarial examples for text classification. arXiv preprint arXiv:1712.06751 (2017).","journal-title":"arXiv preprint arXiv:1712.06751"},{"key":"e_1_3_2_20_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D17-1215"},{"key":"e_1_3_2_21_2","volume-title":"5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24\u201326, 2017, Workshop Track Proceedings","author":"Kurakin Alexey","year":"2017","unstructured":"Alexey Kurakin, Ian J. Goodfellow, and Samy Bengio. 2017. Adversarial examples in the physical world. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24\u201326, 2017, Workshop Track Proceedings."},{"key":"e_1_3_2_22_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00087"},{"key":"e_1_3_2_23_2","article-title":"TextBugger: Generating adversarial text against real-world applications","author":"Li Jinfeng","year":"2018","unstructured":"Jinfeng Li, Shouling Ji, Tianyu Du, Bo Li, and Ting Wang. 2018. TextBugger: Generating adversarial text against real-world applications. arXiv preprint arXiv:1812.05271 (2018).","journal-title":"arXiv preprint arXiv:1812.05271"},{"key":"e_1_3_2_24_2","doi-asserted-by":"publisher","DOI":"10.24963\/ijcai.2019\/403"},{"key":"e_1_3_2_25_2","volume-title":"6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30\u2013May 3, 2018, Conference Track Proceedings","author":"Madry Aleksander","year":"2018","unstructured":"Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. 2018. Towards deep learning models resistant to adversarial attacks. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30\u2013May 3, 2018, Conference Track Proceedings. OpenReview.net. https:\/\/openreview.net\/forum?id=rJzIBfZAb."},{"key":"e_1_3_2_26_2","article-title":"On evaluation of adversarial perturbations for sequence-to-sequence models","author":"Michel Paul","year":"2019","unstructured":"Paul Michel, Xian Li, Graham Neubig, and Juan Miguel Pino. 2019. On evaluation of adversarial perturbations for sequence-to-sequence models. arXiv preprint arXiv:1903.06620 (2019).","journal-title":"arXiv preprint arXiv:1903.06620"},{"key":"e_1_3_2_27_2","unstructured":"Tomas Mikolov Ilya Sutskever Kai Chen Greg S. Corrado and Jeffrey Dean. 2013. Distributed representations of words and phrases and their compositionality. (2013) 3111\u20133119."},{"key":"e_1_3_2_28_2","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2016.282"},{"key":"e_1_3_2_29_2","article-title":"Distorting neural representations to generate highly transferable adversarial examples","author":"Naseer Muzammal","year":"2018","unstructured":"Muzammal Naseer, Salman Hameed Khan, Shafin Rahman, and Fatih Porikli. 2018. Distorting neural representations to generate highly transferable adversarial examples. arXiv preprint arXiv:1811.09020 (2018).","journal-title":"arXiv preprint arXiv:1811.09020"},{"key":"e_1_3_2_30_2","doi-asserted-by":"publisher","DOI":"10.1145\/3052973.3053009"},{"key":"e_1_3_2_31_2","doi-asserted-by":"publisher","DOI":"10.1109\/EuroSP.2016.36"},{"key":"e_1_3_2_32_2","doi-asserted-by":"publisher","DOI":"10.1109\/MILCOM.2016.7795300"},{"key":"e_1_3_2_33_2","article-title":"Combating adversarial misspellings with robust word recognition","author":"Pruthi Danish","year":"2019","unstructured":"Danish Pruthi, Bhuwan Dhingra, and Zachary C. Lipton. 2019. Combating adversarial misspellings with robust word recognition. arXiv preprint arXiv:1905.11268 (2019).","journal-title":"arXiv preprint arXiv:1905.11268"},{"key":"e_1_3_2_34_2","article-title":"Semantic robustness of models of source code","author":"Ramakrishnan Goutham","year":"2020","unstructured":"Goutham Ramakrishnan, Jordan Henkel, Zi Wang, Aws Albarghouthi, Somesh Jha, and Thomas Reps. 2020. Semantic robustness of models of source code. arXiv preprint arXiv:2002.03043 (2020).","journal-title":"arXiv preprint arXiv:2002.03043"},{"key":"e_1_3_2_35_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10458-020-09461-y"},{"key":"e_1_3_2_36_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/P19-1103"},{"key":"e_1_3_2_37_2","article-title":"Towards crafting text adversarial samples","author":"Samanta Suranjana","year":"2017","unstructured":"Suranjana Samanta and Sameep Mehta. 2017. Towards crafting text adversarial samples. arXiv preprint arXiv:1707.02812 (2017).","journal-title":"arXiv preprint arXiv:1707.02812"},{"key":"e_1_3_2_38_2","article-title":"Interpretable adversarial perturbation in input embedding space for text","author":"Sato Motoki","year":"2018","unstructured":"Motoki Sato, Jun Suzuki, Hiroyuki Shindo, and Yuji Matsumoto. 2018. Interpretable adversarial perturbation in input embedding space for text. arXiv preprint arXiv:1805.02917 (2018).","journal-title":"arXiv preprint arXiv:1805.02917"},{"key":"e_1_3_2_39_2","article-title":"Intriguing properties of neural networks","author":"Szegedy Christian","year":"2013","unstructured":"Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. 2013. Intriguing properties of neural networks. arXiv: Computer Vision and Pattern Recognition (2013).","journal-title":"arXiv: Computer Vision and Pattern Recognition"},{"key":"e_1_3_2_40_2","unstructured":"Florian Tram\u00e8r Alexey Kurakin Nicolas Papernot Ian J. Goodfellow Dan Boneh and Patrick D. McDaniel. 2018. Ensemble adversarial training: Attacks and defenses. (2018)."},{"key":"e_1_3_2_41_2","first-page":"5998","volume-title":"Advances in Neural Information Processing Systems","author":"Vaswani Ashish","year":"2017","unstructured":"Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, \u0141ukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems. 5998\u20136008."},{"key":"e_1_3_2_42_2","doi-asserted-by":"publisher","DOI":"10.1145\/3238147.3238206"},{"key":"e_1_3_2_43_2","author":"Wang W.","year":"2019","unstructured":"W. Wang, L. Wang, B. Tang, R. Wang, and A. Ye. 2019. Towards a robust deep neural network in texts: A survey. arXiv preprint arXiv:1902.07285 (2019).","journal-title":"arXiv preprint arXiv:1902.07285"},{"key":"e_1_3_2_44_2","article-title":"Robust machine comprehension models via adversarial training","author":"Wang Yicheng","year":"2018","unstructured":"Yicheng Wang and Mohit Bansal. 2018. Robust machine comprehension models via adversarial training. arXiv preprint arXiv:1804.06473 (2018).","journal-title":"arXiv preprint arXiv:1804.06473"},{"key":"e_1_3_2_45_2","article-title":"Defense of word-level adversarial attacks via random substitution encoding","author":"Wang Zhaoyang","year":"2020","unstructured":"Zhaoyang Wang and Hongtao Wang. 2020. Defense of word-level adversarial attacks via random substitution encoding. arXiv preprint arXiv:2005.00446 (2020).","journal-title":"arXiv preprint arXiv:2005.00446"},{"key":"e_1_3_2_46_2","first-page":"6563","volume-title":"Advances in Neural Information Processing Systems 32","author":"Wei Bolin","year":"2019","unstructured":"Bolin Wei, Ge Li, Xin Xia, Zhiyi Fu, and Zhi Jin. 2019. Code generation as a dual task of code summarization. In Advances in Neural Information Processing Systems 32. 6563\u20136573."},{"key":"e_1_3_2_47_2","doi-asserted-by":"publisher","DOI":"10.1145\/3324884.3416578"},{"key":"e_1_3_2_48_2","doi-asserted-by":"publisher","DOI":"10.1145\/3428230"},{"key":"e_1_3_2_49_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.acl-main.540"},{"key":"e_1_3_2_50_2","doi-asserted-by":"publisher","DOI":"10.1609\/aaai.v34i01.5469"},{"key":"e_1_3_2_51_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/P19-1559"},{"key":"e_1_3_2_52_2","doi-asserted-by":"publisher","DOI":"10.1145\/3377811.3380383"},{"key":"e_1_3_2_53_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2019.07.087"},{"key":"e_1_3_2_54_2","article-title":"A reinforced generation of adversarial samples for neural machine translation","author":"Zou Wei","year":"2020","unstructured":"Wei Zou, Shujian Huang, Jun Xie, Xinyu Dai, and Jiajun Chen. 2020. A reinforced generation of adversarial samples for neural machine translation. arXiv preprint arXiv:1911.03677 (2020).","journal-title":"arXiv preprint arXiv:1911.03677"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3501256","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3501256","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T20:12:18Z","timestamp":1750191138000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3501256"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,7,12]]},"references-count":53,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2022,10,31]]}},"alternative-id":["10.1145\/3501256"],"URL":"https:\/\/doi.org\/10.1145\/3501256","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,7,12]]},"assertion":[{"value":"2021-03-01","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2021-11-01","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2022-07-12","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}