The present disclosure relates generally to the control of machine-learned models. More particularly, the present disclosure relates to constructing prompting inputs for machine-learned models. The present disclosure also relates generally to improved objectives for pretraining machine-learned models to respond to such prompting inputs.
The training of machine-learned models can be completed in stages. A model can be pre-trained for general release and, optionally, subsequently fine-tuned for specific tasks. Pre-training can include pursuit of unsupervised objectives across unlabeled training datasets, often followed by supervised learning on smaller, labeled datasets in the fine-tuning stage. In other cases, pre-trained models can be directly applied to a particular task without fine-tuning.
Once trained, machine-learned models can provide various functionality or perform various tasks. Trained models can be further instructed to perform particular tasks by providing inputs to the model with rich context that prompts the model to behave in a desired fashion.
Aspects and advantages of embodiments of the present disclosure will be set forth in part in the following description, or can be learned from the description, or can be learned through practice of the embodiments.
In one example aspect, example embodiments of the present disclosure provide for an example computer-implemented method for improved prompting of a machine-learned model. The example method includes obtaining, by a computing system including one or more processors, an instructive sequence descriptive of an instructive query, an instructive response, and an instructive trace of intermediate states from the instructive query to the instructive response. The example method includes inputting, by the computing system and to a machine-learned model, the instructive sequence and an operative query, wherein the machine-learned model is configured to process the operative query with attention over the instructive sequence. The example method includes generating, by the computing system, using the machine-learned model and responsive to the operative query, an operative response.
In one example aspect, example embodiments of the present disclosure provide for one or more example memory devices storing computer-readable instructions for improved prompting of a machine-learned model, the instructions executable to cause one or more processors to perform example operations. The example operations include obtaining an instructive sequence descriptive of an instructive query, an instructive response, and an instructive trace of intermediate states from the instructive query to the instructive response. The example operations include inputting, to a machine-learned model, the instructive sequence and an operative query, wherein the machine-learned model is configured to process the operative query with attention over the instructive sequence. The example operations include generating, using the machine-learned model, a plurality of operative responses. The example operations include determining a consistency metric based on a sample of the plurality of operative responses. The example operations include determining an operative response based on the consistency metric.
In one example aspect, example embodiments of the present disclosure provide for an example computing system for improved prompting of a machine-learned model. The example system includes one or more processors and one or more memory devices storing computer-readable instructions executable to cause the one or more processors to perform example operations. In the example system, the example operations include obtaining an instructive sequence descriptive of an instructive query, an instructive response, and an instructive trace of intermediate states from the instructive query to the instructive response. In the example system, the example operations include inputting, to a machine-learned model, the instructive sequence and an operative query, wherein the machine-learned model is configured to process the operative query with attention over the instructive sequence. In the example system, the example operations include generating, using the machine-learned model, a plurality of operative responses. In the example system, the example operations include determining a consistency metric based on a sample of the plurality of operative responses. In the example system, the example operations include determining an operative response based on the consistency metric.
Another example aspect of the present disclosure is directed to an example computer-implemented method for pretraining a machine-learned model with diversified objectives. The example method can include obtaining a plurality of different combinations of configuration parameters of a pretraining objective framework. The example method can include generating, using the pretraining objective framework, a plurality of corrupted training examples from one or more training examples. The plurality of corrupted training examples can be respectively generated according to the plurality of different combinations of configuration parameters. The example method can include inputting the plurality of corrupted training examples into the machine-learned model. The machine-learned model can be configured to generate uncorrupted subportions corresponding to corrupted subportions of the corrupted training examples. The example method can include obtaining, from the machine-learned model, a plurality of outputs respectively generated by the machine-learned model based on the plurality of corrupted training examples. The example method can include updating one or more parameters of the machine-learned model based on an evaluation of the plurality of outputs.
In another aspect, example embodiments of the present disclosure provide an example non-transitory, computer-readable medium storing instructions that are executable to cause one or more processors to perform example operations. The example operations can include obtaining a plurality of different combinations of configuration parameters of a pretraining objective framework. The example operations can include generating, using the pretraining objective framework, a plurality of corrupted training examples from one or more training examples. The plurality of corrupted training examples can be respectively generated according to the plurality of different combinations of configuration parameters. The example operations can include inputting the plurality of corrupted training examples into the machine-learned model. The machine-learned model can be configured to generate uncorrupted subportions corresponding to corrupted subportions of the corrupted training examples. The example operations can include obtaining, from the machine-learned model, a plurality of outputs respectively generated by the machine-learned model based on the plurality of corrupted training examples. The example operations can include updating one or more parameters of the machine-learned model based on an evaluation of the plurality of outputs.
In another aspect, example embodiments of the present disclosure provide an example system including one or more processors and the example non-transitory, computer-readable medium.
Other aspects of the present disclosure are directed to various systems, apparatuses, non-transitory computer-readable media, user interfaces, and electronic devices.
These and other features, aspects, and advantages of various embodiments of the present disclosure will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate example embodiments of the present disclosure and, together with the description, serve to explain the related principles.
Detailed discussion of embodiments directed to one of ordinary skill in the art is set forth in the specification, which makes reference to the appended figures, in which:
Reference numerals that are repeated across plural figures are intended to identify the same features in various implementations.
Generally, the present disclosure is directed to improved techniques for prompting machine-learned models to perform various tasks. Example embodiments of the present disclosure relate to prompting a machine-learned model using a “chain of thought” that traces the reasoning used to generate an output responsive to a given input. For example, a machine-learned model can be trained (e.g., in pre-training, fine tuning, etc.) to learn relationships between inputs. For instance, a machine-learned model can be trained to learn relationships between terms in an input query. Prompting a machine-learned model can include providing an instructive input query and an instructive output response before an operative query of interest. By also providing an instructive trace explaining the sequence of reasoning steps or logical states between the instructive input query and the instructive output response, example prompts according to aspects of the present disclosure can better leverage the network of learned associations to communicate more instructive context with a given prompt. In some implementations, the machine-learned model used to process the chain of thought prompt can have been pre-trained on a plurality of diversified objectives. Pre-training the model in such fashion may improve the ability of the model to process the chain of thought prompt (e.g., even when the model has a relatively smaller number of parameters).
For example, traditional model input structures can be suitable for some tasks. For instance, scaling up the size of language models has led to improvements in performance and sample efficiency. For instance, language models at the scale of 100B or more parameters have achieved strong performance on natural language processing tasks such as sentiment analysis and topic classification, even in few-shot and zero-shot settings.
However, on other tasks, even large models can struggle using traditional input and control techniques. For instance, using traditional input and control techniques, even large language models can struggle with tasks that involve slow and deliberate thinking (e.g., “system-2 tasks,” tasks with multiple steps, etc.), and includes logical, mathematical, and commonsense reasoning tasks, among others. This difficulty can arise even when models are scaled into the hundreds of billions of parameters. For example, a pre-trained GPT-3 model can struggle to perform few-shot addition on numbers with greater than three digits. Similarly, existing large-scale language model implementations can struggle to predict the result of executing Python code, even code which is a solution to a programming task the model is generally able to solve. And standard recurrent and graph neural network implementations can fail to systematically generalize when predicting the output of simple programs with loops.
Advantageously, example techniques of the present disclosure can enable machine-learned models to decompose a posed query or problem into intermediate steps that are solved individually. In some examples, this technique enables the model to resolve the intermediate steps instead of solving an entire multi-hop problem in a single forward pass, proving capacity to focus the model's processing power on more challenging intermediate steps instead of spreading the compute resources thin over all steps at once. Examples of this technique enable the model to resolve the intermediate steps in concert with resolution of the desired output value, leveraging the richer context of the reasoning trace to guide and refine the desired output value.
For example, in some embodiments, machine-learned models can be instructed to generate such chains of thought as intermediate traces. For example, single-shot or few-shot prompting using a number of instructive examples can provide a pattern that the model can understand and follow. In some examples, including an instructive trace with the instructive examples enables the model to generate its own trace when processing a query.
In some embodiments, a machine-learned model can output a single query response and trace thereof. In some embodiments, a machine-learned model can output a plurality of responses (and corresponding traces). The plurality of responses can be leveraged to determine a consistency metric. For instance, a consistency metric can be evaluated across a sampling of diverse traces (e.g., representing diverse approaches to resolving the query) and corresponding responses. For example, a set of outputs with diverse reasoning strategies can be polled to obtain a majority or plurality “vote” on the ultimate answer. In this manner, the model output can self-corroborate its “rationale” to improve the robustness of model output and improve accuracy of the ultimate answers. Compared to some prior decoding methods, a self-consistency technique according to the present disclosure can avoid the repetitiveness that can affect greedy sampling, while mitigating the stochasticity of a single random generation. Compared to prior generate-then re-rank approaches, self-consistency can avoid using a specially-trained re-ranker and can have a faster runtime (e.g., given the same number of decodes).
In some embodiments, a chain of thought can span multiple queries processed by the machine-learned model. For instance, a target query may include a complex or multi-part question. The target query can be broken down or reduced into one or more query components (e.g., using prompting or other methods, using the same or a different model, etc.). The query components can then be recursively processed by the model. For instance, a first query component can be processed in view of an initial instructive sequence (e.g., a chain-of-thought prompt as described herein, etc.). In some embodiments, each successive query component can be processed in view of prior query components and responses thereto. For instance, in this manner, the machine-learned model can self-construct an updated instructive sequence with each recursion to leverage its own prior work to build toward an ultimate response to the target query.
Example embodiments of input data structures according to aspects of the present disclosure can provide for a number of technical effects and benefits. In some embodiments, causing a machine-learned model to generate a chain of thought according to aspects of the present disclosure can provide an interpretable window into the behavior of the model, suggesting how it might have arrived at a particular answer and providing opportunities to debug where the reasoning path went wrong. Input data structures configured according to example embodiments of the present disclosure can unlock previously unrealized capabilities to understand, audit, debug, and improve the functionality of computing devices executing machine-learned models.
In some embodiments, input data structures configured according to example embodiments of the present disclosure can enable machine-learned models to be used for cross-domain tasks. For instance, a machine-learned model trained on a textual corpus may contain weights which encode a number of semantic associations between concepts. Using an input data structure configured according to the present disclosure, such a model can provide utility in resolving queries for any problem that can be formulated in a textual expression, even if the model was not trained to perform such a problem type (e.g., mathematical problems, symbolic manipulation more generally, etc.). In this manner, for example, the presently disclosed input data structures unlock the full computational power of machine-learned models to solve new problems outside of a training domain.
In some embodiments, input data structures configured according to example embodiments of the present disclosure can provide for an improved human-machine interface for inputting and processing queries. For instance, in the context of machine-learned language models, input data structures according to the present disclosure enable a user to control the model to perform complex calculations or other reasoning tasks by inputting only simple instructive strings. In this manner, the technological power of complex machine-learned language models can be made more accessible to non-technical users who may lack requisite training or other resources to, for example, fine-tune a multibillion-parameter model to perform a particular task. By improving the interface for such models, example embodiments of the present disclosure improve the capabilities of computing devices executing the models in such implementations by providing for new pathways of interaction with the models.
In some embodiments, input data structures configured according to example embodiments of the present disclosure can provide for decreased usage of computing resources to adapt a model to a given task. For instance, traditional approaches to instructing a machine-learned model to perform a given task include updating model parameter(s) based on an objective evaluated over some training input. Such an update procedure can be extremely resource intensive (e.g., computational resources, electrical resources, etc.) and may be cost-prohibitive (e.g., energy cost, time cost, etc.). In contrast, input data structures according to the present disclosure can provide for adaptation of large models (e.g., billions of parameters, trillions of parameters, etc.) without necessarily requiring additional training. For instance, input data structures according to the present disclosure can provide for improvements in model performance with just one or more instructive examples and instructive traces.
Example aspects of the present disclosure also provide systems and methods for pretraining machine learned models for diverse downstream tasks. In some embodiments, systems and methods of the present disclosure leverage a plurality of pretraining objectives to simulate diverse implementations. In some embodiments, the pretraining objectives can be based on a pretraining objective framework that provides for efficient construction of a diverse set of pretraining objectives by adjusting parameters of the common framework. In some implementations, a model trained using the pre-diverse training objectives can provide improved performance when used to process chain of thought prompts, as described herein. For example, a model with a relatively smaller number of parameters may still be able to perform high quality processing of chain of thought prompts if trained using the diversified objectives described herein.
A plurality of pretraining objectives can be configured based on a shared pretraining objective framework. For instance, a denoising objective framework can correspond to corrupting one or more selected subportion(s) of a training example (e.g., “noising”) and subsequently predicting/recovering the selected subportion(s) based on a remainder of the training example, such that the original training example can be reconstructed (e.g., “denoising”). A diverse plurality of pretraining objectives can be obtained by adjusting one or more configuration parameters of the shared pretraining objective framework. For example, the one or more configuration parameters can characterize a quantity of the selected subportion(s), a size of the selected subportion(s), a rate at which the selected subportion(s) are corrupted, etc.
Advantageously, systems and methods according to example aspects of the present disclosure can provide for a unified approach to model selection, development, and implementation. For example, in some embodiments, a machine-learned model can be configured for processing sequential information (e.g., language strings, genetic sequencing, other sequenced data). For instance, the model can be configured to understand, generate, respond to, or otherwise interact with sequences of data. Pretraining a model according to example embodiments of the present disclosure can provide a “universal” model effective to perform a variety of different downstream tasks with respect to sequenced data (e.g., the same or different sequenced data), optionally with or without subsequent fine-tuning.
Traditional techniques, in contrast, point to model selection based on the downstream tasks. The plethora of distinct model arrangements, architectures, training recipes, training datasets, etc. can be overwhelming, leading to uninformed choices or otherwise suboptimal model implementations. Furthermore, even if a model may be appropriately selected for a given task, that model may need to be reconfigured or even replaced if the tasks or other requirements change. For example, traditional approaches to processing sequenced data have often relied on different categories of pretraining approaches. For instance, in the context of natural language processing, one prior approach includes pretraining with a language-modeling objective which unidirectionally generates sequences of text based on preceding textual content. Another approach includes pretraining with a masked language objective which identifies masked text based on surrounding text (e.g., bidirectionally). But these pretraining objectives have generally proved inadequate for diverse implementations: for example, open-text generation and prompt-based learning can be an unfavorable setting for traditional masked language objectives, whereas traditional language modeling approaches can be unduly inhibited by purely unidirectional causality.
Therefore, systems and methods according to example aspects of the present disclosure can provide a number of technical effects and advantages over prior approaches. For instance, a unified approach according to example aspects of the present disclosure can provide for implementation of a small number models (e.g., one model) in place of many models (e.g., multiple models). This can decrease the computational complexity of deploying the models, training the models, updating the models, deactivating the models, etc. In this manner, for instance, decreased computational resources can be used to perform model operations with the unified techniques disclosed herein. Decreased storage can be used to store a small number of models (e.g., one model) in place of many models (e.g., multiple models). Decreased network transmissions can be used to implement a small number of models (e.g., one model) in place of many models (e.g., multiple models) on one or more remote device(s) (e.g., client devices connected to a server device). Efficiency of update and patch cycles can be improved by devoting resources (e.g., computational resources, human resources, etc.) to managing and versioning a small number of models (e.g., one model) in place of many models (e.g., multiple models). By using a model trained with a diversified pretraining approach according to example aspects of the present disclosure, a target performance can be achieved with less computational overhead by leveraging a small number of models (e.g., one model) in place of many models (e.g., multiple models). Lower latency can be achieved by using a small number of models (e.g., one model) instead of switching between many models (e.g., multiple models).
Furthermore, systems and methods according to example aspects of the present disclosure can provide for improved performance across task domains. For instance, a diversified pretraining approach according to example aspects of the present disclosure can provide for improved (e.g., more accurate, more precise, less expensive, less prone to error, etc.) processing of model inputs across task domains (e.g., including chain of thought prompt-based tasks). For instance, in real-world deployment scenarios in which tasks may not necessarily be neatly categorized into separate domains, a model trained with a diversified pretraining approach according to example aspects of the present disclosure can provide for improved real-world performance and perform well in mixed or cross-domain tasks.
Further, the ability of a language model to perform chain of thought prompt-based tasks can be improved when pre-trained using the diversified pre-training techniques described herein. This can enable the size of the model to be reduced (e.g., in terms of number of parameters) while still demonstrating high accuracy or other performance metrics. The ability to reduce the size of the model while retaining performance can result in savings of computational resources such as reduced usage of memory, processors, and/or network bandwidth.
Furthermore, systems and methods according to example aspects of the present disclosure can provide for improved robustness from the diverse pretraining. For example, a model pretrained according to example aspects of the present disclosure with diverse pretraining objectives can provide for improved response in new or unfamiliar contexts based on the diverse exposure to different objectives in pretraining. For example, traditional adversarial attacks may be less effective when the model is less easily disrupted by different inputs. In this manner, additionally, for example, models pretrained with diverse objectives according to example aspects of the present disclosure can provide for improved robustness in real-world implementations in which tasks may not necessarily be neatly categorized or curated.
Furthermore, systems and methods according to example aspects of the present disclosure are well suited to pretraining transformer models. For instance, example techniques described herein provide for diverse pretraining objectives that leverage internal parallel structures and processing streams of a transformer model to attend bidirectionally over inputs to the model to recover corrupted inputs. In some embodiments, transformer models can include effectively parallelized computation of multi-headed attention. In this manner, for instance, examples of inherently parallelizable transformer models can be better pretrained for immediate deployment and/or further fine-tuning, offering improvements in scalability and distributed computation by leveraging a small number of transformer models (e.g., one transformer model) in place of many varying models (e.g., multiple models) that may not offer the same advantages at scale.
With reference now to the Figures, example embodiments of the present disclosure will be discussed in further detail.
In some embodiments, the machine-learned model 100 includes a neural network trained to understand and interpret inputs to generate an output. For instance, in some embodiments, the machine-learned model 100 includes a neural network trained to understand and interpret text or other symbolic inputs to extract semantic meaning therefrom, including to respond to instructions provided in such inputs. In some embodiments, the machine-learned model 100 includes a neural network trained to understand and interpret images or other data inputs more generally to extract meaning therefrom, including to respond to instructions provided in such inputs.
In general, the techniques and input data structures of the present disclosure can be implemented using and adapted for a variety of model architectures. In some embodiments, the machine-learned model 100 is configured to attend over the instructive sequence 204 when processing the operative query 112. For instance, in some embodiments, the machine-learned model 100 can include one or more transformer architectures (e.g., encoder only, decoder only, encoder and decoder, etc.).
In some embodiments, the instructive query 104 can present substantially any type of problem, question, or task to be performed. For instance, the instructive query 104 can include substantially any problem capable of being explained, reasoned, or otherwise expressed with symbols, images, language, etc. For example, the instructive query 104 can include mathematical queries, logic queries, knowledge queries, generative queries, summary queries, analytics queries, retrieval queries, image processing queries, etc.
In some embodiments, the instructive trace 108 can include one or more intermediate states from the instructive query 106 to the instructive response 110. For example, intermediate states can include intermediate values associated with component subtasks, declarations of knowns determined (explicitly or implicitly) from the instructive query, logical steps to progress from a problem to a solution, a log of subtasks performed to generate the instructive response 110, etc.
The instructive response 110 can include the fulfillment of the instructive query 106. For instance, in some embodiments of a mathematical instructive query 106, the instructive response 110 can include a numerical solution, an analytical or symbolic solution, etc. In some embodiments, for a knowledge instructive query 106, the instructive response 110 can include returning the requested knowledge, etc.
In some embodiments, the operative query 112 can be of a similar type of query to the instructive query 106. In some embodiments, the operative query 112 can be of a different type of query to the instructive query 106 (e.g., when multiple instructive sequences 104 are provided).
In some embodiments, the instructive query 106 and operative query 112 can contain input flag(s) and output flag(s). For instance, the instructive query 106 can contain an input flag indicating a query start position and an output flag indicating a portion to be generated by the model 100 (e.g., a subsequent portion of the instructive sequence 104).
Based on the input data structure 102, the machine-learned model 100 can generate an output 120. In some embodiments, the output 120 can contain an operative trace 122 and an operative response 124. Generally, the operative response 124 can include a fulfillment of the operative query 112 (e.g., including an expression of an inability to fulfill the query, etc.). In some embodiments, the operative trace 112 can be generated based on a pattern set by one or more instructive traces in the input data structure 102. In some embodiments, the operative response 124 can be generated to relate to the operative trace 122 and the operative query 112 based on a pattern set by the instructive sequence(s) 104.
Instructive sequence 204 can include an instructive trace 208 documenting intermediate states from the instructive query 206 to the instructive response 210. For instance, although the direct answer to the posed query is captured by the instructive response 210, “The answer is 11,” the instructive trace 208 can capture a series of intermediates (or the “chain of thought”) leading to the ultimate answer. For instance, a first intermediate state can include a declaration of a known: “Roger started with 5 balls.” A second intermediate state can include a statement of multiplication based on the query values: “2 cans of 3 tennis balls each is 6 tennis balls.” A third intermediate state can include a summation step (e.g., optionally numeric, in natural language, etc.): “5+6=11.”
Operative query 212 can include a query of the same type as at least one instructive query 206. For instance, operative query 212 can include a mathematical word problem of a similar type as the instructive query 206: “Q: John takes care of 10 dogs. Each dog takes 0.5 hours a day to walk and take care of their business. How many hours a week does he spend taking care of dogs? A:”
The machine-learned model 100 can process the input data structure 202 to generate output 220. The output 220 can include an operative trace 222 and an operative response 224. For example, the operative trace 222 can be generated to include one or more intermediate states of reasoning/solution from the operative query 212 to the operative response 224. For instance, a first intermediate state can include a declarative statement of an explicit known, “John takes care of 10 dogs.” A second intermediate state can include, for example, another declarative statement of an explicit known, “Each dog takes 0.5 hours a day to walk and take care of their business.” A third intermediate state can include, for example, a statement of multiplication based on the explicit knowns, “So that is 10×0.5=5 hours a day.” A fourth intermediate state can include, for example, a statement of multiplication based on an implicit known regarding the number of days in a week, “5 hours a day×7 days a week=35 hours a week.” In this manner, for example, the operative trace 222 can trace intermediate state(s) from the operative query 212 to the operative response 224.
In some embodiments, the respective responses (e.g., instructive response, operative response) can include the respective traces. For instance, in some examples the desired response is the trace. For instance, example embodiments can be implemented to obtain traces of computer-executable script operation.
In some embodiments, the machine-learned model 100 can directly generate an output for fulfilling the operative query. In some embodiments, fulfilling the operative query can include sampling a plurality of outputs to determine a response satisfying a consistency metric.
In some embodiments, sampled outputs 420 can include a number of outputs sampled from an output layer of a machine-learned model 400. In some embodiments, sampled outputs 420 can be sampled from a probability distribution of the outputs (e.g., of a probability distribution over pairs of traces and responses). In some embodiments, samples are selected according to any suitable sampling scheme. In some embodiments, outputs are randomly sampled. In some embodiments, outputs can be sampled based on a ranked probability (e.g., top-K outputs). In some embodiments, outputs can be sampled for diverse traces.
In some embodiments, a plurality or majority of diverse traces that arrive at the same ultimate resolution can be indicative of a response associated with a higher confidence. Accordingly, in some embodiments, a vote is taken over the sampled outputs (e.g., a plurality vote, a majority vote). For instance, a response selector 430 can determine that the ultimate answer of $18 is indicated in two out of the three sampled outputs 420. In this manner, for example, a selected response 432 of $18 can be obtained.
In some embodiments, evaluation of the consistency metric can be expressed as applying a marginalization over the traces in the conditional probability P(response, trace|query) of each output given a query.
In a query breakdown stage 510, for example, a machine-learned model 502 can reduce a complex problem into one or more component problems. For instance, in some embodiments, the model 502 can be prompted to perform the reduction with one or more instructive sequence(s) 512 (e.g., which can optionally contain instructive traces). In some embodiments, the target query 514 is input to the model 502. For instance, the target query 514 can include a scenario providing context for a question to be answered (e.g., example question emphasized in bold in
In a query recursion stage 520, a machine-learned model 504 can recursively process the query components 516 and optionally the initial target query 514. For instance, in some embodiments, the machine-learned model 504 can be prompted with initial instructive sequences 522 to answer the first query component. For instance, query component(s) 524 can include the first query component from query components 516, optionally in combination with the scenario from the target query 514. In some embodiments, the initial instructive sequence(s) 522 can include one or more instructive queries, instructive traces, and instructive responses according to example embodiments of the present disclosure. In some embodiments, the query component(s) can correspond to an operative query (e.g., as described with respect to
On one pass of query recursion 520, the model 504 can generate response component(s) 526 based on the input query component(s) and initial instructive sequence(s) 522. For instance, the response component(s) 526 can include an operative trace and an operative response.
To perform another pass of query recursion 520, a new instructive sequence can be composed from the body of prior knowledge about the problem at hand, which can include new information generated by the model 504. For instance, query component(s) 528 can incorporate query component(s) 524 as well as the response component(s) 526. In this manner, the prior work of the model 504 can effectively become an instructive sequence including instructive queries, instructive traces, and instructive responses. Optionally, the initial instructive sequences 522 can be retained for input together with the query component(s) 528. In this manner, for instance, the model 504 can process additional query component(s) (e.g., the original target query, in bold) by leveraging its prior outputs to generate response component(s) 530.
Query recursion 520 can include, in some embodiments, a plurality of iterations. In some embodiments, the iterative recursion can provide for self-constructed instructive sequences. In some embodiments, this can help the machine-learned model leverage its full power over individual component queries while retaining the ability to build on its own prior work. In some embodiments, this can improve generalization from easy to difficult problems (e.g., easy problems explained via instruction, with inference performed over more difficult problems).
For example, in some embodiments, the query breakdown 510 can provide for an ordered set of query component(s) 516. For instance, in some embodiments, the query component(s) 516 can include an ordering from basic (or foundational) queries to complex (or follow-on) queries. In some embodiments, the set of query components is naturally ordered by appending the task from the original target query to the set of query component(s) 516 generated by the model. In this manner, for instance, the query component(s) 516 can include tractable component queries that can be resolved before tackling the task from the target query 514 itself.
Example results are presented herein for illustration purposes only. It is to be understood that the various configurations presented in the examples are selected for the purpose of illustration and comparison and are not to be interpreted as somehow limiting the scope of disclosure.
First, example results will be discussed with respect to the mathematical word problem type query depicted in
As a baseline approach, standard few-shot prompting results are provided in which a language model is given in-context exemplars of input—output pairs before outputting a prediction for a test-time example. Exemplars are formatted as questions and answers before being fed into the model, and the model gives the answer directly.
For the example chain-of-thought prompting results, a set of eight instructive sequences are used. This set is provided in Table 1.
The results are generated by using two collections of dense left-to-right, decoder-only transformer language models. The first collection is based on LaMDA (Thoppilan et al., Lamda: Language models for dialog applications, arXiv preprint arXiv:2201.08239), which has models of 422M, 2B, 8B, 68B, and 137B parameters. The second collection of models is PaLM (Chowdhery et al., PaLM: Scaling language modeling with Pathways, arXiv preprint arXiv:2204.02311, 2022), which has sizes of 8B, 62B, and 535B parameters. In the present examples, outputs are sampled from the model using greedy decoding. For LaMDA, results are reported averaged over five random seeds, where each seed had a different randomly shuffled order of exemplars. LaMDA experiments did not show large variance among different seeds, so PaLM results are reported using a single random seed.
Example results are presented in
Second, example results are presented for performing symbolic reasoning tasks. Although the symbolic reasoning tasks discussed here are generally simple for humans, machine-learned models can typically exhibit a flat scaling curve for such tasks. In some examples shown here, solving intermediate steps of a symbolic reasoning task according to aspects of the present disclosure using chain of thought prompting allows models to perform tasks that are not solvable with standard prompting alone.
Three tasks are presented herein for the sake of illustration of symbolic manipulation functions: Last letter concatenation (to concatenate the last letters of words in randomly concatenated names from the top one-thousand first and last names from name census data); Reverse list (to reverse the order of a list of randomly sampled names of everyday objects); and Coin flip (to answer whether a coin is still heads up after people either flip or do not flip the coin).
For each task a test set is split into an in-domain test set for which examples had the same number of steps as the training/few-shot exemplars, as well as two out-of-domain (OOD) test sets, for which evaluation examples had more steps than those in the exemplars. For last letter concatenation, the model only sees exemplars of names with two words, and then performs last letter concatenation on names with three and four words. The same is done for the number of items in the reverse list task (in-domain=5, OOD={6, 7}) and the number of potential flips in the coin flip task (in-domain=2, OOD={3, 4}).
Example results are given in
Third, example results are presented for tasks of reasoning about physical and human interactions under the presumption of general background knowledge. Four benchmark datasets are selected for the example results:
Example results are given in
Example results for an example self-consistency technique according to the present disclosure is provided over the following reasoning benchmarks:
Example self-consistency techniques were used to obtain results over the following dense left-to-right, decoder-only transformer language models with varying scales:
For the following example results, the same set of prompts presented above are used. Sampling scheme.
To sample diverse reasoning paths, for LaMDA-137B temperature sampling was used with T=0.5 and truncated at the top-k (k=40) tokens with the highest probability, and for PaLM-540B T=0.7, k=40. Example techniques of self-consistency according to the present disclosure can be generally robust to sampling strategies and parameters. For sampled results, the results are averaged over 10 runs, where 40 outputs are sampled independently from the decoder in each run. Greedy decoding a single chain of thought (e.g., as in previous examples) is provided for comparison.
State-of-the-art results can be obtained on almost all tasks: despite the fact that self-consistency is unsupervised and task-agnostic, these results compare favorably to more costly existing approaches that require task-specific training, or fine-tuning with thousands of examples (e.g., on GSM8K). Example results are provided for arithmetic reasoning in Table 1-9. Example results on commonsense reasoning tasks are given in Table 1-10.
91.2a
73.9b
86.4c
75.0c
Example results are provided for the last-letter concatenation task. In this example task, the query includes a list of words, and the response is the concatenation of the last letters of the words in the list. For example, “thinking, machine” outputs “ge” since the last letter of “thinking” is “g” and the last letter of “machine” is “e”. The experiment setup is as follows: (1) only two demonstration examples are provided; and (2) the lists in training contain at most three words, while the lists for testing can be arbitrarily long. Although this task is straightforward for humans, it is extremely challenging for statistical machine learning methods. First, machine learning models trained with only two examples are not expected to generalize well. Second, the length-based train and test split requires out-of-distribution generalization, which is highly non-trivial for statistical learning.
The initial instructive sequences used for the Chain of Thought example and the Query Recursion example are provided in Table 1-10. Testing lists with lengths from 4 to 12 words were sampled from Wiktionary. For each length, 500 lists are constructed. Example results are given in Table 1-11.
Example results are also provided for the SCAN benchmark (Lake & Baroni, 2018). This benchmark relates to mapping natural language commands to sequences of actions. For this example, all the prompting methods share the same commands, but Naïve Prompting directly maps commands to action sequences without explanations, and Chain of Thought uses the same command-mapping prompts as Query Recursion, except without command reduction. Example results are given in Table 1-12.
Example results are also provided for the DROP benchmark. This benchmark relates to reading comprehension and numerical reasoning. All prompting methods for these example results take 3 shot prompts. An example set of prompts for Query Recursion prompting is shown in Table 1-13, where the prompt on the left column shows how a problem is reduced to subproblems, and the prompt on the right column shows how the subproblems are sequentially solved. Prompts for Chain of Thought here were generated by merging Query Recursion prompts for subproblems, and prompts for Naïve Prompting were generated from the Chain of Thought prompts by removing reasoning chains. Example results are given in Table 1-14.
The computing device 1002 can be any type of computing device, such as, for example, a personal computing device (e.g., laptop or desktop), a mobile computing device (e.g., smartphone or tablet), a gaming console or controller, a wearable computing device, an embedded computing device, or any other type of computing device. In some embodiments, the computing device 1002 can be a client computing device. The computing device 1002 can include one or more processors 1012 and a memory 1014. The one or more processors 1012 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 1014 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 1014 can store data 1016 and instructions 1018 which are executed by the processor 1012 to cause the user computing device 1002 to perform operations (e.g., to perform operations implementing input data structures and self-consistency output sampling according to example embodiments of the present disclosure, etc.).
In some implementations, the user computing device 1002 can store or include one or more machine-learned models 1020. For example, the machine-learned models 1020 can be or can otherwise include various machine-learned models such as neural networks (e.g., deep neural networks) or other types of machine-learned models, including non-linear models or linear models. Neural networks can include feed-forward neural networks, recurrent neural networks (e.g., long short-term memory recurrent neural networks), convolutional neural networks or other forms of neural networks. Some example machine-learned models can leverage an attention mechanism such as self-attention. For example, some example machine-learned models can include multi-headed self-attention models (e.g., transformer models).
In some implementations, one or more machine-learned models 1020 can be received from the server computing system 1030 over network 1070, stored in the computing device memory 1014, and used or otherwise implemented by the one or more processors 1012. In some implementations, the computing device 1002 can implement multiple parallel instances of a machine-learned model 1020.
Additionally, or alternatively, one or more machine-learned models 1040 can be included in or otherwise stored and implemented by the server computing system 1030 that communicates with the computing device 1002 according to a client-server relationship.
The machine-learned models described in this specification may be used in a variety of tasks, applications, and/or use cases.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be image data. The machine-learned model(s) can process the image data to generate an output. As an example, the machine-learned model(s) can process the image data to generate an image recognition output (e.g., a recognition of the image data, a latent embedding of the image data, an encoded representation of the image data, a hash of the image data, etc.). As another example, the machine-learned model(s) can process the image data to generate an image segmentation output. As another example, the machine-learned model(s) can process the image data to generate an image classification output. As another example, the machine-learned model(s) can process the image data to generate an image data modification output (e.g., an alteration of the image data, etc.). As another example, the machine-learned model(s) can process the image data to generate an encoded image data output (e.g., an encoded and/or compressed representation of the image data, etc.). As another example, the machine-learned model(s) can process the image data to generate an upscaled image data output. As another example, the machine-learned model(s) can process the image data to generate a prediction output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be text or natural language data. The machine-learned model(s) can process the text or natural language data to generate an output. As an example, the machine-learned model(s) can process the natural language data to generate a language encoding output. As another example, the machine-learned model(s) can process the text or natural language data to generate a latent text embedding output. As another example, the machine-learned model(s) can process the text or natural language data to generate a translation output. As another example, the machine-learned model(s) can process the text or natural language data to generate a classification output. As another example, the machine-learned model(s) can process the text or natural language data to generate a textual segmentation output. As another example, the machine-learned model(s) can process the text or natural language data to generate a semantic intent output. As another example, the machine-learned model(s) can process the text or natural language data to generate an upscaled text or natural language output (e.g., text or natural language data that is higher quality than the input text or natural language, etc.). As another example, the machine-learned model(s) can process the text or natural language data to generate a prediction output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be speech data. The machine-learned model(s) can process the speech data to generate an output. As an example, the machine-learned model(s) can process the speech data to generate a speech recognition output. As another example, the machine-learned model(s) can process the speech data to generate a speech translation output. As another example, the machine-learned model(s) can process the speech data to generate a latent embedding output. As another example, the machine-learned model(s) can process the speech data to generate an encoded speech output (e.g., an encoded and/or compressed representation of the speech data, etc.). As another example, the machine-learned model(s) can process the speech data to generate an upscaled speech output (e.g., speech data that is higher quality than the input speech data, etc.). As another example, the machine-learned model(s) can process the speech data to generate a textual representation output (e.g., a textual representation of the input speech data, etc.). As another example, the machine-learned model(s) can process the speech data to generate a prediction output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be latent encoding data (e.g., a latent space representation of an input, etc.). The machine-learned model(s) can process the latent encoding data to generate an output. As an example, the machine-learned model(s) can process the latent encoding data to generate a recognition output. As another example, the machine-learned model(s) can process the latent encoding data to generate a reconstruction output. As another example, the machine-learned model(s) can process the latent encoding data to generate a search output. As another example, the machine-learned model(s) can process the latent encoding data to generate a reclustering output. As another example, the machine-learned model(s) can process the latent encoding data to generate a prediction output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be statistical data. Statistical data can be, represent, or otherwise include data computed and/or calculated from some other data source. The machine-learned model(s) can process the statistical data to generate an output. As an example, the machine-learned model(s) can process the statistical data to generate a recognition output. As another example, the machine-learned model(s) can process the statistical data to generate a prediction output. As another example, the machine-learned model(s) can process the statistical data to generate a classification output. As another example, the machine-learned model(s) can process the statistical data to generate a segmentation output. As another example, the machine-learned model(s) can process the statistical data to generate a visualization output. As another example, the machine-learned model(s) can process the statistical data to generate a diagnostic output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be sensor data. The machine-learned model(s) can process the sensor data to generate an output. As an example, the machine-learned model(s) can process the sensor data to generate a recognition output. As another example, the machine-learned model(s) can process the sensor data to generate a prediction output. As another example, the machine-learned model(s) can process the sensor data to generate a classification output. As another example, the machine-learned model(s) can process the sensor data to generate a segmentation output. As another example, the machine-learned model(s) can process the sensor data to generate a visualization output. As another example, the machine-learned model(s) can process the sensor data to generate a diagnostic output. As another example, the machine-learned model(s) can process the sensor data to generate a detection output.
In some cases, the machine-learned model(s) can be configured to perform a task that includes encoding input data for reliable and/or efficient transmission or storage (and/or corresponding decoding). For example, the task may be an audio compression task. The input may include audio data and the output may comprise compressed audio data. In another example, the input includes visual data (e.g. one or more images or videos), the output comprises compressed visual data, and the task is a visual data compression task. In another example, the task may comprise generating an embedding for input data (e.g. input audio or visual data).
In some cases, the input includes visual data and the task is a computer vision task. In some cases, the input includes pixel data for one or more images and the task is an image processing task. For example, the image processing task can be image classification, where the output is a set of scores, each score corresponding to a different object class and representing the likelihood that the one or more images depict an object belonging to the object class. The image processing task may be object detection, where the image processing output identifies one or more regions in the one or more images and, for each region, a likelihood that region depicts an object of interest. As another example, the image processing task can be image segmentation, where the image processing output defines, for each pixel in the one or more images, a respective likelihood for each category in a predetermined set of categories. For example, the set of categories can be foreground and background. As another example, the set of categories can be object classes. As another example, the image processing task can be depth estimation, where the image processing output defines, for each pixel in the one or more images, a respective depth value. As another example, the image processing task can be motion estimation, where the network input includes multiple images, and the image processing output defines, for each pixel of one of the input images, a motion of the scene depicted at the pixel between the images in the network input.
In some cases, the input includes audio data representing a spoken utterance and the task is a speech recognition task. The output may comprise a text output which is mapped to the spoken utterance. In some cases, the task comprises encrypting or decrypting input data. In some cases, the task comprises a microprocessor performance task, such as branch prediction or memory address translation.
In some embodiments, the machine-learned models 1040 can be implemented by the server computing system 1040 as a portion of a web service (e.g., remote machine-learned model hosting service, such as an online interface for performing machine-learned model operations over a network on remote servers 1030). For instance, the server computing system 1030 can communicate with the computing device 1002 over a local intranet or internet connection. For instance, the computing device 1002 can be a workstation or endpoint in communication with the server computing system 1030, with implementation of the model 1040 on the server computing system 1030 being remotely performed and an output provided (e.g., cast, streamed, etc.) to the computing device 1002. Thus, one or more models 1020 can be stored and implemented at the user computing device 1002 or one or more models 1040 can be stored and implemented at the server computing system 1030.
The computing device 1002 can also include one or more input components that receive user input. For example, a user input component can be a touch-sensitive component (e.g., a touch-sensitive display screen or a touch pad) that is sensitive to the touch of a user input object (e.g., a finger or a stylus). The touch-sensitive component can serve to implement a virtual keyboard. Other example user input components include a microphone, a traditional keyboard, or other means by which a user can provide user input.
The server computing system 1030 can include one or more processors 1032 and a memory 1034. The one or more processors 1032 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 1034 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 1034 can store data 1036 and instructions 1038 which are executed by the processor 1032 to cause the server computing system 1030 to perform operations (e.g., to perform operations implementing input data structures and self-consistency output sampling according to example embodiments of the present disclosure, etc.).
In some implementations, the server computing system 1030 includes or is otherwise implemented by one or more server computing devices. In instances in which the server computing system 1030 includes plural server computing devices, such server computing devices can operate according to sequential computing architectures, parallel computing architectures, or some combination thereof.
As described above, the server computing system 1030 can store or otherwise include one or more machine-learned models 1040. For example, the models 1040 can be or can otherwise include various machine-learned models. Example machine-learned models include neural networks or other multi-layer non-linear models. Example neural networks include feed forward neural networks, deep neural networks, recurrent neural networks, and convolutional neural networks. Some example machine-learned models can leverage an attention mechanism such as self-attention. For example, some example machine-learned models can include multi-headed self-attention models (e.g., transformer models).
The computing device 1002 or the server computing system 1030 can train example embodiments of a machine-learned model (e.g., including models 1020 or 1040) using a pretraining pipeline (e.g., an unsupervised pipeline, a semi-supervised pipeline, etc.). In some embodiments, the computing device 1002 or the server computing system 1030 can train example embodiments of a machine-learned model (e.g., including models 1020 or 1040) using a pretraining pipeline by interaction with the training computing system 1050. In some embodiments, the training computing system 1050 can be communicatively coupled over the network 1070. The training computing system 1050 can be separate from the server computing system 1030 or can be a portion of the server computing system 1030.
The training computing system 1050 can include one or more processors 1052 and a memory 1054. The one or more processors 1052 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 1054 can include one or more non-transitory computer-readable storage media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 1054 can store data 1056 and instructions 1058 which are executed by the processor 1052 to cause the training computing system 1050 to perform operations (e.g., to perform operations implementing input data structures and self-consistency output sampling according to example embodiments of the present disclosure, etc.). In some implementations, the training computing system 1050 includes or is otherwise implemented by one or more server computing devices.
The model trainer 1060 can include a pretraining pipeline for training machine-learned models using various objectives. Parameters of the image-processing model(s) can be trained, in some embodiments, using various training or learning techniques, such as, for example, backwards propagation of errors. For example, an objective or loss can be backpropagated through the pretraining pipeline(s) to update one or more parameters of the model(s) (e.g., based on a gradient of the loss function). Various determinations of loss can be used, such as mean squared error, likelihood loss, cross entropy loss, hinge loss, or various other loss functions. Gradient descent techniques can be used to iteratively update the parameters over a number of training iterations. In some implementations, performing backwards propagation of errors can include performing truncated backpropagation through time. The pretraining pipeline can perform a number of generalization techniques (e.g., weight decays, dropouts, etc.) to improve the generalization capability of the models being trained.
The model trainer 1060 can include computer logic utilized to provide desired functionality. The model trainer 1060 can be implemented in hardware, firmware, or software controlling a general-purpose processor. For example, in some implementations, the model trainer 1060 includes program files stored on a storage device, loaded into a memory, and executed by one or more processors. In other implementations, the model trainer 1060 includes one or more sets of computer-executable instructions that are stored in a tangible computer-readable storage medium such as RAM, hard disk, or optical or magnetic media.
The network 1070 can be any type of communications network, such as a local area network (e.g., intranet), wide area network (e.g., Internet), or some combination thereof and can include any number of wired or wireless links. In general, communication over the network 1070 can be carried via any type of wired or wireless connection, using a wide variety of communication protocols (e.g., TCP/IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML), or protection schemes (e.g., VPN, secure HTTP, SSL).
The central intelligence layer can include a number of machine-learned models. For example, as illustrated in
The central intelligence layer can communicate with a central device data layer. The central device data layer can be a centralized repository of data for the computing device 1082. As illustrated in
At 1102, a computing system can obtain an instructive sequence descriptive of an instructive query, an instructive response, and an instructive trace of intermediate states from the instructive query to the instructive response. For example, illustrative instructive queries, responses, and traces are discussed with respect to
In some embodiments, the instructive sequence can contain an input flag. For example, an instructive query can contain, for example, an input flag signifying a start of a query (e.g., “Q:”). In some embodiments, the instructive query can also contain an output flag. For instance, an output flag can signify an end of a query or a beginning of a portion of the sequence corresponding to a response to be generated. Example flags are shown in
In some embodiments, the instructive sequence can include a tokenized representation of natural language (e.g.,
At 1104, the computing system can input to a machine-learned model, the instructive sequence and an operative query. In some embodiments, the machine-learned model is configured to process the operative query with attention over the instructive sequence. In some embodiments, the instructive sequence can be prepended to the operative query. For example, in some embodiments, the machine-learned model comprises a transformer architecture (e.g., encoder, decoder, etc.) into which the input data structure according to the present disclosure can be input.
At 1106, the computing system can generate, using the machine-learned model and responsive to the operative query, an operative response. In some embodiments, generating the operating response can include generating, using the machine-learned model, a plurality of operative responses. In some embodiments, generating the operating response can include determining the operative response based on a sample of the plurality of operative responses. In some embodiments, the sample is random. In some embodiments, the sample is based on respective probabilities associated with the plurality of operative responses.
In some embodiments, determining the operative response includes determining a consistency metric based on the sample of the plurality of operative responses. For example, a consistency metric can include a self-consistency metric configured to determine internally consistent outputs. In some embodiments, the consistency metric includes a plurality vote (e.g., a vote of output values from one or more operative responses). In some embodiments, the consistency metric includes a majority vote (e.g., a vote of output values from one or more operative responses).
In some embodiments, the method 1100 can include generating, using the machine-learned model and responsive to the operative query, an operative trace of intermediate states from the operative query to the operative response. In some embodiments, the vote (e.g., plurality vote, majority vote, etc.) can be based on a plurality of operative responses respectively associated with a plurality of diverse operative traces.
In some embodiments, the operative query can be a first query component and the operative response can be a first response component, and the method 1100 can include inputting, to the machine-learned model, the instructive sequence, the first query component, the first response component, and a second query component. For instance, the method 1100 can include a query recursion process flow (e.g., as described above with respect to
For instance, in some embodiments, the method 1100 can include generating using the machine-learned model and responsive to the second query component, a second response component.
For instance, in some embodiments, the method 1100 can include generating, by the computing system and responsive to a target query, one or more query components.
For instance, in some embodiments, the method 1100 can include inputting, to the machine-learned model, a preliminary instructive sequence including a preliminary instructive query and a preliminary instructive response. In some embodiments, the preliminary instructive response includes a plurality of preliminary instructive query components.
For instance, in some embodiments, the method 1100 can include a first query component and a second query component that are generated with a different machine-learned model other than the machine-learned model used to obtain the first response component and the second response component.
For instance, in some embodiments, the method 1100 can include a second query component corresponding to the target query.
For instance, in some embodiments, the method 1100 can include, for a plurality of iterations, one or more generating and inputting operations that build on one another. For instance, in some embodiments, the method 1100 can include, for a plurality of iterations, generating an updated instructive sequence based on combining one or more prior input sequences with one or more output sequences respectively corresponding thereto; inputting, to the machine-learned model, the updated instructive sequence and an additional query component; and generating, using the machine-learned model and responsive to the additional query component, an additional response component.
In general, corrupted training data 1214 can include both corrupted and uncorrupted aspects of the training data 1202. In this manner, for instance, one or more pretraining objective(s) can include attempting to recover and/or reconstruct corrupted aspects of the training data 1202, providing for an unsupervised training objective.
The machine-learned model 1216 can be provided with the corrupted training data 1214 to obtain as an output recovered data 1218. The output recovered data 1218 can be evaluated by evaluator 1220 to determine one or more updates to the machine-learned model 1216 (e.g., updates to one or more parameters of the machine-learned model 1216).
In some embodiments, training examples of the training data 1202 can include sequences of data elements (which can optionally be tokenized, such as for processing by, e.g., an encoder and/or decoder of a transformer model). In some embodiments, training examples can be subdivided into one or more subportions for generating corrupted training examples.
For example, in some embodiments, a plurality of corrupted training examples (e.g., for corrupted training data 1214) can be generated from one or more training examples (e.g., of training data 1202). In some embodiments, each training example of the one or more training examples includes a sequence of data tokens. In some embodiments, the plurality of corrupted training examples are respectively generated according to a plurality of configurations (e.g., objective configurations 1206, 1208, 1210, 1212, etc.) of a pretraining objective framework (e.g., objective framework 1204). In some embodiments, the plurality of corrupted training examples each include one or more corrupted subportions of a sequence of data tokens.
In some embodiments, the plurality of configurations can effectively interpolate between long-range generative language modeling objectives and local prefix-based modeling objectives. Advantageously, each of the plurality of object configurations can test the performance of the model 1216 in different ways. For example, bounding a model by bidirectional context (or the future) (e.g., span corruption) can make the task easier and can become more akin to fact completion. Meanwhile, language modeling objectives can be more open ended. This behaviors can be observed, for example, by monitoring cross entropy losses of different objective configurations.
In some embodiments, a modal token can be added to the input to the machine-learned model 1216 to signal the mode or paradigm of pretraining. For instance, it can be beneficial for the model 1216 to not only distinguish between different objective configurations during pre-training but also to adaptively switch modes when learning downstream tasks. Modal tokens can advantageously facilitate mode switching. Mode switching can include associating pre-training tasks with dedicated sentinel tokens and can allow dynamic mode switching via discrete prompting.
The objective framework 1204 can provide for selection from the plurality of objective configurations based on one or more parameter values. One parameter value can include a span length parameter. The span length parameter can be a mean span length parameter. For instance, a span length for a given corrupted training example can be sampled from a desired distribution (e.g., a normal distribution) with a mean set by the span length parameter. For sequence-based objectives, the span length parameter can be augmented be constraining the span to the end of the input sequence, such that no uncorrupted tokens appear after the corrupted span.
One parameter value can include a corruption rate. A corruption rate can indicate a probability of subportions of a span being corrupted. For instance, a corruption rate can be expressed as a percentage, fraction, etc.
One parameter value can include a quantity of spans. The quantity of spans can be a function of the length of the original input. The quantity of spans can be a function of the span length or mean span length. For instance, the quantity of spans can be determined based on computing the result of the input length divided by the span length.
Parameterizing the objective framework based on the span length, corruption rate, and quantity of spans can provide for multiple different objective configurations that can interpolate among different types of learning objectives. As an example, to construct an objective analogous to causal language modeling using this formulation, one could set the span length to the length of the input span, a corruption rate of 100%, and the quantity of spans to 1 (e.g., a single corrupted span with its span length equal to the length of the input sequence). To express one similar to prefix-based language modeling objective, one could set the span length to the difference between the input sequence length and a prefix length and the quantity of spans to a single, post-prefix span, with the additional constraint that the single corrupted span reaches the end of the sequence. The corruption rate can be set at, for example 100% minus the ratio of the prefix length to the input span length.
Multiple different objective configurations can be used. For instance, a first objective configuration can be used for training example. A second objective configuration can be used for a second training example. A third objective configuration can be used for a third training example. Alternatively, multiple different objective configurations can be used for each training example.
An example mixture of objective configurations is described herein with respect to three different types or classes of configurations. The first two types or classes of configurations that follow can be considered distributed configurations, in that they can be configured for generating multiple corrupted spans distributed across the input sequence (e.g., randomly distributed). The third type or class can be considered a sequential configuration, in that it can be configured for generating a corrupted span in a particular sequence (e.g., a sequence of uncorrupted input followed by a single span of corrupted input).
A first objective configuration can be a configuration that implements relatively short corrupted spans. The first objective configuration can include relatively short corrupted spans with relatively low corruption rates. The first objective configuration can be similar to “regular” span corruption objectives, such as introduced by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, & Peter J Liu, Exploring the limits of transfer learning with a unified text-to-text transformer, arXiv preprint arXiv:1910.10683, 2019. An example first objective configuration can include parameters to use about 2 to 5 tokens as the span length, or less than about 10 tokens, and corrupting about 15% of input tokens. A first objective configuration can be a mild corruption configuration.
A second objective configuration can be a configuration that implements more extreme corruption. The second objective configuration can include longer spans for corruption. The second objective configuration can include higher corruption rates. For instance, an example second objective configuration can include spans for corruption of length greater than about 12 tokens. In some examples, approximately half the input can be portioned apart for corruption. An example second objective configuration can include a corruption rate of greater than about 30%, such as about 50% or greater.
A third objective configuration can be a configuration that implements relatively long-form language generation. The third objective configuration can be a sequence-based objective. The third objective configuration can be set up to provide for a predetermined sequential ordering of uncorrupted and corrupted spans. For instance, the third objective configuration can provide a prefix-based language modeling task. The third objective configuration can partition the input sequence into two sub-sequences of tokens as context and target such that the targets do not rely on future information.
A pretraining pipeline 1200 can leverage any one or more of objective configurations from the three different classes. A pretraining pipeline 1200 can implement all three classes of objective configurations. A pretraining pipeline 1200 can implement one or more objective configurations from each of the three classes. For instance, multiple sets of configuration parameters can be used within each class. For instance, the mild class of objectives can be implemented with a span length of three and a span length of 8 together (e.g., in parallel), both with a corruption rate of 15%. The more extreme class of objectives can be implemented with a span length of three, a span length of 8, a span length of 64 (all with a corruption rate of 50%) and a span length of 64 with a corruption rate of 15%. The sequence-based class of objectives can be configured with a variety of span lengths, such as one-quarter of the input sequence length, with a corruption rate of 25%. In this manner, for instance, each class can be implemented in different configurations in parallel to train model 1216. For instance, all seven of the examples provided above can be used during training of model 1216.
In
In this manner, for example, the machine-learned model 1216 can learn to recover the corrupted subportions by processing the corrupted subportions (e.g., processing replacement or altered token(s) for the subportion).
Corrupted training examples 1302, 1304, and 1306 can be corrupted according to the same objective configuration. Each of corrupted training examples 1302, 1304, and 1306 can be corrupted according to different objective configurations. Each of corrupted training examples 1302, 1304, and 1306 can be corrupted according to a battery of objective configurations, such as each of a set of configurations.
Under a first objective configuration, for instance, original text “Thank you for inviting me to your party last week” can be corrupted as “Thank you <X> me to your party <Y> week” where <X> and <Y> are optionally distinct replacement tokens, such that the machine-learned model can target obtaining “for inviting” for <X> and “last” for <Y>. This can be can example of a mild objective configuration.
In a second, more extreme objective configuration, for instance, the original text can be corrupted as “Thank <X> party <Y>” where <X> and <Y> are optionally distinct replacement tokens, such that the machine-learned model can target obtaining “you for inviting me to your” for <X> and “last week” for <Y>.
In a third objective configuration, the original text can be corrupted as “Thank you for inviting me <X>.” where <X> is a replacement token, such that the machine-learned model can target obtaining “to your party last week” for <X>. This can be an example of a prefix-based language modeling objective.
In some embodiments, configuration parameters of the objective framework can be selected to interpolate between, for example, language modeling objectives (e.g., to unidirectionally predict subsequent word(s) based on preceding word(s)) and in-place reconstruction (e.g., fill in gaps bidirectionally based on surrounding context). For instance, as the corrupted subportion length increases, the objective can, in some embodiments, approximate a language modeling objective locally within the corrupted subportion. Accordingly, a diverse mixture of pretraining objectives can be generated by implementing a plurality of configurations of a pretraining objective framework according to example aspects of the present disclosure.
In some embodiments, a modal token can be added to the input to the machine-learned model 1216 to signal the mode or paradigm of pretraining. For instance, in
The symbols “<{letter}>” can be all the same or individually selected (e.g., individually different) and can be used to index the subportions 2, 4, 6, 8, and 10. For instance, the target can be input to the model 1216 (e.g., to a decoder component of the model) to trigger prediction of the original tokens corresponding to the corrupted spans indicated in the target. For instance, a placeholder token “<a>” can be associated (e.g., distinctly associated) with subportion 4. The input can include a placeholder token corresponding to “<a>” in lieu of the subportion 4. Thus the model 1216 can be configured to predict based on processing “<a>” that subportion 4 follows. Accordingly, the target can be used to guide the model 1216 toward predicting an output sequence that contains the corrupted subportions delimited by the corresponding placeholder token(s). For instance, for the first objective configuration, an example output can be “<B> ability <a> emotion or <b> copied. <c> Noughts & <d> Ellis, <E>.” In this manner, for instance, example implementations can effectively provide a fill-in-the-blank solution to masked-out subportions of the input sequence.
For a second objective configuration, multiple sets of configuration parameters can be used. For instance, in a first set of configuration parameters (left column), the mean span length can be longer (e.g., 20 tokens, 30 tokens, 40 tokens, etc.). The span quantity can be relatively low. For instance, spans 14, 16, 18, and 20 can be selected for corruption. Individual sampled span lengths can be, in one example, 16, 32, 24, and 24, respectively. In a second set of configuration parameters (right column), the mean span length can be shorter (e.g., 3 tokens, 5 tokens, 8 tokens, etc.). The span quantity can be relatively higher. For instance, spans 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, and 48 can be selected for corruption. Individual sampled span lengths can be, in one example, 3, 3, 5, 4, 4, 5, 5, 3, 3, 2, 4, 4, 2, 4, and 5, respectively. As shown in
For a third objective configuration, a sequence-based objective can be used. A single, longer span 50 can be selected for corruption. For instance, the span length can be 95. The span can be anchored to the end of the input sequence. As shown in
For pre-training objectives, a Present Example is compared with the following pre-training baselines:
Causal Language Model (CLM)—This is the standard left-to-right auto-regressive language model pre-training, used in many standard pre-trained models, like GPT (Radford et al., 2019; Brown et al., 2020). This disclosure refers to this model as GPT-like in the experiments.
Prefix LM (PLM)—This is a slight variation of causal LM where M has bidirectional receptive fields, introduced in (Liu et al., 2018; Raffel et al., 2019). For this baseline, PLM is uniformly sampled for the length of M and only compute the loss at the auto-regressive targets.
Span Corruption (SC)—This is the standard denoising objective proposed in T5 (Raffel et al., 2019). The idea is to blank out certain text portions and replace them with sentinel tokens. The text replaced with sentinel tokens are then copied to the targets and autoregressively generated by the model. This baseline uses a mean span of 3 and denoising rate of 15% following the default T5 setup.
Span Corruption+LM (SCLM)—This baseline trains on a mixture of CLM and Span Corruption with an equal mix ratio. This baseline uses the same hyper-parameters for SC for the SC component of this objective.
UniLM (ULM)—This is the objective proposed in Dong et al. (2019).
For all objectives, these results explore both single-stack and encoder-decoder architectures. All architectures are inputs-to-targets either implemented in encoder-decoder or decoder-only model structures since we consider BERT-style masked language modeling pretraining to have already been effectively subsumed by this style of pretraining, as empirically made evident in (Raffel et al., 2019).
The datasets used are SuperGLUE (Wang et al., 2019), including 8 NLU subtasks. Experiments also cover 3 datasets from the GEM benchmark (Gehrmann et al., 2021) that focuses on language generation problems. XSUM (summarization), ToTTo (table-to-text generation) (Parikh et al., 2020) and Schema Guided Dialog (SGD) (Rastogi et al., 2019) from the GEM benchmark are used. For all these tasks, these results evaluate on both supervised fine-tuning and prompt-based one-shot learning. Finally these results also compare the models on their general ability for text generation using perplexity scores on the C4 validation set.
For SuperGLUE, these results report well-established metrics such as accuracy, F1 or Exact Match, whenever appropriate. For GEM benchmark, these results use the Rouge-L metric. For language modeling these results report negative log perplexity. The universality of the models, i.e., their collective performance across all range of tasks, is a main evaluation criteria here. To enable the comparison between models from this perspective, these results use an aggregate performance score. However, metrics on different tasks can be widely different in nature—take, for example, F1 and perplexity. To address this, these results opt to report and use the normalized relative gain with respect to baselines as an overall metric. For this purpose, these results use the standard language model (decoder-only) (GPT-like) and standard span denoising encoder-decoder (T5) as prime baselines and report all methods against their relative performance against these well-established candidates. The overall gain is normalized for these results, so this becomes harder to exploit or be susceptible to benchmark lottery effects.
The present experiments are all conducted in JAX/Flax (Bradbury et al., 2018) using the open source T5X4 framework (Roberts et al., 2022) and Flaxformer. The present experiments pre-train all models for 500K steps with a batch size of 128 and a sequence length of 512 inputs and 512 targets using the C4 corpus. The total approximate tokens seen during pre-training is approximately 32 billion tokens. Each pre-training run is typically trained using 64 to 128 TPUv4 chips (Jouppi et al., 2020).
The present experiments optimize the Present Example with the Adafactor (Shazeer & Stern, 2018) optimizer with an inverse square root learning rate. The present example runs all baseline pre-training objectives with both the decoder-only architecture and encoder-decoder architecture. The present results report key experiment results using a base architecture of approximately 167M parameters for the decoder model and 335M parameters for the encoder-decoder model. All models use a standard Transformer that uses SwiGLU layers as described in (Shazeer, 2020).
The present examples use the default T5 English 32K sentencepiece for all models. Within the context of decoder-only models, except for the case of the decoder model trained on causal LM, the present experiments use a bidirectional receptive field only in its input segment and autoregressive decoding at the targets segment.
Table 2-1 reports the raw results on all the benchmark tasks and datasets. The Present Example is denoted by “UL2.” To facilitate easier comparison across setups, the present results also report relative comparisons against well-established baselines such as T5 and GPT models. This is reported in Tables 2 and 3 respectively.
When using T5 as the reference baseline, with the exception of UL2 Decoder, none of the pre-trained decoders models outperform T5. Additionally, there is a 10% to 30% degradation in overall relative performance. The Prefix-LM decoder model is about 10% worse than the T5 baseline. The UL2 decoder outperforms the T5 encoder-decoder setup by +14.6%.
Overall, UL2 outperforms by T5+43.4% and +76.2% when compared to the GPT-like CLM decoder model. This is the highest relative (overall) gain compared to all other alternatives. On all individual tasks, UL2 outperforms T5 on all 9 out of 9 considered tasks. Hence, UL2 is a universally better option compared to the span corruption T5 model. UL2 is very consistent. Even when it loses to another method on a task, the loss is relatively marginal (e.g., 6.5 vs 7.3 on one-shot TOTTO). Conversely, when UL2 outperforms a baseline like T5, the gain can be as large as +363%. UL2 remains the most consistently strong method. The consistent improvement also suggests that it can be used as a more consistent replacement to T5 and GPT-like models.
In order to ascertain that mode switching capabilities can be effective on performance, ablation results are provided. Experiments on one-shot XSum and one-shot SuperGLUE were conducted. Table 2-4 reports the results of varying the paradigm prompt to the model. The results show that using the right or wrong prompt can lead to a 48% gap in performance (on XSum, Rouge-1). SuperGLUE, on the other hand, was less sensitive to prompting. On SuperGLUE, using prompts was almost always better than not using prompts during one-shot evaluation.
Experiments are provided to test the effectiveness of individual objectives within the objective framework. Table 2-5 reports results for these ablations. Table 2-5 reports results for varying the mean span, and corruption rate, along with the percentage of S-denoising used (denoted by % SD)). For this test, the total number of configurations in a mixture was span×corruption rate+1. Table 2-5 labels these configurations from Var-A through Var-L to refer to them easily.
Additional experiments are conducted by scaling up both 1) the model size and 2) pre-training dataset size. The UL2 Encoder-Decoder model was scaled up to approximately 1B parameters and increased the number of pre-training tokens to 0.5 trillion tokens.
Table 2-6 reports results in this scaled setting. At large scale, the Present Example UL2 encoder-decoder model is still competitive. A difference now is that UL2 drops the SuperGLUE suite against T5 (1B). However, this is compensated by not only out-performing on 7 out of 8 tasks but also improving performance by 2-4 times on one-shot evaluation. The gains on supervised fine-tuning are smaller, but still noticeable across the board on XSUM, SGD and TOT.
The Present Example was also evaluated at a model size of about 20B parameters. The present experiments follow the same training protocol in earlier experiments by pretraining on the C4 corpus but by also scaling the number of tokens the model sees during pretraining. The present experiments use a batch size of 1024 and 512 TPUv4 chips for pretraining this model. The model is trained on a total of 1 trillion tokens on C4 (2 million steps). The sequence length is set to 512/512 for inputs and targets. Dropout is set to 0 during pretraining. The model has 32 encoder layers and 32 decoder layers, dmodel of 4096 and dff of 16384. The dimension of each head is 256 for a total of 16 heads. The model uses a model parallelism of 8. The results retain the same sentencepiece tokenizer as T5 of 32 k vocab size. Hence, UL20B can be interpreted as a model that is quite similar to T5 but trained with a different objective and slightly different scaling knobs. Similar to earlier experiments, UL20B is trained with Jax and T5X infrastructure.
To demonstrate the universality of the approach, the present experiments consider a total of nearly 50+ NLP tasks. The list and categorization of tasks is below. Note that the categorization of tasks are generally soft in nature and some tasks may cross into different categorization boundaries.
Language Generation—summarization and data-to-text generation tasks. CNN/Dailymail (Hermann et al., 2015), XSUM (Narayan et al., 2018), MultiNews (Fabbri et al., 2019), SAMSum (Gliwa et al., 2019), WebNLG (Castro Ferreira et al., 2020) (English), E2E (Dusek et al., 2019) and CommonGen (Lin et al., 2020) to evaluate our models. For WebNLG, E2E and CommonGen, use the versions from the GEM benchmark (Gehrmann et al., 2021).
Language Generation with Human Evaluation—evaluate on a variety of text generation tasks using human evaluation, via the GENIE leaderboard (Khashabi et al., 2021). These tasks include aNLG (Bhagavatula et al., 2019), ARC-DA (Clark et al., 2018), WMT19 (Foundation), and XSUM (Narayan et al., 2018).
Language Understanding, Classification and Question Answering—use Reading Comprehension, Question Answering, Text Classification and natural language inference datasets. Use RACE (Reading comprehension) (Lai et al., 2017), QASC (Khot et al., 2020), OpenBookQA (Mihaylov et al., 2018), TweetQA (Xiong et al., 2019), QuAIL (Rogers et al., 2020), IMDB (Maas et al., 2011), Agnews (Zhang et al., 2015), DocNLI (Yin et al., 2021), Adversarial NLI (Nie et al., 2019), VitaminC (Schuster et al., 2021a), Civil Comments and Wikipedia Toxicity detection datasets (Borkan et al., 2019). Use standard SuperGLUE (Wang et al., 2019) and GLUE (Wang et al., 2018) datasets.
Commonsense Reasoning—use HellaSwag (Zellers et al., 2019), SocialIQA/SIQA (Sap et al., 2019), PhysicalIQA/PIQA (Bisk et al., 2020), CosmosQA (Huang et al., 2019), AbductiveNLI (Bhagavatula et al., 2019), CommonsenseQA (Talmor et al., 2018), CommonsenseQA2 (Talmor et al., 2021).
Long Range Reasoning—Use the Scrolls benchmark (Shaham et al., 2022) which comprises of seven component tasks including GovReport (Huang et al., 2021), SumScr (Chen et al., 2021), QMSUm (Zhong et al., 2021), QASPER (Dasigi et al., 2021), NarrativeQA (Kocisk y et al., 2018), QuaLITY (Pang et al., 2021), and ContractNLI (Koreeda & Manning, 2021).
Structured Knowledge Grounding—use several component tasks from UnifiedSKG (Xie et al., 2022), namely WikiTQ (Pasupat & Liang, 2015), CompWQ (Talmor & Berant, 2018), FetaQA (Nan et al., 2021), HybridQA (Chen et al., 2020), WikiSQL (Zhong et al., 2017), TabFat (Chen et al., 2019), Feverous (Aly et al., 2021), SQA (Iyyer et al., 2017), MTOP (Li et al., 2020) and DART (Nan et al., 2020). Select datasets that are relatively convenient to perform evaluation and uses mainstream metrics such as accuracy or exact match instead of obscure ones or those that require significant domain specific post-processing.
Information Retrieval—IR is the task of retrieving relevant documents given queries. Use the setup of the latest next generation IR paradigm, i.e., differentiable search index (Tay et al., 2022) for the experiments. Use the same NQ (Kwiatkowski et al., 2019) splits in the DSI paper.
For each dataset, the best previous state of the art (SOTA) result is provided.
(l)denotes leaderboard submission.
(#)denotes the best published found on the respective leaderboard.
(e)denotes SOTA used an ensembled approach.
indicates data missing or illegible when filed
UL2 achieves at least SOTA performance on around 50+ NLP tasks and setups. For many, the margins are quite wide and for those that UL2 doesn't achieve SOTA, the performance of UL2 is generally quite competitive. The extent of difficulty of obtaining SOTA on each benchmark has vastly different difficulties. For some, the SOTA model is a 32B dense equivalent (Zoph et al., 2022). For some others, it's a base model.
At 1502, example method 1500 can include obtaining a plurality of different combinations of configuration parameters of a pretraining objective framework. The pretraining objective framework (e.g., including pretraining pipeline 200) can include a parameterized corruption function that is configured to generate training examples according to one or more configuration parameters. For instance, the parameterized corruption function can be configured to receive original training examples (e.g., sequences of text, etc.) and output corrupted training examples. A plurality of different combinations of configuration parameters can respectively correspond to a plurality of objective configurations, such as objective configurations 206-212. A plurality of different combinations of configuration parameters can be obtained from a configuration file or other parameter storage.
At 1504, example method 1500 can include generating, using the pretraining objective framework, a plurality of corrupted training examples from one or more training examples. The plurality of corrupted training examples can be respectively generated according to the plurality of different combinations of configuration parameters. For instance, a different corrupted training example can be generated according to each of the plurality of different combinations of configuration parameters (e.g., according to each of a plurality of objective configurations).
At 1506, example method 1500 can include inputting the plurality of corrupted training examples into the machine-learned model. The machine-learned model can be configured to generate uncorrupted subportions corresponding to corrupted subportions of the corrupted training examples. For example, the machine-learned model can be configured to perform next-word generation based on surrounding context. The machine-learned model can be configured to leverage uncorrupted tokens bidirectionally as inputs for predicting the corrupted subportion.
At 1508, example method 1500 can include obtaining, from the machine-learned model, a plurality of outputs respectively generated by the machine-learned model based on the plurality of corrupted training examples.
At 1510, example method 1500 can include updating one or more parameters of the machine-learned model based on an evaluation of the plurality of outputs.
In some implementations of example method 1500, the configuration parameters can include two or more different parameters of: a subportion length parameter, a subportion quantity parameter, or a corruption rate parameter.
In some implementations of example method 1500, the plurality of different combinations of configuration parameters can include a distributed configuration configured for generating a plurality of corrupted subportions distributed over a training example and a sequential configuration configured for generating a corrupted subportion corresponding to a terminus of the training example.
In some implementations of example method 1500, the plurality of different combinations of configuration parameters can include a first distributed configuration configured for generating a first plurality of corrupted subportions distributed over a training example; a second distributed configuration configured for generating a second plurality of corrupted subportions distributed over the training example; and a sequential configuration configured for generating a corrupted subportion corresponding to a terminus of the training example. In some implementations of example method 1500, the second distributed configuration can be configured to cause greater corruption of the training example than the first distributed configuration
In some implementations of example method 1500, as compared to the first distributed configuration, the second distributed configuration can include at least one of: a subportion length parameter corresponding to a longer subportion length; or a corruption rate parameter corresponding to a greater rate of corruption.
In some implementations of example method 1500, the sequential configuration can correspond to a prefix-based language modeling objective.
In some implementations of example method 1500, the plurality of different combinations of configuration parameters can include: a first plurality of distributed configurations that can be respectively associated with subportion length parameters indicating subportion lengths of less than about 12 tokens; and a second plurality of distributed configurations that can be respectively associated with at least one of: subportion length parameters indicating subportion lengths of greater than about 12 tokens; or corruption rate parameters indicating a corruption rate of greater than about 30%. In some implementations of example method 1500, the plurality of different combinations of configuration parameters can include a sequential configuration. In some implementations of example method 1500, the plurality of different combinations of configuration parameters can include a quantity of one or more sequential configurations such that the quantity is less than about 50% of the total quantity of the plurality of configurations. In some implementations of example method 1500, the plurality of different combinations of configuration parameters can include a quantity of one or more sequential configurations such that the quantity is about 20% of the total quantity of the plurality of configurations.
In some implementations of example method 1500, the first plurality of distributed configurations can be respectively associated with subportion length parameters indicating subportion lengths of less than about 10 tokens.
In some implementations of example method 1500, the second plurality of distributed configurations can be respectively associated with subportion length parameters indicating subportion lengths of greater than about 12 tokens. In some implementations of example method 1500, the second plurality of distributed configurations can be respectively associated with subportion length parameters indicating subportion lengths of greater than about 30 tokens.
In some implementations of example method 1500, the second plurality of distributed configurations can be respectively associated with corruption rate parameters indicating a corruption rate of greater than about 30%. In some implementations of example method 1500, the second plurality of distributed configurations can be respectively associated with corruption rate parameters indicating a corruption rate of at least about 50%.
In some implementations of example method 1500, generating a plurality of corrupted training examples from the one or more training examples can include, for a respective training example of the one or more training examples (the respective training example including a respective sequence of data tokens), determining one or more selected subportions of the respective sequence of data tokens; and replacing the one or more selected subportions with a replacement token.
In some implementations of example method 1500, the example method 1500 can include inputting, with a respective corrupted training example of the plurality of corrupted training examples, a mode-switching token (e.g., modal token, such as “[R],” “[X],” “[S],” etc.) corresponding to at least one configuration of the plurality of different combinations of configuration parameters, the at least one configuration used to corrupt the respective corrupted training example.
In some implementations of example method 1500, the mode-switching token can trigger downstream behavior of the machine-learned model corresponding to tasks prioritized by the at least one configuration. For instance, the mode-switching token can be prepended to runtime inputs (e.g., at inference time) based on the type of task associated with the runtime input. For instance, short form generative tasks can use a mode-switching token associated with short form corrupted spans (e.g., “[R]”). Long form generative tasks can use a mode-switching token associated with long form corrupted spans (e.g., “[X]” or “[S]”).
In some implementations of example method 1500, at least one of the corruption parameters can be a probabilistic parameter. In some implementations of example method 1500, the probabilistic parameter can be the corrupted subportion length parameter characterizing a distribution from which a selected subportion length is sampled. In some implementations of example method 1500, the probabilistic parameter can be the corruption rate parameter characterizing a rate at which one or more selected subportions of a training example are corrupted.
In some implementations of example method 1500, the sequence of data tokens can correspond to natural language.
In some implementations of example method 1500, the sequence of data tokens can correspond to genetic data.
In some implementations of example method 1500, the sequence of data tokens can correspond to textual data.
In some implementations of example method 1500, the machine-learned model can include a transformer encoder. In some implementations of example method 1500, the machine-learned model can include a transformer decoder.
In some implementations of example method 1500, the example method 1500 can include generating a first fine-tuned version of the machine-learned model for a first task; and generating a second fine-tuned version of the machine-learned model for a second, different task.
In some implementations of example method 1500, the first task can be at least one of a classification task or a sequence-to-sequence task. In some implementations of example method 1500, the second, different task can be at least one of an open-text generation or prompt-based inference task.
The technology discussed herein makes reference to servers, databases, software applications, and other computer-based systems, as well as actions taken and information sent to and from such systems. The inherent flexibility of computer-based systems allows for a great variety of possible configurations, combinations, and divisions of tasks and functionality between and among components. For instance, processes discussed herein can be implemented using a single device or component or multiple devices or components working in combination. Databases and applications can be implemented on a single system or distributed across multiple systems. Distributed components can operate sequentially or in parallel.
While the present subject matter has been described in detail with respect to various specific example embodiments thereof, each example is provided by way of explanation, not limitation of the disclosure. Those skilled in the art, upon attaining an understanding of the foregoing, can readily produce alterations to, variations of, and equivalents to such embodiments. Accordingly, the subject disclosure does not preclude inclusion of such modifications, variations and/or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. For instance, features illustrated or described as part of one embodiment can be used with another embodiment to yield a still further embodiment. Thus, it is intended that the present disclosure cover such alterations, variations, and equivalents.
Aspects of the disclosure have been described in terms of illustrative embodiments thereof. Any and all features in the following claims can be combined or rearranged in any way possible, including combinations of claims not explicitly enumerated in combination together, as the example claim dependencies listed herein should not be read as limiting the scope of possible combinations of features disclosed herein. Accordingly, the scope of the present disclosure is by way of example rather than by way of limitation, and the subject disclosure does not preclude inclusion of such modifications, variations or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. Moreover, terms are described herein using lists of example elements joined by conjunctions such as “and,” “or,” “but,” etc. It should be understood that such conjunctions are provided for explanatory purposes only. Clauses and other sequences of items joined by a particular conjunction such as “or,” for example, can refer to “and/or,” “at least one of”, “any combination of” example elements listed therein, etc. Also, terms such as “based on” should be understood as “based at least in part on.”
The present application claims priority to and the benefit of each of the following applications: U.S. Provisional Patent Application No. 63/305,910, filed Feb. 2, 2022; and U.S. Provisional Patent Application No. 63/348,637, filed Jun. 3, 2022. Each of the applications identified above is hereby incorporated by reference herein in its entirety.
Number | Date | Country | |
---|---|---|---|
63305910 | Feb 2022 | US | |
63348637 | Jun 2022 | US |