SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.17983 · 2024

Is The Watermarking Of LLM-Generated Code Robust?

arXiv · PDF · Open in the Atlas

Code that ran

14 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 10 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2403.17983.json · badge: /api/ran/2403.17983.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
uiuc-arc/llm-code-watermark canonical (classifier label)
classifier basis: census
14 ran · 2 no recorded run
FunctionStatusWhere it lives
additive_prf Ran
ran, violated the contract we drafted
uiuc-arc/llm-code-watermark/lpw/lmw/watermark_reliability_release/alternative_prf_schemes.py
pointer only (licence: NONE) · get_code("3e107246e54539b5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

exp_sampling Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/lmw/watermark_processor.py
pointer only (licence: NONE); the stored copy get_code serves, from tongzhou0101/bileve-official, is pointer only (licence: NOASSERTION) · get_code("10189519bf49509e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

filter_code Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/run_watermark.py
pointer only (licence: NONE) · get_code("5d6e554696cc8e39")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

fix_indents Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/run_watermark.py
pointer only (licence: NONE) · get_code("afdaf4aa610b6f70")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_shift Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/lmw/watermark_processor.py
pointer only (licence: NONE) · get_code("b2daba77e1f49ff5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_completion Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/perturb_watermark.py
pointer only (licence: NONE) · get_code("8b74f1e0438ca473")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_individual_function_lst Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/perturb_watermark.py
pointer only (licence: NONE) · get_code("770a7f3428877b7c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_value_from_tuple_list Ran
ran, honoured the contract we drafted
uiuc-arc/llm-code-watermark/lpw/run_watermark.py
pointer only (licence: NONE) · get_code("8e4b80b04998697e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

multiplicative_prf Ran
ran, violated the contract we drafted
uiuc-arc/llm-code-watermark/lpw/lmw/watermark_reliability_release/alternative_prf_schemes.py
pointer only (licence: NONE) · get_code("ab84746bf94016d2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

score_sequence Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/lmw/experiments/watermark.py
pointer only (licence: NONE) · get_code("a6dbdc2c268292d7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

seeding_scheme_lookup Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/lmw/watermark_reliability_release/alternative_prf_schemes.py
pointer only (licence: NONE) · get_code("97bace61e91ab919")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

str2bool Ran
ran, violated the contract we drafted
uiuc-arc/llm-code-watermark/lpw/lmw/demo_watermark.py
pointer only (licence: NONE) · get_code("2b4664e4a5e4d097")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

tokenize_and_truncate Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/lmw/experiments/watermark.py
pointer only (licence: NONE); the stored copy get_code serves, from carol-long/cc_watermark, is pointer only (licence: NONE) · get_code("4e16ec055b8b619e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

tokenize_for_generation Ran
ran; our contract draft was wrong, not the code
uiuc-arc/llm-code-watermark/lpw/lmw/experiments/watermark.py
pointer only (licence: NONE) · get_code("8b03fbc5046b96f8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_model Not yet run
unverified (harvested, no recorded run)
uiuc-arc/llm-code-watermark/lpw/lmw/demo_watermark.py
pointer only (licence: NONE) · get_code("b63882b68514b2bc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_tokenizer_device Not yet run
unverified (harvested, no recorded run)
uiuc-arc/llm-code-watermark/lpw/lmw/demo_watermark.py
pointer only (licence: NONE) · get_code("1961e9ee0c1d0ddc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uiuc-arc/llm-code-watermark when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 6 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 4 the same month, 3 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
str2bool 175 other papers
113 dated earlier, 4 the same month, 57 later, 1 same year, order not determinable · 2 only as an assembly brick
1406.6247 (2014-06)
Recurrent Models of Visual Attention
1603.09382 (2016-03)
Deep Networks with Stochastic Depth
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
and 172 more not named here
additive_prf 3 other papers
2 dated earlier, 1 the same month
2311.08721 (2023-11)
A Robust Semantics-based Watermark for Large Language Model against Paraphrasing
2402.14007 (2024-02)
Can Watermarks Survive Translation? On the Cross-lingual Consistency of Text Watermark for Large Language Models
2403.13027 (2024-03)
Towards Better Statistical Understanding of Watermarking LLMs
multiplicative_prf 3 other papers
2 dated earlier, 1 the same month
2311.08721 (2023-11)
A Robust Semantics-based Watermark for Large Language Model against Paraphrasing
2402.14007 (2024-02)
Can Watermarks Survive Translation? On the Cross-lingual Consistency of Text Watermark for Large Language Models
2403.13027 (2024-03)
Towards Better Statistical Understanding of Watermarking LLMs
exp_sampling 2 other papers
1 dated earlier, 1 later
2307.15593 (2023-07)
Robust Distortion-free Watermarks for Language Models
2406.01946 (2024-06)
Bileve: Securing Text Provenance in Large Language Models Against Spoofing with Bi-level Signature
seeding_scheme_lookup 1 other paper
1 the same month
2403.13027 (2024-03)
Towards Better Statistical Understanding of Watermarking LLMs
tokenize_and_truncate 1 other paper
1 later
2505.08878 (2025-05)
Optimized Couplings for Watermarking Large Language Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We present the first in depth study on the robustness of existing watermarking techniques applied to code generated by large language models (LLMs). As LLMs increasingly contribute to software development, watermarking has emerged as a potential solution for detecting AI generated code and mitigating misuse, such as plagiarism or the automated generation of malicious programs. While previous research has demonstrated the resilience of watermarking in the text setting, our work reveals that watermarking techniques are significantly more fragile in code-based contexts. Specifically, we show that simple semantic-preserving transformations, such as variable renaming and dead code insertion, can effectively erase watermarks without altering the program's functionality. To systematically evaluate watermark robustness, we develop an algorithm that traverses the Abstract Syntax Tree (AST) of a watermarked program and applies a sequence of randomized, semantics-preserving transformations. Our experimental results, conducted on Python code generated by different LLMs, indicate that even minor modifications can drastically reduce watermark detectability, with true positive rates (TPR) dropping below 50% in many cases. Our code is publicly available at https://github.com/uiuc-arc/llm-code-watermark.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2403.17983")
get_code_for_paper("2403.17983")
have("2403.17983")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2403.17983.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2403.17983.svg)](https://syntology.ai/paper/2403.17983)

Connect an agent — have() is free.