SWAP: Towards Copyright Auditing of Soft Prompts via Sequential Watermarking

Wenyuan Yang, Yichen Sun, Changzheng Chen, Zhixuan Chu, Jiaheng Zhang, Yiming Li, Dacheng Tao

TL;DR

Researchers have developed SWAP (Sequential Watermarking for soft Prompts), the first effective framework for auditing the copyright of soft prompts in Vision-Language Models like CLIP. By encoding watermarks into the relative ordering of out-of-distribution classes rather than forcing misclassifications, SWAP provides a robust, "harmless" way to prove model ownership without degrading performance.

What Problem Does This Paper Address?

Large-scale Vision-Language Models (VLMs) like CLIP are incredibly powerful but expensive to fine-tune. To adapt them to specific tasks (like medical imaging or satellite analysis), engineers use soft prompts—small, learnable vector modules that act as "plug-and-play" adapters. While these prompts represent significant intellectual property, they are tiny (often <0.1% of the total model parameters), making them easy to steal and hard to protect.

Existing copyright protection methods fail here for two main reasons:

  1. Fingerprinting (Non-intrusive) fails: Different models trained on similar data naturally converge to similar features, leading to "false positives" where an innocent model looks like a stolen one.
  2. Traditional Backdoors (Intrusive) fail: Standard watermarking tries to force a model to misclassify a "trigger" image. However, because soft prompts have so few parameters, there is an objective conflict: the prompt can't effectively learn to be a great classifier and a "broken" classifier (the watermark) at the same time.

Methods

The authors propose SWAP, which moves the watermark from the primary decision space (the labels) to a more complex "probability-ordering" space.

  • Sequential Encoding: Instead of forcing the model to output a wrong label, the defender chooses a set of $n$ "verification classes" (e.g., random out-of-distribution labels like "Target A", "Target B").
  • Hinge-Loss Training: During the prompt tuning phase, the defender uses a specific loss function to ensure the model predicts these classes in a specific order of probability (e.g., $P(\text{Target A}) > P(\text{Target B}) > P(\text{Target C})$).
  • Zero-Shot Leverage: SWAP exploits CLIP’s unique ability to handle any text label "out of the box." This allows the watermark to exist in a space that doesn't interfere with the model's actual task (like identifying sunflowers).
  • Hypothesis-Test Verification: To check a suspicious model, the defender queries it with images and checks if the predicted sequence of these hidden classes matches the secret key using a T-test protocol.

Datasets

The authors evaluated SWAP across 11 diverse benchmark datasets to ensure it works in various domains:

  • Generic Objects: ImageNet, Caltech101.
  • Fine-grained Classification: OxfordPets, StanfordCars, Flowers102, Food101, FGVCAircraft.
  • Specialized Tasks: SUN397 (scenes), UCF101 (actions), DTD (textures), and EuroSAT (satellite imagery).

Key Insights and Ideas

  • Decoupling the Watermark: The "aha moment" is realizing that watermarking shouldn't compete with the main task. By using the order of probabilities for classes the model isn't even supposed to see, the authors eliminate the "objective conflict" that plagues traditional backdoors.
  • Complexity as Security: A standard backdoor is a binary state (triggered or not), which is easy for an attacker to forge. A sequential watermark with $n$ classes has $n!$ possible permutations. With just 4 classes, the chance of a model accidentally having the correct sequence is only ~4.17%, making "false claims" by attackers statistically improbable.
  • Harmlessness by Design: Because the watermark doesn't change the top-1 prediction (the actual label), the model’s utility remains identical to a non-watermarked version.

Key Results

  • Effectiveness: SWAP achieved a Watermark Success Rate (WSR) of nearly 100% across all 11 datasets and multiple prompt-tuning methods (CoOp, MaPLe, PromptSRC).
  • Harmlessness: The "Relative Harmless Degree" was near zero, meaning the watermarked prompts performed just as well on base and novel tasks as clean prompts.
  • Robustness: The watermark survived common "removal" attempts, including fine-tuning (training the stolen prompt on new data) and model pruning (removing neurons to try and break the watermark).
  • Resistance to Forgery: In "False Claim Attacks," where an adversary tries to register a fake watermark to steal credit, SWAP showed high resistance because the adversarial perturbations required to flip the sequence are too subtle to transfer effectively between different models.

Limitations and Future Work

While SWAP is highly effective, the authors note a few areas for further exploration:

  • Black-Box Constraints: Verification requires the ability to query the model with arbitrary text labels. If a third-party API restricts the output to only a fixed set of classes, the current verification protocol might be limited.
  • Adaptive Attacks: While SWAP resists current pruning and fine-tuning, future attackers who are aware of the "sequential" nature of the watermark might attempt to specifically "shuffle" the probabilities of low-confidence classes.
  • Expanding to LLMs: The paper focuses on Vision-Language Models; extending this sequential logic to pure Large Language Models (LLMs) is a logical next step for copyright protection in the text domain.

Summary updated

BibTeX
@article{yang2026swap,
  author = {Wenyuan Yang and Yichen Sun and Changzheng Chen and Zhixuan Chu and Jiaheng Zhang and Yiming Li and Dacheng Tao},
  title = {{SWAP: Towards Copyright Auditing of Soft Prompts via Sequential Watermarking}},
  journal = {Int. J. Comput. Vis.},
  year = {2026},
  doi = {10.1007/s11263-026-02896-y},
}
Figure