← Latest papers
💻 computer science

Can Watermarking Techniques Help Prevent LLM Model Stealing?

This paper proposes a watermarking-based defense that perturbs model logits to prevent black-box model stealing attacks, including the extraction of hidden layer dimensions, while demonstrating through empirical experiments that this approach effectively thwarts such attacks without significantly degrading model utility.

Original authors: Elette Boyle, MohammadTaghi Hajiaghayi, Keivan Rezaei, Suho Shin, Amos Stern

Published 2026-07-14
📖 5 min read🧠 Deep dive

Original authors: Elette Boyle, MohammadTaghi Hajiaghayi, Keivan Rezaei, Suho Shin, Amos Stern

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've built a magnificent, secret recipe for a cake that costs millions to bake. You don't sell the cake; you just let people order slices through a window. They get the taste, but they can't see the ingredients list or the size of the mixing bowl.

Recently, a group of sneaky chefs discovered a trick to peek inside your kitchen. By ordering thousands of specific slices and analyzing the tiny crumbs left behind (called "logits"), they could use a mathematical magnifying glass called PCA to figure out the exact size of your mixing bowl (the "hidden dimension"). Once they know that, they might be able to reverse-engineer your entire secret recipe and build a competing cake shop.

This paper proposes a new way to protect your kitchen: digital watermarks. Instead of just hiding the bowl, the authors suggest sprinkling a special, invisible "noise" onto every slice of cake before it leaves the window. This noise is designed to confuse the sneaky chefs' math, making it impossible for them to count the bowl's size, while still letting the cake taste delicious.

The "Noise" Problem: Why Simple Tricks Fail

The authors tested several ways to add this noise, and they found that some obvious ideas were total flops.

  • The "Static" Mistake: If you add the exact same amount of noise to every slice, the chefs can just subtract it out. It's like if you put the same amount of salt on every cookie; a smart chef can just taste the salt and ignore it.
  • The "Sorted" Mistake: They tried sorting the noise to match the order of the ingredients. Surprisingly, this didn't work either. The noise itself had a hidden pattern that the chefs could still see, like a fingerprint left on the glass.
  • The "Multiplication" Mistake: They tried multiplying the ingredients by a random number. This ruined the taste of the cake (degraded model quality) but still didn't stop the chefs from counting the bowl.

The paper explicitly argues against using simple, independent noise (random sprinkles that change every time) because the chefs can just order the same slice 40 times and average the results to wash the noise away.

The Winning Strategy: The "Secret Seed" and the "Softplus" Shield

The authors found a solution that actually works, inspired by how we watermark digital images. Their method has two main ingredients:

  1. The Secret Seed: Instead of using random noise, the kitchen uses a secret code (a cryptographic function) based on the exact state of the cake batter inside the oven. This means every single slice gets a unique noise pattern that depends on what's inside it. Even if the chefs order the same prompt twice, the noise is identical (so they can't average it away), but if they change the prompt even slightly, the noise changes completely.
  2. The Softplus Shield: To make sure the noise doesn't ruin the cake's flavor, they use a special mathematical trick called "softplus." Think of this as a gentle filter that bends the ingredients just enough to hide the bowl's size, but keeps the top-tasting ingredients in the exact same order.

When they combined this "Secret Seed" with "Softplus" and added random Gaussian noise (like a fine mist of sugar), the results were impressive. In their tests on a model called Mistral-7B (which has a hidden dimension of 4,096), the sneaky chefs failed completely. The math showed no clear "jump" in the data that would reveal the bowl size. The attack failed to identify the dimension, even when the chefs tried advanced tricks like "Robust PCA" or trying to reverse the softplus filter.

Does the Cake Still Taste Good?

The biggest worry was: "If you mess with the ingredients, will the cake taste bad?"

The authors measured this carefully. They used a benchmark called MMLU (a test of knowledge and reasoning) and found that:

  • Simple, messy noise dropped the model's score significantly (down to around 44.75% or 49.52% in some cases).
  • However, the Softplus-based method kept the score incredibly high, staying around 56.55% to 57.78%. This is almost the same as the original, unmodified model!

They also checked how much the "flavor profile" changed using a metric called Perplexity. The best configurations showed a perplexity of just 3.37, which is very close to the original model's 3.40.

The Bottom Line

The paper doesn't claim to have solved every possible theft in the universe, but it strongly suggests that this specific method is a robust defense. By using a secret, prompt-dependent seed and a gentle "softplus" filter, they managed to scramble the mathematical clues thieves need to steal the model's size, all while keeping the model smart and useful.

In short: You can now sprinkle a little "confusion dust" on your AI's answers to stop thieves from measuring your kitchen, without ruining the taste of the cake.

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 →