Auto-SPT: Automating Semantic Preserving Transformations for Code
Not on the map. Why?
Abstract (arXiv)
Machine learning (ML) models for code clone detection determine whether two pieces of code are semantically equivalent, which in turn is a key building block for software-engineering tasks like refactoring and security tasks like vulnerability and malware detection. While these models are predominantly trained on clean, structured code datasets, real-world code often undergoes a variety of semantic-preserving transformations, including refactoring, minification, automated formatting, and compiler optimizations. To address this critical gap between training and test data, we propose Auto-SPT, a novel framework to automatically construct synthetic-data generators for code. Auto-SPT is designed to produce Semantic Preserving Transformations (SPTs) that alter a program's syntactic structure while preserving its functionality and is instantiated on top of Large Language Models (LLMs). In particular, we use LLMs to craft a diverse set of SPTs, generate strong implementations for these SPTs, and compose them to result into strong transformations. Our formal analysis shows that the diversity of SPTs impacts the strength of their composition. We then empirically demonstrate that Auto-SPT generates more diverse SPTs than existing approaches and these SPTs significantly drop the performance of state-of-the-art code clone detectors. Further experiments show Auto-SPT can be used to enhance code datasets for training, to produce code-clone detection models that are robust to real-world, adversarial code transformations.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 28 of its 34 references that are in the map. First posted on arXiv 5 Dec 2025.
Builds on
28 of 34 references.
References · 28
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
- 2022PAL: Program-aided Language Modelscited by 652
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2018code2vec: Learning Distributed Representations of Codecited by 250
- 2024OpenCodeInterpreter: Integrating Code Generation with Execution and Refinementcited by 247
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
- 2022Natural Attack for Pre-trained Models of Codecited by 75
- 2024Arctic-Embed: Scalable, Efficient, and Accurate Text Embedding Modelscited by 61
- 2021Self-Supervised Bug Detection and Repaircited by 59
16 more
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 54
- 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
- 2024Forcing Diffuse Distributions out of Language Modelscited by 48
- 2020Semantic Robustness of Models of Source Codecited by 45
- 2020On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformationscited by 44
- 2024GenQA: Generating Millions of Instructions from a Handful of Promptscited by 35
- 2021Generating Adversarial Computer Programs using Optimized Obfuscationscited by 22
- 2021Challenging Machine Learning-based Clone Detectors via Semantic-preserving Code Transformationscited by 15
- 2024Do Large Code Models Understand Programming Concepts? Counterfactual Analysis for Code Predicatescited by 14
- 2017Do Code Clones Matter?cited by 12
- 2023GPTCloneBench: A comprehensive benchmark of semantic clones and cross-language clones using GPT-3 model and SemanticCloneBenchcited by 11
- 2024Towards Reliable Evaluation of Neural Program Repair with Natural Robustness Testingcited by 5
- 2024PolicyLR: A Logic Representation For Privacy Policiescited by 3
- 2025ScriptoriumWS: A Code Generation Assistant for Weak Supervisioncited by 3
- 2023Gitor: Scalable Code Clone Detection by Building Global Sample Graphcited by 2
- 2024GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understandingcited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.