← Latest papers
🔢 mathematics

LLM-Text Watermarking based on Lagrange Interpolation

This paper proposes a robust LLM text watermarking scheme that embeds author identity as f(x)f(x) values corresponding to pseudorandomly generated xx-coordinates on a straight line, enabling the recovery of multi-bit author information even after heavy adversarial redaction by solving the Maximum Collinear Points problem.

Original authors: Jarosław Janas, Paweł Morawiecki, Josef Pieprzyk

Published 2026-02-27
📖 5 min read🧠 Deep dive

Original authors: Jarosław Janas, Paweł Morawiecki, Josef Pieprzyk

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a magical pen that can write perfect stories, essays, or emails. This pen is an AI (specifically, a Large Language Model). It's so good at writing that it's becoming hard to tell if a human wrote a story or if the AI did.

This creates a problem: How do we know who (or what) wrote a piece of text? Is it a real person, or is it a robot trying to spread fake news or steal credit?

The authors of this paper, Jarosław, Paweł, and Josef, have invented a clever way to hide a secret signature inside the AI's writing. They call this a "watermark," but instead of a visible stamp, it's a hidden mathematical pattern.

Here is how their method works, explained with simple analogies:

1. The Secret Recipe: Drawing a Straight Line

Imagine you and a friend have a secret code. You decide that your secret signature is a straight line drawn on a giant piece of graph paper.

  • The line follows a simple rule: $y = ax + b$.
  • The numbers aa and bb are your secret key (the watermark).

In the real world, you can't just draw on the text. So, the authors use a trick:

  • They pick random spots on the graph paper (these are the x-coordinates).
  • They calculate where the line should be at those spots (the y-coordinates).
  • They then hide these coordinates inside the AI's writing.

2. Hiding the Clues: The "Green and Red" Tokens

How do you hide a number in a sentence? You do it by slightly nudging the AI's choices.

Imagine the AI is about to write the next word. It has a list of 50,000 possible words it could choose.

  • The secret code says: "For this specific moment, if the hidden number is 0, pick a word from the Red list. If it's 1, pick a word from the Green list."
  • The AI doesn't know it's doing this; it just thinks it's choosing a word that fits the context. But because the authors "tilted the scales" (biased the probabilities), the AI is slightly more likely to pick a word from the correct list.

By doing this for many words, they embed a long string of 0s and 1s that, when decoded, reveals the coordinates of points on that secret straight line.

3. The Detective Work: Finding the Line

Now, imagine a detective (the verifier) receives the text. They don't know the secret line, but they have the secret key to find the "x" spots.

  1. Reconstruct: They look at the words, decode the "Green/Red" choices, and get a bunch of points (x,y)(x, y).
  2. The Problem: Because the AI is a bit random, and because a bad guy might try to edit the text (delete words, swap words), some of these points will be wrong. They will look like scattered dots all over the graph paper.
  3. The Solution (The Magic Trick): The detective looks for the longest straight line that passes through the most dots.
    • Even if 50% of the dots are scattered noise (fake points), the real secret line will still have the most dots sitting on it.
    • This is called the Maximum Collinear Points problem. It's like looking at a messy room full of confetti and finding the one straight line of marbles that someone carefully placed.

Once they find that line, they can read the equation ($y = ax + b$). The numbers aa and bb are the watermark, proving who wrote the text.

Why is this special?

  • It's Robust: If a bad guy tries to edit the text (delete a paragraph, change a few words), they might destroy some of the "dots." But as long as enough dots remain to form the straight line, the watermark survives. It's like trying to erase a straight line drawn on a foggy window; if you wipe away a few spots, the line is still visible.
  • It's Fast: Finding the line is a math problem computers can solve very quickly, even for long texts.
  • It's Invisible: The text still reads perfectly naturally. Humans can't tell the difference.

The Analogy of the "Broken Puzzle"

Think of the text as a puzzle. The authors have hidden a few special puzzle pieces that, when put together, form a straight stick.

  • Normal text: Just a pile of random puzzle pieces.
  • Watermarked text: A pile of random pieces, but with a hidden stick made of special pieces.
  • The Attack: A hacker tries to smash the puzzle or swap pieces.
  • The Defense: Even if the hacker breaks the puzzle, as long as they don't break every single piece of the stick, you can still find the stick and prove it was there.

Summary

This paper proposes a way to stamp AI text with a hidden, mathematical "straight line" signature. Even if someone tries to scrub the text clean, the signature is so resilient that the "line" will still stand out among the noise, allowing us to prove, "Yes, this text came from an AI, and here is the proof."

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →