SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.14604 · 2024

Watermarking Low-entropy Generation for Large Language Models: An Unbiased and Low-risk Method

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 6 functions out of this paper's own repositories and ran 6 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
djwei96/sta canonical 6 of 6
FunctionStatusWhere it lives
compute_p_value Ran djwei96/sta/evaluation_pipeline_attack.py
code served (permissive licence) · get_code("625e0edbbd10c06f")
compute_z_score Ran djwei96/sta/evaluation_pipeline_attack.py
code served (permissive licence) · get_code("f85aa9e50e798930")
filter_paraphrase_text Ran djwei96/sta/evaluation_pipeline_attack.py
code served (permissive licence) · get_code("cd8573f60c1a41d5")
get_classification_score Ran djwei96/sta/evaluation_detect_human_eval.py
code served (permissive licence) · get_code("ab8d4e8900115d63")
group_passed_data Ran djwei96/sta/evaluation_pass_number_human_eval.py
code served (permissive licence) · get_code("d52984a3e02ab963")
str2bool Ran djwei96/sta/evaluation_pipeline_C4.py
code served (permissive licence) · get_code("678874b625786116")

Repositories linked to this paper

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

Abstract

Recent advancements in large language models (LLMs) have highlighted the risk of misusing them, raising the need for accurate detection of LLM-generated content. In response, a viable solution is to inject imperceptible identifiers into LLMs, known as watermarks. Our research extends the existing watermarking methods by proposing the novel Sampling One Then Accepting (STA-1) method. STA-1 is an unbiased watermark that preserves the original token distribution in expectation and has a lower risk of producing unsatisfactory outputs in low-entropy scenarios compared to existing unbiased watermarks. In watermark detection, STA-1 does not require prompts or a white-box LLM, provides statistical guarantees, demonstrates high efficiency in detection time, and remains robust against various watermarking attacks. Experimental results on low-entropy and high-entropy datasets demonstrate that STA-1 achieves the above properties simultaneously, making it a desirable solution for watermarking LLMs. Implementation codes for this study are available online.

For agents

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

get_harvested_code_for_paper("2405.14604")
get_code_for_paper("2405.14604")
have("2405.14604")

Connect an agent — have() is free.