Table of Contents
Fetching ...

LLM-Text Watermarking based on Lagrange Interpolation

Jarosław Janas, Paweł Morawiecki, Josef Pieprzyk

TL;DR

This work introduces a line-based watermarking scheme for LLM-generated text that encodes a multi-bit identity as a secret polynomial $f(x)$ over $GF(2^n)$. Watermark points $(x_i,f(x_i))$ are embedded with $x_i$ derived from a cryptographic hash of the preceding token and a secret key, while only $f(x_i)$ is embedded, enabling identity recovery by solving the Maximum Collinear Points problem even after substantial text redaction. Key contributions include a dense embedding method reducing token overhead, a probabilistic security analysis showing robustness against adversarial edits, and practical extensions to long identities via multiple lines or higher-degree polynomials (MCPP). The approach is lightweight, scalable, and adaptable to different security requirements, offering a flexible framework for provenance attribution in AI-generated text with tunable trade-offs between efficiency and resilience.

Abstract

The rapid advancement of LLMs (Large Language Models) has established them as a foundational technology for many AI and ML-powered human computer interactions. A critical challenge in this context is the attribution of LLM-generated text -- either to the specific language model that produced it or to the individual user who embedded their identity via a so-called multi-bit watermark. This capability is essential for combating misinformation, fake news, misinterpretation, and plagiarism. One of the key techniques for addressing this challenge is digital watermarking. This work presents a watermarking scheme for LLM-generated text based on Lagrange interpolation, enabling the recovery of a multi-bit author identity even when the text has been heavily redacted by an adversary. The core idea is to embed a continuous sequence of points $(x, f(x))$ that lie on a single straight line. The $x$-coordinates are computed pseudorandomly using a cryptographic hash function $H$ applied to the concatenation of the previous token's identity and a secret key $s_k$. Crucially, the $x$-coordinates do not need to be embedded into the text -- only the corresponding $f(x)$ values are embedded. During extraction, the algorithm recovers the original points along with many spurious ones, forming an instance of the Maximum Collinear Points (MCP) problem, which can be solved efficiently. Experimental results demonstrate that the proposed method is highly effective, allowing the recovery of the author identity even when as few as three genuine points remain after adversarial manipulation.

LLM-Text Watermarking based on Lagrange Interpolation

TL;DR

This work introduces a line-based watermarking scheme for LLM-generated text that encodes a multi-bit identity as a secret polynomial over . Watermark points are embedded with derived from a cryptographic hash of the preceding token and a secret key, while only is embedded, enabling identity recovery by solving the Maximum Collinear Points problem even after substantial text redaction. Key contributions include a dense embedding method reducing token overhead, a probabilistic security analysis showing robustness against adversarial edits, and practical extensions to long identities via multiple lines or higher-degree polynomials (MCPP). The approach is lightweight, scalable, and adaptable to different security requirements, offering a flexible framework for provenance attribution in AI-generated text with tunable trade-offs between efficiency and resilience.

Abstract

The rapid advancement of LLMs (Large Language Models) has established them as a foundational technology for many AI and ML-powered human computer interactions. A critical challenge in this context is the attribution of LLM-generated text -- either to the specific language model that produced it or to the individual user who embedded their identity via a so-called multi-bit watermark. This capability is essential for combating misinformation, fake news, misinterpretation, and plagiarism. One of the key techniques for addressing this challenge is digital watermarking. This work presents a watermarking scheme for LLM-generated text based on Lagrange interpolation, enabling the recovery of a multi-bit author identity even when the text has been heavily redacted by an adversary. The core idea is to embed a continuous sequence of points that lie on a single straight line. The -coordinates are computed pseudorandomly using a cryptographic hash function applied to the concatenation of the previous token's identity and a secret key . Crucially, the -coordinates do not need to be embedded into the text -- only the corresponding values are embedded. During extraction, the algorithm recovers the original points along with many spurious ones, forming an instance of the Maximum Collinear Points (MCP) problem, which can be solved efficiently. Experimental results demonstrate that the proposed method is highly effective, allowing the recovery of the author identity even when as few as three genuine points remain after adversarial manipulation.
Paper Structure (15 sections, 2 theorems, 8 equations, 1 figure, 4 tables)

This paper contains 15 sections, 2 theorems, 8 equations, 1 figure, 4 tables.

Key Result

theorem 1

Given a plane $GF(2^n)\times GF(2^n)$, $R$ random points and the assumption that $R\ll 2^n$, then the probability that there is a straight line that contains $k$ points is approximated by where $k> 2$.

Figures (1)

  • Figure 1: Adversarial model

Theorems & Definitions (4)

  • theorem 1
  • proof
  • theorem 2
  • proof