Training generative neural networks to reconstruct environment states
The state-aware supervised fine-tuning method improves generative neural networks' long-context reasoning by explicitly tracking environment states, addressing errors in dynamic environments and enhancing accuracy in complex tasks.
Patent Information
- Application Number
- PCT/US2026/028879
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-19
- Filing Date
- 2026-05-19
- Publication Date
- 2026-11-26
Smart Images

Figure US2026028879_26112026_PF_FP_ABST
Abstract
Description
[0001] Attorney Docket No. 45288-0653WO1
[0002] TRAINING GENERATIVE NEURAL NETWORKS TO RECONSTRUCT ENVIRONMENT STATES
[0003] CROSS-REFERENCE TO RELATED APPLICATION
[0004] [1] This application claims priority to U.S. Provisional Application No. 63 / 808,552, filed on May 19, 2025. The disclosure of the prior application is considered part of and is incorporated by reference in the disclosure of this application.
[0005] BACKGROUND
[0006] [2] This specification relates to generating data using machine learning models.
[0007] [3] Machine learning models receive an input and generate an output, e.g., a predicted output, based on the received input. Some machine learning models are parametric models and generate the output based on the received input and on values of the parameters of the model.
[0008] [4] Some machine learning models are deep models that employ multiple layers of models to generate an output for a received input. For example, a deep neural network is a deep machine learning model that includes an output layer and one or more hidden layers that each apply a non-linear transformation to a received input to generate an output.
[0009] SUMMARY
[0010] [5] This specification describes systems and methods implemented as computer programs on one or more computers in one or more locations for training a generative neural network. In particular, this specification describes training generative neural networks to reconstruct environment states, e.g., to improve their long-context reasoning capabilities.
[0011] [6] The subject matter described in this specification can be implemented in particular embodiments so as to realize one or more of the following advantages. Generative neural networks, e.g., Large Language Models (LLMs), have demonstrated remarkable capabilities in various natural language understanding and generation tasks. However, many existing models exhibit limitations in scenarios requiring long-context understanding and consistent stateful reasoning. In multi-turn dialogues or complex tasks where system states (e.g., calendar events, database records, application settings) evolve dynamically over extended interactions, generative neural networks often struggle to accurately track these changes, leading to errors such as hallucinating information, failing to recall previously mentioned details, or incorrectly applying updates.Attorney Docket No. 45288-0653WO1
[0012] [7] Current training methodologies for generative neural networks often rely on the model implicitly inferring state from the conversational history, the interaction history, or other information in the context that is provided to the generative neural network. This implicit approach can be unreliable, especially as the context length and complexity of state changes increase. Thus, there is a need for a more direct and robust method to imbue generative neural networks with the ability to explicitly manage and reason about system states over long durations. Such a capability is crucial for the success of real-world applications involving sophisticated agentic behavior, planning, and interaction with dynamic environments.
[0013] [8] This specification describes techniques that address this problem in generative neural network training by improving the long-context, stateful reasoning capabilities of generative neural networks. In particular, the described techniques describe a state-aware supervised fine-tuning (SFT) approach wherein the generative neural network is trained on a dataset that includes multi-turn dialogues where explicit, structured representations of system state are incorporated at specific intervals. The generative neural network is trained to output this complete system state as part of its response at designated turns. This explicit state tracking mechanism enhances the model's ability to maintain context, track changes, and perform accurately in tasks requiring understanding and manipulation of dynamically evolving states over extended interactions. As a result, the described techniques demonstrate significant improvements in state tracking accuracy both in-domain and out-of-domain, as well as gains on various long-context benchmark evaluations, thereby improving the ability of the generative neural network to perform well on a variety of downstream tasks that require long-context stateful reasoning. This specification also describes techniques for effectively and programmatically generating the dataset for training, making training using the above approach possible even if no pre-existing dataset is available.
[0014] [9] In examples relating to agent control, such as where the agent is a mechanical agent, e.g., as a robot or an autonomous vehicle interacting with a real-world physical environment, the explicit state-tracking mechanism provided can ensure the safe, reliable, and precise operation of the technical system. In complex, multi-step physical tasks, implicit state inference is highly susceptible to context degradation, often resulting in the generative neural network “hallucinating” spatial information or dropping critical historical context. By, during training and, in some cases, in response to a trigger during inference, forcing the generative neural network to explicitly reconstruct and output the target environment state representation atAttorney Docket No. 45288-0653WO1
[0015] intervals, the system can be forced to anchor its reasoning in the actual physical reality of the environment. For example, in a robotic manipulation or navigation task, accurately and continuously tracking the system state, such as the spatial coordinates of a robotic end-effector, the current torque of a joint, or the dynamically updated positions of surrounding obstacles, ensures that generated actions are physically viable. This can prevent the mechanical agent from generating control signals that would result in physical collisions, catastrophic hardware damage, or deviations outside of safe operating boundaries, thereby serving the specific technical purpose of safely controlling a physical system.
[0016]
[0010] The details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the description below.
[0017]
[0011] Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims.
[0018] BRIEF DESCRIPTION OF THE DRAWINGS
[0019]
[0012] FIG. l is a block diagram of an example training system.
[0020]
[0013] FIG. 2 is a flow diagram of an example process for training a generative neural network.
[0021]
[0014] FIG. 3 is a flow diagram of an example process for generating an interaction.
[0022]
[0015] FIG. 4 shows an example of the performance of the described techniques.
[0023]
[0016] FIG. 5 illustrates an example interaction.
[0024]
[0017] Like reference numbers and designations in the various drawings indicate like elements.
[0025] DETAILED DESCRIPTION
[0026]
[0018] FIG. 1 shows an example training system 100. The training system 100 is an example of a system implemented as computer programs on one or more computers in one or more locations in which the systems, components, and techniques described below are implemented.
[0027]
[0019] The training system 100 trains a generative neural network 110. Optionally, prior to the generative neural network 110 being trained by the system, the generative neural network 110 can have been trained on one or more initial training tasks, e g., unsupervised pre-training,Attorney Docket No. 45288-0653WO1
[0028] supervised fine-tuning, reinforcement learning from human or AT feedback, direct preference optimization, and so on.
[0029]
[0020] The system 100 trains the neural network 110 on a training data set 120 that includes multiple training sequences 130.
[0030]
[0021] Each training sequence 130 represents a respective interaction of a respective agent with a respective environment. Each respective environment is associated with a respective set of actions that each modify a state of the environment. Accordingly, each respective interaction includes a plurality of turns that each include (i) a respective request and (ii) a respective action performed in response to the request to modify the state of the environment.
[0031]
[0022] In some cases, each training sequence 130 represents an interaction with the same environment while, in some other cases, different training sequences can represent interactions with different environments. For example, one or more of the environments can be respective software environments. As another example, one or more of the environments can be respective real-world environments as described below.
[0032]
[0023] Each training sequence 130 can include (i) an initial state representation 132 that represents the state of the respective environment prior to the respective interaction. Each training sequence can also include, for each of the plurality of turns during the interaction, (ii) a respective request representation 134 that characterizes the request to interact with the environment at the turn, and (iii) a respective action 136 representation that characterizes the action performed at the turn.
[0033]
[0024] Moreover, for only a proper subset of the plurality of turns during the interaction, the training sequence also includes (iv) a target environment state representation 138 that characterizes the state of the respective environment as of that turn. That is, although the interaction includes a respective action that modifies the state of the environment at every turn, the training sequence 130 only includes a target environment state representation 138 at a proper subset of, i.e., at less than all of, the turns.
[0034]
[0025] The system trains the generative neural network 110 on the training dataset 120 using an objective function 140 (“objective”) that, for each of the training sequences and for each turn in the proper subset of turns, promotes alignment between the target environment state representation for the turn and the predicted outputs for output positions corresponding to the target environment state representation for the turn. Thus, the objective 140 trains the generativeAttomev Docket No. 45288-0653WO1
[0035] neural network 110 to “track” the effect of actions on the state of the environment even for turns that do not include a state representation in order to accurately reconstruct the state representations at turns in the proper subset.
[0036]
[0026] In some cases, the training sequence 130 includes a respective token at each of the multiple output positions. In these cases, each representation within the training sequence is a subsequence of tokens within the training sequence. Accordingly, the predicted outputs for the output positions can be score distributions over a vocabulary of tokens, e.g., a probability distribution or a distribution of logits.
[0037]
[0027] In general, training the generative neural network 110 using the objective 140 involves backpropagating gradients of the objective to update trainable parameters, e.g., weights, of the generative neural network 110. This can use any appropriate gradient descent optimization algorithm, e g., Adam, Adafactor, AdamW, SGD or another optimization algorithm.
[0038]
[0028] In some implementations the architecture of the generative neural network 110 is a sequence processing architecture and the generative neural network is configured to process a model input that comprises an input sequence of tokens to generate output sequences of possible output values that comprise tokens of possible tokens, e.g., from a vocabulary of possible tokens and / or including soft tokens (not restricted to discrete values in a predetermined vocabulary). The score distribution comprises a distribution over the possible tokens, e.g., a distribution of logits or a probability distribution.
[0039]
[0029] The described techniques can be used with any type of machine learning model. For example, a machine learning model as described herein can implement a generative neural network, e.g., comprising a sequence processing neural network. Such a sequence processing neural network can have any appropriate architecture that generates an output sequence by processing an input sequence.
[0040]
[0030] As one example a machine learning model as described herein may comprise an autoregressive generative model (e.g., a Transformer, a recurrent neural network, etc.) that can auto-regressively generate an output sequence as the output sequence based on the input. A transformer neural network is a neural network comprising a stack of transformer blocks, each typically including an attention or self-attention neural network layer, generally followed by a feedforward neural network layer (where a self-attention neural network layer applies a self-Attorney Docket No. 45288-0653WO1
[0041] attention operation, e.g., QKV self-attention, to elements of an embedding, to update each element of the embedding).
[0042]
[0031] The model can, for example, comprise a large language model (LLM) that can generate tokenized representations of text data; a vision-language model (VLM) that can generate tokenized representations of image or video data, e.g., in response to a text input or that can generate tokenized representations of text, e.g., in response to an image input; an audio model that can input or generate tokenized representations of audio data; or a multimodal model that can generate tokens representing any of text, image or audio, e.g., in response to an input comprising any of text, image or audio; and so on.
[0043]
[0032] As previously mentioned, the sequence processing neural network may be a language model or vision language model neural network. In general, a (vision) language model neural network can be a neural network that has been trained so that, given a text prompt that includes a sequence of tokens in a natural language, the neural network can generate the next token in the sequence. This process can be repeated to extend the text prompt one token at a time to generate a natural language output, i.e., to generate the natural language output auto-regressively token by token. At each time “time step,” the language model neural network processes the current sequence to generate a probability distribution over a vocabulary of tokens. The next token can then be selected using the probability distribution, e.g., by sampling from the distribution using nucleus sampling or another sampling technique or by selecting the highest-probability token. The tokens in the vocabulary can include any of a variety of tokens, e.g., some combination of words, sub-words, characters, punctuation and other symbols, and numbers. In general, the language model neural network is trained on a corpus of text made up of tokens from the vocabulary (and optionally other tokens that can be mapped to a designated out-of-vocabulary token), to predict the next token in a sequence of tokens from the training data. The (vision) language model neural network can comprise an autoregressive Transformer neural network.
[0044]
[0033] A (vision) language model neural network can be made to perform a particular task by providing a natural language description of the desired response as an input or “prompt” (input sequence). In some cases, the prompt may be a few-shot prompt where a few, e.g., 1 to 10, examples of a query and an example output are provided in the text prior to the actual query.Attomev Docket No. 45288-0653WO1
[0045]
[0034] Instead or in addition, a (vision) language model neural network may be “fine-tuned” to perform a particular task, by obtaining a pre-trained language model neural network trained on a large corpus of examples as previously described and then further training part of all of the language model neural network on a relatively small number of examples particular to the type of task that is to be performed.
[0046]
[0035] The (vision) language model neural network may be a large language model neural network, e.g., one that has greater than 1 billion, 10 billion or 100 billion trained parameters. The (vision) language model neural network may have been trained on greater than 10 billion, 100 billion or 1000 billion words or tokens representing words or other tokens.
[0047]
[0036] In implementations the model input and the model output (and the training sequences) each comprise a sequence of elements referred to herein as tokens. A “token” as used in this specification is a vector of numerical values having a specified dimensionality, i.e., the number of numerical values is constant across different tokens. Each token can comprise a respective predetermined or learned embedding (an ordered collection of numerical values having a predetermined dimensionality).
[0048]
[0037] The model implementations and the generative neural network (or machine learning model) can have a sequence processing architecture, in which the model input comprises an input sequence of tokens and the model is configured to generate an output comprising an output sequence of tokens. The model implementations and the generative neural network (or machine learning model) can implement a generative neural network system configured to process the input sequence of tokens using a sequence processing neural network to generate the output sequence of tokens.
[0049]
[0038] In some implementations the tokens can represent text, e.g., words, wordpieces or characters, in a natural or computer language. For example text may be received, e.g., as a series of encoded characters, e.g., UTF-8 encoded characters; such “characters” can include Chinese and other similar characters, as well as logograms, syllabograms and the like. A text encoder, i.e., a tokenizer, can process a sequence of text to represent the text as a series of text tokens from a vocabulary of text tokens, e.g., that each represent words, wordpieces or characters in a natural or computer language. The computer language may be any formal language used to communicate with a computer, e.g., a markup language, or a command or configuration language, or a data exchange language such as JSON, or a programming language. TheAttorney Docket No. 45288-0653WO1
[0050] tokenizer can, e g., implement BPE (Byte Pair Encoding) or Wordpiece tokenization. Optionally the text can be obtained from audio data representing speech; the output tokens may be converted into audio data that represent speech corresponding to the text.
[0051]
[0039] Also or instead the tokens may represent an image. For example a set (sequence) of input or output tokens can represent an image. Each image token may comprise a block encoding of values of the pixels in a different region of an image that maps a set of values of the pixels to a respective image token. The block encoding may be obtained using a neural network such as a Transformer neural network.
[0052]
[0040] As used herein an image may be any still or moving image, i.e., the image may be part of a video, in 2D or 3D, and may be a monochrome, color or hyperspectral image, i.e., comprising monochrome or color pixels. As defined herein an “image” includes a point cloud, e.g., from a LIDAR system, and a “pixel” includes a point of the point cloud. An image may have been captured by a camera or other image sensor from the real world; and objects in the image may comprise physical objects, represented by the image.
[0053]
[0041] Also or instead the tokens may represent an audio waveform. For example a set (sequence) of input or output tokens can represent audio data representing a waveform, e.g., instantaneous audio amplitude values or time-frequency audio data. Each image token may comprise a block encoding of the audio waveform in a different time segment of the audio that maps a set of values representing the audio waveform to a respective image token. The block encoding may be obtained using a neural network such as a Transformer neural network.
[0054]
[0042] In a multimodal system audio data or an image may be flagged by a start-of-audio token or start-of-image token.
[0055]
[0043] In some implementations the tokens represent text, pixels of an image, or an audio waveform and the generative neural network system is configured to generate the output sequence of tokens to perform a task represented by the input sequence of tokens. These tasks can also be referred to as “downstream” tasks.
[0056]
[0044] In some implementations the task comprises an image or audio generation task. The input sequence of tokens (e.g., text tokens) can then characterize the image or audio to be generated, and the output sequence of tokens can comprise tokens defining an image or audio waveform characterized by the input sequence of tokens.Attorney Docket No. 45288-0653WO1
[0057]
[0045] In some implementations the task comprises an image or audio processing task. The input sequence of tokens can define an image or audio input, and the output sequence of tokens can comprise tokens defining text that describes the image or audio input. As some examples, the task can be a speech recognition task, an object or action detection task, a classification task, a captioning task, a question-answering task, or a character or word recognition task.
[0058]
[0046] In some implementations the task comprises a multimodal processing task. One or both of the input sequence of tokens and the input sequence of tokens can comprise multimodal data. For example the input sequence of tokens can characterize both an image or audio input and a text input and the output sequence of tokens can comprise tokens defining a result of an image or audio processing task defined by the text, such as an open vocabulary classification or object detection task.
[0059]
[0047] In general, multimodal data comprises a combination of two or more different types of data, e.g., two or more of audio data, image data, text data, or graph data. As one example the multimodal data may comprise audio-visual data, comprising a combination of pixels of an image or of video and audio data representing values of a digitized audio waveform. As another example the multimodal data may comprise a combination of i) text data representing text in a natural language and ii) pixels of an image or of video or audio data representing values of an audio waveform.
[0060]
[0048] Some examples of multimodal tasks include: open-vocabulary image classification (the output can classify the image input based on a text input comprising text descriptions of one or more classes in the image); open-vocabulary object detection (the output can detect one or more objects in the image input based on a text input comprising text descriptions of the one or more objects); image captioning (the output can comprise text that describes the image input); textbased image search (the output can identify from amongst multiple images in the image input one or more images that meet a text description of images to be retrieved, the text description being provided in a text input); image-based retrieval (the output can identify from amongst multiple images in the image input one or more images that match a further image in the image input), and so on. The multimodal processing task to be performed can be defined by text in the input sequence.
[0061]
[0049] In some implementations the task comprises an agent control task in which the agent interacts with an environment to perform the task. The agent can be a mechanical agent such asAttorney Docket No. 45288-0653WO1
[0062] a robot or (semi-)autonomous vehicle, interacting with a real-world environment to perform the task. The generative neural network system can be trained to control a simulated version of the agent in a simulated version of the environment and then afterwards used to control the real agent in the real-world environment. The input sequence of tokens can comprise tokens that represent an observation of the environment, e.g., an image captured by a camera or other imaging device from a real-world environment. The output sequence of tokens comprises tokens that define one or more actions to be performed by the agent in the environment in response to the observation.
[0063]
[0050] Further examples of tasks are described later.
[0064]
[0051] The pre-trained version of the machine learning model (“generative neural network”) can be obtained in any convenient manner. Merely as an example, a sequence processing neural network model can be trained using a token-predicting objective or other objective function, such as a softmax cross entropy loss (with teacher forcing) or an autoregressive negative log likelihood (NLL) loss. As an example such a loss could be — Xf=i log p(yi \y<i, x<i) for a multimodal input comprising a sequence of text encoded as L tokens with the Zth text token y(conditioned on preceding second modality inputs x< such as one or more images or videos, and conditioned on preceding text tokens y<{. As another example the model could be trained with a masking loss, e.g., a loss that requires the model to predict masked-out data such as masked out text or image tokens.
[0065]
[0052] There are many suitable training datasets available, depending on the task to be performed. Just as some examples these include, for text: WebLI (Web Language Image, Chen, et al., arXiv:2305.18565vl). Some examples for images include: the Visual Genome dataset for Visual Question Answering (Krishna, et al., arXiv: 1602.07332); Objects365 (Shao, et al., “Objects365: A large-scale, high-quality dataset for object detection”, IEEE / CVF international conference on computer vision, pages 8430-8439); Open Images V4 (Kuznetsova, et al., arXiv: 1811.00982); the SBU dataset (Ordonez, et al., “Im2Text: Describing Images Using 1 Million Captioned Photographs”, NeurlPS 2011); the Conceptual Captions datasets, e.g., VI (2M images) or V2 (10M images) (Sharma, et al., “Conceptual Captions: A Cleaned, Hypemymed, Image Alt-text Dataset For Automatic Image Captioning”, ACL 2018); and Kinetics for video (Kay, et al., arXiv: 1705.06950). An example for audio data is AudioSet (Gemmeke, et al., “Audio set: An ontology and human-labeled dataset for audio events,” ICASSP, IEEE, 2017,Attorney Docket No. 45288-0653WO1
[0066] pp. 776-780). An example training dataset for agent (robot) control is described in Ebert, et al., arXiv:2109.13396.
[0067]
[0053] In general a training dataset for a particular task may comprise task-specific training examples that have been manually generated by a human being and / or task-specific training data may be generated automatically using existing tools. For example an OCR (Optical Character Recognition) task dataset may be generated by applying an OCR tool to a corpus of images; or an object detection task that requires generating object bounding-box coordinates may be generated by applying an existing object detection tool, such as a trained neural network, to a corpus of images; or a set of aligned image and text representations may be generated using ALIGN (Jia, et al., arXiv:2102.05918); or instruction-annotated robot trajectories may be obtained as described in Brohan, et al., arXiv:2212.06817, in either the real-world or in simulation.
[0068]
[0054] As previously described, implementations of the described techniques can be used to obtain a (trained) generative neural network system.
[0069]
[0055] In some implementations the generative neural network system, e.g., a language model or a visual language model, is stored on a user computing device, i.e., a device local to the user, such as a mobile device, e.g., a mobile phone, or a smart speaker.
[0070]
[0056] In some implementations the generative neural network system is implemented on a remote server in communication with a user computing device over a wired or wireless network communications link between the user computing device and the server.
[0071]
[0057] The user computing device may be provided with an input mechanism, such as a text or voice interface, that enables user input from the user in a natural language. The user computing device may be provided with an output mechanism that provides a system output for the user in the or another natural language, e.g., as speech or text; or in some other way, e g., by displaying an image. The input and output mechanism may comprise, e.g., a keyboard, microphone, speaker, display, and / or camera.
[0072]
[0058] As an example the input mechanism may comprise a system configured to input audio data characterizing a speech waveform of speech representing the input from the user in a natural language, and configured to convert the audio data into tokens representing the speech in the natural language, e.g., representing a transcription of the spoken input. The output mechanism may comprise a system configured to receive tokens representing the output for the user in the orAttorney Docket No. 45288-0653WO1
[0073] another natural language and a system configured to convert the received tokens into audio data representing a waveform of speech representing the output to the user in the natural language, i.e., representing spoken words.
[0074]
[0059] As a further example, the trained system can be deployed in an environment that enables a user to provide a request for the system, e.g., to process a multimodal input to generate a corresponding output, e.g., output sequence. A user can provide the request, e.g., by way of a user interface or through an application programming interface (API). The request can be transmitted from a user device, e.g., over a data communications network such as the internet, to one or more computers implementing the system, e.g., in a data center. The system can generate an output sequence and then transmit the output sequence to a user device over a data communications network.
[0075]
[0060] In some implementations, during inference, the generative neural network can be configured to dynamically output the explicit environment state representation based on a predetermined trigger. The predetermined trigger can be associated with the current input or the broader interaction history. For example, the predetermined trigger can comprise a specific control token or command included in the user's request, a determination that a predefined number of turns has elapsed in the interaction history since the last state generation, or a rulebased heuristic, e.g., evaluating the complexity or volume of recent actions. Responsive to detecting this predetermined trigger while processing the input, the generative neural network can generate an output comprising the explicit environment state representation. This generated representation explicitly characterizes the cumulative state of the environment as it has been influenced by the sequence of actions in the interaction history up to a point related to the trigger, e.g., a turn corresponding to the trigger. This can enable the system to reliably maintain an accurate, grounded understanding of the current environment state before executing further reasoning or downstream tasks.
[0076]
[0061] Further example applications
[0077]
[0062] A user computing device may be provided as an interface for the generative neural network system, with an input mechanism that enables user input from the user in a natural language and an output mechanism that provides a system output to the user in the natural language. The input and output mechanism may comprise, e.g., a keyboard and display. Also or instead the input and output mechanism may comprise a speech-based mechanism. For exampleAttorney Docket No. 45288-0653WO1
[0078] the input mechanism may comprise a system configured to input audio data characterizing a speech waveform of speech representing the input from the user in the natural language and configured to convert the audio data into tokens representing the speech in the natural language, e.g., representing a transcription of the spoken input. The output mechanism may comprise a system configured to receive tokens representing the output to the user in the natural language and a system configured to convert the received tokens into audio data representing a waveform of speech representing the output to the user in the natural language, i.e., representing spoken words.
[0079]
[0063] In some implementations the input sequence comprises one or more natural language statements relating to an environment, in particular a real-world environment, and can include a natural language request relating to the environment. Similarly the output sequence may be a natural language reply or natural language output statement that also relates to the environment i.e., it provides information relating to the environment, in some implementations relating to or specifying actions to be taken in the environment.
[0080]
[0064] The (trained) generative neural network system can be used for diagnosing a fault, or for correcting undesired behavior, in a mechanical or computing system operating in the real world environment. The input may comprise a description and / or image of one or more observations of the mechanical or computing system, e.g., of operation of the system, optionally obtained from one or more sensors sensing a condition or operation of the system. An image observation may be converted into a text description, e g., using an image captioning system or in other ways. The generated output sequence may comprise an image, audio, or text that identifies (described) a likely cause of the fault or undesired behavior. This may be used to repair the fault or correct the behavior. The reward model(s) can define relatively more useful types of output for repairing the fault or correcting the behavior, and other aspects of the response as previously described.
[0081]
[0065] The (trained) generative neural network system can be used for controlling a mechanical agent such as a robot or vehicle, e.g., to perform a predetermined task in the environment. For example the input may comprise a description of a task to be performed, and the generated output sequence may comprise a list of sub-tasks to be performed by the mechanical agent (trained to perform such sub-tasks), in order to perform the task. The reward model(s) can define relatively more preferable or useful types of sub-task, task safety, efficiency, and so on.Attorney Docket No. 45288-0653WO1
[0082]
[0066] As another example, the environment can be a computer security monitoring environment, e.g., the system can be deployed as part of a system that monitors the security of one or more computers. For example, the environment may be a computer network security monitoring environment, and the system can be deployed as part of a system that monitors the security of one or more computers on a computer network, e.g., a wireless network, a cellular network, a local area network and / or the internet. As another example, the environment may alternatively or additionally be a computer system security monitoring environment and the system can be deployed as part of a system that monitors the system for the presence of computer viruses and / or an unresolved software vulnerability, e.g., a zero-day exploit. A software vulnerability may be resolved by updating the software (e.g., patching) and / or removing (e.g., uninstalling) the software from the computer system. In these examples, the natural language request can query whether a computer security incident has been resolved (e.g., “has the incident been resolved?”) and the input sequence may comprise relevant statements from system logs, i.e., that are potentially relevant to the event being queried. A computer security incident can be, e.g., a data breach, an unauthorized log-in or other access of a secured system, a detection of a computer virus or detection of a software vulnerability. The incident can be “resolved” when the underlying incident is no longer a threat to the security of the computer system e.g., the computer virus has been removed, the access to the secured system has been removed, the data breach has been mitigated, or the software having the vulnerability has been updated or removed. The system can use the input sequence to generate a reply to the request that comprises a natural language statement indicating whether the incident has been resolved, optionally displaying evidence used to determine this.
[0083]
[0067] The input sequence may include one or more of code snippets from the software code, system logs, program logs, or other artifacts that should be left on the computer by running the program, or verification rules that represent requirements for the execution of the software program, or natural language statements describing the computer system on which the software executes. In general the input sequence may include relevant statements, i.e., statements that are potentially relevant to the event being queried.
[0084]
[0068] In some implementations obtaining the input sequence may comprise obtaining, from the system logs, the data characterizing the computer network, or both, or from other data as described above, one or more observations of the computer network (which here includesAttomev Docket No. 45288-0653WO1
[0085] computers on the network), and processing the one or more observations to generate a natural language representation of the one or more observations. The natural language request may relate to the computer security incident or to the secure operation of the computer network. The method may include using the natural language representation of the one or more observations to provide one or more of the natural language statements describing the computer network, and using the natural language reply or the natural language output statement to identify a security status of the computer network or a security flaw in the computer network.
[0086]
[0069] As another example, the environment can be a software testing or evaluation environment, e.g., the system can be deployed as part of a system that tests software before deployment or that evaluates already-deployed software to identify bugs. In these examples, when the system tests software before deployment, the natural language request can ask whether the software will execute as intended, and the input sequence can include code snippets from the software code and, optionally, natural language statements describing the computer system on which the software will execute. The system can then use the input sequence to generate a reply that indicates whether the code will execute as intended, optionally displaying evidence used to determine this. When the system monitors the execution of code after deployment, the natural language request can ask whether a software program, or a portion of a software program, has executed as intended, and the input sequence can include one or more of: code snippets from the software code, system logs, program logs, or other artifacts that should be left on the computer by running the program, or verification rules that represent requirements for the execution of the software program, or natural language statements describing the computer system on which the software executes. The system can then use the input sequence to generate a reply that indicates whether the code has executed as intended, optionally displaying evidence used to determine this. As a particular example, the software program can be part of the boot up of a computer, and the system can generate a reply each time that the computer starts up to verify whether the computer will function correctly after start up.
[0087]
[0070] As another example, the environment can be an educational environment, e.g., the system can be deployed as part of an education software program that assists a user in learning or practicing one or more corresponding skills. In these examples, the input sequence can include natural language statements describing or referencing a scenario or scene in a real-world or imagined environment, and the request can be a question about the scenario or scene.Attorney Docket No. 45288-0653WO1
[0088]
[0071] As another example, the environment can be an information retrieval environment, e.g., the system can be deployed as part of a search engine or other software that allows a user to search for information in a corpus of documents, e.g., the Internet or another electronic document corpus. In these examples, the request can be any appropriate natural language question, and the reply can optionally include evidence such as include relevant statements from the corpus of documents, e.g., as identified by searching the corpus using conventional information retrieval techniques.
[0089]
[0072] In some implementations, the language model neural network is a visual language model (VLM). In general, the VLM may process input sequences comprising tokens that each represent natural language or (a part of) an image or video to generate output tokens that each represent natural language or (a part of) an image or video. For example, the VLM may be configured to describe an image or video using natural language, e.g., to perform an image or video captioning task. As another example, the VLM may be configured to process input tokens representing an image and text tokens representing a query about the image or a request to modify the image, and to generate output tokens representing an answer to the query or representing a version of the image that has been modified in accordance with the request. The VLM may generate output tokens representing an image or video that is generated in response to input tokens providing a visual and / or audio and / or textual description of a desired image or video.
[0090]
[0073] In some implementations, the “language” of the language model is not a natural language such (e.g., English), but may instead be a text-based encoding describing an entity or class of entities, e.g., a chemical or biological entity, such as a chemical structure or molecule. For example, the text-based encoding may be a sequence of tokens that defines a molecule or protein, e.g., a sequence specifying an arrangement of atoms or chemical functional groups in a molecule, or the amino acid residues of a protein. The language model may be referred to as a chemical and / or biological language model in such cases. The input for the language generation neural network may therefore be an input string defining a chemical (e.g., protein) structure and the output may be an output string defining a different chemical structure from the input string. The strings may be in the Simplified Molecular Input Line Entry System, SMILES, format, for example.Attorney Docket No. 45288-0653WO1
[0091]
[0074] In another example of a computer language text generation task, a task-specific training example may comprise an image or video and a sequence of text in a computer language for performing a task in relation to the image or video, e.g., a data processing task that involves analyzing the content of the image or video to provide a result of the analysis or, e.g., a search to search for information relating to the content of the image or video. The computer language in the model output may comprise computer language for invoking a function or calling one or more external APIs. Merely as one example, such an output may be formatted as a JSON object. As previously, the sequence of text in the multimodal input may define the task to be performed and the second modality input may comprise, e.g., an image or video in relation to which the task is to be performed, e.g., a task that involves manipulation of particular types of data that may benefit from access to an API such as mathematical data, date / time related data, scientific data, recent data that may post-date training of the model (that may be accessed by a search function or API), and so on. After training, when the model is used in inference, the model output may comprise text in the or another computer language for performing a task, e.g., as described above, in relation to an image or video in the second modality input. The method may then include using the text in the computer language to perform the task.
[0092]
[0075] In some implementations, the language model neural network may be used to interact with a human user of a digital assistant such as a smart speaker, smart display, or other device. For example, information defining a task can be obtained from the digital assistant, and the digital assistant can be used to instruct the user to perform the task. For example, this may comprise receiving, at the digital assistant, a request from the user for assistance and determining, in response to the request, a series of tasks for the user to perform, e.g., steps or sub-tasks of an overall task. Then for one or more tasks of the series of tasks, e.g., for each task, e.g., until a final task of the series the digital assistant can be used to output to the user an indication of the task, e.g., step or sub-task, to be performed. This may be done using natural language, e.g., on a display and / or using a speech synthesis subsystem of the digital assistant. Visual, e.g., video, and / or audio observations of the user performing the task may be captured, e.g., using the digital assistant. A system may then be used to determine whether the user has successfully achieved the task, e.g., step or sub-task, i.e., from the answer as previously described. If there are further tasks to be completed the digital assistant may then, in response, progress to the next task (if any) of the series of tasks, e g., by outputting an indication of theAttomev Docket No. 45288-0653WO1
[0093] next task to be performed. In this way the user may be led step-by-step through a series of tasks to perform an overall task.
[0094]
[0076] As an illustrative example, a user may be interacting with a digital assistant and ask for help performing an overall task consisting of multiple steps, e.g., cooking a pasta dish. While the user performs the task, the digital assistant receives audio and / or video inputs representative of the user's progress on the task, e.g., images or video or sound clips of the user cooking. The digital assistant uses a system as described above, in particular by providing it with the captured audio and / or video and a question that asks whether the user has completed a particular step, e.g., 'Has the user finished chopping the peppers?', to determine whether the user has successfully completed the step. If the answer confirms that the user has successfully completed the step then the digital assistant progresses to telling the user to perform the next step or, if at the end of the task, or if the overall task is a single-step task, then the digital assistant may indicate this to the user. The digital assistant may then stop receiving or processing audio and / or video inputs to ensure privacy and / or reduce power use.
[0095]
[0077] In a further aspect there is provided a digital assistant device including a system as described above. The digital assistant can also include a user interface to enable a user to request assistance and to output information. In implementations this is a natural language user interface and may comprise a keyboard, voice input-output subsystem, and / or a display. The digital assistant can further include an assistance subsystem configured to determine, in response to the request, a series of tasks for the user to perform. In implementations this may comprise a generative (large) language model, in particular for dialog. The digital assistant can have an observation capture subsystem to capture visual and / or audio observations of the user performing a task; and an interface for the above-described language model neural network (which may be implemented locally or remotely). The digital assistant can also have an assistance control subsystem configured to assist the user. The assistance control subsystem can be configured to perform the steps described above, for one or more tasks, e.g., of a series of tasks, e.g., until a final task of the series. More particularly, the assistance control subsystem and output to the user an indication of the task to be performed, capture, using the observation capture subsystem, visual or audio observations of the user performing the task, determine from the above-described answer whether the user has successfully achieved the task. In response, the digital assistant canAttomev Docket No. 45288-0653WO1
[0096] progress to a next task of the series of tasks and / or control the digital assistant, e.g., to stop capturing observations.
[0097]
[0078] The generative neural network system may comprise a multimodal machine learning system such as a visual language model (VLM). That is, implementations of the generative neural network system can perform a multimodal task in which the input and output sequence, collectively, comprise data of multiple different types. As used herein text can include numbers, punctuation, special symbols, and so on.
[0098]
[0079] In some implementations, after training, a particular task that is to be performed by the generative neural network system can be described by part or all of a sequence of text in the input to the system. For example in an input that includes an image such a prompt might specify “Generate a caption”, “Generate a description”, “Answer the following question: [about the image or video]”, or “Detect a person”. Where the system is used for an agent control task a prompt may define “Take the knife out of the drawer”, or “Q: What action should the robot take to take the knife out of the drawer?”. Also or instead such a prompt may give one or more examples of a task to be performed. The generative neural network system can be trained on multiple natural and / or computer languages and the prompt may then specify a language to use.
[0099]
[0080] A few further examples of some machine learning tasks that can be performed by a system trained as described herein follow. The tasks described below may be tasks that require spatial awareness or other context from the image or video. For example, a prompt may ask “What is the object in the top left corner?”.
[0100]
[0081] In general for the tasks below the system can have been trained or fine-tuned on examples of the input and output for the task. For example the system can have been trained using still or moving images containing one or more objects or actions, and corresponding sequences of text or other data, e.g., describing or classifying the images. However large, “foundation” models can, in general, perform some tasks zero-shot, i.e., without having been specifically trained on those tasks.
[0101]
[0082] As one example the task may comprise an object or action detection task. For example the generated output sequence may comprise or represent text that describes or otherwise labels detected object(s) or action(s) in an input comprising an image or audio, and may include coordinates such as bounding-box coordinates for the detected object(s) or action(s), e.g., “1020 90 100 cat 2030 100 100 dog”.Attorney Docket No. 45288-0653WO1
[0102]
[0083] As another example the task may comprise a classification task, e.g., an object or action classification task. The generated output sequence may comprise data, e.g., text, that classifies the object(s) or action(s) in represented in the conditioning data, e.g., in an image or audio, into one of a plurality of classes, or that otherwise classify object(s) or action(s) represented in the conditioning data.
[0103]
[0084] As another example the task may comprise a still or moving image describing task, e.g., a captioning task (which, as used here, includes an audio description task to explain what is happening in an image). The generated output sequence may comprise data, e.g., text, describing an image or video in the conditioning data. For example the generated output sequence may provide a caption or description or it may count objects in the image or video, or it may provide some other form of description.
[0104]
[0085] As another example the task may comprise a still or moving image question-answering task. The generated output sequence may comprise data, e.g., text, that answers a question about the input, e.g., an image or audio, where the question is also specified in the input, e.g., as sequence of text. This may be used, e.g., to answer questions about visual plots and charts or about sounds.
[0105]
[0086] As another example the task may comprise a character or word recognition task, e.g., an OCR (optical character recognition) task. The input may comprise a still or moving image and the generated output sequence may comprise text that represents characters or words in the input, e g., in a natural language.
[0106]
[0087] As another example the task may comprise a still or moving image generation task. The generated output sequence may comprise image data defining values for pixels of a still or moving image, and the input, e.g., a sequence of text, may describe or characterize the image to be generated. Merely as an example, an image of a plot or chart may be generated to represent the input, e.g., comprising text.
[0107]
[0088] As another example the task may comprise a computer language text generation task. The conditioning data may comprise a natural language description of a task to be performed, and optionally an image (if the task is to be performed on or in relation to an image), and the generated output sequence may comprise text in a computer language to perform the task, e.g., a task of analyzing the content of the image to provide a result of the analysis or to search for information relating to the content of the image.Attorney Docket No. 45288-0653WO1
[0108]
[0089] As a particular example the computer language in the generated output sequence may comprise computer language for invoking a function or calling one or more external APIs.
[0109] Merely as one example, such an output sequence may comprise data formatted as a JSON object. As previously, the input may define the task to be performed and may also include an image in relation to which the task is to be performed. In general the task can involve manipulation of particular types of data that may benefit from access to an API such as mathematical data, date / time related data, scientific data, recent data that may post-date training of the system (that may be accessed by a search function or API), and so on; and the generated output sequence may comprise text in a computer language for performing the task. The method may then include using the text in the computer language to perform the task.
[0110]
[0090] In general where the generated output sequence comprises text this may be converted to speech representing the text, and an audio (speech) output provided.
[0111]
[0091] In some implementations the task comprises an agent control task in which the agent interacts with an environment to perform the agent control task. In these implementations the input can include an observation characterizing the environment. For example the input can include a sequence of text that defines the task to be performed by the agent and the image can represent an observation of the environment, e.g., captured by a camera or other imaging device from a real -world environment. The generated output sequence can comprise an action selection output, e.g., including text, that is used to select one or more actions to be performed by the agent in the environment in response to the observation. As an illustration the generated output sequence may define an action as text such as “A: 132 114 128 5 25 156”, that can be converted into a control signal for a mechanical agent, such as a robot, e.g., “ T = [0.1, —0.2,0] AR = [10°, 25°, —7°]”. The action selection output may also or instead define one or more low-level skills, e.g., from a vocabulary of previously learnt skills. As before, the sequence of text in the input to the system may describe the task to be performed, e.g., “What action should the robot take to [perform task]”. Examples of systems for controlling an agent that may be fine tuned as described herein can include PaLM-E (Driess, et al., arXiv:2303.03378), RT-1 (Brohan, et al., arXiv:2212.06817), and RT-2 (Brohan, et al., arXiv:2307.15818).
[0112]
[0092] In some agent control implementations, the environment is a real-world environment and the agent is a mechanical agent interacting with the real-world environment, e.g., a robot or an autonomous or semi -autonomous land, air, or sea vehicle operating in or navigating through theAttorney Docket No. 45288-0653WO1
[0113] environment, and the actions are actions taken by the mechanical agent in the real-world environment to perform the task. For example, the agent may be a robot or other mechanical agent interacting with the environment to accomplish a specific task, e.g., to locate or manipulate an object of interest in the environment or to move an object of interest to a specified location in the environment or to navigate to a specified destination in the environment. In these implementations, the observations may include, e.g., one or more of images, object position data, and sensor data to capture observations as the agent interacts with the environment. The actions may define control signals to control the robot or other mechanical agent, e.g., positions, torques, or other control signals for the parts of the mechanical agent, or higher-level control commands.
[0114]
[0093] In some agent control implementations the agent may be a human agent and the environment may be a real -world environment. For example the agent can be a human user of a digital assistant such as a smart speaker, smart display, or some other device that is used to instruct the user to perform actions. The task may be any real-world task that the user wishes to perform. The observations may be obtained from an observation capture subsystem, e.g., a monitoring system such as a video camera or sound capture system, to capture visual observations of the user performing the task. The actions may comprise instructions in the form of, e.g., text, image, video, or audio data such as speech, that guide the user in performing the task.
[0115]
[0094] In any of the above examples, the task may be a “planning” task that requires the generative neural network to generate one or more intermediate outputs prior to generating a final output that is used as the final output for the task. For example, the generative neural network may be caused to perform planning by virtue of the prompt that is provided as input to the neural network, e.g., which can include a natural language instruction or other type of instruction that instructs the neural network to generate intermediate outputs, a few-shot example of planning “trajectories” or both.
[0116]
[0095] The described systems and techniques may be applied to a wide range of different types of input sequence and output sequence. In implementations of the described techniques the tokens may represent, characterize, or encode any type of information in a sequence, e.g., stream of data. The term “represent” is used herein generally to refer to any way in which a token can encode part of a sequence. The tokens may include marker tokens, such as a start of sequenceAttorney Docket No. 45288-0653WO1
[0117] token, an end of sequence token, and a separator token (indicating a separation or break between two distinct parts of a sequence). The tokens may, but need not be, drawn from a defined vocabulary of tokens.
[0118]
[0096] Some of these implementations may be used for natural language tasks such as providing a natural language response to a natural language input, e.g., for question answering, or for text completion. In some implementations the input sequence may represent text in a natural language and the output sequence may represent text in the same natural language, e.g., a longer item of text. For example in some implementations the input sequence may represent text in a natural language and the output sequence may represent the same text with a missing portion of the text added or filled in. For example the output sequence may represent a predicted completion of text represented by the input sequence. Such an application may be used, e.g., to provide an auto-completion function, e.g., for natural language-based search. In some implementations the input sequence may represent a text in a natural language, e.g., posing a question or defining a topic, and the output sequence may represent a text in a natural language which is a response to the question or about the specified topic.
[0119]
[0097] As another example the input sequence may represent a first item of text and the output sequence may represent a second, shorter item of text, e.g., the second item of text may be a summary of a passage that is the first item of text. As another example the input sequence may represent a first item of text and the output sequence may represent an aspect of the first item of text, e.g., it may represent an entailment task, a paraphrase task, a textual similarity task, a sentiment analysis task, a sentence completion task, a grammaticality task, and in general any natural language understanding task that operates on a sequence of text in some natural language, e.g., to generate an output that classifies or predicts some property of the text. For example some implementations may be used to identify a natural language of the first item of text, or of spoken words where the input is audio (as described below).
[0120]
[0098] Some implementations may be used to perform neural machine translation. Thus in some implementations the input tokens represent words, wordpieces, or characters in a first natural language and the output tokens represent words, wordpieces or characters in a second, different natural language. That is, the input sequence may represent input text in the first language and the output sequence may represent a translation of the input text into the second language.Attorney Docket No. 45288-0653WO1
[0121]
[0099] Some implementations may be used for automatic code generation. For example the input tokens may represent words, wordpieces or characters in a first natural language and the output tokens may represent instructions in a computer programming or markup language, or instructions for controlling an application program to perform a task, e.g., build a data item such as an image or web page.
[0122]
[0100] Some implementations may be used for speech recognition. In such applications the input sequence may represent spoken words and the output sequence may represent a conversion of the spoken words to a machine-written representation, e.g., text. Then the input tokens may comprise tokens representing an audio data input including the spoken words, e.g., characterizing a waveform of the audio in the time domain or in the time-frequency domain. The output tokens may represent words, wordpieces, characters, or graphemes of a machine-written, e.g., text, representation of the spoken input, that is representing a transcription of the spoken input.
[0123]
[0101] Some implementations may be used for handwriting recognition. In such applications the input sequence may represent handwritten words, syllabograms or characters and the output sequence may represent a conversion of the input sequence to a machine-written representation, e.g., text. Then the input tokens may comprise tokens representing portions of the handwriting and the output tokens may represent words, wordpieces, characters or graphemes of a machine-written, e.g., text, representation of the spoken input.
[0124]
[0102] Some implementations may be used for text-to-speech conversion. In such applications the input sequence may represent text and the output sequence may represent a conversion of the text to spoken words. Then the input tokens may comprise tokens representing words or wordpieces or graphemes of the text and the output tokens may represent portions of audio data for generating speech corresponding to the text, e.g., tokens characterizing a portion of a waveform of the speech in the time domain or in the time-frequency domain, or phonemes.
[0125]
[0103] Some implementations may be used for a genomics task, where the input sequence represents a fragment of a DNA sequence or other molecule sequence and the output sequence is either an embedding of the fragment for use in a downstream task, e.g., by making use of an unsupervised learning technique on a data set of DNA sequence fragments, or an output for the downstream task. Examples of downstream tasks include promoter site prediction, methylation analysis, predicting functional effects of non-coding variants, and so on.Attorney Docket No. 45288-0653WO1
[0126]
[0104] In some cases, the machine learning task is a combination of multiple individual machine learning tasks, i.e., the system is configured to perform multiple different individual machine learning tasks, e.g., two or more of the machine learning tasks mentioned above. For example, the system can be configured to perform multiple individual natural language understanding tasks, with the network input including an identifier for the individual natural language understanding task to be performed on the network input.
[0127]
[0105] In some implementations the input sequence and the output sequence represent different modalities of input. For example the input sequence may represent text in a natural language and the output sequence may represent an image or video corresponding to the text; or vice-versa. In general the tokens may represent image or video features and a sequence of such tokens may represent an image or video. There are many ways to represent an image (or video) using tokens. As one example an image (or video) may be represented as a sequence of regions of interest (Rols) in the image, optionally including one or more tokens for global image features. For example an image may be encoded using a neural network to extract Rol features; optionally (but not essentially) a token may also include data, e.g., a position encoding, representing a position of the Rol in the image. As another example, the tokens may encode color or intensity values for pixels of an image. As another example, some image processing neural network systems, e.g., autoregressive systems, naturally represent images as sequences of image features. As another example, a transformer-based sequence processing neural network system as previously described may be used to process images instead of or as well as text (e.g., if trained on images instead of or as well as text).
[0128]
[0106] Thus in some implementations at least one of the input sequence and the output sequence is a sequence representing an image or video, and the tokens represent the image or video. For example the input sequence may be a sequence of text, the input tokens may represent words, wordpieces, or characters and the output sequence may comprise output tokens representing an image or video, e.g., described by the text, or providing a visual answer to a question posed by the text, or providing a visualization of a topic of the text. In another example the input sequence may comprise a sequence of input tokens representing an image or video, and the output tokens may represent words or wordpieces, or characters representing text, e.g., for a description or characterization of the image or video, or providing an answer to a question posed visually by the image or video, or providing information on a topic of a topic of the image or video.Attorney Docket No. 45288-0653WO1
[0129]
[0107] In some other implementations both the input sequence and the output sequence may represent an image or video, and both the input tokens and the output tokens may represent a respective image or video. In such implementations the method / system may be configured to perform an image or video transformation. For example the input sequence and the output sequence may represent the same image or video in different styles, e.g., one as an image the other as a sketch of the image; or different styles for the same item of clothing.
[0130]
[0108] In some implementations the input sequence represents data to be compressed, e.g., image data, text data, audio data, or any other type of data; and the output sequence a compressed version of the data. The input and output tokens may each comprise any representation of the data to be compressed / compressed data, e.g., symbols or embeddings generated / decoded by a respective neural network.
[0131]
[0109] In some implementations the input sequence represents a sequence of actions to be performed by an agent, e.g., a mechanical agent in a real-world environment implementing the actions to perform a mechanical task. The output sequence may comprise a modified sequence of actions, e.g., one in which an operating parameter, such as a speed of motion or power consumption, has a limited value; or one in which safety or other boundary is less likely to be crossed. Then both the input tokens and the output tokens may represent the actions to be performed.
[0132]
[0110] In some implementations the input sequence represents a sequence of health data and the output sequence may comprise a sequence of predicted treatment. Then the input tokens may represent any aspect of the health of a patient, e.g., data from blood and other medical tests on the patient and / or EHR (Electronic Health Record) data; and the output tokens may represent diagnostic information, e.g., relating to a disease status of the patient and / or relating to suggested treatments for the patient, and / or relating to a likelihood of an adverse health event for the patient.
[0133] [Hl] As a particular example the sequence processing neural network can comprise a multimodal model neural network in which one or both of the model input (i.e., input sequence) and the model output (i.e., output sequence) comprise an image or audio. For example the multimodal machine learning model may be configured to process an input sequence comprising visual tokens representing pixels of a still or moving image (which here may include a point cloud image), and / or data representing an audio waveform, e.g., values or features of the audioAttorney Docket No. 45288-0653WO1
[0134] waveform such as audio tokens, and / or text tokens representing a sequence of text, to generate an output sequence, e.g., comprising text tokens representing the still or moving image or audio waveform, and / or comprising a sequence of intensity value inputs for the pixels of an image or a sequence of values defining an audio waveform. A visual token may, e.g., represent multiple pixels in a region of the image, e.g., as features of the region. Such a multimodal model may perform any of the previously described tasks, e.g., using a multimodal input, or by providing a multimodal output, or by converting between different input and output modes (e.g., text / image / audio). For example it may generate text representing, describing (e.g., captioning), or otherwise characterizing an image or audio input, e.g., by answering a question related to the image or audio input, e.g., relating to a future, e.g., physical prediction of a state of objects represented by the image or audio. As another example it may generate an image or audio represented, described, or otherwise characterized by a text input, or otherwise in response to the text input, e.g., representing an image or audio answer to a text question.
[0135]
[0112] FIG. 2 is a flow diagram of an example process 200 for training a generative neural network. For convenience, the process 200 will be described as being performed by a system of one or more computers located in one or more locations. For example, a training system, e.g., the training system 100 of FIG. 1, appropriately programmed in accordance with this specification, can perform the process 200.
[0136]
[0113] The system can perform the process 200 at each of multiple training iterations during the training in order to train the generative neural network. As described above, in some cases, prior to the generative neural network being trained using the process 200, the generative neural network can have been trained on one or more initial training tasks, e.g., unsupervised pretraining, supervised fine-tuning, reinforcement learning from human or Al feedback, direct preference optimization, and so on.
[0137]
[0114] The system obtains a set of one or more training sequences (step 202), e.g., by sampling the training sequences from the dataset of training sequences.
[0138]
[0115] As described above, each training sequence represents a respective interaction of a respective agent with a respective environment. Each respective environment is associated with a respective set of actions that each modify a state of the environment. Accordingly, each respective interaction includes a plurality of turns that each include (i) a respective request andAttorney Docket No. 45288-0653WO1
[0139] (ii) a respective action performed in response to the request to modify the state of the environment.
[0140]
[0116] For example, the respective environment for one or more of the training sequences can be a respective software environment and the respective interaction can be a simulation of an interaction with the respective software environment. In this example, the respective set of actions are application programming interface (API) calls or function calls that generate outputs that modify the state of the respective software environment.
[0141]
[0117] For example, the respective software environment can be a database and the respective set of actions can each modify data stored in the database.
[0142]
[0118] As another example, the respective software environment can be an event scheduling service and the respective set of actions include one or more actions that modify events scheduled in the event scheduling service.
[0143]
[0119] Thus, each training sequence can include (i) an initial state representation that represents the state of the respective environment prior to the respective interaction. Optionally, each training sequence can include an action description representation that identifies the respective set of actions for interacting with the respective environment. For example, the action description representation can specify each API call or function call that is available to be made to interact with a software environment.
[0144]
[0120] Each training sequence can also include, for each of the plurality of turns during the interaction, (ii) a respective request representation that characterizes the request to interact with the environment at the turn, and (iii) a respective action representation that characterizes the action performed at the turn. For example, within the training sequence, the initial state representation can precede the respective request representations and action representations for the plurality of turns, i.e., so that the representations in the training sequence are ordered in order of occurrence within the corresponding interaction.
[0145]
[0121] Moreover, for only a proper subset of the plurality of turns during the interaction, the training sequence also includes (iv) a target environment state representation that characterizes the state of the respective environment as of that turn. That is, although the interaction includes a respective action that modifies the state of the environment at every turn, the training sequence only includes a target environment state representation at a proper subset of, i.e., at less than all of, the turns. In other words, for some turns, the sequence does not include a target environmentAttorney Docket No. 45288-0653WO1
[0146] state representation but does include a respective request representation that characterizes the request to interact with the environment at the turn and a respective action representation that characterizes the action performed at the turn.
[0147]
[0122] The turns in the proper subset can be, e.g., at regular intervals within the training sequence, at randomly selected turns within the training sequence, or can be selected using another appropriate technique.
[0148]
[0123] Generally, the interactions represent long-context interactions with many turns and many environment state changes. Thus, the training sequences each include representations for a large number of turns, e.g., each training sequence can include at least 500 turns, at least 1000 turns, or more. Similarly, each training sequence includes a large number of tokens, e.g., at least 100,000 tokens, at least 200,000 tokens, or more.
[0149]
[0124] The proper subset of turns can be a relatively small subset of the total turns represented in the training sequence, i.e., to cause the neural network to track the state across many time steps between each time that the target state is provided. For example, the proper subset can include less than 10% of the turns in the sequence, less than 5% of the turns in the sequence, or less than 2% of the turns in the sequence.
[0150]
[0125] In some cases, the initial state representation and the respective target environment state representations can each represent the state of the environment according to a structured data format.
[0151]
[0126] In some cases, the training sequence includes a respective token at each of the multiple output positions. In these cases, each representation within the training sequence is a subsequence of tokens within the training sequence.
[0152]
[0127] For each of the one or more training sequences, the system processes an input derived from the training sequence using the generative neural network to generate a respective predicted output corresponding to each of a plurality of output positions within the training sequence (step 204). When the training sequence includes a respective token at each of the multiple output positions, the predicted outputs can be score distributions over a vocabulary of tokens, e.g., a vocabulary that includes any or all of the types of tokens described above.
[0153]
[0128] The system then trains the generative neural network using an objective function that, for each of the training sequences and for each turn in the proper subset of turns, promotes alignment (e.g., increased similarity, agreement or predicted likelihood) between the targetAttorney Docket No. 45288-0653WO1
[0154] environment state representation for the turn and the predicted outputs for output positions corresponding to the target environment state representation for the turn (step 206). Thus, the objective trains the generative neural network to “track” the effect of actions on the state of the environment even for turns that do not include a state representation in order to accurately reconstruct the state representations at turns in the proper subset. As used herein, promoting alignment refers to adjusting the parameters of the generative neural network such that the predicted outputs increasingly match or assign higher probabilities to the target environment state representations.
[0155]
[0129] For example, when the respective predicted output for each of the output positions includes a respective score distribution over a vocabulary of tokens, the objective can measure, for each of the training sequences and for each turn in the proper subset of turns during the interaction, respective likelihoods assigned to tokens in the respective turn state representation for the turn by the respective score distributions at the corresponding output positions. For example, the respective likelihoods can be log likelihoods and the objective can be a negative log likelihood objective measured over the corresponding output positions.
[0156]
[0130] The objective can incorporate predicted outputs for output positions that do not correspond to target environment state representations in any of a variety of ways.
[0157]
[0131] For example, the objective can avoid output positions corresponding to request representations, i.e., so that the neural network is not trained on the corresponding predicted outputs, e.g., because, after training, requests will be received as input and therefore the neural network does not need to be able to predict which requests will be received. In other words, in this example, for each of the training sequences, predicted outputs for output positions corresponding to turns not in the proper subset of turns are not measured by the respective objective.
[0158]
[0132] As another example, the objective can avoid output positions corresponding to turns not in the proper subset of turns, i.e., so that the neural network is not trained on the corresponding predicted outputs. In other words, in this example, for each of the training sequences, predicted outputs for output positions corresponding to turns not in the proper subset of turns are not measured by the respective objective.
[0159]
[0133] As another example, the objective can incorporate output positions corresponding to action representations, i.e., so that the neural network is trained on the corresponding predictedAttorney Docket No. 45288-0653WO1
[0160] outputs in order to generate high-quality action representations after training in addition to learning how to track the state of the interaction. In other words, in this example, for each of the training sequences and for each turn in the plurality of turns, the objective promotes alignment between the respective action representation for the turn and the predicted outputs for output positions corresponding to the respective action representation for the turn. For example, when the respective predicted output for each of the output positions includes a respective score distribution over a vocabulary of tokens, the objective can measure, for each of the training sequences and for each turn during the interaction, respective likelihoods assigned to tokens in the respective action representation for the turn by the respective score distributions at the corresponding output positions.
[0161]
[0134] In general training the generative neural network using the objective involves backpropagating gradients of the objective to update trainable parameters, e.g., weights, of the generative neural network. This can use any appropriate gradient descent optimization algorithm, e.g., Adam, Adafactor, AdamW, SGD or another optimization algorithm.
[0162]
[0135] FIG. 3 is a flow diagram of an example process 300 for generating an interaction that is represented in the training dataset. For convenience, the process 300 will be described as being performed by a system of one or more computers located in one or more locations. For example, a training system, e.g., the training system 100 of FIG. 1, appropriately programmed in accordance with this specification, can perform the process 300.
[0163]
[0136] In particular, the system can generate the interaction turn by turn, i.e., by performing steps 302-310 at each turn in the interaction.
[0164]
[0137] Prior to performing steps 302-310, the system can define an initial environment state for the interaction and the set of actions for the interaction. For example, for a software environment, an initial system state (e.g., a set of calendar entries, database tables) and a collection of functions or APIs that can modify this state are defined. For example, in a calendar management domain, APIs might include create event, modify event,
[0165] add meeting notes to event, etc. In a database management domain, APIs might include create table, insert data, select data, etc. These APIs have defined inputs and produce deterministic outputs that affect the system state.Attorney Docket No. 45288-0653WO1
[0166]
[0138] The system samples, from a distribution over the respective set of actions, the action for the turn (step 302). For example, the distribution can be a uniform distribution over the respective set of actions.
[0167]
[0139] The system generates parameters that parametrize the action (step 304). For example, for each input to an API, the system can randomly sample a value for the input from the space of allowed values for the input.
[0168]
[0140] The system determines an output of executing the action for the turn parametrized by the generated parameters (step 306).
[0169]
[0141] The system modifies the state of the environment based on the output (step 308).
[0170]
[0142] Thus, the system generates the action and updates the state for each turn.
[0171]
[0143] The system can also determine a request that is satisfied by performing the action for the turn parameterized by the generated parameters for the turn and then include the request as part of the interaction. For example, the system can process an input that identifies the action for the turn and the generated parameters using a generative neural network, e.g., the generative neural network being trained, a pre-trained version of the generative neural network being trained, or a different, already-trained generative neural network to generate an output that predicts a request that would be satisfied by performing the action for the turn parameterized by the generated parameters for the turn.
[0172]
[0144] Thus, although the system tracks the state of the environment at each turn in the interaction, the system only inserts representations of the state for a proper subset of the turns when generating the training sequence that represents the interaction.
[0173]
[0145] FIG. 4 shows an example 400 of the performance of the described techniques.
[0174]
[0146] In particular, the example 400 shows the performance of a generative neural network on a task that requires tracking the state of a database across multiple interactions, e.g., with a user or a simulated user. More specifically, the example 400 shows the performance of the generative neural network both before and after being trained using the described techniques (LOST).
[0175] Moreover, the dataset was not included in the training dataset used to train the generative neural network using the described techniques, i.e., the dataset is an out-of-distribution dataset. As can be seen from the example 400, after being trained using the described techniques, the generative neural network is able to reliably track the state of the database across the entire interaction, despite being unable to do so reliably before the training. Thus, the generative neural network isAttorney Docket No. 45288-0653WO1
[0176] able to effectively respond to queries that relate to the current database state through the interaction.
[0177]
[0147] FIG. 5 illustrates an example interaction 502 within a database management domain 504 and the corresponding training sequence 506 derived from that interaction 502. The environment 508 depicted in this example is a software environment, specifically a database 508, where the respective set of actions 510 each modify data stored in the database 508. The training sequence 506 begins with an initial state representation 512 that characterizes the state of the database 508 prior to the interaction 502 taking place. Optionally, the training sequence 506 includes an action description representation 514 that identifies the specific application programming interface calls 516 or function calls 516 available for interacting with the database 508. In this database management domain 504, these available application programming interfaces 516 might include create table, insert data, and select data functions, which have defined inputs and produce deterministic outputs that affect the overall system state.
[0178]
[0148] The interaction 502 itself is represented as a plurality of sequential turns 518. Each turn 518 in the sequence includes a respective request representation 520 that characterizes the request made at that turn 518, along with a respective action representation 522 characterizing the specific application programming interface 516 or function call 516 performed in response. For instance, a first turn 518 may include a request to add a new user to the system and a corresponding insert data action representation 522 parameterized to execute that request.
[0179] Although the action 510 modifies the state of the database 508 at every turn 518, the training sequence 506 explicitly includes a target environment state representation 524 at only a proper subset of the turns 518. Therefore, the training sequence 506 may not include a target environment state representation 524 for the first turn 518. At a subsequent turn 518 that is selected to be part of the proper subset, the training sequence 506 includes the target environment state representation 524 characterizing the exact, updated state of the database 508 as of that specific turn 518. By providing the target environment state representation 524 at less than all of the turns 518, the objective function 526 trains the generative neural network 528 to implicitly track the cascading effects of actions 510 on the state of the database 508 across multiple turns 518 in order to accurately reconstruct the state representations when required.Attorney Docket No. 45288-0653WO1
[0180]
[0149] In this specification, the term "configured" is used in relation to computing systems and environments, as well as computer program components. A computing system or environment is considered "configured" to perform specific operations or actions when it possesses the necessary software, firmware, hardware, or a combination thereof, enabling it to carry out those operations or actions during operation. For instance, configuring a system might involve installing a software library with specific algorithms, updating firmware with new instructions for handling data, or adding a hardware component for enhanced processing capabilities.
[0181] Similarly, one or more computer programs are “configured” to perform particular operations or actions when they contain instructions that, upon execution by a computing device or hardware, cause the device to perform those intended operations or actions.
[0182]
[0150] The embodiments and functional operations described in this specification can be implemented in various forms, including digital electronic circuitry, software, firmware, computer hardware (encompassing the disclosed structures and their structural equivalents), or any combination thereof. The subject matter can be realized as one or more computer programs, essentially modules of computer program instructions encoded on a tangible non-transitory storage medium for execution by or to control the operation of a computing device or hardware. The storage medium can be a storage device such as a hard drive or solid-state drive (SSD), a storage medium, a random or serial access memory device, or a combination of these.
[0183] Additionally or alternatively, the program instructions can be encoded on a transmitted signal, such as a machine-generated electrical, optical, or electromagnetic signal, designed to carry information for transmission to a receiving device or system for execution by a computing device or hardware. Furthermore, implementations may leverage emerging technologies like quantum computing or neuromorphic computing for specific applications, and may be deployed in distributed or cloud-based environments where components reside on different machines or within a cloud infrastructure.
[0184]
[0151] The term “computing device or hardware” refers to the physical components involved in data processing and encompasses all types of devices and machines used for this purpose.
[0185] Examples include processors or processing units, computers, multiple processors or computers working together, graphics processing units (GPUs), tensor processing units (TPUs), and specialized processing hardware such as field-programmable gate arrays (FPGAs) or applicationspecific integrated circuits (ASICs). In addition to hardware, a computing device or hardwareAttorney Docket No. 45288-0653WO1
[0186] may also include code that creates an execution environment for computer programs. This code can take the form of processor firmware, a protocol stack, a database management system, an operating system, or a combination of these elements. Embodiments may particularly benefit from utilizing the parallel processing capabilities of GPUs, in a General-Purpose computing on Graphics Processing Units (GPGPU) context, where code specifically designed for GPU execution, often called kernels or shaders, is employed. Similarly, TPUs excel at running optimized tensor operations crucial for many machine learning algorithms. By leveraging these accelerators and their specialized programming models, the system can achieve significant speedups and efficiency gains for tasks involving artificial intelligence and machine learning, particularly in areas such as computer vision, natural language processing, and robotics.
[0187]
[0152] A computer program, also referred to as software, an application, a module, a script, code, or simply a program, can be written in any programming language, including compiled or interpreted languages, and declarative or procedural languages. It can be deployed in various forms, such as a standalone program, a module, a component, a subroutine, or any other unit suitable for use within a computing environment. A program may or may not correspond to a single file in a file system and can be stored in various ways. This includes being embedded within a file containing other programs or data (e.g., scripts within a markup language document), residing in a dedicated file, or distributed across multiple coordinated files (e.g., files storing modules, subprograms, or code segments). A computer program can be executed on a single computer or across multiple computers, whether located at a single site or distributed across multiple sites and interconnected through a data communication network. The specific implementation of the computer programs may involve a combination of traditional programming languages and specialized languages or libraries designed for GPU programming or TPU utilization, depending on the chosen hardware platform and desired performance characteristics.
[0188]
[0153] In this specification, the term “engine” broadly refers to a software-based system, subsystem, or process designed to perform one or more specific functions. An engine is typically implemented as one or more software modules or components installed on one or more computers, which can be located at a single site or distributed across multiple locations. In some instances, one or more dedicated computers may be used for a particular engine, while in other cases, multiple engines may operate concurrently on the same one or more computers. ExamplesAttorney Docket No. 45288-0653WO1
[0189] of engine functions within the context of Al and machine learning could include data preprocessing and cleaning, feature engineering and extraction, model training and optimization, inference and prediction generation, and post-processing of results. The specific design and implementation of engines will depend on the overall architecture and the distribution of computational tasks across various hardware components, including CPUs, GPUs, TPUs, and other specialized processors.
[0190]
[0154] The processes and logic flows described in this specification can be executed by one or more programmable computers running one or more computer programs to perform functions by operating on input data and generating output. Additionally, graphics processing units (GPUs) and tensor processing units (TPUs) can be utilized to enable concurrent execution of aspects of these processes and logic flows, significantly accelerating performance. This approach offers significant advantages for computationally intensive tasks often found in Al and machine learning applications, such as matrix multiplications, convolutions, and other operations that exhibit a high degree of parallelism. By leveraging the parallel processing capabilities of GPUs and TPUs, significant speedups and efficiency gains compared to relying solely on CPUs can be achieved. Alternatively or in combination with programmable computers and specialized processors, these processes and logic flows can also be implemented using specialized processing hardware, such as field-programmable gate arrays (FPGAs) or application-specific integrated circuits (ASICs), for even greater performance or energy efficiency in specific use cases.
[0191]
[0155] Computers capable of executing a computer program can be based on general-purpose microprocessors, special-purpose microprocessors, or a combination of both. They can also utilize any other type of central processing unit (CPU). Additionally, graphics processing units (GPUs), tensor processing units (TPUs), and other machine learning accelerators can be employed to enhance performance, particularly for tasks involving artificial intelligence and machine learning. These accelerators often work in conjunction with CPUs, handling specialized computations while the CPU manages overall system operations and other tasks. Typically, a CPU receives instructions and data from read-only memory (ROM), random access memory (RAM), or both. The essential elements of a computer include a CPU for executing instructions and one or more memory devices for storing instructions and data. The specific configuration of processing units and memory will depend on factors like the complexity of the Al model, theAttorney Docket No. 45288-0653WO1
[0192] volume of data being processed, and the desired performance and latency requirements.
[0193] Embodiments can be implemented on a wide range of computing platforms, from small embedded devices with limited resources to large-scale data center systems with high-performance computing capabilities. The system may include storage devices like hard drives, SSDs, or flash memory for persistent data storage.
[0194]
[0156] Computer-readable media suitable for storing computer program instructions and data encompass all forms of non-volatile memory, media, and memory devices. Examples include semiconductor memory devices such as read-only memory (ROM), solid-state drives (SSDs), and flash memory devices; hard disk drives (HDDs); optical media; and optical discs such as CDs, DVDs, and Blu-ray discs. The specific type of computer-readable media used will depend on factors such as the size of the data, access speed requirements, cost considerations, and the desired level of portability or permanence.
[0195]
[0157] To facilitate user interaction, embodiments of the subject matter described in this specification can be implemented on a computing device equipped with a display device, such as a liquid crystal display (LCD) or an organic light-emitting diode (OLED) display, for presenting information to the user. Input can be provided by the user through various means, including a keyboard, touchscreens, voice commands, gesture recognition, or other input modalities depending on the specific device and application. Additional input methods can include acoustic, speech, or tactile input, while feedback to the user can take the form of visual, auditory, or tactile feedback. Furthermore, computers can interact with users by exchanging documents with a user's device or application. This can involve sending web content or data in response to requests or sending and receiving text messages or other forms of messages through mobile devices or messaging platforms. The selection of input and output modalities will depend on the specific application and the desired form of user interaction.
[0196]
[0158] Machine learning models can be implemented and deployed using machine learning frameworks, such as TensorFlow or JAX. These frameworks offer comprehensive tools and libraries that facilitate the development, training, and deployment of machine learning models.
[0197]
[0159] Embodiments of the subject matter described in this specification can be implemented within a computing system comprising one or more components, depending on the specific application and requirements. These may include a back-end component, such as a back-end server or cloud-based infrastructure; an optional middleware component, such as a middlewareAttorney Docket No. 45288-0653WO1
[0198] server or application programming interface (API), to facilitate communication and data exchange; and a front-end component, such as a client device with a user interface, a web browser, or an app, through which a user can interact with the implemented subject matter. For instance, the described functionality could be implemented solely on a client device (e.g., for on-device machine learning) or deployed as a combination of front-end and back-end components for more complex applications. These components, when present, can be interconnected using any form or medium of digital data communication, such as a communication network like a local area network (LAN) or a wide area network (WAN) including the Internet. The specific system architecture and choice of components will depend on factors such as the scale of the application, the need for real-time processing, data security requirements, and the desired user experience.
[0199]
[0160] The computing system can include clients and servers that may be geographically separated and interact through a communication network. The specific type of network, such as a local area network (LAN), a wide area network (WAN), or the Internet, will depend on the reach and scale of the application. The client-server relationship is established through computer programs running on the respective computers and designed to communicate with each other using appropriate protocols. These protocols may include HTTP, TCP / IP, or other specialized protocols depending on the nature of the data being exchanged and the security requirements of the system. In certain embodiments, a server transmits data or instructions to a user's device, such as a computer, smartphone, or tablet, acting as a client. The client device can then process the received information, display results to the user, and potentially send data or feedback back to the server for further processing or storage. This allows for dynamic interactions between the user and the system, enabling a wide range of applications and functionalities.
[0200]
[0161] While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or on the scope of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment.
[0201] Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially beAttorney Docket No. 45288-0653WO1
[0202] claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
[0203]
[0162] Similarly, while operations are depicted in the drawings and recited in the claims in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0204]
[0163] Particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous.
[0205]
[0164] Aspects of the present disclosure may be as set out in the following clauses:
[0206] Clause 1. A method performed by one or more computers for training a generative neural network, the method comprising:
[0207] obtaining a set of one or more training sequences, wherein each training sequence represents a respective interaction of a respective agent with a respective environment, wherein each respective environment is associated with a respective set of actions that each modify a state of the environment, wherein the respective interaction comprises a plurality of turns that each include (i) a respective request and (ii) a respective action performed in response to the request to modify the state of the environment, and wherein each training sequence comprises:
[0208] (i) an initial state representation that represents the state of the respective environment prior to the respective interaction;
[0209] for each of the plurality of turns during the interaction:Attorney Docket No. 45288-0653WO1
[0210] (ii) a respective request representation that characterizes the request to interact with the environment at the turn, and
[0211] (iii) a respective action representation that characterizes the action performed at the turn; and
[0212] for only a proper subset of the plurality of turns during the interaction:
[0213] (iv) a target environment state representation that characterizes the state of the respective environment as of that turn;
[0214] for each of the one or more training sequences, processing an input derived from the training sequence using the generative neural network to generate a respective predicted output corresponding to each of a plurality of output positions within the training sequence; and training the generative neural network using an objective function that, for each of the training sequences and for each turn in the proper subset of turns, promotes alignment between the target environment state representation for the turn and the predicted outputs for output positions corresponding to the target environment state representation for the turn.
[0215] Clause 2. The method of clause 1, wherein the initial state representation precedes the respective request representations and action representations for the plurality of turns within the training sequence.
[0216] Clause 3. The method of clause 1 or clause 2, wherein each training sequence further comprises:
[0217] (v) an action description representation that identifies the respective set of actions for interacting with the respective environment.
[0218] Clause 4. The method of clause 3, when dependent on clause 2, wherein the initial state representation and the action description representation precede the respective request representations and action representations for the plurality of turns within the training sequence. Clause 5. The method of any preceding clause, wherein the respective environment for one or more of the training sequences is a respective software environment and the respective interaction is a simulation of an interaction with the respective software environment.
[0219] Clause 6. The method of clause 5, wherein the respective set of actions are application programming interface (API) calls or function calls that generate outputs that modify the state of the respective software environment.Attorney Docket No. 45288-0653WO1
[0220] Clause 7. The method of clause 6, wherein the respective software environment is a database and the respective set of actions each modify data stored in the database.
[0221] Clause 8. The method of clause 6, wherein the respective software environment is an event scheduling service and the respective set of actions include one or more actions that modify events scheduled in the event scheduling service.
[0222] Clause 9. The method of any preceding clause, wherein the initial state representation and the respective target environment state representations each represent the state of the environment according to a structured data format.
[0223] Clause 10. The method of any preceding clause, further comprising:
[0224] generating the respective interactions, comprising, at each turn:
[0225] sampling, from a distribution over the respective set of actions, the action for the turn;
[0226] generating parameters that parametrize the action;
[0227] determining an output of executing the action for the turn parametrized by the generated parameters; and
[0228] modifying the state of the environment based on the output.
[0229] Clause 11. The method of clause 10, further comprising, for each turn:
[0230] determining a request that is satisfied by performing the action for the turn parameterized by the generated parameters for the turn.
[0231] Clause 12. The method of clause 11, wherein determining a request that is satisfied by performing the action for the turn parameterized by the generated parameters for the turn comprises:
[0232] processing an input that identifies the action for the turn and the generated parameters using a second generative neural network to generate an output that predicts a request that would be satisfied by performing the action for the turn parameterized by the generated parameters for the turn.
[0233] Clause 13. The method of any preceding clause, wherein, for each of the training sequences, predicted outputs for output positions corresponding to turns not in the proper subset of turns are not measured by the respective objective.Attorney Docket No. 45288-0653WO1
[0234] Clause 14. The method of any preceding clause, wherein, for each of the training sequences, predicted outputs for output positions corresponding to request representations are not measured by the respective objective.
[0235] Clause 15. The method of any preceding clause, wherein the objective measures, for each of the training sequences and for each turn during the interaction, respective likelihoods assigned to the tokens in the respective action representation for the turn by the respective score distributions at the corresponding output positions.
[0236] Clause 16. The method of any preceding clause wherein, for each of the training sequences and for each turn in the plurality of turns, promotes alignment between the respective action representation for the turn and the predicted outputs for output positions corresponding to the respective action representation for the turn.
[0237] Clause 17. The method of any preceding clause, wherein the output sequence comprises a respective output token at each of the plurality of output positions.
[0238] Clause 18. The method of clause 17, wherein the respective predicted output for each of the output positions comprises a respective score distribution over a vocabulary of tokens.
[0239] Clause 19. The method of clause 18, wherein the objective measures, for each of the training sequences and for each turn in the proper subset of turns during the interaction, respective likelihoods assigned to tokens in the respective turn state representation for the turn by the respective score distributions at the corresponding output positions.
[0240] Clause 20. The method of clause 17 or clause 18, when dependent on clause 16, wherein the objective measures, for each of the training sequences and for each turn during the interaction, respective likelihoods assigned to tokens in the respective action representation for the turn by the respective score distributions at the corresponding output positions.
[0241] Clause 21. The method of any preceding clause, wherein the one or more training sequences each comprise at least 500 turns.
[0242] Clause 22. The method of any preceding clause, wherein the one or more training sequences each comprise at least 1000 turns.
[0243] Clause 23. The method of any preceding clause, wherein the one or more training sequences each comprise at least 100,000 tokens.
[0244] Clause 24. The method of any preceding clause, wherein the one or more training sequences each comprise at least 200,000 tokens.Attorney Docket No. 45288-0653WO1
[0245] Clause 25. The method of any preceding clause, wherein the proper subset includes less than 10% of the plurality of turns.
[0246] Clause 26. The method of any preceding clause, wherein the proper subset includes less than 5% of the plurality of turns.
[0247] Clause 27. The method of any preceding clause, wherein the proper subset includes less than 2% of the plurality of turns.
[0248] Clause 28. The method of any preceding clause, further comprising:
[0249] after training the generative neural network, using the generative neural network to perform a downstream task.
[0250] Clause 29. The method of clause 28, wherein the downstream task is a planning task.
[0251] Clause 30. The method of clause 28 or clause 29, wherein the downstream task is an environment interaction task.
[0252] Clause 31. The method of any one of clauses 28-30, wherein the downstream task is a multimodal task that requires processing tokens that represent two or more of: text, audio, images, or video.
[0253] Clause 32. The method of any one of clauses 28-31, wherein the downstream task is a multimodal task that requires generating tokens that represent two or more of: text, audio, images or video.
[0254] Clause 33. The method of any preceding clause, wherein the generative neural network is a multi-modal generative neural network.
[0255] Clause 34. A method performed by one or more computers using a generative neural network, the method comprising:
[0256] receiving an input comprising representations of an interaction history between an agent and an environment, the environment having a state modifiable by actions, the interaction history comprising representations of a plurality of turns, each turn including (i) a respective request and (ii) a respective action performed in response to the request that modified the state of the environment;
[0257] processing the input with the generative neural network, wherein the neural network has been trained to promote alignment between predicted outputs at output positions corresponding to a target environment state representation and a target environment state representation at each of one or more turns in an interaction sequence comprising a plurality of turns.Attorney Docket No. 45288-0653WO1
[0258] Clause 35. The method of clause 34, wherein the one or more turns are a proper subset of the plurality of turns.
[0259] Clause 36. The method of clause 35, wherein the proper subset includes less than 10% of the plurality of turns.
[0260] Clause 37. The method of clause 35, wherein the proper subset includes less than 5% of the plurality of turns.
[0261] Clause 38. The method of clause 35, wherein the proper subset includes less than 2% of the plurality of turns.
[0262] Clause 39. The method of any preceding clause, when dependent on clause 28, wherein the downstream task is:
[0263] i) an image or audio generation task, wherein the input sequence of tokens characterizes the image or audio to be generated and the output sequence of tokens comprises tokens defining an image or audio waveform characterized by the input sequence of tokens; or
[0264] ii) an image or audio processing task, wherein the input sequence of tokens defines an image or audio input and the output sequence of tokens comprises tokens defining text that describes the image or audio input;
[0265] iii) a multimodal processing task, wherein the input sequence of tokens characterizes both an image or audio input and a text input and wherein the output sequence of tokens comprises tokens defining a result of an image or audio processing task defined by the text;
[0266] iv) an agent control task, wherein the agent interacts with an environment to perform the task, wherein the input sequence of tokens comprises an observation of the environment, and wherein the output sequence of tokens comprises tokens defining one or more actions to be performed by the agent in the environment in response to the observation.
[0267] Clause 40. A system comprising one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform the operations of the respective method of any preceding clause.
[0268] Clause 41. One or more computer storage media encoded with instructions that, when executed by one or more computers, cause the one or more computers to perform the operations of the respective method of any one of clauses 1-39.Attorney Docket No. 45288-0653WO1
[0269] Clause 42. A system comprising one or more computers and one or more storage devices storing instructions that when executed by the one or more computers cause the one or more computers to implement a generative neural network, wherein the generative neural network is configured to:
[0270] receive an input comprising representations of an interaction history between an agent and an environment, the environment having a state modifiable by actions, the interaction history comprising representations of a plurality of turns, each turn including (i) a respective request and (ii) a respective action performed in response to the request that modified the state of the environment; and
[0271] while processing the input, generate, responsive to a predetermined trigger associated with the input or the interaction history, an output comprising an explicit environment state representation that characterizes the state of the environment as influenced by the actions in the interaction history up to a point related to the trigger.
[0272] Clause 43. One or more computer storage media encoded with instructions that, when executed by one or more computers, cause the one or more computers to implement the generative neural network of clause 42.
[0273]
[0165] What is claimed is:
Claims
Attorney Docket No. 45288-0653WO1CLAIMS1. A method performed by one or more computers for training a generative neural network, the method comprising:obtaining a set of one or more training sequences, wherein each training sequence represents a respective interaction of a respective agent with a respective environment, wherein each respective environment is associated with a respective set of actions that each modify a state of the environment, wherein the respective interaction comprises a plurality of turns that each include (i) a respective request and (ii) a respective action performed in response to the request to modify the state of the environment, and wherein each training sequence comprises:(i) an initial state representation that represents the state of the respective environment prior to the respective interaction;for each of the plurality of turns during the interaction:(ii) a respective request representation that characterizes the request to interact with the environment at the turn, and(iii) a respective action representation that characterizes the action performed at the turn; andfor only a proper subset of the plurality of turns during the interaction:(iv) a target environment state representation that characterizes the state of the respective environment as of that turn;for each of the one or more training sequences, processing an input derived from the training sequence using the generative neural network to generate a respective predicted output corresponding to each of a plurality of output positions within the training sequence; and training the generative neural network using an objective function that, for each of the training sequences and for each turn in the proper subset of turns, promotes alignment between the target environment state representation for the turn and the predicted outputs for output positions corresponding to the target environment state representation for the turn.
2. The method of claim 1, wherein the initial state representation precedes the respective request representations and action representations for the plurality of turns within the training sequence.Attorney Docket No. 45288-0653WO13. The method of claim 1 or claim 2, wherein each training sequence further comprises:(v) an action description representation that identifies the respective set of actions for interacting with the respective environment.
4. The method of claim 3, when dependent on claim 2, wherein the initial state representation and the action description representation precede the respective request representations and action representations for the plurality of turns within the training sequence.
5. The method of any preceding claim, wherein the respective environment for one or more of the training sequences is a respective software environment and the respective interaction is a simulation of an interaction with the respective software environment.
6. The method of claim 5, wherein the respective set of actions are application programming interface (API) calls or function calls that generate outputs that modify the state of the respective software environment.
7. The method of claim 6, wherein the respective software environment is a database and the respective set of actions each modify data stored in the database.
8. The method of claim 6, wherein the respective software environment is an event scheduling service and the respective set of actions include one or more actions that modify events scheduled in the event scheduling service.
9. The method of any preceding claim, wherein the initial state representation and the respective target environment state representations each represent the state of the environment according to a structured data format.Attorney Docket No. 45288-0653WO110. The method of any preceding claim, further comprising:generating the respective interactions, comprising, at each turn:sampling, from a distribution over the respective set of actions, the action for the turn;generating parameters that parametrize the action;determining an output of executing the action for the turn parametrized by the generated parameters; andmodifying the state of the environment based on the output.
11. The method of claim 10, further comprising, for each turn:determining a request that is satisfied by performing the action for the turn parameterized by the generated parameters for the turn.
12. The method of claim 11, wherein determining a request that is satisfied by performing the action for the turn parameterized by the generated parameters for the turn comprises:processing an input that identifies the action for the turn and the generated parameters using a second generative neural network to generate an output that predicts a request that would be satisfied by performing the action for the turn parameterized by the generated parameters for the turn.
13. The method of any preceding claim, wherein, for each of the training sequences, predicted outputs for output positions corresponding to turns not in the proper subset of turns are not measured by the objective function.
14. The method of any preceding claim, wherein, for each of the training sequences, predicted outputs for output positions corresponding to request representations are not measured by the objective function.
15. The method of any preceding claim, wherein the objective function, for each of the training sequences and for each turn in the plurality of turns, promotes alignment between the respective action representation for the turn and the predicted outputs for output positions corresponding to the respective action representation for the turn.Attorney Docket No. 45288-0653WO116. The method of any preceding claim, wherein the predicted outputs comprise a respective output token at each of the plurality of output positions.
17. The method of any preceding claim, wherein the respective predicted output for each of the output positions comprises a respective score distribution over a vocabulary of tokens.
18. The method of claim 17, wherein the objective function measures, for each of the training sequences and for each turn during the interaction, respective likelihoods assigned to tokens in the respective action representation for the turn by the respective score distributions at the corresponding output positions.
19. The method of claim 18, wherein the objective function measures, for each of the training sequences and for each turn in the proper subset of turns during the interaction, respective likelihoods assigned to tokens in the respective target environment state representation for the turn by the respective score distributions at the corresponding output positions.
20. The method of claim 17 or claim 18, when dependent on claim 16, wherein the objective function measures, for each of the training sequences and for each turn during the interaction, respective likelihoods assigned to tokens in the respective action representation for the turn by the respective score distributions at the corresponding output positions.
21. The method of any preceding claim, wherein the one or more training sequences each comprise at least 500 turns.
22. The method of any preceding claim, wherein the one or more training sequences each comprise at least 1000 turns.
23. The method of any preceding claim, wherein the one or more training sequences each comprise at least 100,000 tokens.
24. The method of any preceding claim, wherein the one or more training sequences each comprise at least 200,000 tokens.
25. The method of any preceding claim, wherein the proper subset includes less than 10% of the plurality of turns.Attorney Docket No. 45288-0653WO126. The method of any preceding claim, wherein the proper subset includes less than 5% of the plurality of turns.
27. The method of any preceding claim, wherein the proper subset includes less than 2% of the plurality of turns.
28. The method of any preceding claim, further comprising:after training the generative neural network, using the generative neural network to perform a downstream task.
29. The method of claim 28, wherein the downstream task is a planning task.
30. The method of claim 28 or claim 29, wherein the downstream task is an environment interaction task.
31. The method of any one of claims 28-30, wherein the downstream task is a multi-modal task that requires processing tokens that represent two or more of: text, audio, images, or video.
32. The method of any one of claims 28-31, wherein the downstream task is a multi-modal task that requires generating tokens that represent two or more of: text, audio, images or video.
33. The method of any preceding claim, wherein the generative neural network is a multimodal generative neural network.
34. A method performed by one or more computers using a generative neural network, the method comprising:receiving an input comprising representations of an interaction history between an agent and an environment, the environment having a state modifiable by actions, the interaction history comprising representations of a plurality of turns, each turn including (i) a respective request and (ii) a respective action performed in response to the request that modified the state of the environment;processing the input with the generative neural network, wherein the neural network has been trained to promote alignment between predicted outputs at output positions corresponding to a target environment state representation and the target environment state representation at each of one or more turns in an interaction sequence comprising a plurality of turns.Attorney Docket No. 45288-0653WO135. The method of claim 34, wherein the one or more turns are a proper subset of the plurality of turns.
36. The method of claim 35, wherein the proper subset includes less than 10% of the plurality of turns.
37. The method of claim 35, wherein the proper subset includes less than 5% of the plurality of turns.
38. The method of claim 35, wherein the proper subset includes less than 2% of the plurality of turns.
39. The method of any one of claims 34-38, wherein processing the input with the generative neural network comprises using the generative neural network to perform a downstream task.
40. The method of claim 39 or any one of claims 28-33 when dependent on claim 28, wherein the downstream task is:i) an image or audio generation task, wherein the input characterizes the image or audio to be generated and the predicted outputs define an image or audio waveform characterized by the input; orii) an image or audio processing task, wherein the input defines an image or audio input and the predicted outputs define text that describes the image or audio input; oriii) a multimodal processing task, wherein the input characterizes both an image or audio input and a text input and wherein the predicted outputs define a result of an image or audio processing task defined by the text; oriv) an agent control task, wherein the agent interacts with an environment to perform the task, wherein the input comprises an observation of the environment, and wherein the predicted outputs define one or more actions to be performed by the agent in the environment in response to the observation.Attorney Docket No. 45288-0653WO141. A method performed by one or more computers using a generative neural network, the method comprising:receiving an input comprising representations of an interaction history between an agent and an environment, the environment having a state modifiable by actions, the interaction history comprising representations of a plurality of turns, each turn including (i) a respective request and (ii) a respective action performed in response to the request that modified the state of the environment; andwhile processing the input, generating, responsive to a predetermined trigger associated with the input or the interaction history, an output comprising an explicit environment state representation that characterizes the state of the environment as influenced by the actions in the interaction history up to a point related to the trigger.
42. The method of claim 41, wherein the generative neural network performs a downstream task based at least in part on the explicit environment state representation, wherein the downstream task is:i) an image or audio generation task, wherein the input further characterizes an image or audio to be generated and the generative neural network defines an image or audio waveform; or ii) an image or audio processing task, wherein the input further defines an image or audio and the generative neural network defines text that describes the image or audio; oriii) a multimodal processing task, wherein the input further characterizes both an image or audio and a text and wherein the generative neural network defines a result of an image or audio processing task defined by the text; oriv) an agent control task, wherein the input further comprises an observation of the environment, and wherein the generative neural network defines one or more actions to be performed by the agent in the environment in response to the observation.
43. A system comprising one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform the operations of the respective method of any preceding claim.Attorney Docket No. 45288-0653WO144. One or more computer storage media encoded with instructions that, when executed by one or more computers, cause the one or more computers to perform the operations of the respective method of any one of claims 1-42.
45. One or more computer storage media encoded with instructions that, when executed by one or more computers, cause the one or more computers to implement the generative neural network of claims 1-42.
46. One or more computer storage media storing a generative neural network trained by the method of any one of claims 1-33.
