Collaborative watermarking of generated content
A system may receive a content request, and generate a set of tokens based on the content request. The system may transmit the set of tokens to a model deployer, and receive a mask in response. The system may then generate a second mask. The system may combine the model deployer mask and the second mask to generate a combined mask. The system may obtain a next token as part of a response, the next token selected based in part on an output of a machine learning model in response to the set of tokens and the combined mask being provided as input to the machine learning model. The system may add the next token to the set of tokens to generate an updated set of tokens; and transmit the updated set of tokens to satisfy the content request.
1 . A system comprising:
a computer-readable memory comprising a content generation model; and
one or more processors in communication with the memory, wherein computer-executable instructions, when executed by the one or more processors, causes the one or more processors to at least:
generate a key value;
receive a content request;
generate a set of tokens based on the content request using a first machine learning model configured to tokenize input text;
transmit the set of tokens to a model deployer;
receive a first vocabulary mask from the model deployer in response to transmission of the set of tokens;
generate a second vocabulary mask based in part on a vocabulary, the key value, and the set of tokens;
combine the first vocabulary mask and second vocabulary mask to generate a combined vocabulary mask;
obtain a next token based in part on an output of a second machine learning model generated in response to the set of tokens and the combined vocabulary mask being provided as input to the second machine learning model;
add the next token to the set of tokens to generate an updated set of tokens; and
transmit the updated set of tokens to satisfy the content request.
2 . The system of claim 1 , wherein the computer-executable instructions, when executed, further cause the one or more processors to:
transmit a bias value to the model deployer; and
generate the first vocabulary mask based in part on the bias value.
3 . The system of claim 1 , wherein the computer-executable instructions, when executed, further cause the one or more processors to:
transmit a list fraction value to the model deployer; and
generate the first vocabulary mask based in part on the list fraction value.
4 . The system of claim 1 , wherein the first machine learning model is a first large language model, and wherein the second machine learning model is a second large language model.
5 . The system of claim 1 , wherein the second vocabulary mask is generated based in part on a pseudorandom value, and wherein the computer-executable instructions, when executed, further cause the one or more processors to:
generate the pseudorandom value based on a pseudorandom function that accepts, as input, the key value and the set of tokens.
6 . A method comprising:
receiving a content request from a requesting system;
transmitting the content request to a model creator;
receiving a set of tokens from the model creator;
generating a vocabulary mask based in part on a key value and the set of tokens;
transmitting the vocabulary mask to the model creator;
receiving an updated set of tokens;
determining that the updated set of tokens represent a complete response; and
in response to determining that the updated set of tokens represent a complete response, transmitting the updated set of tokens to the requesting system.
7 . The method of claim 6 , further comprising receiving a vocabulary from the model creator, and wherein the vocabulary mask is generated based in part on the vocabulary.
8 . The method of claim 6 further comprising:
receiving a bias value from the model creator; and
receiving a list fraction value from the model creator,
wherein the vocabulary mask is generated based in part on the bias value and the list fraction value.
9 . The method of claim 6 , wherein the set of tokens is received from the model creator in response to transmitting the content request.
10 . The method of claim 6 , further comprising:
transmitting the set of tokens to a model modifier;
receiving a second vocabulary mask from the model modifier;
combining the vocabulary mask and the second vocabulary mask to generate a combined vocabulary mask; and
transmitting the combined vocabulary mask to the model creator.
11 . The method of claim 6 , further comprising:
transmitting the set of tokens to a model modifier;
in response to transmitting the set of tokens, receiving a second vocabulary mask from the model modifier; and
transmitting the second vocabulary mask to the model creator.
12 . The method of claim 6 , further comprising:
in response to determining the updated set of tokens do not represent a complete response, generating a second vocabulary mask based in part on the key value and the updated set of tokens;
transmitting the second vocabulary mask to the model creator;
receiving a second updated set of tokens;
determining the second updated set of tokens represents a complete response;
formatting a response based in part on the second updated set of tokens; and
transmitting the response to the requesting system.
13 . The method of claim 6 , further comprising:
transmitting a key request to a secure storage location under control of a model deployer; and
receiving the key value from the secure storage location in response to the key request.
14 . The method of claim 6 , wherein generating the vocabulary mask comprises:
generating a first list comprising a first plurality of tokens of a vocabulary, wherein the vocabulary is used by a machine learning model of the model creator to generate content responsive to the content request; wherein each token of the first list is associated with a first bias value, and wherein the first bias value indicates an increase in a likelihood a token of the first list will be selected as the next token by a machine learning model; and
generating a second list comprising a second plurality of tokens of the vocabulary, wherein the second plurality of tokens is different from the first plurality of tokens, wherein each token of the second list is associated with a second bias value, and wherein the second bias value indicates a decrease in the likelihood a token of the second list will be selected as the next token by the machine learning model.
15 . A non-transitory machine-readable storage medium encoded with instructions executable by a processor of a computing device, wherein the instructions, when executed by the processor, cause the computing device to at least:
receive a content request;
transmit the content request to a model creator;
receive a set of tokens from the model creator;
receive a model creator vocabulary mask from the model creator;
generate a vocabulary mask based in part on a key value and the set of tokens;
generate a combined vocabulary mask based in part on the vocabulary mask and the model creator vocabulary mask;
transmit the combined vocabulary mask to the model creator;
receive an updated set of tokens;
determine that the updated set of tokens represent a complete response; and
transmit the updated set of tokens to satisfy the content request.
16 . The non-transitory machine-readable storage medium of claim 15 , wherein the instructions, when executed, further cause the computing device to:
receive a first size from the model creator;
receive a second size from the model creator;
receive a first bias value from the model creator;
receive a second bias value from the model creator;
generate a first list of the first size comprising a first plurality of tokens of a vocabulary, wherein each token of the first list is associated with the first bias value, and wherein the first bias value indicates an increase in a likelihood a token of the first list will be selected as a next token by a machine learning model of the model creator used to generate content responsive to the content request; and
generate a second list of the second size comprising a second plurality of tokens of the vocabulary, wherein the second plurality of tokens is different from the first plurality of tokens, wherein each token of the second list is associated with the second bias value, and wherein the second bias value indicates a decrease in the likelihood a token of the second list will be selected as the next token by the machine learning model, and
wherein the vocabulary mask is generated based in part on the first list and the second list.
17 . The non-transitory machine-readable storage medium of claim 16 , wherein the first size is equal to the second size, and wherein the first bias value is equal to the second bias value.
18 . The non-transitory machine-readable storage medium of claim 16 , wherein the model creator vocabulary mask comprises a model creator first list of the first size, and a model creator second list of the second size.
19 . The non-transitory machine-readable storage medium of claim 15 , wherein the content request is received from a requesting system, and wherein the requesting system is at least one of: a model modifier, or a model deployer.
20 . The non-transitory machine-readable storage medium of claim 15 , wherein the set of tokens are generated by a machine learning model of the model creator, and wherein the machine learning model is a large language model.