Robustness Analysis of Watermarking Techniques for LLM-Generated Code
The widespread adoption of large language models (LLMs) for code generation raises critical concerns regarding authorship attribution and accountability, motivating the development of watermarking techniques to trace model outputs. However, the practical utility of these approaches depends on their robustness against real-world adversarial conditions, including code transformations and model adaptation. This work systematically evaluates two state-of-the-art watermarking paradigms: SWEET, which embeds token-level statistical biases, and CodeMark, which leverages semantic-preserving transformations at the statement level. We design experiments under two adversarial settings: (i) spoofing attacks and (ii) watermark-removal attacks. Empirical results reveal that the robustness of different watermarking schemes may differ under varying attack scenarios, but all lack resistance in adversarial environments. Our study underscores the need for future watermarking mechanisms that combine semantic redundancy, structural integrity, and adaptive detection to ensure robustness and corresponding adaptive validation methods in practical deployment scenarios.
Institutions
- CSIRO Manufacturing (AU)
- Swinburne University of Technology (AU)
Publication Details
- Journal
- IEEE Networking Letters
- Published
- 2025-10-01
- DOI
- https://doi.org/10.1109/lnet.2025.3616325
- Primary Topic
- Diverse Scientific and Economic Studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00