Filigranes robustes sans distorsion pour les modèles de langage
Robust Distortion-free Watermarks for Language Models
July 28, 2023
Auteurs: Rohith Kuditipudi, John Thickstun, Tatsunori Hashimoto, Percy Liang
cs.AI
Résumé
Nous proposons une méthodologie pour insérer des filigranes dans le texte généré par un modèle de langage autorégressif, qui sont robustes aux perturbations sans altérer la distribution du texte jusqu'à un budget de génération maximal donné. Nous générons du texte filigrané en associant une séquence de nombres aléatoires -- calculée à l'aide d'une clé de filigrane randomisée -- à un échantillon issu du modèle de langage. Pour détecter le texte filigrané, toute partie connaissant la clé peut aligner le texte avec la séquence de nombres aléatoires. Nous concrétisons notre méthodologie de filigrane avec deux schémas d'échantillonnage : l'échantillonnage par transformation inverse et l'échantillonnage exponentiel minimum. Nous appliquons ces filigranes à trois modèles de langage -- OPT-1.3B, LLaMA-7B et Alpaca-7B -- pour valider expérimentalement leur puissance statistique et leur robustesse face à diverses attaques de paraphrase. Notamment, pour les modèles OPT-1.3B et LLaMA-7B, nous constatons que nous pouvons détecter de manière fiable le texte filigrané (p ≤ 0,01) à partir de 35 tokens, même après avoir corrompu entre 40 et 50 % des tokens par des modifications aléatoires (c'est-à-dire des substitutions, insertions ou suppressions). Pour le modèle Alpaca-7B, nous menons une étude de cas sur la faisabilité du filigranage des réponses à des instructions utilisateur typiques. En raison de l'entropie plus faible des réponses, la détection est plus difficile : environ 25 % des réponses -- dont la longueur médiane est d'environ 100 tokens -- sont détectables avec p ≤ 0,01, et le filigrane est également moins robuste à certaines attaques de paraphrase automatisées que nous avons implémentées.
English
We propose a methodology for planting watermarks in text from an
autoregressive language model that are robust to perturbations without changing
the distribution over text up to a certain maximum generation budget. We
generate watermarked text by mapping a sequence of random numbers -- which we
compute using a randomized watermark key -- to a sample from the language
model. To detect watermarked text, any party who knows the key can align the
text to the random number sequence. We instantiate our watermark methodology
with two sampling schemes: inverse transform sampling and exponential minimum
sampling. We apply these watermarks to three language models -- OPT-1.3B,
LLaMA-7B and Alpaca-7B -- to experimentally validate their statistical power
and robustness to various paraphrasing attacks. Notably, for both the OPT-1.3B
and LLaMA-7B models, we find we can reliably detect watermarked text (p leq
0.01) from 35 tokens even after corrupting between 40-50\% of the tokens
via random edits (i.e., substitutions, insertions or deletions). For the
Alpaca-7B model, we conduct a case study on the feasibility of watermarking
responses to typical user instructions. Due to the lower entropy of the
responses, detection is more difficult: around 25% of the responses -- whose
median length is around 100 tokens -- are detectable with p leq 0.01, and
the watermark is also less robust to certain automated paraphrasing attacks we
implement.