Dynamics-Level Watermarking of Flow Matching Models with Random Codes
> Paper: Dynamics-Level Watermarking of Flow Matching Models with Random Codes (arXiv: 2605.16239, May 2026) > Author: Shuchan Wang > Fields: Generative models (Flow Matching), information security, IP protection > Keywords: velocity field perturbation, zero-integral design, asynchronous demodulation, black-box verification
The Problem: Protecting Billion-Dollar Models
Modern generative AI models (like Stable Diffusion or Sora) cost hundreds of millions of dollars to train. How do you stop someone from stealing your model weights? Existing watermarks have weaknesses:
- Pixel-level watermarks are embedded in generated images and can be edited away with tools like Photoshop.
- Weight-level watermarks live in model parameters and can be overwritten by fine-tuning.
- 100% identification rate: Even with only black-box API access, querying the model with noise and observing its velocity directions allows extraction of the hidden code via an asynchronous demodulation algorithm with 100% accuracy.
- Erasure resistance: Unless the model's generation dynamics are fundamentally retrained, the watermark persists like it's etched into the model's DNA.
- Security barrier: Without the private key, an attacker who knows a watermark exists still decodes only meaningless noise (detection confidence up to 8.4 standard deviations).
This paper takes a different approach: it embeds an invisible code directly into the velocity field — the very "flow rules" the model uses to transport data.
Background: Flow Matching as a Cyber Mover
Flow matching models generate images by transporting chaotic noise (like a pile of sand) into a coherent output (a painting). The core learned skill is the velocity field, which tells every particle of noise which direction to move and how fast at each moment.
Traditional watermarking stamps a seal on the finished sand painting. This new scheme plays tricks *while the sand is moving*.
Zero-Integral Perturbation: Detour Without Delay
The core mathematical trick:
1. Rhythmic perturbation: During sampling, a private key induces a specific rhythm in the trajectories — e.g., drift slightly left at t=0.1s, back right at t=0.2s. 2. Zero-integral design: The perturbation is mathematically constrained so that although trajectories wiggle along the way, they arrive at exactly the same endpoint.
Result: Generated images remain pristine (FID quality essentially unchanged), but the entire generation "journey" now carries your signature.
How Robust Is It?
Experimental highlights:
Open Questions
Before calling this an ultimate "digital passport," some caveats:
1. Sampler filtering: Verification currently relies on direct access to the velocity field. Many real-world APIs only return final images. Does the subtle flow rhythm survive complex discretization or truncation in sampling? The paper's discussion of pure pixel-side recovery remains preliminary. 2. Multi-watermark conflicts: If two companies co-train a model, or someone stacks a second dynamics watermark on an already-watermarked model, could excessive perturbations "topologically tear" the manifold paths and degrade generation quality? 3. Compute overhead: The perturbation doesn't hurt quality, but training and verification require extra projection and demodulation computation. Is that overhead worthwhile for efficiency-critical edge devices?
Takeaway
The highest form of anti-counterfeiting is making the mark vanish into the rules themselves. This paper shows that in the generative AI era, protecting IP is about "guiding" rather than "blocking." By manipulating the *evolution process* rather than the *evolution result*, dynamics-level watermarking issues AI models a permanent digital identity card: a trajectory carries deeper information dimensions than a static image ever could.