SWAP: Towards Copyright Auditing of Soft Prompts via Sequential Watermarking

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

Abstract

Large-scale Vision-Language Models (VLMs) like CLIP are often adapted to downstream tasks using "soft prompts"—small, learnable vector modules. Despite their utility, these prompts are susceptible to unauthorized reuse. We introduce SWAP (Sequential Watermarking for soft Prompts), a novel framework for auditing soft prompt copyright. By leveraging the relative ordering of out-of-distribution class probabilities, SWAP provides a robust and harmless watermarking solution that avoids the performance trade-offs typical of traditional backdoor methods.

Introduction

The rise of foundation models has shifted the paradigm of AI development toward parameter-efficient fine-tuning. Soft prompts, which consist of a tiny fraction of a model's parameters, have emerged as a popular "plug-and-play" solution for task adaptation. However, their small footprint makes them easy to steal and difficult to protect. Existing copyright protection techniques, such as non-intrusive fingerprinting or intrusive backdooring, often fail due to high false-positive rates or significant degradation in model performance (the "objective conflict").

Methodology: From Misclassification to Sequential Ordering

Traditional watermarking methods often attempt to force a model to misclassify specific "trigger" images into a target class. In the context of soft prompts, this creates a conflict between the primary task (accurate classification) and the watermark task (deliberate misclassification).

SWAP overcomes this by moving the watermark into a "probability-ordering" space. Instead of changing the top-1 prediction, SWAP ensures that a set of "verification classes" (labels the model would not normally encounter) are predicted in a specific, secret sequence of probabilities.

Comparison between traditional Backdoor-based Watermarking (BWAP) and the proposed Sequential Watermarking (SWAP).

The core components of SWAP include:

  1. Sequential Encoding: A secret key defines a permutation of $n$ verification classes.
  2. Hinge-Loss Training: A specialized loss function is used during prompt tuning to enforce the desired probability sequence without affecting the primary label.
  3. Zero-Shot Leverage: SWAP utilizes CLIP’s open-vocabulary nature to insert watermarks into classes that are irrelevant to the main task.
  4. Hypothesis-Test Verification: Ownership is verified by checking if the observed probability sequence on a suspect model matches the secret key using a T-test protocol.

Experimental Evaluation

The authors evaluated SWAP across 11 diverse datasets, ranging from generic objects (ImageNet) to specialized satellite imagery (EuroSAT).

Key Results

  • Effectiveness: SWAP consistently achieved a Watermark Success Rate (WSR) of nearly 100% across all benchmarks and various prompt-tuning methods like CoOp and MaPLe.
  • Harmlessness: The model's accuracy on its primary task remained virtually unchanged, as the watermark does not interfere with the top-1 prediction.
  • Robustness: The watermark proved resilient against common removal attempts, such as fine-tuning on new data or model pruning.
  • Resistance to Forgery: SWAP is uniquely resistant to "False Claim Attacks," where an adversary tries to claim ownership of a model by registering a fake watermark.
Illustration of a False Claim Attack where a malicious developer attempts to register a watermark to steal credit from an independent developer.

Conclusion

SWAP represents a significant step forward in protecting the intellectual property of soft prompts. By decoupling the watermark from the primary classification task through sequential probability ordering, it provides a secure, robust, and harmless auditing mechanism. Future work will look into extending this approach to pure Large Language Models and addressing potential adaptive shuffling attacks.

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