[2606.11755] Acoda: Adversarial Code Obfuscation for Defending against LLM-based Analysis
Skip to main content
Search arXiv
Press Enter to search · Advanced search
-->
Computer Science > Software Engineering
arXiv:2606.11755 (cs)
[Submitted on 10 Jun 2026]
Title:Acoda: Adversarial Code Obfuscation for Defending against LLM-based Analysis
Authors:Hongzhou Rao, Zikan Dong, Yanjie Zhao, Haodong Li, Haoyu Wang<br>View a PDF of the paper titled Acoda: Adversarial Code Obfuscation for Defending against LLM-based Analysis, by Hongzhou Rao and 4 other authors
View PDF<br>HTML (experimental)
Abstract:With the widespread adoption of Large Language Models (LLMs) in software engineering (SE) tasks such as code understanding, debugging, and vulnerability detection, their powerful semantic reasoning ability has also introduced new security and privacy risks. LLMs can analyze, reconstruct, or even reverse-engineer source code logic, potentially leading to the leakage of intellectual property. To address this issue, we propose Acoda, a genetic algorithm-based adversarial code obfuscation framework that defends against LLM-based code analysis. Acoda leverages two key mechanisms of LLMs, namely safety alignment and token-based information processing, to design 8 semantics-preserving obfuscation methods. It iteratively optimizes obfuscation strategies through a genetic algorithm to generate adversarial samples that maximize defensive effectiveness. In addition, we propose a quantitative evaluation framework based on LLM responses, which combines an auxiliary LLM and four evaluation metrics to assess how target LLMs analyze obfuscated code comprehensively. Experimental results show that Acoda can effectively induce LLMs to refuse or misinterpret code analysis. On 7 state-of-the-art LLMs, including GPT-4o, DeepSeek, Qwen, Llama, and Gemma, Acoda achieves an attack success rate (ASR) of up to 70%, with strong cross-model transferability and minimal runtime overhead, while ensuring that the semantics of the original code remain unchanged. Overall, this study provides a new perspective for code protection and LLM security defense in the era of LLMs.
Subjects:
Software Engineering (cs.SE)
Cite as:<br>arXiv:2606.11755 [cs.SE]
(or<br>arXiv:2606.11755v1 [cs.SE] for this version)
https://doi.org/10.48550/arXiv.2606.11755
Focus to learn more
arXiv-issued DOI via DataCite
Submission history<br>From: Yanjie Zhao [view email]<br>[v1]<br>Wed, 10 Jun 2026 07:29:31 UTC (700 KB)
Full-text links:<br>Access Paper:
View a PDF of the paper titled Acoda: Adversarial Code Obfuscation for Defending against LLM-based Analysis, by Hongzhou Rao and 4 other authors<br>View PDF<br>HTML (experimental)<br>TeX Source
view license
Current browse context:
cs.SE
next >
new<br>recent<br>| 2026-06
Change to browse by:
cs
References & Citations
NASA ADS<br>Google Scholar
Semantic Scholar
export BibTeX citation<br>Loading...
BibTeX formatted citation
×
loading...
Data provided by:
Bookmark
Bibliographic Tools
Bibliographic and Citation Tools
Bibliographic Explorer Toggle
Bibliographic Explorer (What is the Explorer?)
Connected Papers Toggle
Connected Papers (What is Connected Papers?)
Litmaps Toggle
Litmaps (What is Litmaps?)
scite.ai Toggle
scite Smart Citations (What are Smart Citations?)
Code, Data, Media
Code, Data and Media Associated with this Article
alphaXiv Toggle
alphaXiv (What is alphaXiv?)
Links to Code Toggle
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub Toggle
DagsHub (What is DagsHub?)
GotitPub Toggle
Gotit.pub (What is GotitPub?)
Huggingface Toggle
Hugging Face (What is Huggingface?)
ScienceCast Toggle
ScienceCast (What is ScienceCast?)
Demos
Demos
Replicate Toggle
Replicate (What is Replicate?)
Spaces Toggle
Hugging Face Spaces (What is Spaces?)
Spaces Toggle
TXYZ.AI (What is TXYZ.AI?)
Related Papers
Recommenders and Search Tools
Link to Influence Flower
Influence Flower (What are Influence Flowers?)
Core recommender toggle
CORE Recommender (What is CORE?)
Author
Venue
Institution
Topic
About arXivLabs
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs .
Which authors of this paper are endorsers? |<br>Disable MathJax (What is MathJax?)
Major funding support from