Skip to content
NewA calmer, faster ZeroHour

SEW: Style-Encoded Watermarking of LLM-Generated Code

arXiv cs.CRby Soohan Lim ()1 min read2 · 1 read
AI summary · grok-4.7Summaries by Vani AI

SEW watermarks already generated LLM code using secret-keyed style rules calibrated on human-written code.

SEW embeds and detects watermarks in already generated LLM code instead of changing token selection during generation. Style rules drawn from style guides are chosen by a secret key and each program's structure, then calibrated against style probabilities from human-written code. Context-aware aggregation stops repeated applications of the same style from inflating evidence. Across three unnamed LLMs and three languages on CodeContests, mean TPR at 5% FPR improved 12.44% over baselines, with only a 0.94% mean relative drop under four non-LLM editing attacks.

Key facts
  • Watermarks completed code rather than altering token sampling
  • Secret key and structure choose style-guide transformation rules
  • Evidence is calibrated on human-written code style probabilities
  • Mean TPR at 5% FPR rose 12.44% on CodeContests
Explain this AI news with Vani AIWhat was announced, what is new and why it matters, in a new chat

From the original article

1 min read at arxiv.org

Code watermarking supports provenance tracking for code generated by LLMs. Modifying token selection to embed watermarks as an LLM generates code can create a trade-off between detectability and functional correctness. Other methods instead watermark completed code using predefined transformations or trained neural models.

arXiv cs.CR

By Soohan Lim · arxiv.org

Read the full article at arXiv cs.CR

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.