How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Yang, Hua, Velasco, Alejandro, Le-Cong, Thanh, Haque, Md Nazmul, Xu, Bowen, Poshyvanyk, Denys
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912844992217088
author Yang, Hua
Velasco, Alejandro
Le-Cong, Thanh
Haque, Md Nazmul
Xu, Bowen
Poshyvanyk, Denys
author_facet Yang, Hua
Velasco, Alejandro
Le-Cong, Thanh
Haque, Md Nazmul
Xu, Bowen
Poshyvanyk, Denys
contents The success of large language models for code relies on vast amounts of code data, including public open-source repositories, such as GitHub, and private, confidential code from companies. This raises concerns about intellectual property compliance and the potential unauthorized use of license-restricted code. While membership inference (MI) techniques have been proposed to detect such unauthorized usage, their effectiveness can be undermined by semantically equivalent code transformation techniques, which modify code syntax while preserving semantic. In this work, we systematically investigate whether semantically equivalent code transformation rules might be leveraged to evade MI detection. The results reveal that model accuracy drops by only 1.5% in the worst case for each rule, demonstrating that transformed datasets can effectively serve as substitutes for fine-tuning. Additionally, we find that one of the rules (RenameVariable) reduces MI success by 10.19%, highlighting its potential to obscure the presence of restricted code. To validate these findings, we conduct a causal analysis confirming that variable renaming has the strongest causal effect in disrupting MI detection. Notably, we find that combining multiple transformations does not further reduce MI effectiveness. Our results expose a critical loophole in license compliance enforcement for training large language models for code, showing that MI detection can be substantially weakened by transformation-based obfuscation techniques.
format Preprint
id arxiv_https___arxiv_org_abs_2512_15468
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?
Yang, Hua
Velasco, Alejandro
Le-Cong, Thanh
Haque, Md Nazmul
Xu, Bowen
Poshyvanyk, Denys
Software Engineering
Artificial Intelligence
Cryptography and Security
The success of large language models for code relies on vast amounts of code data, including public open-source repositories, such as GitHub, and private, confidential code from companies. This raises concerns about intellectual property compliance and the potential unauthorized use of license-restricted code. While membership inference (MI) techniques have been proposed to detect such unauthorized usage, their effectiveness can be undermined by semantically equivalent code transformation techniques, which modify code syntax while preserving semantic. In this work, we systematically investigate whether semantically equivalent code transformation rules might be leveraged to evade MI detection. The results reveal that model accuracy drops by only 1.5% in the worst case for each rule, demonstrating that transformed datasets can effectively serve as substitutes for fine-tuning. Additionally, we find that one of the rules (RenameVariable) reduces MI success by 10.19%, highlighting its potential to obscure the presence of restricted code. To validate these findings, we conduct a causal analysis confirming that variable renaming has the strongest causal effect in disrupting MI detection. Notably, we find that combining multiple transformations does not further reduce MI effectiveness. Our results expose a critical loophole in license compliance enforcement for training large language models for code, showing that MI detection can be substantially weakened by transformation-based obfuscation techniques.
title How Do Semantically Equivalent Code Transformations Impact Membership Inference on LLMs for Code?
topic Software Engineering
Artificial Intelligence
Cryptography and Security
url https://arxiv.org/abs/2512.15468