A Locally Tokenized Generative Model for Robust Time-Series Watermarking

Dongbin Kim, Geonwoo Shin, Yujin Choi, Soyeon Park, Jaewook LeeNeurIPS 2026

TL;DR

Watermarking synthetic time-series data seems straightforward until someone edits the signal—then existing detectors go haywire, often flagging real, unwatermarked data as synthetic. The authors show this happens because standard models tangle the entire timeline together during detection, allowing small local edits to corrupt the whole test. By building a generative model that chops time series into strictly isolated local tokens, they keep perturbations contained, achieving rock-solid detection and near-zero false alarms—all while running over 1,000x faster than diffusion-based alternatives.

What Problem Does This Paper Address?

As generative models churn out realistic financial, medical, and energy data, we need watermarks to track what’s synthetic and what’s real. In Large Language Models (LLMs), watermarking is relatively clean: you secretly split your vocabulary into "green" and "red" lists, nudge the model to pick green tokens during generation, and count the green tokens later.

Time series are trickier because the output is a continuous wave, not discrete words. To check for a watermark, a detector must first re-encode (invert) that continuous signal back into an internal representation. Previously, researchers mostly asked: "If someone edits a watermarked signal, can we still detect it?" They overlooked a dangerous flip side: "What happens when someone edits a non-watermarked signal?"

It turns out, existing detectors use globally coupled re-encoding—meaning every recovered unit depends on the entire time series. If an attacker crops or inserts a small snippet into a clean, unwatermarked signal, that local shockwave ripples across the entire representation. This causes bidirectional null drift: the baseline statistical score ($z$-score) of unwatermarked data shifts wildly in either direction, shattering detection thresholds and causing massive false-positive spikes.

Figure 1: Bidirectional drift of the null on non-watermarked samples (TimeWak [18], Stocks). Crop and insert push the recovered tokens (a) and the resulting z-score (b) in opposite directions, with insert crossing the clean-calibrated threshold and yielding an 85% false-positive rate.

Methods

To stop local edits from causing global chaos, the authors introduce two paired components: a new generative backbone (L-VQVAE) and a watermarking scheme (LVQMark).

  • L-VQVAE (Local Tokenization, Global Generation): Instead of encoding the whole time series at once, a local tokenizer slices the signal into short, overlapping sliding windows and maps each window to a discrete codebook token (Vector Quantization). Crucially, locality is only enforced during encoding. A global cross-attention decoder and an autoregressive (AR) transformer still look across long horizons to generate smooth, realistic time series.
  • LVQMark (Scheduled Watermark Injection): Adapting LLM red–green logit biasing to local time-series tokens introduces two quirks. First, overlapping windows often produce runs of identical tokens; a static green list would turn the whole run green or red by default. The authors fix this with an alternating partition that flips the green/red lists on even vs. odd steps. Second, early AR steps lack context and have flat probabilities, so a logit bias forces a repetitive, stereotyped startup sequence. An unbiased warm-up suppresses the watermark for the first three tokens to let the signal diversify naturally.
  • Robust Encoder: At detection time, a classifier-based robust encoder—trained on clean/attacked signal pairs—maps perturbed windows back to their original clean token IDs before running the green-list statistical test.
Overview of the L-VQVAE generative architecture and LVQMark injection and detection pipeline.

Datasets

The authors evaluate their approach on four standard multivariate time-series benchmarks (no new datasets are introduced), chosen to span diverse temporal dynamics and variable counts:

  • Stocks (finance)
  • ETTh (electricity transformer temperature)
  • Energy (appliance energy prediction)
  • fMRI (neuroimaging)

Key Insights and Ideas

  • False-positive control is a representation problem, not a statistics problem: Counting green tokens is mathematically sound, but if your encoder mixes global information, a 30% crop or insertion completely warps the null distribution. Bounding each token's receptive field physicallyquarantines the damage of local edits.
  • Zero empirical FPR can be a mirage: Under attack, some baseline detectors drift severely into negative $z$-scores (e.g., $-32.2$). While this technically yields a 0% false-positive rate, it proves the detector's statistical calibration is completely broken—it just happened to drift below the threshold rather than above it.
  • Attack-aware training fails without locality: You cannot just slap a robust, attack-trained encoder onto a globally coupled model (like SDformer). Without local tokenization providing a stable target per window, retraining on attacks yields erratic results and can even destroy clean detection.

Key Results

Evaluated under aggressive 30% post-editing attacks (offset, crop, and insertion):

  • Rock-solid calibration: Baseline diffusion watermarks (like Tree-Ring) suffer catastrophic null drift under cropping, hitting mean $z$-scores up to $+69.4$ and a 100% false-positive rate on unwatermarked data. LVQMark keeps non-watermarked mean $z$-scores tightly centered near zero ($[-0.25, +0.35]$), holding FPR $\le 0.01$ across all 12 dataset-attack pairs while achieving 100% True Positive Rate (TPR) in 11 of 12 cases.
  • State-of-the-art generation quality: L-VQVAE matches or beats top diffusion (DiffusionTS) and VQ (SDformer) baselines on Context-FID, Correlational, Discriminative, and Predictive scores.
  • Massive speedups: Because verification only requires one forward pass through a lightweight local encoder rather than iterative diffusion inversion, verification latency drops from 1,010 ms (TimeWak) to 0.72 ms—over 1,400x faster—while generation throughput jumps ~14x (from 350 to 4,922 samples/sec).

Limitations and Future Work

  • Low SNR vulnerability: While LVQMark handles global smoothing well, heavy additive Gaussian noise on noisy financial data (Stocks) obscures local patterns, causing watermark detection (TPR) to fail—though false positives remain safely near zero.
  • Multi-stage complexity: Training L-VQVAE and LVQMark requires several sequential steps (local pretraining, global decoder, AR transformer, and robust encoder), which is more involved than single-stage diffusion baselines.
  • Scope: Experiments are currently limited to four datasets and three sequence lengths; scaling to much longer time horizons and broader domains remains open for future work.

Summary updated

Abstract

Watermarking is a central tool for provenance in generative models, yet its application to multivariate time series remains hindered by reliability failures under post-editing attacks. We show that existing detectors, which rely on globally coupled re-encoding, suffer from bidirectional drift of the null distribution: post-editing attacks can shift the detection z-score of non-watermarked samples in either direction, invalidating clean-calibrated thresholds. We argue that this instability is a property of the re-encoding, and that reliable detection requires each recovered unit to depend only on a bounded temporal neighborhood. Guided by this principle, we propose L-VQVAE, a generative model in which each discrete token is produced from a short contiguous window, and LVQMark, a watermarking method over this token space that combines logit-bias injection with robust re-encoding for attack-time detection. Experiments on four benchmarks spanning finance, energy, and neuroimaging show that our approach preserves generation quality while stabilizing both detection power and false-positive behavior under post-editing attacks.
BibTeX
@inproceedings{kim2026locally,
  author = {Dongbin Kim and Geonwoo Shin and Yujin Choi and Soyeon Park and Jaewook Lee},
  title = {{A Locally Tokenized Generative Model for Robust Time-Series Watermarking}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=j0GmuP3V69},
}

Loading related content...

Figure