arXiv ScienceSearch

arXiv · 2404.01245

A Statistical Framework of Watermarks for Large Language Models: Pivot, Detection Efficiency and Optimal Rules

Abstract

Since ChatGPT was introduced in November 2022, embedding (nearly) unnoticeable statistical signals into text generated by large language models (LLMs), also known as watermarking, has been used as a principled approach to provable detection of LLM-generated text from its human-written counterpart. In this paper, we introduce a general and flexible framework for reasoning about the statistical efficiency of watermarks and designing powerful detection rules. Inspired by the hypothesis testing formulation of watermark detection, our framework starts by selecting a pivotal statistic of the text and a secret key -- provided by the LLM to the verifier -- to enable controlling the false positive rate (the error of mistakenly detecting human-written text as LLM-generated). Next, this framework allows one to evaluate the power of watermark detection rules by obtaining a closed-form expression of the asymptotic false negative rate (the error of incorrectly classifying LLM-generated text as human-written). Our framework further reduces the problem of determining the optimal detection rule to solving a minimax optimization program. We apply this framework to two representative watermarks -- one of which has been internally implemented at OpenAI -- and obtain several findings that can be instrumental in guiding the practice of implementing watermarks. In particular, we derive optimal detection rules for these watermarks under our framework. These theoretically derived detection rules are demonstrated to be competitive and sometimes enjoy a higher power than existing detection approaches through numerical experiments.

Explore related subjects

Keep this discovery

BibTeXRIS

Xiang Li, Feng Ruan, Huiyuan Wang, Qi Long, Weijie J. Su. 2024-04-01. A Statistical Framework of Watermarks for Large Language Models: Pivot, Detection Efficiency and Optimal Rules. https://doi.org/10.1214/24-aos2468

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

A Scale Invariance Property of PCA

The PCA algorithm is sensitive to changes in measurement scale. Measuring one variable of a system in inches rather than centimeters, say, alters both its principal axes and principal eigenvalues. Although this scale dependence is generally complicated, we show here that it nevertheless obeys a strict invariance property: under a continuous scale adjustment, the initial state's $k$-th largest principal component (ordered by eigenvalue) continuously evolves into the final state's $k$-th largest principal component, for each $k$. In this sense, we can say that the modes of PCA are "order-stable" with respect to changes in measurement scale. A special case occurs when scaling along directions that are orthogonal to some modes. Here, apparent eigenvalue crossings can occur. However, we show that we can interpret these apparent crossings as cases where the modes instantaneously swap their orientation, in this way maintaining the required order stability.

math.ST

Small noise asymptotics for linear parabolic SPDEs in two space dimensions with unknown damping factors

We study parametric estimation for second order linear parabolic stochastic partial differential equations in two space dimensions with a small volatility parameter driven by a $Q$-Wiener process with an unknown damping parameter using high frequency spatio-temporal data. We first provide an estimator for the damping parameter of the $Q$-Wiener process utilizing realized quadratic variations based on spatial and temporal increments. We next propose minimum contrast estimators of the diffusive and advective parameters in the SPDE using a contrast function with the proposed estimator of the damping parameter. We then construct a quasi-maximum likelihood estimator of the reaction parameter in the SPDE using the approximate coordinate process derived from the estimators of the diffusive and advective parameters. We also provide simulation results of the proposed estimators.

math.ST

Spike Estimation from Heteroscedastic Noise via Random Splitting

In this paper, we consider a spiked Wigner type matrix with a heteroscedastic and unknown variance profile. It is well known that in the supercritical regime of the BBP transition, strong spikes can create outliers in the spectrum. Unfortunately, in the heteroscedastic case, in general it is not possible to estimate the spike strength from these observed outlier consistently, as the latter is a solution to a Dyson equation with unknown parameters from the variance profile. In this paper, inspired by the work on sparse matrix completion \citep{BordenaveCosteNadakuditi2023}, we introduce an asymmetrized model by randomly splitting the spiked matrix into two parts, which transforms the noisy Wigner type matrix into a non Hermitian random matrix, while preserving the Hermitian spikes at the cost of a dilution. We establish a BBP type transition for the asymmetrized model, from which we can estimate the strength of the spikes precisely, even without knowing the variance profile of the noise part. We then further apply our approach to study the correlation between two correlated spiked models, where the spike/signal parts of the two models are correlated, and the noise parts are independent but may both be heteroscedastic. By applying our asymmetrization approach to the two models separately and also jointly, we are able to obtain a precise estimate of the correlation between the signal parts of the two models.

math.ST