{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,7,30]],"date-time":"2025-07-30T14:35:58Z","timestamp":1753886158869,"version":"3.41.2"},"reference-count":49,"publisher":"Association for Computing Machinery (ACM)","issue":"6","content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2025,7,31]]},"abstract":"<jats:p>Finding similar code is important for software engineering, defense of intellectual property, and security, and one of the increasingly common ways adversaries use to defeat the detection of similar code is through obfuscations such as code transformation and scattering the code they wish to hide among long sequences. Moving code far enough apart poses a specific challenge for solutions with localized features (e.g., n-grams), or attention mechanisms as the code parts are distributed beyond the local context window. We introduce a neural network solution pattern called \u201cCybertron\u201d that addresses this problem by utilizing reinforcement learning to train a code abstraction and summarization function; this converts arbitrarily long code into fixed-length real vectors in a way that is optimized for similarity search. The key to the design is the smart selection of important elements of the code and abstraction to preserve semantic function while minimizing syntactic feature information. We evaluated the approach on a three-challenge benchmark of obfuscated JavaScript, a scripting language that is commonly obfuscated and for which code-mixing is a rising challenge. The evaluation shows our approach identifies obfuscated code within even large scripts with an AUC of 78%, which outperforms current state-of-the-art sequence models by 7\u201335%.<\/jats:p>","DOI":"10.1145\/3711903","type":"journal-article","created":{"date-parts":[[2025,2,7]],"date-time":"2025-02-07T17:31:44Z","timestamp":1738949504000},"page":"1-28","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["Obfuscated Clone Search in JavaScript based on Reinforcement Subsequence Learning"],"prefix":"10.1145","volume":"34","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-1195-0007","authenticated-orcid":false,"given":"Leo","family":"Song","sequence":"first","affiliation":[{"name":"Computing, Queen\u2019s University, Kingston, Ontario, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4513-200X","authenticated-orcid":false,"given":"Steven H. H.","family":"Ding","sequence":"additional","affiliation":[{"name":"McGill University, Montreal, Quebec, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2208-3893","authenticated-orcid":false,"given":"Yuan","family":"Tian","sequence":"additional","affiliation":[{"name":"Queen\u2019s University, Kingston, Ontario, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7925-764X","authenticated-orcid":false,"given":"Li Tao","family":"Li","sequence":"additional","affiliation":[{"name":"Queen\u2019s University, Kingston, Ontario, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6911-6146","authenticated-orcid":false,"given":"Weihan","family":"Ou","sequence":"additional","affiliation":[{"name":"Computing, Queen\u2019s University, Kingston, Ontario, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4051-9942","authenticated-orcid":false,"given":"Philippe","family":"Charland","sequence":"additional","affiliation":[{"name":"Mission Critical Cyber Security Section, Defence R&amp;D Canada, Quebec, Quebec, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1103-2465","authenticated-orcid":false,"given":"Andrew","family":"Walenstein","sequence":"additional","affiliation":[{"name":"BlackBerry Labs, BlackBerry Ltd, Waterloo, Ontario, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2025,7,2]]},"reference":[{"key":"e_1_3_2_2_2","doi-asserted-by":"publisher","DOI":"10.3390\/fi14080217"},{"key":"e_1_3_2_3_2","unstructured":"Iz Beltagy Matthew E. Peters and Arman Cohan. 2020. Longformer: The long-document transformer. arXiv:2004.05150. Retrieved from https:\/\/arxiv.org\/abs\/2004.05150"},{"key":"e_1_3_2_4_2","doi-asserted-by":"publisher","DOI":"10.1109\/72.279181"},{"key":"e_1_3_2_5_2","unstructured":"V\u00edctor Campos Brendan Jou Xavier Gir\u00f3-i Nieto Jordi Torres and Shih-Fu Chang. 2017. Skip RNN: Learning to skip state updates in recurrent neural networks. arXiv:1708.06834. Retrieved from https:\/\/arxiv.org\/abs\/1708.06834"},{"key":"e_1_3_2_6_2","unstructured":"Rewon Child Scott Gray Alec Radford and Ilya Sutskever. 2019. Generating long sequences with sparse transformers. arXiv:1904.10509. Retrieved from https:\/\/arxiv.org\/abs\/1904.10509"},{"key":"e_1_3_2_7_2","unstructured":"Zihang Dai Zhilin Yang Yiming Yang Jaime Carbonell Quoc V. Le and Ruslan Salakhutdinov. 2019. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv:1901.02860. Retrieved from https:\/\/arxiv.org\/abs\/1901.02860"},{"key":"e_1_3_2_8_2","unstructured":"Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova. 2018. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv:1810.04805. Retrieved from https:\/\/arxiv.org\/abs\/1810.04805"},{"key":"e_1_3_2_9_2","doi-asserted-by":"publisher","DOI":"10.1145\/2939672.2939719"},{"key":"e_1_3_2_10_2","doi-asserted-by":"publisher","DOI":"10.1109\/SP.2019.00003"},{"key":"e_1_3_2_11_2","doi-asserted-by":"crossref","first-page":"1899","DOI":"10.1145\/3319535.3345656","volume-title":"Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security","author":"Fass Aurore","year":"2019","unstructured":"Aurore Fass, Michael Backes, and Ben Stock. 2019. Hidenoseek: Camouflaging malicious javascript in benign ASTs. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, 1899\u20131913."},{"key":"e_1_3_2_12_2","doi-asserted-by":"crossref","unstructured":"Zhangyin Feng Daya Guo Duyu Tang Nan Duan Xiaocheng Feng Ming Gong Linjun Shou Bing Qin Ting Liu Daxin Jiang et al. 2020. Codebert: A pre-trained model for programming and natural languages. arXiv:2002.08155. Retrieved from https:\/\/arxiv.org\/abs\/2002.08155","DOI":"10.18653\/v1\/2020.findings-emnlp.139"},{"key":"e_1_3_2_13_2","doi-asserted-by":"publisher","DOI":"10.1162\/neco.1997.9.8.1735"},{"key":"e_1_3_2_14_2","doi-asserted-by":"crossref","unstructured":"Ting Huang Gehui Shen and Zhi-Hong Deng. 2019. Leap-LSTM: Enhancing long short-term memory for text categorization. arXiv:1905.11558. Retrieved from https:\/\/arxiv.org\/abs\/1905.11558","DOI":"10.24963\/ijcai.2019\/697"},{"key":"e_1_3_2_15_2","first-page":"96","volume-title":"Proceedings of the 29th International Conference on Software Engineering (ICSE \u201907)","author":"Jiang Lingxiao","year":"2007","unstructured":"Lingxiao Jiang, Ghassan Misherghi, Zhendong Su, and Stephane Glondu. 2007. Deckard: Scalable and accurate tree-based detection of code clones. In Proceedings of the 29th International Conference on Software Engineering (ICSE \u201907). IEEE, 96\u2013105."},{"key":"e_1_3_2_16_2","first-page":"5156","volume-title":"Proceedings of the International Conference on Machine Learning","author":"Katharopoulos Angelos","year":"2020","unstructured":"Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and Fran\u00e7ois Fleuret. 2020. Transformers are RNNs: Fast autoregressive transformers with linear attention. In Proceedings of the International Conference on Machine Learning. PMLR, 5156\u20135165."},{"key":"e_1_3_2_17_2","doi-asserted-by":"publisher","DOI":"10.1002\/aic.690370209"},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.1145\/2597008.2597807"},{"key":"e_1_3_2_19_2","doi-asserted-by":"publisher","DOI":"10.1109\/SOSE.2014.57"},{"issue":"1","key":"e_1_3_2_20_2","first-page":"3","article-title":"Obfuscating C++ programs via control flow flattening","volume":"30","author":"L\u00e1szl\u00f3 T\u0131mea","year":"2009","unstructured":"T\u0131mea L\u00e1szl\u00f3 and \u00c1kos Kiss. 2009. Obfuscating C++ programs via control flow flattening. Annales Universitatis Scientarum Budapestinensis de Rolando E\u00f6tv\u00f6s Nominatae, Sectio Computatorica 30, 1 (2009), 3\u201319.","journal-title":"Annales Universitatis Scientarum Budapestinensis de Rolando E\u00f6tv\u00f6s Nominatae, Sectio Computatorica"},{"key":"e_1_3_2_21_2","first-page":"707","article-title":"Binary codes capable of correcting deletions, insertions, and reversals","volume":"10","author":"Levenshtein Vladimir I.","year":"1965","unstructured":"Vladimir I. Levenshtein. 1965. Binary codes capable of correcting deletions, insertions, and reversals. Soviet Physics. Doklady 10 (1965), 707\u2013710. Retrieved from https:\/\/api.semanticscholar.org\/CorpusID:60827152","journal-title":"Soviet Physics"},{"key":"e_1_3_2_22_2","doi-asserted-by":"publisher","DOI":"10.1145\/3630008"},{"key":"e_1_3_2_23_2","doi-asserted-by":"publisher","DOI":"10.1145\/3480027"},{"key":"e_1_3_2_24_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2017.28"},{"key":"e_1_3_2_25_2","doi-asserted-by":"publisher","DOI":"10.1109\/TPAMI.2018.2889473"},{"key":"e_1_3_2_26_2","doi-asserted-by":"publisher","DOI":"10.5555\/3015812.3016002"},{"key":"e_1_3_2_27_2","volume-title":"Surreptitious Software: Obfuscation, Watermarking, and Tamperproofing for Software Protection: Obfuscation, Watermarking, and Tamperproofing for Software Protection","author":"Nagra Jasvir","year":"2009","unstructured":"Jasvir Nagra and Christian Collberg. 2009. Surreptitious Software: Obfuscation, Watermarking, and Tamperproofing for Software Protection: Obfuscation, Watermarking, and Tamperproofing for Software Protection. Pearson Education."},{"key":"e_1_3_2_28_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.asoc.2019.105721"},{"key":"e_1_3_2_29_2","first-page":"1310","volume-title":"Proceedings of the International Conference on Machine Learning","author":"Pascanu Razvan","year":"2013","unstructured":"Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. 2013. On the difficulty of training recurrent neural networks. In Proceedings of the International Conference on Machine Learning. PMLR, 1310\u20131318."},{"issue":"3","key":"e_1_3_2_30_2","doi-asserted-by":"crossref","first-page":"387","DOI":"10.1007\/s11416-022-00450-1","article-title":"On improvements of robustness of obfuscated JavaScript code detection","volume":"19","author":"Ponomarenko G. S.","year":"2023","unstructured":"G. S. Ponomarenko and P. G. Klyucharev. 2023. On improvements of robustness of obfuscated JavaScript code detection. Journal of Computer Virology and Hacking Techniques 19, 3 (2023), 387\u2013398.","journal-title":"Journal of Computer Virology and Hacking Techniques"},{"key":"e_1_3_2_31_2","doi-asserted-by":"publisher","DOI":"10.1145\/3579856.3582818"},{"key":"e_1_3_2_32_2","unstructured":"Zhen Qin Weixuan Sun Hui Deng Dongxu Li Yunshen Wei Baohong Lv Junjie Yan Lingpeng Kong and Yiran Zhong. 2022. cosformer: Rethinking softmax in attention. arXiv:2202.08791. Retrieved from https:\/\/arxiv.org\/abs\/2202.08791"},{"key":"e_1_3_2_33_2","unstructured":"Baptiste Roziere Jonas Gehring Fabian Gloeckle Sten Sootla Itai Gat Xiaoqing Ellen Tan Yossi Adi Jingyu Liu Tal Remez J\u00e9r\u00e9my Rapin et al. 2023. Code llama: Open foundation models for code. arXiv:2308.12950. Retrieved from https:\/\/arxiv.org\/abs\/2308.12950"},{"key":"e_1_3_2_34_2","doi-asserted-by":"publisher","DOI":"10.1145\/2884781.2884877"},{"key":"e_1_3_2_35_2","doi-asserted-by":"crossref","unstructured":"Rico Sennrich Barry Haddow and Alexandra Birch. 2015. Neural machine translation of rare words with subword units. arXiv:1508.07909. Retrieved from https:\/\/arxiv.org\/abs\/1508.07909","DOI":"10.18653\/v1\/P16-1162"},{"key":"e_1_3_2_36_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.eswa.2017.12.040"},{"key":"e_1_3_2_37_2","first-page":"586","volume-title":"Proceedings of the 2023 IEEE 47th Annual Computers, Software, and Applications Conference (COMPSAC)","author":"Song Leo","year":"2023","unstructured":"Leo Song and Steven H. H. Ding. 2023. Milo: Attacking deep pre-trained model for programming languages tasks with anti-analysis code obfuscation. In Proceedings of the 2023 IEEE 47th Annual Computers, Software, and Applications Conference (COMPSAC). IEEE, 586\u2013594."},{"key":"e_1_3_2_38_2","first-page":"9902","volume-title":"Proceedings of the International Conference on Machine Learning","author":"Sukhbaatar Sainbayar","year":"2021","unstructured":"Sainbayar Sukhbaatar, Da Ju, Spencer Poff, Stephen Roller, Arthur Szlam, Jason Weston, and Angela Fan. 2021. Not all memories are created equal: Learning to forget by expiring. In Proceedings of the International Conference on Machine Learning. PMLR, 9902\u20139912."},{"key":"e_1_3_2_39_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSM.2015.7332459"},{"key":"e_1_3_2_40_2","first-page":"23664","volume-title":"Proceedings of the 38th AAAI Conference on Artificial Intelligence","author":"Swindle Adrian","year":"2024","unstructured":"Adrian Swindle, Derrick McNealy, Giri Krishnan, and Ramyaa Ramyaa. 2024. Evaluation of large language models on code obfuscation (student abstract). In Proceedings of the 38th AAAI Conference on Artificial Intelligence, 23664\u201323666."},{"key":"e_1_3_2_41_2","unstructured":"Gemma Team Ale Jakse Hartman Andrea Hu Christopher A. Choquette-Choo Heri Zhao Jane Fine Jeffrey Hui Jingyue Shen Joe Kelley Joshua Howland et al. 2024. CodeGemma: Open code models based on gemma. arXiv:2403.08295. Retrieved from https:\/\/arxiv.org\/abs\/2403.08295"},{"key":"e_1_3_2_42_2","doi-asserted-by":"publisher","DOI":"10.1109\/TIT.2014.2320500"},{"key":"e_1_3_2_43_2","article-title":"Attention is all you need","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. Advances in Neural Information Processing Systems 30 (2017).","journal-title":"Advances in Neural Information Processing Systems"},{"key":"e_1_3_2_44_2","volume-title":"Dagstuhl Seminar Proceedings 06301: Duplication, Redundancy, and Similarity in Software","author":"Walenstein Andrew","year":"2007","unstructured":"Andrew Walenstein and Arun Lakhotia. 2007. The software similarity problem in malware analysis. In Dagstuhl Seminar Proceedings 06301: Duplication, Redundancy, and Similarity in Software. Schloss Dagstuhl-Leibniz-Zentrum f\u00fcr Informatik."},{"key":"e_1_3_2_45_2","doi-asserted-by":"publisher","DOI":"10.1007\/BF00992696"},{"key":"e_1_3_2_46_2","unstructured":"Guangxuan Xiao Yuandong Tian Beidi Chen Song Han and Mike Lewis. 2023. Efficient streaming language models with attention sinks. arXiv:2309.17453. Retrieved from https:\/\/arxiv.org\/abs\/2309.17453"},{"key":"e_1_3_2_47_2","first-page":"70","volume-title":"Proceedings of the 2019 IEEE\/ACM 27th International Conference on Program Comprehension (ICPC)","author":"Yu Hao","year":"2019","unstructured":"Hao Yu, Wing Lam, Long Chen, Ge Li, Tao Xie, and Qianxiang Wang. 2019. Neural detection of semantic code clones via tree-based convolution. In Proceedings of the 2019 IEEE\/ACM 27th International Conference on Program Comprehension (ICPC). IEEE, 70\u201380."},{"key":"e_1_3_2_48_2","first-page":"17283","article-title":"Big bird: Transformers for longer sequences","volume":"33","author":"Zaheer Manzil","year":"2020","unstructured":"Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. 2020. Big bird: Transformers for longer sequences. Advances in Neural Information Processing Systems 33 (2020), 17283\u201317297.","journal-title":"Advances in Neural Information Processing Systems"},{"key":"e_1_3_2_49_2","first-page":"783","volume-title":"Proceedings of the 2019 IEEE\/ACM 41st International Conference on Software Engineering (ICSE)","author":"Zhang Jian","year":"2019","unstructured":"Jian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun, Kaixuan Wang, and Xudong Liu. 2019. A novel neural source code representation based on abstract syntax tree. In Proceedings of the 2019 IEEE\/ACM 41st International Conference on Software Engineering (ICSE). IEEE, 783\u2013794."},{"key":"e_1_3_2_50_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2023.3240118"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3711903","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,7,3]],"date-time":"2025-07-03T03:19:04Z","timestamp":1751512744000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3711903"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,7,2]]},"references-count":49,"journal-issue":{"issue":"6","published-print":{"date-parts":[[2025,7,31]]}},"alternative-id":["10.1145\/3711903"],"URL":"https:\/\/doi.org\/10.1145\/3711903","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"type":"print","value":"1049-331X"},{"type":"electronic","value":"1557-7392"}],"subject":[],"published":{"date-parts":[[2025,7,2]]},"assertion":[{"value":"2024-02-10","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-12-15","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-07-02","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}