TL;DR
Agentic AI systems, powered by LLMs, are valuable intellectual property (IP) but vulnerable to imitation attacks. This paper introduces AGENTWM, the first watermarking framework specifically designed for these "grey-box" agentic systems, embedding verifiable signals directly into action trajectories without compromising performance.
What Problem Does This Paper Address?
The rise of agentic AI systems, which use LLMs to interact with external tools and environments to perform complex tasks, has created significant new intellectual property (IP). These systems are built through extensive training and represent a substantial investment. However, they are susceptible to "imitation attacks," where adversaries steal these proprietary capabilities by training their own models on outputs from the victim agent. Existing watermarking techniques, designed for traditional LLMs that output full text, are ineffective here because agentic systems often operate in a "grey-box" mode, concealing internal reasoning steps and only exposing action sequences. This makes it difficult to embed and detect watermarks in the visible parts of the agent's output.
Methods
AGENTWM tackles this by exploiting the concept of "trajectory equivalence." This means that for a given task, an agent can generate multiple different sequences of actions (trajectories) that all lead to the same functional outcome. AGENTWM embeds watermarks by subtly biasing the distribution of these semantically equivalent action sequences.
Here's a breakdown of their approach:
- Watermark Definition: A watermark is defined by an "equivalence set" of action segments that perform the same semantic function. AGENTWM then biases the probability distribution of these segments.
- WM Insertion: When a user interacts with the agent, AGENTWM intercepts the action sequence. Based on a unique User ID (UID), a specific set of watermark "passes" is activated. These passes transform the original action sequence into a watermarked version by sampling from the biased distributions for identified equivalent action segments. This process is designed to be imperceptible to the user.
- WM Schemes: They propose five distinct watermarking schemes categorized into:
- Action-Based: Exploiting equivalence in individual tool calls (e.g., using different vendors for the same function, different parameter granularities, or interface aliases).
- Structure-Based: Exploiting equivalence in multi-action compositions (e.g., using an auxiliary action or composing atomic actions differently).
- Automated Pipeline: An automated pipeline (Generator and Verifier) is used to mine and validate candidate equivalence sets from tool libraries, generating hundreds of unique watermark passes.
- Verification: To detect IP theft, AGENTWM queries the suspect model with a private dataset and uses statistical hypothesis testing (Jensen-Shannon Divergence) to compare the empirical distribution of its action sequences against the target watermarked distribution. A high discrepancy indicates theft. The UID system allows for user-level attribution.
Datasets
- Training/Fine-tuning: The
xlam-function-calling-60kdataset is used as the base tool library. This dataset is extended and validated using GPT-5 and DeepSeek-v3.2. For simulating imitation attacks, a fine-tuning dataset (Dft) of 24,000 trajectories is created. - Evaluation/Verification: A held-out test set (
Dtest) of 6,000 trajectories is used for evaluating model performance and for the verification process.
Key Insights and Ideas
- Grey-Box Vulnerability: Agentic systems' grey-box nature (hiding internal reasoning) is a critical vulnerability that existing LLM watermarking methods cannot address.
- Trajectory Equivalence as a Watermark Channel: The inherent flexibility in agentic systems to achieve the same outcome via different action sequences provides a robust channel for embedding watermarks without affecting functional utility.
- Distributional Biasing is Stealthy: Shifting the probability distribution of semantically equivalent actions is a stealthy way to embed watermarks, making them hard to detect by adversaries relying on token-level analysis or simple paraphrasing.
- User-Level Attribution: The UID system, mapping users to specific watermark passes, enables precise localization of malicious actors, moving beyond just detecting theft to identifying the perpetrator.
- Trade-off in Watermark Strength: There's a clear trade-off between watermark strength (detectability) and fidelity (performance). Overly aggressive watermarking can degrade model utility and ironically make it more detectable.
Key Results
- High Detection Accuracy: AGENTWM achieves near-perfect detection accuracy (F1-score close to 1.0) for imitation attacks across various configurations.
- Robust Localization: Malicious users can be identified with high accuracy (0.92-1.0) even when mixed with a large pool of benign users (up to 50,000).
- Minimal Performance Degradation: Watermarking introduces negligible performance degradation (<3% on trajectory quality) and minimal latency overhead (0.28%).
- Robustness Against Attacks: AGENTWM watermarks survive various removal attacks, including random deletion, LLM rephrasing, and even sophisticated "Fully Knowledgeable" attacker attempts, with attackers achieving low F1-scores (<0.02 for PK, 0.2350 for FK) and severe degradation in the stolen model's utility.
- Stealthiness: Watermarked outputs are statistically indistinguishable from clean ones, as evidenced by near-identical perplexity distributions.
- Generalizability: The framework demonstrates robustness across different backbone LLMs (Qwen3-4B, Ministral-8B, Qwen3-8B) and is effective even in cross-model imitation scenarios.
Limitations and Future Work
- Watermark Strength Trade-off: The paper highlights a trade-off between watermark strength and trajectory quality, recommending moderate values (δ=2-3) for practical deployment.
- Computational Cost: While minimal, watermark insertion does add a small computational overhead.
- Future Work: The paper suggests exploring more advanced watermark schemes and potentially investigating more sophisticated adversarial removal techniques. The robustness against adaptive adversaries who might try to infer watermark parameters is a continuing area of research.
Summary updated