Reproduce “Acoda: Adversarial Code Obfuscation for Defending against LLM-based Analysis” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Hongzhou Rao, Zikan Dong, Yanjie Zhao, Haodong Li, Haoyu Wang

An adversarial code obfuscation framework, Acoda, was developed to protect proprietary source code from Large Language Model (LLM) analysis. Leveraging a genetic algorithm and semantics-preserving methods, Acoda achieved up to a 98% Attack Success Rate against target LLMs with minimal execution overhead.

Key insights

  • By exploiting specific internal LLM mechanisms like safety alignment and token-based processing, it is possible to create effective adversarial obfuscation that induces refusal or erroneous analysis.
  • A genetic algorithm-driven optimization approach can efficiently discover combinations of obfuscation methods that maximize adversarial strength and enhance transferability across diverse LLMs.
  • Effective adversarial obfuscation can be achieved with negligible runtime and memory overheads, making it practical for real-world application without impacting program performance.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.