ArXiv TLDR

PuzzleMark: Implicit Jigsaw Learning for Robust Code Dataset Watermarking in Neural Code Completion Models

🐦 Tweet
2604.27677

Haocheng Huang, Yuchen Chen, Weisong Sun, Peizhuo Lv, Yuan Xiao + 3 more

cs.SE

TLDR

PuzzleMark introduces a robust, stealthy watermarking method for code datasets, ensuring intellectual property protection with high verification success.

Key contributions

  • Introduces PuzzleMark, a robust watermarking method for code datasets to protect intellectual property.
  • Uses a carrier selection strategy based on code complexity to reduce watermark exposure risk.
  • Proposes a novel concatenation pattern for variable names, enhancing watermark robustness and stealth.
  • Achieves 100% verification success, 0% false positives, and strong imperceptibility with minimal performance impact.

Why it matters

High-quality code datasets are valuable but vulnerable to unauthorized use. PuzzleMark provides a practical and robust solution for copyright protection, addressing the limitations of existing methods. Its novel approach to embedding and verification sets a new standard for securing intellectual property in AI.

Original Abstract

Constructing and curating high-quality code datasets requires significant resources, making them valuable intellectual property. Unfortunately, these datasets currently face severe risks of unauthorized use. Although digital watermarking offers a post hoc mechanism for copyright authentication, existing methods are predominantly based on the co-occurrence pattern, which is not robust and is susceptible to watermark detection and removal attacks. In this paper, we propose PuzzleMark, a robust watermarking method for code datasets. To reduce the risk of watermark exposure, PuzzleMark introduces a carrier selection strategy that leverages code complexity to evaluate the suitability of code snippets as watermark carriers, and selects those with high suitability for watermarking. To enhance the robustness of the watermark, PuzzleMark proposes a novel concatenation pattern to replace the traditional co-occurrence pattern, and implements two watermarking strategies through variable name concatenation. PuzzleMark adaptively embeds watermarks based on the inherent characteristics of the code, making it more stealthy while maintaining design simplicity. For watermark verification, PuzzleMark employs Fisher's exact test to verify suspicious models under a black-box setting. Experimental results demonstrate that PuzzleMark achieves a 100% verification success rate and a 0% false positive rate, with negligible impact on model performance. Both our human study and our evaluation using four state-of-the-art watermark detection methods show that PuzzleMark exhibits strong imperceptibility, with an average suspicious rate $\leq$ 0.24 and an average recall $\leq$ 30.41%, respectively. As a practical digital watermarking method, PuzzleMark provides strong protection for the intellectual property of code datasets and offers new insights for future research.

📬 Weekly AI Paper Digest

Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.