Research map / Large language models / Language, safety and interpretability
Who Wrote this Code? Watermarking for Code Generation
Taehyun Lee, Seokhee Hong, Jaewoo Ahn, Ilgee Hong, Hwaran Lee, Sangdoo Yun, Jamin Shin, Gunhee Kim
Seoul National University · LG AI Research · Georgia Institute of Technology · NAVER
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
On benchmark leaderboards
- HumanEval leaderboard pass@1 32.6 · rank 205 of 261 papers
- MBPP leaderboard pass@1 33.2 · rank 143 of 165 papers
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| apply watermark only to high-entropy tokens (SWEET) instead of all tokens (WLLM), at ~10% pass@1 drop | StarCoder · MBPP | AUROC: 0.718 -> 0.873 | Improved |
| apply entropy thresholding (SWEET vs WLLM) at ~10% pass@1 drop | StarCoder · HumanEval | AUROC: 0.822 -> 0.943 | Improved |
| apply entropy thresholding (SWEET vs WLLM) at AUROC>=0.9 | StarCoder · HumanEval | pass@1: 25.3 -> 32.6 | Improved |
| apply entropy thresholding (SWEET vs WLLM) at AUROC>=0.9 | StarCoder · MBPP | pass@1: 24.2 -> 33.2 | Improved |
| apply entropy thresholding (SWEET vs WLLM) at AUROC>=0.9 | StarCoder · DS-1000 | pass@1: 8.6 -> 18.8 | Improved |
| use distortion-free EXP-edit watermark at low temperature | StarCoder · HumanEval, MBPP, DS-1000 | AUROC: 0.489, 0.536, 0.546 | Hurt |
| use post-hoc detectors instead of watermarking | StarCoder · HumanEval, MBPP, DS-1000 | AUROC | Hurt |
| raise entropy threshold in SWEET (ablation) | StarCoder · HumanEval, MBPP, DS-1000 | pass@1 | Improved |
| raise entropy threshold in SWEET (ablation) | StarCoder · HumanEval, MBPP, DS-1000 | AUROC | Mixed |
| detect SWEET with generic prompts instead of gold prompt (ablation) | StarCoder · HumanEval | AUROC | Hurt |
| detect with LLaMA2-7B surrogate instead of LLaMA2-13B generator (ablation) | LLaMA2-13B SWEET · code benchmarks | AUROC | No clear effect |
| rename all variables in watermarked code | SWEET · MBPP | AUROC: drops to about 0.8 | Hurt |
Open problems this paper states
- “Detection needs the source LLM in a white-box setting, which can be a computational burden even with a smaller surrogate.” → Detection needs white-box or gray-box access to the model. (an open problem in text watermarking)
- “Further robustness against paraphrasing attacks is left for future work.” → Watermarks and multi-bit payloads break under paraphrasing. (an open problem in text watermarking)
Open problems in text watermarking
Can text watermarks stay detectable after paraphrasing, on short or low-entropy text, and without access to model internals?
- Experiments use a few small models and no larger ones. · 15 papers state it
- Detection needs white-box or gray-box access to the model. · 13 papers state it
- Watermarks and multi-bit payloads break under paraphrasing. · 12 papers state it
Closest papers by meaning
- Majority Bit-Aware Watermarking for Large Language Models (NeurIPS 2026 · similarity 0.86)
- Black-Box Detection of Language Model Watermarks (ICLR 2025 · similarity 0.85)
- Break the Trade-off Between Watermark Strength and Speculative Sampling Efficiency for Language Models (ICLR 2026 · similarity 0.85)
- ArcMark: Distortion-Free Multi-Byte LLM Watermark via Optimal Transport (NeurIPS 2026 · similarity 0.85)
- Learning to Watermark: A Selective Watermarking Framework for Large Language Models via Multi-Objective Optimization (NeurIPS 2025 · similarity 0.84)
- On the Learnability of Watermarks for Language Models (ICLR 2024 · similarity 0.84)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.