Abstract
Protecting the intellectual property (IP) of large-scale deep learning models is a critical challenge in the era of Model-as-a-Service (MaaS). Traditional black-box watermarking techniques often rely on backdoor training, which inevitably degrades primary task performance and lacks formal security guarantees. This paper presents BranchWM, a novel watermarking protocol that achieves zero performance degradation by decoupling the forensic verification task from the model's inference logic. By utilizing cryptographic Message Authentication Codes (MACs) within a parallel API branch, BranchWM provides a stealthy, efficient, and mathematically provable solution for model ownership verification.
Introduction
The immense computational cost associated with training state-of-the-art models, such as Large Language Models (LLMs), has transformed them into high-value assets. To prevent unauthorized redistribution or deceptive service provision, researchers have turned to watermarking—embedding hidden signals to prove ownership.
However, existing black-box methods typically employ "backdoor training," where a model is retrained to produce specific outputs for "trigger" inputs. This approach suffers from two primary drawbacks:
- Performance Degradation: The secondary watermarking task often interferes with the model's primary accuracy.
- Heuristic Security: It is difficult to prove that these watermarks are robust against sophisticated attacks or won't cause unintended behavior on edge cases.
Proposed Methodology: The BranchWM Protocol
BranchWM addresses these limitations by moving the watermark out of the model's weights and into a parallel logic layer within the serving API. This architectural shift ensures that the model's parameters remain untouched, guaranteeing that performance is preserved for all legitimate users.
Architectural Components
- Parallel Branching: The API maintains two distinct states. The Service State executes the original, unmodified model for standard queries. The Forensic State is activated only when a specific, cryptographically verified trigger is detected.
- MAC-based Unaccessible and Fast Trigger (MUFT): To ensure triggers are unforgeable, BranchWM utilizes a Message Authentication Code (MAC) with "Existential Unforgeability under Chosen Message Attack" (EUF-CMA). This ensures that without the secret key, the probability of a user accidentally or maliciously triggering the forensic state is computationally negligible.
- Concealed Embedding: To maintain stealth, triggers are embedded into natural-sounding text using a "greenlist" approach. This prevents attackers from using perplexity-based filters to identify and scrub potential watermarks from incoming traffic.
Efficiency and Performance
A key advantage of BranchWM is its computational efficiency. By opting for symmetric MACs over asymmetric digital signatures (like ECDSA), the protocol minimizes latency overhead in high-throughput production environments.
As shown in the performance analysis, the HMAC_SHA512 implementation adds negligible overhead (a time rate of ~1.2x compared to a simple SHA512 hash), whereas asymmetric signatures like ECDSA are over 60 times slower. This efficiency makes BranchWM viable for real-time API services.
Experimental Validation
The authors evaluated BranchWM using the OPT-1.3B language model and the ROCStories dataset. The results confirmed:
- Zero Performance Loss: Because the primary inference path is untouched, the model maintains 100% of its original accuracy.
- High Stealth: Triggers generated via the "Concealed TriggerGen" algorithm maintain high semantic readability, making them difficult to detect via automated machine-text detectors.
Discussion and Limitations
While BranchWM effectively protects the API service, it faces challenges regarding Model Extraction. If an attacker distills the model's knowledge into a local copy, the API-level branch watermark will not be present in the stolen model. Furthermore, cryptographic triggers require a minimum bit-length to remain secure, making the protocol better suited for long-form text generation than for short, single-word completions. Future work aims to mitigate replay attacks by incorporating temporal metadata into the evidence generation process.
Conclusion
BranchWM represents a significant step forward in model IP protection. By shifting from parameter-level modifications to an architectural branching strategy, it provides a robust, efficient, and performance-lossless framework for verifying model ownership in the MaaS ecosystem.
Summary updated