Synthetic time series generated by diffusion models enable sharing privacy-sensitive datasets, such as patients' functional MRI records. Key criteria for synthetic data include high data utility and traceability to verify the data source. Recent watermarking methods embed in homogeneous latent spaces, but state-of-the-art time series generators operate in data space, making latent-based watermarking incompatible. This creates the challenge of watermarking directly in data space while handling feature heterogeneity and temporal dependencies. We propose TimeWak, the first watermarking algorithm for multivariate time series diffusion models. To handle temporal dependence and spatial heterogeneity, TimeWak embeds a temporal chained-hashing watermark directly within the temporal-feature data space. The other unique feature is the
First, we assign random seeds at the beginning of each interval. 1 Temporally chained-hashing. A, B, and C (pink) show seeds being copied from the previous step and the feature order shuffled. 2 Shuffling the seeds for each series. Positional indices are highlighted in green. 3 Constructing an initial Gaussian noise. 4 Generating multivariate time series. 5 Reversing the diffusion process. 6 Recovering the watermark seed. 7 Unshuffling the seeds in the opposite way they were shuffled. 8 Bit accuracy between the hash and recovered seed.
Clone and Install
git clone https://github.com/soizhiwen/TimeWak.git
cd TimeWak/
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtDownload Models and Datasets
python download.pyFull Experiment
bash run.shSingle Experiment
Modify the configurations in run.sh, e.g.:
CONFIGS=("stocks")
METHODS=("timewak")
WINDOW_SIZES=(24)
ATTACKS=("offset")
OFFSET_FACTORS=(0.3)Evaluation
- Context-FID and Correlational scores: Experiments/metric_pytorch.ipynb
- Discriminative and Predictive scores: Experiments/metric_tensorflow.ipynb
- Z-score and TPR@0.1%FPR: Experiments/metric_detection.ipynb
- MDD, ACD, SD and KD: Experiments/metric_ts.ipynb
@inproceedings{soi2025timewak,
title = {TimeWak: Temporal Chained-Hashing Watermark for Time Series Data},
author = {Zhi Wen Soi and Chaoyi Zhu and Fouad Abiad and Aditya Shankar and Jeroen M. Galjaard and Huijuan Wang and Lydia Y. Chen},
booktitle = {NeurIPS},
year = {2025},
}