mlsanityData to 14 Oct 2026

CODE ACROSTIC: Robust Watermarking for Code Generation

arXiv 2512.14753 ↗First posted 14 Dec 2025cs.CR cs.AIcited by 0

On the map: LLM safety and security → Watermarking generated content and models

Abstract (arXiv)

Watermarking large language models (LLMs) is vital for preventing their misuse, including the fabrication of fake news, plagiarism, and spam. It is especially important to watermark LLM-generated code, as it often contains intellectual property.However, we found that existing methods for watermarking LLM-generated code fail to address comment removal attack.In such cases, an attacker can simply remove the comments from the generated code without affecting its functionality, significantly reducing the effectiveness of current code-watermarking techniques.On the other hand, injecting a watermark into code is challenging because, as previous works have noted, most code represents a low-entropy scenario compared to natural language. Our approach to addressing this issue involves leveraging prior knowledge to distinguish between low-entropy and high-entropy parts of the code, as indicated by a Cue List of words.We then inject the watermark guided by this Cue List, achieving higher detectability and usability than existing methods.We evaluated our proposed method on HumanEvaland compared our method with three state-of-the-art code watermarking techniques. The results demonstrate the effectiveness of our approach.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Watermarking generated content and models, one of 12 directions in LLM safety and security. Builds on 20 of its 28 references that are in the map. First posted on arXiv 14 Dec 2025.

Builds on

20 of 28 references.

Closest ancestors · 14

Same direction, newest first

  1. 2025Marking Code Without Breaking It: Code Watermarking for Detecting LLM-Generated Code26 Feb
  2. 2024Inevitable Trade-off between Watermark Strength and Speculative Sampling Efficiency for Language Models27 Oct
  3. 2024MarkLLM: An Open-Source Toolkit for LLM Watermarking16 May
  4. 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Code24 Apr
  5. 2024Is The Watermarking Of LLM-Generated Code Robust?24 Mar
  6. 2024An Entropy-based Text Watermarking Detection Method20 Mar
  7. 2024GumbelSoft: Diversified Language Model Watermarking via the GumbelMax-trick20 Feb
  8. 2023A Survey of Text Watermarking in the Era of Large Language Models13 Dec
  9. 2023Publicly-Detectable Watermarking for Language Models27 Oct
  10. 2023CodeMark: Imperceptible Watermarking for Code Datasets against Neural Code Completion Models28 Aug
  11. 2023Undetectable Watermarks for Language Models25 May
  12. 2023Who Wrote this Code? Watermarking for Code Generation24 May
2 more
  1. 2023Watermarking Text Generated by Black-Box Language Models14 May
  2. 2023A Watermark for Large Language Models24 Jan

Other references · 6

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2023A Survey of Large Language Modelscited by 2,576
  3. 2022Survey of Hallucination in Natural Language Generationcited by 2,075
  4. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  5. 2023OUTFOX: LLM-Generated Essay Detection Through In-Context Learning with Adversarially Generated Examplescited by 80
  6. 2020Neural Deepfake Detection with Factual Structure of Textcited by 41

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024Efficient and Universal Watermarking for LLM-Generated Code Detection
  2. 2026Can we Watermark Low-Entropy LLM Outputs?
  3. 2025CLASP: Training-Free LLM-Assisted Source Code Watermarking via Semantic-Preserving Transformations
  4. 2024Watermarking Large Language Models and the Generated Content: Opportunities and Challenges
  5. 2026Preserving Structure, Strengthening Signals: A Grammar-Driven Approach to Optimize the Trade-off Between Quality and Detectability in Code Watermarking
  6. 2025HeavyWater and SimplexWater: Distortion-Free LLM Watermarks for Low-Entropy Next-Token Predictions
  7. 2024Large Language Model Watermark Stealing With Mixed Integer Programming
  8. 2025Entropy-Guided Watermarking for LLMs: A Test-Time Framework for Robust and Traceable Text Generation