Watermarking Generative Categorical Data

Bochao Gu, Hengzhi He, Guang ChengarXiv 2024

Abstract

In this paper, we propose a novel statistical framework for watermarking generative categorical data. Our method systematically embeds pre-agreed secret signals by splitting the data distribution into two components and modifying one distribution based on a deterministic relationship with the other, ensuring the watermark is embedded at the distribution-level. To verify the watermark, we introduce an insertion inverse algorithm and detect its presence by measuring the total variation distance between the inverse-decoded data and the original distribution. Unlike previous categorical watermarking methods, which primarily focus on embedding watermarks into a given dataset, our approach operates at the distribution-level, allowing for verification from a statistical distributional perspective. This makes it particularly well-suited for the modern paradigm of synthetic data generation, where the underlying data distribution, rather than specific data points, is of primary importance. The effectiveness of our method is demonstrated through both theoretical analysis and empirical validation.

Introduction

The proliferation of generative models for tabular data, such as CTGAN and TabSyn, has enabled the creation of high-fidelity synthetic datasets for sensitive domains like finance and healthcare. However, this progress introduces significant challenges regarding data provenance and the identification of AI-generated content. Traditional watermarking techniques for categorical data often rely on static properties, such as row ordering or primary key bit manipulation. These methods are inherently fragile when faced with generative AI, as these models learn and reproduce the underlying statistical distribution rather than copying specific data points. Consequently, watermarks embedded at the record level are often "learned away" or lost during the sampling process.

To address this, we propose a distribution-level watermarking framework. By embedding a "fingerprint" into the statistical structure of the data, we ensure that the watermark persists even after the data has been processed by a generative model and new samples are produced.

Methodology: Distribution-Level Watermarking

Our approach shifts the focus from individual data points to the conditional probability distribution of the data. The framework consists of two primary components: the Inserter and the Inverse Algorithm.

The Inserter (Embedding)

The embedding process begins by partitioning the dataset features into two groups, $X$ and $Y$. We utilize a one-way cryptographic hash function (e.g., SHA-1) combined with a secret key to establish a deterministic "target" category for $Y$ based on a subset of $X$. For a small fraction of the data, denoted by the parameter $p_w$, the value of $Y$ is modified to match this hash-generated target. This creates a subtle, deterministic link between $X$ and $Y$ that is statistically detectable but appears as random noise to those without the secret key.

Uniform distribution of hash results across 10 categories, ensuring the watermark signal is indistinguishable from noise without the secret key.

The Inverse Algorithm (Detection)

To verify the presence of a watermark in a suspicious dataset, the data owner employs an insertion inverse algorithm. This algorithm uses the secret key to "undo" the perturbations, attempting to recover the original distribution ($D_{inv}$). Detection is then framed as a hypothesis test, where we calculate the Total Variation (TV) distance between the recovered distribution and the known original distribution. A significantly small distance (resulting in a low p-value) confirms the dataset is an illicit copy.

Experimental Validation

We evaluated our method using both simulated categorical datasets and state-of-the-art generative models. Simulations allowed for precise control over category counts and feature dependencies. Furthermore, we validated the framework against TabSyn, a leading tabular data synthesizer, to demonstrate that the watermark survives the generative training and sampling process.

Key Results and Discussion

The core innovation of this work is the realization that for generative models, a watermark must be a statistical property. By embedding the signal into the relationship between feature groups, the generative model treats the watermark as a pattern to be learned and reproduced.

Empirical results demonstrate high detection accuracy. As shown in the simulation results below, the detector achieved p-values of zero even with a low perturbation level ($p_w = 0.05$). The Total Variation distance ($d_{TV}$) remains consistently low, indicating successful recovery of the original distribution through the inverse algorithm.

Simulation results demonstrating near-zero p-values and low Total Variation distance across various perturbation levels ($p_w$).

The method also proved robust against "replacement attacks," where an attacker attempts to obscure the watermark by replacing rows with random noise. The watermark remained detectable for over 100 rounds of such attacks, highlighting its resilience.

Conclusion and Future Work

We have presented a robust framework for watermarking generative categorical data at the distribution level. While effective, the method's performance depends on the stability of the relationship between the chosen feature groups $X$ and $Y$. Future research will focus on extending this framework to high-dimensional spaces and mixed-type datasets containing both continuous and categorical variables.

Summary updated

BibTeX
@misc{gu2024watermarking,
  author = {Bochao Gu and Hengzhi He and Guang Cheng},
  title = {{Watermarking Generative Categorical Data}},
  year = {2024},
  eprint = {2411.10898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.10898},
}
Figure