arXiv AI

Disappearing Ink: Obfuscation Breaks N-gram Code Watermarks in Theory and Practice

The paper demonstrates that N‑gram based code watermarking schemes, widely used to identify machine‑generated code, are ineffective when faced with realistic code obfuscation. By modeling semantics‑preserving transformations as a Markov random walk and introducing the assumption of distribution consistency, the authors prove that obfuscation can drive the failure rate of any detector to nearly 1 minus its false‑positive rate. Extensive experiments across multiple watermarking methods, LLMs, languages, benchmarks, and obfuscators confirm that detectors collapse to near‑random performance (AUROC ≈ 0.5) after obfuscation.

arXiv Machine Learning
Jul 8

Multi-Channel Spread-Spectrum Code Watermarking

arXiv:2607. 06009v1 Announce Type: cross Abstract: Attributing code to the large language model that produced it is essential for provenance, licensing, and misuse accountability, yet no deployed watermark meets this need.

By Soohyeon Choi, Debin Gao, Yue Duan
arXiv AI
Nov 14

Look It Up: Multi-bit LLM Watermarking via Codebook Search

The paper introduces a codebook-based watermarking scheme that encodes an n‑bit payload into a longer u‑bit codeword and embeds it into LLM outputs via token‑level logit biasing. Extraction matches the received bit sequence to the nearest codeword in a secret codebook using Hamming or Levenshtein distance, achieving near‑perfect recovery for 16‑24 bit payloads on 200‑token generations and strong performance on 127‑token generations for base models. The study also explores a BCH variant, evaluates robustness against deletions, paraphrasing, and rewrites, and discusses collision probability, codeword separation, extraction time, tokenization consistency, and text quality to assess practicality and limitations for short‑form attribution.

By Jaros{\l}aw Janas, Pawe{\l} Morawiecki, Josef Pieprzyk
arXiv AI
Oct 2

Are AI Coders Snitches? An Empirical Study of Pretraining Data Detection on Code Large Language Models

The paper investigates whether code large language models (CodeLLMs) inadvertently reproduce proprietary or sensitive code by evaluating seven state‑of‑the‑art training data detection (TDD) methods on eight CodeLLMs. It introduces CodeSnitch, a benchmark of 9,000 function‑level code samples across three languages, each labeled as included or excluded from training data, and applies mutation strategies based on the Type‑1 to Type‑4 code clone taxonomy to test TDD robustness. The study offers a systematic assessment of current TDD techniques for code and suggests directions for developing more effective detection methods.

By Tianlin Li, Yunxiang Wei, Zhiming Li, Aishan Liu, Qing Guo, Xianglong Liu, Dongning Sun, Yang Liu