Manuscript Offprint

arXiv:2610.37266

Watermark Basins: Black-Box Detection of Distilled LLMs

Hongyan Chang, Hady Elsahar, Tom Sander, Pierre Fernandez, Saeed Mahloujifar, Sylvestre-Alvise Rebuffi, Tomáš Souček, Tuan Tran, Valeriu Lacatusu, Surya Parimi, Rashel Moritz, Vanessa Stark, Alexandre Mourachko

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Hongyan Chang*, Hady Elsahar*, Tom Sander†, Pierre Fernandez†, Saeed Mahloujifar, Sylvestre-Alvise Rebuffi, Tomáš Souček, Tuan Tran, Valeriu Lacatusu, Surya Parimi§, Rashel Moritz§, Vanessa Stark§, Alexandre Mourachko

FAIR, Meta Superintelligence Labs

*Main contributors, †Core team, §Project support

Proprietary language models and their reasoning traces are vulnerable to API-based distillation, where an adversary trains a student model on the teacher model's outputs. To obtain evidence of distillation, model providers can watermark the teacher's outputs, aiming to leave a radioactive signal in the student's outputs. Existing black-box detectors search for such radioactivity using token-level statistics of the suspect model's outputs. However, token-level signals are not always detectable, for instance when the distillation traces are sampled at a low temperature. In this work, we discover the watermark basin, a persistent signal that enables more reliable watermark detection: during fine-tuning, watermarked teacher traces embed a distinct, key-specific geometric signal in parameter space that lies orthogonal to the ordinary task-specific fine-tuning subspace. Building on this, we introduce Watermark Basin Alignment (WM-Basin), a black-box watermark detector that queries the suspect model through its API, without access to its weights or logits. WM-Basin maps generated text to gradient representations using a fixed clean probe model, projects out the ordinary fine-tuning task directions, and tests whether the residual gradient aligns with the watermark basin induced by the watermark key. We evaluate WM-Basin extensively across diverse teacher models and student architectures (from 135M to 8.2B parameters) distilled on mathematical reasoning. At a strict 0.1% false-positive rate, WM-Basin detects 79% of distilled models at n-gram=1 and 45% at n-gram=3, substantially improving over the state-of-the-art token-level baseline (29% and 1.3%, respectively). Because the watermark signal resides in a persistent basin, it survives post-distillation modifications including quantization, pruning, and reinforcement-learning post-training.

Meta

Figure

Figure 1 The watermark basin. Training on watermarked traces moves the student into a persistent, key-specific watermark basin, whereas clean traces from the same teacher move it only along the task direction. Watermark Basin Alignment (WM-Basin) recovers this geometry from black-box outputs alone to detect distillation.

Figure

Figure 2 WM-Basin: black-box distillation detection via watermark basin alignment. The three panels are the three stages of §2.3. (i) The verifier collects suspect outputs on test prompts and, on separate build prompts, teacher outputs under the claimed watermark key and M decoy keys. Backpropagating each collection through one fixed probe model gives the suspect gradient Δsus\Delta_{sus} and one reference gradient Δk\Delta_k per key. (ii) Raw gradients share large common task components that inflate the cosine similarities, so every key appears to overlap with the suspect. Projecting out the shared task directions leaves the residuals Δ~sus\tilde{\Delta}_{sus} and Δ~k\tilde{\Delta}_k, among which only the claimed key stays close to the suspect; θ\theta is the angle between them. (iii) Each candidate key receives the alignment score S(k)=cos⁡(Δ~sus,Δ~k)S(k) = \cos(\tilde{\Delta}_{sus}, \tilde{\Delta}_k), and the claimed key's rank among the decoys gives the p-value prankp_{rank}. The claimed key ranking at the top is evidence of distillation; a decoy key at the top is not.

1 Introduction

Proprietary language models are increasingly targeted by API-based distillation: an adversary queries a closed teacher model and fine-tunes a competing student model on its outputs. This attack extends black-box model extraction, first demonstrated against ML-as-a-service systems (Tramèr et al., 2016), and has become a major threat to reasoning LLMs (Anthropic, 2026a; Google Threat Intelligence Group, 2026; Remler and Hayum, 2026). Providers have responded by withholding reasoning traces, but concealment does not prevent distillation. Hidden traces can be extracted at scale from encrypted response blocks (Panfilov et al., 2026), while answers and short summaries can be expanded into synthetic traces that recover much of the benefit of training on the originals (Zhang et al., 2026). Other defenses make extraction harder rather than detectable (Anthropic, 2026a; Google Threat Intelligence Group, 2026; Savani et al., 2026; Ma et al., 2026). We review related work in full in §4.

In this work, we focus on output watermarking, which is encouraged by emerging regulatory requirements (European Commission, 2026). Anthropic, for example, embeds watermarks in texts generated by Claude models released beginning in August 2026 (Anthropic, 2026b). Such watermarks can survive distillation: Sander et al. (2024) show that students trained on watermarked teacher outputs retain a “radioactive” signal. Their black-box detector, to our knowledge the only existing one for this setting and our baseline throughout, tests suspect outputs for an excess of watermark-favored tokens, but only where watermark-conditioned contexts recur. We find that this dependence is fragile: detection degrades sharply with larger context windows and loses most of its power under low-temperature teacher sampling. We therefore seek a watermark signal that does not require exact token-level recurrence.

Our main finding is the watermark basin: supervised fine-tuning on clean (watermark-free) teacher traces moves a student along a broad task direction, whereas watermarked traces add a faint, key-specific watermark direction (Fig. 1), leading the student into a key-specific region of parameter space. Post-training updates cannot easily push the student out of this basin. Building on this geometry, we introduce Watermark Basin Alignment (WM-Basin), a black-box detector that represents the suspect model's outputs and the watermarked teacher's outputs as gradients of one fixed, clean probe model. After removing the task subspace estimated from clean models, the distilled student should align with the watermark key more closely than with decoy keys that were never used to watermark the teacher. WM-Basin turns this relative rank into a calibrated p-value using a non-parametric ranking test (Dwass, 1957): a small value is evidence that the suspect was distilled from the claimed teacher and key on the audited domain (Fig. 2).

We evaluate WM-Basin along many axes: the student architecture, the teacher model, the water-marking scheme, the sampling temperature and watermarked fraction of the distillation traces, the fine-tuning recipe, and the task domain. Among 1,200 student models distilled from DeepSeek-R1-Distill-Qwen-14B (Guo et al., 2025) on OpenR1-Math reasoning traces (Hugging Face, 2025), at a 0.1% false-positive rate, WM-Basin detects 79% of distilled models at n-gram=1 and 45% at n-gram=3, against 29% and 1.3% for the state-of-the-art black-box detector (Sander et al., 2024). Quantization, pruning, and reinforcement-learning post-training all leave detection intact, as none of them moves the student out of the watermark basin. Like any black-box method, WM-Basin reads only the suspect model's text, so detection depends on that text carrying the teacher's token distribution. Continued training on clean data can reshape that distribution and therefore degrade black-box detection, although the basin itself survives in the weights and remains easy to identify under white-box access. Our contributions are as follows:

• Discovery of watermark basins. We find that watermarked distillation places every distilled student in a persistent basin, spanned by the ordinary task direction and a faint, key-specific watermark direction. Leaving this basin without knowledge of the key is difficult: post-training operations (quantization, pruning, supervised fine-tuning, RL) displace weights primarily along the task axis and leave the key-specific component intact, which we exploit for detection.

  • A parameter-space black-box detector (WM-Basin). WM-Basin looks for distillation evidence in parameter space. It maps text outputs to gradients of a fixed clean probe model, removes the shared task subspace, and scores the residual alignment against decoy keys. The watermark becomes far more detectable than in token space, with exact finite-sample false-positive control and no access to the suspect's parameters.

• Robust detection at scale. Across 24 student architectures (135M to 8.2B parameters), 4 teachers, and 4 watermarking schemes, WM-Basin achieves 79% TPR at 0.1% FPR versus 29% for the state-of-the-art token-level detector, and remains effective under quantization, pruning, and RL post-training.

References (50)