TRAINING OF LARGE NEURAL NETWORKS
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for training a neural network to perform any one or more of a variety of machine learning tasks. For example, the neural network can be configured as a generative neural network, e.g., an autoregressive generative neural network.
1 . A method performed by one or more computers, wherein the method comprises:
obtaining a first training input sequence that includes first tokens and a second training input sequence that includes second tokens;
generating a modified first training input sequence, comprising:
selecting a plurality of second tokens from the second tokens included in the second training input sequence;
determining a first canary position within the first training input sequence; and
inserting the selected plurality of second tokens into the first training input sequence at positions after the first canary position;
training a neural network including learning parameter values of the neural network by using a training dataset that comprises the modified first training input sequence;
after the training, using the trained neural network to generate, from a test input sequence that comprises a subset of the first tokens, one or more predicted continuations of the test input sequence, wherein each predicted continuation specifies a plurality of output tokens; and
determining an estimate of a degree to which the trained neural network memorizes data in the training dataset, comprising evaluating the plurality of output tokens specified by each predicted continuation against the selected plurality of second tokens included in the modified first training input sequence.
2 . The method of claim 1 , wherein the training dataset comprises the modified first training input sequence and a modified second training input sequence, the modified second training input sequence being generated by:
selecting a plurality of first tokens from the first tokens included in the first training input sequence;
determining a second canary position within the second training input sequence; and
inserting the selected plurality of first tokens into the second training input sequence at positions after the second canary position.
3 . The method of claim 1 , wherein each predicted continuation includes the plurality of output tokens, and wherein evaluating the plurality of output tokens against the selected plurality of second tokens comprises:
determining how many of the selected plurality of second tokens included in the modified first training input sequence are included in the plurality of output tokens.
4 . The method of claim 1 , wherein each predicted continuation defines, for each output token position, a corresponding probability distribution over a vocabulary of tokens, and wherein evaluating the plurality of output tokens against the selected plurality of second tokens comprises:
computing a likelihood assigned to at least a subset of the selected plurality of second tokens by the probability distributions for the output token positions.
5 . The method of claim 3 , further comprising:
determining that the estimate satisfies a threshold degree; and
in response, applying one or more adjustments to the training of the neural network to lower the estimate.
6 . The method of claim 5 , wherein determining that the estimate satisfies the threshold degree comprises:
determining that the plurality of output tokens includes more than a threshold number of the selected plurality of second tokens.
7 . The method of claim 5 , wherein determining that the estimate satisfies the threshold degree comprises:
determining that the likelihood satisfies a likelihood threshold.
8 . The method of claim 1 , wherein determining the first canary position within the first training input sequence comprises:
determining the first canary position based on positions of the selected plurality of second tokens within the second training input sequence.
9 . The method of claim 1 , wherein selecting the plurality of second tokens comprises:
selecting a predetermined number of second tokens that are adjacent to each other within the second training input sequence.
10 . The method of claim 1 , wherein the first training input sequence and the second training input sequence are both in a same natural language.
11 . The method of claim 1 , wherein the first training input sequence is in a first natural language and the second training input sequence is in a second natural language different from the first language.
12 . The method of claim 1 , wherein the training dataset comprises further comprises a modified third training input sequence, the modified third training input sequence being generated by:
obtaining a third training input sequence;
determining, from a plurality of levels of toxicity, a determined level of toxicity based on content represented by the third training input sequence;
prepending a particular toxicity token corresponding to the determined level of toxicity to the third training input sequence.
13 . The method of claim 12 , wherein the plurality of levels of toxicity comprise three or more levels of toxicity.
14 . The method of claim 12 , wherein prepending the particular toxicity token to the third training input sequence comprises:
determining whether to prepend the particular toxicity token to the third training input sequence based on a total number of training input sequences to which toxicity tokens have been prepended.
15 . The method of claim 12 , further comprising:
obtaining a context sequence that includes a plurality of input tokens;
generating, from the context sequence, a quality-controlled context sequence by adding to the context sequence a particular toxicity token selected from the plurality of toxicity tokens representing levels of toxicity of content represented by the output sequence; and
generating, by using the trained neural network, an output sequence based on processing the quality-controlled context sequence.
16 . The method of claim 15 , wherein the quality-controlled context sequence comprises the particular quality token followed by the plurality of input tokens.
17 . The method of claim 1 , wherein the neural network is a Transformer neural network that auto-regressively generates the output tokens.
18 . A system comprising one or more computers and one or more storage devices storing instructions that when executed by the one or more computers cause the one more computers to perform operations comprising:
obtaining a first training input sequence that includes first tokens and a second training input sequence that includes second tokens;
generating a modified first training input sequence, comprising:
selecting a plurality of second tokens from the second tokens included in the second training input sequence;
determining a first canary position within the first training input sequence; and
inserting the selected plurality of second tokens into the first training input sequence at positions after the first canary position;
training a neural network including learning parameter values of the neural network by using a training dataset that comprises the modified first training input sequence;
after the training, using the trained neural network to generate, from a test input sequence that comprises a subset of the first tokens, one or more predicted continuations of the test input sequence, wherein each predicted continuation specifies a plurality of output tokens; and
determining an estimate of a degree to which the trained neural network memorizes data in the training dataset, comprising evaluating the plurality of output tokens specified by each predicted continuation against the selected plurality of second tokens included in the modified first training input sequence.
19 . The system of claim 18 , wherein the training dataset comprises the modified first training input sequence and a modified second training input sequence, the modified second training input sequence being generated by:
selecting a plurality of first tokens from the first tokens included in the first training input sequence;
determining a second canary position within the second training input sequence; and
inserting the selected plurality of first tokens into the second training input sequence at positions after the second canary position.
20 . One or more computer storage media storing instructions that when executed by one or more computers cause the one more computers to perform operations comprising:
obtaining a first training input sequence that includes first tokens and a second training input sequence that includes second tokens;
generating a modified first training input sequence, comprising:
selecting a plurality of second tokens from the second tokens included in the second training input sequence;
determining a first canary position within the first training input sequence; and
inserting the selected plurality of second tokens into the first training input sequence at positions after the first canary position;
training a neural network including learning parameter values of the neural network by using a training dataset that comprises the modified first training input sequence;
after the training, using the trained neural network to generate, from a test input sequence that comprises a subset of the first tokens, one or more predicted continuations of the test input sequence, wherein each predicted continuation specifies a plurality of output tokens; and
determining an estimate of a degree to which the trained neural network memorizes data in the training dataset, comprising evaluating the plurality of output tokens specified by each predicted continuation against the selected plurality of second tokens included in the modified first training input sequence.