← Latest papers
🤖 machine learning

Dynamics-Level Watermarking of Flow Matching Models with Random Codes

This paper introduces a dynamics-level watermarking technique for flow matching models that embeds messages into the velocity field via key-dependent perturbations during training, enabling reliable black-box detection without compromising generation quality.

Original authors: Shuchan Wang

Published 2026-05-18
📖 5 min read🧠 Deep dive

Original authors: Shuchan Wang

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

The Big Idea: Hiding a Secret in the "Flow" of Creation

Imagine you own a factory that builds custom toys. You want to prove that a specific toy came from your factory, even if someone else copies the toy's design or tries to hide your name.

Most current methods try to watermark these creations in two ways:

  1. On the final toy: Putting a tiny, invisible sticker on the finished product. (Problem: If you sand the toy down or repaint it, the sticker is gone.)
  2. In the factory blueprints: Hiding a secret code in the instructions the workers follow. (Problem: If someone steals the blueprints and changes a few numbers, the code breaks.)

This paper proposes a third, smarter way. Instead of hiding the secret in the toy or the blueprints, they hide it in the movement of the factory itself.

The Analogy: The River and the Boat

The paper focuses on a type of AI called Flow Matching. Think of this AI as a river that carries a boat (a random noise particle) from a starting point (Point A) to a destination (Point B, which is a real image like a cat or a number).

  • The Velocity Field: This is the current of the river. It tells the boat exactly how fast and in what direction to move at every single moment to get from A to B.
  • The Watermark: The researchers don't change the destination (the final image). They don't change the map (the blueprints). Instead, they add a tiny, rhythmic wiggle to the river's current.

Imagine the river usually flows straight. The researchers make the current wiggle back and forth like a sine wave (a smooth, rolling motion) as the boat travels.

  • The Secret: The pattern of the wiggle is the secret message.
  • The Magic: Because the wiggle goes forward and then backward perfectly, the boat ends up in the exact same spot it would have been without the wiggle. The final image looks perfect. The "wiggle" disappears from the final result, but it was there the whole time during the journey.

How It Works (The Simple Steps)

1. Training (Embedding the Secret)
When the AI is learning how to draw pictures, the researchers teach it to add this specific "wiggle" to the river current.

  • They give the AI a secret key (like a password).
  • Based on that key, the AI learns to wiggle the current in a specific pattern that corresponds to a message (e.g., "This model belongs to Company X").
  • Crucially, the wiggle is designed so that over the whole trip, it cancels itself out. The boat still arrives at the right place.

2. Detection (Finding the Secret)
You don't need to see the blueprints or the final image to find the secret. You just need to ask the AI, "Hey, if I'm at this spot in the river at this time, which way are you pushing me?"

  • The detector asks the AI thousands of these questions (black-box queries).
  • It listens for that specific rhythmic "wiggle" in the answers.
  • If the AI has the secret key, the detector can decode the message. If the AI doesn't have the key, the detector just hears random noise.

Why This Is Special (The 5 Superpowers)

The paper claims this method solves five big problems that other methods have:

  1. It's Unbreakable by "Sanding": Since the secret is in the movement (the dynamics) and not the final picture, you can't remove it by editing the image. The "wiggle" is part of how the image is made.
  2. It's Black-Box Friendly: You don't need to see the AI's internal code or weights. You just need to be able to ask it questions (like using an API).
  3. It Keeps Quality: Because the wiggle cancels itself out over time, the final images look exactly as good as they would without the watermark. The paper tested this on images of numbers (MNIST) and small color photos (CIFAR-10), and the quality didn't drop.
  4. It Needs a Key: If you don't have the secret key (the specific pattern of the wiggle), you can't find the message. It's like trying to hear a specific radio station without the frequency; you just hear static. The paper found that without the key, the detection rate was no better than guessing randomly.
  5. It Can Carry Lots of Data: It's not just a "Yes/No" watermark. It can carry a whole message (like a serial number or a version ID) because they used a "codebook" of different wiggle patterns.

The Results

The researchers tested this on two types of AI models (a simple one called MLP and a complex one called UNet).

  • Success Rate: They could recover the secret message 100% of the time from watermarked models.
  • False Alarms: Clean models (without watermarks) were never mistaken for watermarked ones (0% false positives).
  • Quality: The images generated were just as good as the originals.

The Bottom Line

This paper introduces a way to stamp a secret, unremovable, high-quality signature directly into the "motion" of an AI as it creates things. It's like teaching a river to flow with a secret rhythm that only the owner can hear, ensuring that even if the water is poured into a new cup, the rhythm remains.

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 →