Developer Tools

Acoda: New AI code obfuscation tricks LLMs with 70% success rate

A genetic algorithm creates code that LLMs can't analyze, preserving original logic.

Deep Dive

A new research paper introduces Acoda, an adversarial code obfuscation framework designed to protect source code from being analyzed, reconstructed, or reverse-engineered by large language models (LLMs). As LLMs like GPT-4o, DeepSeek, and Llama are increasingly used for code understanding and vulnerability detection, they also pose security and privacy risks by potentially leaking intellectual property. Acoda leverages two key LLM mechanisms—safety alignment and token-based information processing—to design eight semantics-preserving obfuscation methods. A genetic algorithm iteratively optimizes obfuscation strategies to generate adversarial samples that maximize defensive effectiveness against LLM-based analysis.

Experimental results across seven state-of-the-art LLMs show Acoda achieves up to a 70% attack success rate (ASR), meaning the obfuscated code causes LLMs to refuse analysis or misinterpret the logic. The technique also demonstrates strong cross-model transferability—obfuscations effective against one model often work on others—while maintaining minimal runtime overhead and ensuring the original code semantics remain unchanged. Acoda provides a new perspective for code protection in the LLM era, offering developers a practical way to defend their proprietary algorithms against increasingly capable AI analysis tools.

Key Points
  • Acoda uses a genetic algorithm to generate adversarial code obfuscations that disrupt LLM analysis, achieving up to 70% ASR across GPT-4o, DeepSeek, Qwen, Llama, and Gemma.
  • The framework employs 8 semantics-preserving obfuscation methods targeting LLM safety alignment and token processing, with strong cross-model transferability.
  • Minimal runtime overhead means developers can apply Acoda without significant performance loss, protecting IP from LLM reverse-engineering.

Why It Matters

As LLMs analyze production code, Acoda offers a practical defense against IP theft via adversarial obfuscation.

📬 Get the top 10 AI stories daily