Machine-learned models for processing structural representations of therapeutic materials

A machine-learned sequence processing model trained on diverse datasets addresses the limitations of specialized models by providing a unified, efficient, and accessible tool for therapeutic research, enhancing generalization and reducing computational costs through cross-task knowledge transfer.

WO2025235348A1PCT designated stage Publication Date: 2025-11-13GOOGLE LLC

Patent Information

Application Number
PCT/US2025/027695
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-03-17
Filing Date
2025-05-05
Publication Date
2025-11-13

AI Technical Summary

Technical Problem

Traditional machine-learned models for therapeutic compound prediction are specialized and lack generalization across different tasks and stages of the drug discovery pipeline, limiting their utility and efficiency in therapeutic development.

Method used

A machine-learned sequence processing model is trained on diverse datasets and tasks using a shared representational schema, enabling it to handle multiple material representations and perform various therapeutic compound prediction tasks with improved generalization and conversational abilities.

Benefits of technology

The model provides a unified, efficient, and accessible tool for therapeutic research, reducing computational and energy costs by minimizing redundant processing and enhancing cross-task knowledge transfer, leading to improved performance and reduced latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2025027695_13112025_PF_FP_ABST
    Figure US2025027695_13112025_PF_FP_ABST
Patent Text Reader

Abstract

An example computer-implemented method for training a machine-learned sequence processing model to process queries over material structures includes obtaining a plurality of training inputs comprising a plurality of input sequences respectively corresponding to a plurality of representational schemas for representing material structures of a plurality of different materials, wherein each respective input sequence of the plurality of input sequences comprises a respective textual query and a respective sequence-based structural representation of a respective material, wherein each different respective sequence-based structural representation is characterized by a different respective representational schema; generating, using a machine-learned sequence processing model, a plurality of training outputs that respectively correspond to the plurality of training inputs; evaluating the plurality of training outputs; and updating, based on the evaluation of the plurality of training outputs, one or more parameters of the machine-learned sequence processing model.
Need to check novelty before this filing date? Find Prior Art

Description

MACHINE-LEARNED MODELS FOR PROCESSING STRUCTURAL REPRESENTATIONS OF THERAPEUTIC MATERIALS PRIORITY CLAIM

[0001] The present application is based on and claims priority to United States Provisional Application Number 63 / 773,114 having a filing date of March 17, 2025 and United States Provisional Application Number 63 / 643,721 having a filing date of May 7, 2024. Application claims priority to and the benefit of each of such applications and incorporates all such applications herein by reference in their entirety. FIELD

[0002] The present disclosure relates generally to machine learning processes and machine-learned devices and systems. More particularly, the present disclosure relates to machine-learned models for processing structural representations of therapeutic materials. BACKGROUND

[0003] A computer can receive input(s). The computer can execute instructions to process the input(s) to generate output(s) using a parameterized model. The computer can obtain feedback on its performance in generating the outputs with the model. The computer can generate feedback by evaluating its performance. The computer can receive feedback from an external source. The computer can update parameters of the model based on the feedback to improve its performance. In this manner, the computer can iteratively “learn” to generate the desired outputs. The resulting model is often referred to as a machine-learned model. SUMMARY

[0004] Aspects and advantages of embodiments of the present disclosure will be set forth in part in the following description, or can be learned from the description, or can be learned through practice of the embodiments.

[0005] In an aspect, the present disclosure provides a first example method. In some implementations, the first example method includes obtaining a plurality of training inputs comprising a plurality of input sequences respectively corresponding to a plurality ofrepresentational schemas for representing material structures of a plurality of different materials, wherein each respective input sequence of the plurality of input sequences includes a respective textual query and a respective sequence-based structural representation of a respective material, wherein each different respective sequence-based structural representation is characterized by a different respective representational schema. In some implementations, the first example method includes generating, using a machine-learned sequence processing model, a plurality of training outputs that respectively correspond to the plurality of training inputs. In some implementations, the first example method includes evaluating the plurality of training outputs. In some implementations, the first example method includes updating, based on the evaluation of the plurality of training outputs, one or more parameters of the machine-learned sequence processing model.

[0006] In an aspect, the present disclosure provides a second example method. In some implementations, the second example method includes accessing a plurality of therapeutic data sequences respectively comprising sequence-based structural representations of materials and corresponding textual queries. In some implementations, the second example method includes accessing transcript data comprising a plurality of multi-turn query-response dialog sequences, wherein a respective multi-turn query-response dialog sequence includes a first portion indicating a query from a first entity and a second portion indicating a response from a second entity. In some implementations, the second example method includes obtaining a plurality of training inputs comprising the plurality of therapeutic data sequences and the transcript data in proportions according to a mixture ratio, wherein the plurality of therapeutic data sequences are formatted into a multi-turn query-response dialog sequence format. In some implementations, the second example method includes generating, using a machine-learned sequence processing model, a plurality of training outputs that respectively correspond to the plurality of training inputs. In some implementations, the second example method includes evaluating the plurality of training outputs. In some implementations, the second example method includes updating, based on the evaluation of the plurality of training outputs, one or more parameters of the machine-learned sequence processing model.

[0007] In an aspect, the present disclosure provides a third example method. In some implementations, the third example method includes constructing an input sequence comprising a textual query and a sequence-based structural representation of a material. In some implementations, the third example method includes generating, using the machine- learned therapeutics analysis model, an output sequence based on the query. In someimplementations, the machine-learned therapeutics analysis model includes a machine- learned sequence processing model that was trained according to any one or more of the preceding claims.

[0008] In an aspect, the present disclosure provides a fourth example method. In some implementations, the fourth example method includes generating an agent model output based on processing a query related to a therapeutic effect using a machine-learned agent model. In some implementations, the fourth example method includes generating, based on the agent model output, a tool input for input to a machine-learned therapeutics analysis model, wherein the tool input includes a sequence-based structural representation of a material and a textual query directed to the material. In some implementations, the fourth example method includes receiving a tool output generated by the machine-learned therapeutics analysis model based on the tool input. In some implementations, the fourth example method includes generating, based on the tool output, a response to the query.

[0009] In an aspect, the present disclosure provides a first example one or more non- transitory computer-readable media storing a machine-learned sequence processing model that was trained according to any one or more implementations of the first example method or the second example method or the third example method or the fourth example method.

[0010] In an aspect, the present disclosure provides a first example computing system that includes the first example one or more non-transitory computer-readable media.

[0011] In an aspect, the present disclosure provides a second example one or more non-transitory computer-readable media storing instructions that are executable by one or more processors to cause a computing system to perform operations, the operations comprising any one or more implementations of the first example method or the second example method or the third example method or the fourth example method.

[0012] In an aspect, the present disclosure provides a second example computing system that includes the second example one or more non-transitory computer-readable media. In some implementations of the second computing system, the second example one or more non-transitory computer-readable media store a machine-learned sequence processing model that was trained according to any one or more implementations of the first example method or the second example method.

[0013] In an aspect, the present disclosure provides an example neural network that was trained according to any one or more implementations of the first example method or the second example method.

[0014] In an aspect, the present disclosure provides a third example computing system. In some implementations, the third example computing system includes one or more processors. In some implementations, the third example computing system includes one or more non-transitory computer-readable media storing a machine-learned sequence processing model trained according to any one or more implementations of the first example method or the second example method. In some implementations, the third example computing system includes one or more non-transitory computer-readable media storing instructions that are executable by the one or more processors to cause the computing system to perform operations. In some implementations of the third example computing system, the operations comprise obtaining a query comprising an input sequence. In some implementations of the third example computing system, the operations comprise processing the input sequence using the machine-learned sequence processing model to generate an output sequence. In some implementations of the third example computing system, the operations comprise outputting, responsive to the query, a response based on the output sequence.

[0015] In an aspect, the present disclosure provides a fourth example computing system. In some implementations, the fourth example computing system includes one or more processors. In some implementations, the fourth example computing system includes one or more non-transitory computer-readable media storing instructions that are executable by the one or more processors to cause the computing system to perform operations. In some implementations of the fourth example computing system, the operations comprise obtaining a query comprising an input sequence. In some implementations of the fourth example computing system, the operations comprise providing the query to a model execution system for processing the input sequence using a machine-learned sequence processing model trained according to any one or more implementations of the first example method or the second example method. In some implementations of the fourth example computing system, the operations comprise receiving, from the model execution system, an output sequence generated based on processing the input sequence using the machine-learned sequence processing model. In some implementations of the fourth example computing system, the operations comprise outputting, responsive to the query, a response based on the output sequence.

[0016] In an aspect, the present disclosure provides an example computing device. In some implementations, the example computing device includes one or more processors. In some implementations, the example computing device includes one or more non-transitorycomputer-readable media. In some implementations of the example computing device, the one or more non-transitory computer-readable media store a machine-learned sequence processing model trained according to any one or more implementations of the first example method or the second example method. In some implementations of the example computing device, the one or more non-transitory computer-readable media store instructions that are executable by the one or more processors to cause the computing system to perform operations. In some implementations of the example computing device, the operations comprise obtaining a query comprising an input sequence. In some implementations of the example computing device, the operations comprise processing the input sequence using the machine-learned sequence processing model to generate an output sequence. In some implementations of the example computing device, the operations comprise outputting, responsive to the query, a response based on the output sequence.

[0017] Other example aspects of the present disclosure are directed to other systems, methods, apparatuses, tangible non-transitory computer-readable media, and devices for performing functions described herein. These and other features, aspects, and advantages of various implementations will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate implementations of the present disclosure and, together with the description, help explain the related principles. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a block diagram of aspects of an example training system for training a machine-learned model according to example implementations of aspects of the present disclosure.

[0019] Figure 2 is a block diagram of aspects of an example training system for training a machine-learned model according to example implementations of aspects of the present disclosure.

[0020] Figure 3 is a block diagram of aspects of an example training system for training a machine-learned model according to example implementations of aspects of the present disclosure.

[0021] Figure 4A is a chart illustrating example performance metrics of an example system for implementing a machine-learned model according to example implementations of aspects of the present disclosure.

[0022] Figure 4B is a chart illustrating example performance metrics of an example system for implementing a machine-learned model according to example implementations of aspects of the present disclosure.

[0023] Figure 5 is a block diagram of an example system for implementing a machine-learned model according to example implementations of aspects of the present disclosure.

[0024] Figure 6 is a block diagram of an example system for implementing a machine-learned model according to example implementations of aspects of the present disclosure.

[0025] Figure 7 is a flow chart diagram illustrating an example method for training a machine-learned model according to example implementations of aspects of the present disclosure.

[0026] Figure 8 is a block diagram of an example processing flow for using machine- learned model(s) to process input(s) to generate output(s) according to example implementations of aspects of the present disclosure.

[0027] Figure 9 is a block diagram of an example sequence processing model according to example implementations of aspects of the present disclosure.

[0028] Figure 10 is a block diagram of an example technique for populating an example input sequence for processing by a sequence processing model according to example implementations of aspects of the present disclosure.

[0029] Figure 11 is a block diagram of an example model development platform according to example implementations of aspects of the present disclosure.

[0030] Figure 12 is a block diagram of an example training workflow for training a machine-learned model according to example implementations of aspects of the present disclosure.

[0031] Figure 13 is a block diagram of an inference system for operating one or more machine-learned model(s) to perform inference according to example implementations of aspects of the present disclosure.

[0032] Figure 14 is a block diagram of an example networked computing system according to example implementations of aspects of the present disclosure.

[0033] Figure 15 is a block diagram of an example computing device according to example implementations of aspects of the present disclosure.

[0034] Figure 16 is a block diagram of an example computing device according to example implementations of aspects of the present disclosure.

[0035] Figure 17 is a flow chart diagram illustrating an example method for training a machine-learned model according to example implementations of aspects of the present disclosure.

[0036] Figure 18 is a flow chart diagram illustrating an example method for implementing a machine-learned model according to example implementations of aspects of the present disclosure.

[0037] Figure 19 is a flow chart diagram illustrating an example method for training a machine-learned model according to example implementations of aspects of the present disclosure.

[0038] Figure 20 is a flow chart diagram illustrating an example method for implementing a machine-learned model according to example implementations of aspects of the present disclosure. DETAILED DESCRIPTION

[0039] Generally, the present disclosure is directed to adapting machine-learned sequence processing models (e.g., large language models or “LLMs”) for processing complex queries related to material structures, such as those found in therapeutic compounds. The techniques described herein provide training techniques and inference systems that are specifically configured to predict the properties and interactions of a wide array of materials, including small molecules, proteins, and nucleic acids. An example machine-learned sequence processing model is trained using a collection of datasets, allowing it to learn about material properties and drug-target interactions across a broad array of datasets in diverse task contexts.

[0040] In an example, a fine-tuned machine-learned model can be trained to provide generalist performance over several domains of therapeutic compound prediction tasks. For instance, strong generalization can be achieved using the diverse training techniques described herein. An example training method includes obtaining a multitude of training inputs that each contain a textual query associated with a sequence-based structural representation of various materials. These representations may be based on different representational schemas, such as the Simplified Molecular-Input Line-Entry System (SMILES), amino acid sequences, or nucleotide sequences. In this manner, textualrepresentations can operate as a shared communication mechanism to learn processing of multiple different representational schemas. This can allow the model parameters to learn from multiple different types of material representations and learn to understand and reason over material interactions independently from specific representational schemas.

[0041] A model with generalist performance over several domains of therapeutic compound prediction tasks can provide an easy to use and expanded technical toolkit for performing therapeutics research and development. Developing therapeutics is both time- consuming and costly and has a high rate of failure. Traditional machine-learned models in this domain are typically specialized, focusing on narrow sets of tasks within specific stages of the drug discovery pipeline. This specialization limits their ability to generalize and transfer knowledge across different tasks and stages, thereby constraining their utility in the broader context of therapeutic development. In contrast, the techniques provided herein overcome many of these challenges and limitations to provide a powerful machine-learned model with generalist performance over several domains of therapeutic compound prediction tasks.

[0042] For example, implementations of the present disclosure can provide a machine-learned sequence processing model that is fine-tuned on a wide array of classification, regression, and generation tasks related to drug discovery and analysis. By representing candidate therapeutic materials as strings and fine-tuning a base language model on diverse tasks relating to the material representations, an example machine-learned sequence processing model can process and predict various properties using a single, unified model architecture. This approach not only streamlines the initial screening steps in therapeutic development but also enables the model to contextualize information across different tasks, leading to improved performance and the potential for positive skill transfer between tasks. Furthermore, the model’s ability to handle a variety of representational schemas for material structures, such as SMILES, SELFIES, and amino acid or nucleotide sequences, allows for a comprehensive understanding of both the chemical and biological aspects of therapeutics.

[0043] In another aspect, the present disclosure provides for a training recipe that builds machine-learned sequence processing model with therapeutics expert performance while also maintaining conversational abilities. In some implementations, the system combines a conversational model training paradigm with a therapeutics expert training recipe to bridge the gap between specialized LLMs and general language models, resulting in aunified model with conversational abilities and skill regarding therapeutic tasks. Such a model may offer scientists a versatile tool that can provides an intuitive, efficient interface for extracting and substantiating predictions using natural language.

[0044] In some implementations, a machine-learned sequence processing model that has been initially trained for conversational dialog interactions can be further trained on both therapeutics domain data and general natural language conversational data to achieve the benefits of therapeutics domain fine-tuning without causing the model to regress in its abilities to support a natural language interface. In some implementations, by combining both types of training data, a training recipe according to example aspects of the present disclosure can combine both raw prediction performance with a highly accessible human-machine interface for engaging with and querying the model. The training data can be combined in proportions in the training dataset based on a mixture ratio. In some implementations, the proportions can be altered to enrich training data in either specialized domain functions, communication abilities, or both.

[0045] In some implementations, one or more machine-learned sequence processing models trained according to the present disclosure can be integrated into an agentic system. For instance, a general-purpose agent model can be used in conjunction with one or more therapeutics prediction tools including a machine-learned sequence processing models trained according to the present disclosure. In some implementations, a user input can include a query in natural language. The general-purpose agent model may process the user input to generate outputs that can control various tools. These tools can include, for example, data retrieval tools or a fine-tuned specialized-domain model as described herein. The agent model, operating as an orchestration system, can decompose a goal described in the user input into various sub-tasks. Each sub-task can be solved by using one or multiple tools available to the agent. In some implementations, the general purpose agent model uses the tools to gather context data that forms an input to the specialized domain model. The agent then receives the result, such as data relating to potential therapeutics. Finally, the agent may use the retrieved data to format and generate a useful and high quality response for the user that satisfies the user’s request. In this manner, for instance, specialty domain models can be accessed via an agentic wrapper that enables general-purpose models—which may be highly performant in interpreting user inputs and task decomposition—to selectively invoke fine- tuned models to access specific skillsets that the general-purpose model may lack. This in turn can facilitate a human-machine interface (or a machine-machine interface) that benefitsfrom both the communicative power of a general-purpose model and the specialized predictive power of a fine-tuned special-purpose model.

[0046] Example machine-learned sequence processing models according to the present disclosure offer several technical advantages over traditional specialized models, particularly in the context of computational efficiency and energy usage. By consolidating multiple specialized capabilities into a single model, the generalist approach described herein reduces the need for multiple independent models, each of which would require separate computational resources for training and inference.

[0047] Further, different model architectures can be suited to different hardware architectures (e.g., chip count, memory size, etc.), potentially requiring either compromising the hardware for acceptable average performance over all the specialist models or implementing multiple sets of distinct hardware optimized for each specialist model. In contrast, using a single generalist model can lead to significant reductions in computational cost, as the same hardware resources—which can be optimized with respect to the generalized model—can be leveraged across a variety of tasks without the overhead of loading different models, reconfiguring hardware arrangements, etc.

[0048] Additionally, example machine-learned sequence processing models according to the present disclosure can decrease compute and energy usage by minimizing the redundant processing that often occurs when separate models are used for tasks with overlapping knowledge domains. In some traditional setups where separate specialized models are employed, there can be a significant amount of redundancy in both the training and inference phases. Each model may independently process and learn from data that may contain similar or related information, which can result in duplicated effort and wasted computational resources. This redundancy may not only increase the overall energy consumption but also require more extensive hardware utilization.

[0049] With example machine-learned sequence processing models according to the present disclosure, this redundancy can be substantially reduced. The model is designed to learn from a diverse set of data and tasks, effectively capturing the underlying patterns and knowledge that are common across different domains. As a result, the same set of parameters can encode skills for a number of different tasks. This cross-utilization of parameter count minimizes the need for the storage and loading of task-specific parameter sets, thereby conserving computational power and reducing energy expenditure.

[0050] Example machine-learned sequence processing models according to the present disclosure can provide decreased latency and increased ease of use. By providing a single model that can handle a wide range of queries related to material structures, users can receive responses to their inquiries more rapidly, without the delays associated with loading and querying multiple specialized models. Furthermore, a generalist model simplifies deployment by eliminating the complexity of determining which specialized model to use for a given task and how to set up and maintain each such model. Users can interact with a single interface, streamlining the process and making it more accessible, especially for those who may not have expertise in the specific interfaces for controlling traditional specialized models.

[0051] Example machine-learned sequence processing models according to the present disclosure can also enhance the accessibility of human-machine interfaces for machine-learned therapeutics systems. By training on diverse datasets and tasks using a shared representational schema, the model can understand and process a wide variety of material representations. This capability enables the model to respond to queries in a manner that is agnostic to the specific material representation, allowing users to interact with the same model for several different tasks, without requiring re-training or extensive experience for each specific specialist model. This flexibility can increase an ease of use of the computational system by a broader user base, including researchers, clinicians, and drug developers.

[0052] Similarly, a machine-learned sequence processing model that exhibits both specialized domain skillsets and a conversational interaction modality can facilitate richer input data to be provided in a more efficient manner. For example, some specialized fine- tuned models may expect a specific input format. Curating data to populate a specific input format may be difficult or impractical in some situations. Some data may be missing or unavailable at a query time. Further, the input format may preclude some modalities of human-machine interaction (e.g., voice-based interactions, interactions using constrained input interfaces, such as mobile device keyboards) due to the complexity of size of the input format. In contrast, a machine-learned sequence processing model that exhibits both specialized domain skillsets and a conversational interaction modality according to example aspects of the present disclosure can enable less rigidly structured inputs to be provided, such as in a conversational manner over one or more input messages. This can facilitate the use of other input modalities (e.g., voice, touch, etc.) that may be more amenable to less rigidsyntactical requirements. Further, raw, unstructured user inputs may be provided in a conversational manner to the model directly (e.g., as opposed to an approach in which unstructured inputs are first parsed into a standardized format) such that the model may access the full context of the original input, potentially avoiding loss of data in the parsing from an unstructured input modality to a structured input.

[0053] Example machine-learned sequence processing models according to the present disclosure can also leverage cross-domain knowledge transfer between tasks to improve the performance of the model on individual tasks. The models can apply knowledge gained from one task to improve its predictions on another. Such cross-task learning can lead to more accurate predictions and, consequently, more efficient use of computational resources, as the model may require fewer iterations or less fine-tuning to achieve high performance. This can ultimately contribute to a more effective use of energy and computational power.

[0054] A further technical effect of example implementations of the present disclosure is increased energy efficiency in performing operations using machine-learned models, thereby improving the functioning of computers implementing such models. For instance, example implementations can provide for more energy-efficient runtime execution or inference. In some scenarios, increased energy efficiency can provide for less energy to be used to perform a given task (e.g., less energy expended to maintain the model in memory, less energy expended to perform calculations within the model, etc.). In some scenarios, increased energy efficiency can provide for more task(s) to be completed for a given energy budget (e.g., a larger quantity of tasks, more complex tasks, the same task but with more accuracy or precision, etc.).

[0055] In another example aspect, example implementations can provide for more energy-efficient training operations or model updates. In some scenarios, increased energy efficiency can provide for less energy to be used to perform a given number of update iterations (e.g., less energy expended to maintain the model in memory, less energy expended to perform calculations within the model, such as computing gradients, backpropagating a loss, etc.). In some scenarios, increased energy efficiency can provide for more update iterations to be completed for a given energy budget (e.g., a larger quantity of iterations, etc.). In some scenarios, greater expressivity afforded by model architectures and training techniques of the present disclosure can provide for a given level of functionality to be obtained in fewer training iterations, thereby expending a smaller energy budget. In somescenarios, greater expressivity afforded by model architectures and training techniques of the present disclosure can provide for an extended level of functionality to be obtained in a given number of training iterations, thereby more efficiently using a given energy budget.

[0056] In this manner, for instance, the improved energy efficiency of example implementations of the present disclosure can reduce an amount of pollution or other waste associated with implementing machine-learned models and systems, thereby advancing the field of machine-learning and artificial intelligence as a whole. The amount of pollution can be reduced in toto (e.g., an absolute magnitude thereof) or on a normalized basis (e.g., energy per task, per model size, etc.). For example, an amount of CO2 released (e.g., by a power source) in association with training and execution of machine-learned models can be reduced by implementing more energy-efficient training or inference operations. An amount of heat pollution in an environment (e.g., by the processors / storage locations) can be reduced by implementing more energy-efficient training or inference operations.

[0057] Various example implementations are described herein with respect to the accompanying Figures.

[0058] Figure 1 is a block diagram of an example system for training a machine- learned model for processing structural representations of materials (e.g., therapeutic materials). A training dataset 100 can contain groups of inputs and corresponding reference outputs. The inputs can include input sequences paired with output sequences: for instance, a first group of input sequence(s) 102i and output sequence(s) 102o, a second group of input sequence(s) 104i and output sequence(s) 104o, and an N-th group of input sequence(s) 106i and output sequence(s) 106o. Each input sequence can include multiple portions. For instance, input sequence(s) 102i can include a textual query 102i-1 and a structural representation 102i-2 that adheres to a first representational schema; input sequence(s) 104i can include a textual query 104i-1 and a structural representation 104i-2 that adheres to a second representational schema; input sequence(s) 106i can include a textual query 106i-1 and a structural representation 106i-2 that adheres to an N-th representational schema.

[0059] Training inputs 108 can include a plurality of input sequences (e.g., a plurality containing input sequence 102i, input sequence 104i, input sequence 106i, etc.). The plurality of input sequences can respectively correspond to a plurality of representational schemas for representing material structures of a plurality of different materials (e.g., N schemas, such as schema 1, 2, and N). Machine-learned sequence processing model 110 can process training inputs 108 to generate training outputs 112. Training outputs 112 can include logit values orscores associated with one or more output values (e.g., token identifiers). Training outputs 112 can include token identifiers. Training outputs 112 can include text, images, or other data.

[0060] Model training system 114 can evaluate training outputs 112 against reference outputs 116 to evaluate a performance of machine-learned sequence processing model 110 over the training inputs 108. Reference outputs 116 can include output sequences corresponding to input sequences in training inputs 108 (e.g., output sequences 102o, 104o, 106o, etc.). Model training system 114 can determine one or more updates 118 to one or more parameters of machine-learned sequence processing model 110.

[0061] Example text-based structural representation schemas are provided in Table 1. Table 1 Type Format Example Small culesSCN1C(=O)CN=C(C2=CCCCC2)c2cc(Cl)ccc21 AminoMoleMILES stringAcid: Proteins and peptides Amino acid sequences Amino Acid: MHC Pseudo- ulessequenYFAMYGEKVAHTHVDTLYVRYHYYTWAEWAYTWYmoleccesAmino Acid: CDR3 T cell hypervariable CSASEGTSSYEQYF receptors loopsNucleic acidNucleotidesequence ACAGCCCAGCAGUUAUCACGGGDisease English text Chronic myeloproliferative disease Cell Line English text NU-1, stomach cell sourced from cancer

[0062] Input Sequence(s) 102i, 102i, 106i, can be or include inputs associated with one or more tasks associated with a therapeutic or potentially therapeutic material. Input sequences can be multimodal or single modal. Input sequences can include textual inputs, image inputs, audio inputs, or other types of inputs. Input sequences can each include one or more portions. For instance, in some implementations, input sequence(s) 102i or input sequence(s) 106i can include textual query(ies) 102i-1 or textual query(ies) 106i-1, respectively. In some implementations, input sequence(s) 102i can include a sequence-based structural representation 102i-2. In some implementations, input sequence(s) 104i can include a sequence-based structural representation 104i-2. In some implementations, input sequence(s) 106i can include a sequence-based structural representation 106i-2. Thesequence-based structural representations 102i-2, 104i-2, 106i-2 can adhere to one or more representational schemas. One or more example representational schemas are provided in Table 1.

[0063] Textual query 102i-1, 104i-1, 106i-1 can be or include text data. Text data can include natural language data. Text data can include descriptions of therapeutic materials, queries associated with therapeutic materials, descriptions of diseases, queries associated with diseases, queries associated with cell lines, queries associated with target interactions (e.g., drug target identification), statements of interest, or other text that may be provided as input context for generating a prediction output.

[0064] Structural representations 102i-2, 104i-2, 106i-2 can represent a chemical structure, a physical structure, a biological structure, or other structure of a therapeutic material or other material, as illustrated or described herein. In some implementations, structural representations 102i-2, 104i-2, 106i-2 can represent the material using one or more text-based representational schemas.

[0065] Output sequences 102o, 104o, 106o can represent a response to a query or command associated with a structural representation 102i-2, 104i-2, 106i-2 that is provided as an input sequence 102i, 104i, 106i. Output sequences 102o, 104o, 106o can represent a prediction of therapeutic properties, drug target interactions, drug response, disease information, cell line information, or other information that may be presented as output. Output sequences 102o, 104o, 106o can provide a reference to evaluate predictions from a machine-learned sequence processing model (e.g., machine-learned sequence processing model 110). For example, output sequences 102o, 104o, 106o can provide ground truth data corresponding to an input sequence.

[0066] Training inputs 108 can be based on one or more input sequences. For example, training inputs can include one input sequence to cause machine-learned sequence processing model 110 to produce a corresponding output. Alternatively, training inputs can include multiple input sequences to cause machine-learned sequence processing model 110 to produce a corresponding set of output sequences (e.g., in sequence or in parallel along a batch dimension).

[0067] Machine-learned sequence processing model 110 can be or include a machine- learned model configured to generate output sequences based on an input sequence. Example machine-learned models are described in further detail herein with respect to machine- learned model 1 and 4. An example model is the Pathways Language Model, described inPaLM 2 Technical Report, GOOGLE, arXiv:2305.10403. An example model is in the Gemma family of models, described in Gemma 2: Improving Open Language Models at a Practical Size, GOOGLE, arXiv:2408.00118.

[0068] In some implementations, machine-learned sequence processing model 110 is multimodal. For instance, structural representations can be provided in non-textual data modalities that can be tokenized into a sequence for processing. For example, structural representations or context or queries can include image data (e.g., visible light imaging, scanning electron imaging, radiological imaging, or other image datatypes, such as point, pixel, or ray-based image formats). Image data can be tokenized and processed using a multimodal machine-learned sequence processing model 110.

[0069] Training outputs 112 can include a generated response based on a training input. For instance, a training output can include a generated label or regression output that can be compared against a reference output in the training dataset. A training output can be or include a logit, score, or other value generated by the model in association with all or part of an output sequence (e.g., a value in an output vocabulary, such as a token id). For instance, training outputs can include an autoregressively generated output sequence that may be compared with a reference output sequence. Training outputs can include scores associated with reference elements in the reference output sequence.

[0070] Model training system 114 can include a computing system configured to evaluate training outputs with respect to reference outputs from the dataset. Model training system 114 can evaluate the outputs using one or more loss functions.

[0071] Reference outputs 116 can be based on one or multiple of output sequences 102o, 104o, 106o.

[0072] Update(s) 118 can include adjustments to one or more learnable parameters of machine-learned model 110. Further details are described herein with respect to example method 700.

[0073] Figure 2 is a block diagram of an example implementation of training dataset 100. Training dataset 100 can include training examples for multiple different tasks. Different tasks can be grouped into different categories.

[0074] One or more input sequences can relate to classification tasks. A classification task can include a task for which a desired result is an assignment of an input to a particular class or category. For instance, training dataset 100 can include classification inputsequence(s) 202i paired with output sequence(s) 202o. Classification input sequence(s) 202i can include textual query 202i-1 and structural representation 202i-2.

[0075] One or more input sequences can relate to generation tasks. A generation task can include a task for which a desired result is the probabilistic generation of content (e.g., structured content, unstructured content, free text, image, etc.). A generation task can include autoregressively generating sequences of data in a free-form manner. For instance, training dataset 100 can include generation input sequence(s) 204i paired with output sequence(s) 204o. Generation input sequence(s) 204i can include textual query 204i-1 and structural representation 204i-2. Structural representation 204i-2 can use the same schema as structural representation 202i-2. Structural representation 204i-2 can use a different schema from structural representation 202i-2.

[0076] One or more input sequences can relate to regression tasks. A regression task can include a task for which a desired result is an output of a numerical value that represents a predicted value for a parameter associated with (e.g., sampled from) a distribution of values describing a given phenomenon or property. The distribution may be known or unknown, explicitly represented or implicitly encoded by the model. For instance, training dataset 100 can include regression input sequence(s) 206i paired with output sequence(s) 206o. Regression input sequence(s) 206i can include textual query 206i-1 and structural representation 206i-2. Structural representation 206i-2 can use the same schema as structural representation 202i-2. Structural representation 206i-2 can use the same schema as structural representation 204i-2. Structural representation 206i-2 can use a different schema from structural representation 202i-2. Structural representation 206i-2 can use a different schema from structural representation 204i-2.

[0077] Example classification tasks are described in Table 2. Table 2 Task Name Input Task - predict whether the material: AMES SMILES is mutagenicBBB MartinsSMILEScan cross the blood-brain barrier.Bioavailability MaSMILESorally available.CYP1A2 VeithSMILESinhibits CYP1A2.CYP2C19 VeithSMILESinhibits CYP2C19.CYP2C9 SubstrateSMILESCarbonMangelsis a substrate to CYP2C9.Task Name Input Task - predict whether the material:CYP2C9 VeithSMILESinhibits CYP2C9.CYP2D6 SubstrateSMILESCarbonMangelsis a substrate to CYP2D6.CYP2D6 VeithSMILESinhibits CYP2D6.CYP3A4 SubstrateSMILESCarbonMangelsis a substrate to CYP3A4.CYP3A4 VeithSMILESinhibits CYP3A4.Carcinogens LaguninSMILESis a carcinogen.ClinToxSMILESis toxic.DILISMILEScan cause liver injury.HIA HouSMILESis absorbed in the human intestine.HIVSMILEShas anti-HIV activity.HuRI ProteinGiven the amino acid sequences of two proteins,predict whether the proteins interact.MHC1 IEDB IMGT Given the amino acid of the peptide and pseudo aminoNielsenProteinacid of MHC 1, predict whether the peptide binds to the MHC. Given the amino acid of the peptide and pseudo amino MHC2 IEDB Jensen Protein acid of MHC 2, predict whether the peptide binds to the MHC.PAMPA NCATSSMILESis permeable in a PAMPA assay.Pgp BroccatelliSMILESinhibits Pgp.SARSCOV2 3CLProSMILESDiamondbinds SARS-CoV-23CL protease.SARSCoV2 VitroSMILESTouretinhibits SARS-CoV-2 replication.SAbDab Chen ProteinGiven an antibody heavy chain and light chainsequence, whether it is developable.Skin ReactionSMILEScan cause skin reaction.Tox21SMILESis toxic in various assays.ToxCastSMILESis toxic in various assays.butkiewiczSMILESis active against various proteins.hERGSMILESblocks hERG.hERG KarimSMILESinhibits hERG.herg centralSMILESinhibits hERG.miRTarBaseNucleic acid&protein mature and target amino acid interact.Task Name Input Task - predict whether the material:phase1diseasethe phase 1 trial will be approved.phase2SMILES &disease the phase 2 trial will be approved.phase3SMILES &disease the phase 3 trial will be approved.Given the amino acid of the epitope and a T-cell weber Protein receptor (amino acid of the hypervariable CDR3 loop), predict whether the epitope binds to the TCR.

[0078] Example regression and generation tasks are described in Table 3. Table 3 Task Name Input Regress or generate value(s) for:BindingDB PatentProtein & smallmolecule binding affinity.BindingDB ic50 ProteinGiven the target amino acid and drugSMILES, predict their IC50.BindingDB kd ProteinGiven the target amino acid and drugSMILES, predict their Kd.BindingDB ki ProteinGiven the target amino acid and drugSMILES, predict their Ki.Buchwald HartwigSMILES Given a product, a catalyst, and a reactantSMILES, predict the reaction yield.Caco2 WangSMILEScell effective permeability.Clearance HepatocyteSMILESAZactivity of hepatocyte clearance.Clearance MicrosomeSMILESAZactivity of microsome clearance.DAVISProtein & smallGiven the target amino acid and drug moleculeSMILES, predict their binding aÿnity.DisGeNET Protein & disease Given the disease description and the aminoacid of the gene, predict their association.DrugComb BlissSmall moleculesGiven two drug SMILESs and a cell line &cell linedescription, predict the drug synergy level.DrugComb CSSSmall moleculesGiven two drug SMILESs and a cell line &cell linedescription, predict the drug synergy level.DrugComb HSASmall moleculesGiven two drug SMILESs and a cell line &cell linedescription, predict the drug synergy level.Task Name Input Regress or generate value(s) for:DrugCombSmall moleculesGiven two drug SMILESs and a cell line &cell linedescription, predict the drug synergy level.DrugComb ZIPSmall moleculesGiven two drug SMILESs and a cell line &cell linedescription, predict the drug synergy level.GDSC1Small moleculesGiven a drug SMILES and a cell line &cell linedescription, predict the drug sensitivity level.GDSC2Small moleculesGiven a drug SMILES and a cell line &cell linedescription, predict the drug sensitivity level. Half Life Obach SMILES half life duration.KIBAProtein & smallGiven the target amino acid and drug moleculeSMILES, predict their binding affinity. LD50 Zhu SMILES LD50 toxicity.Leenay Nucleic acidGiven a GuideSeq sequence, predict variousproperties.LipophilicityAstraZenecaSMILES lipohilicity.OncoPolyPharmacologyCell line & smallGiven two drug SMILESs and a cell line moleculesdescription, predict the drug synergy level.PPBR AZ SMILESGiven a drug SMILES, predict the plasmaprotein binding rate.Protein SAbDab ProteinGiven the amino acid of the antibody andantigen, predict the binding aÿnity.Solubility AqSolDB SMILESGiven a drug SMILES, predict the activity ofsolubility.ProteinGiven an antibody heavy chain and light chainsequence, predict its CDR length.SMILES Given the product SMILES, generate thereactant SMILESs.SMILES Given a catalyst SMILES, reactant SMILES,and product SMILES, predict the yield.VDss LombardoSMILES Given a drug SMILES, predict the volume ofdistribution.

[0079] An example dataset was used to collect a number of drug discovery datasets. An example dataset is referred to as “Text” herein. Text can include a collection of 709 drug discovery datasets comprising 66 tasks formatted for instruction tuning. Text was sourced from TDC, a publicly available repository that offers a wide variety of tasks spanning the drug discovery process. Each dataset in Text is formatted as a text prompt comprised of four components (instructions, context, question, answer). Instructions included a short sentence describing the task at hand, such as “Answer the following question about drug properties”.For each dataset, context was provided as free-text descriptions providing additional information that grounds the question in a relevant biochemical setting. Contexts can be 2-3 sentences long, sourced from TDC dataset descriptions, and manually complemented based on a brief literature search of the topic. For specialized assays describing a specific experimental condition, such as ToxCast, additional information for contexts were obtained from publicly available assay descriptions. The question can be a succinct query that specifies the specific property being asked, and interleaves English text with text-based representations of therapeutics (e.g., “Does the following molecule cross the blood brain barrier? <molecule>”). The format of answers varied depending of the type of task.

[0080] Example datasets in Text fall into one of three categories: (I) Binary - classification questions were formatted as a prediction of a single property of a therapeutic with two possibilities, yes / no (e.g., whether a drug is toxic); (ii) Regression - questions were formatted as a prediction of a single property of a therapeutic on a continuous scale (e.g. drug-target binding affinity), which can be binned into labels from 0 to 1000 to leverage a token-based, and not float-based, representation (which can be transformed back into an original numerical space); (iii) Generation - a generation task including predicting reactants of a chemical reaction given the product.

[0081] Example string representations of diverse types of therapeutics in TxT may fall into one of the following categories:

[0082] (i) SMILES: Small molecules were represented with their SMILES string.

[0083] (ii) Amino acid: Proteins and peptides were represented with their amino acid sequences. Multiple Histopatibility Complex molecules, such as those found in the in the MHC1 IEDB IMGT Nielsen and MHC2 IEDB Jensen datasets were represented using their pseudo-sequences (only showing residues that are in contact with a peptide), T cell receptors were represented using their CDR3 hypervariable loops.

[0084] (iii) Nucleotide: Nucleic acids were represented with their nucleotide sequence.

[0085] (iv) Amino acid + SMILES: Multi-instance datasets containing both proteins and small molecules used the protein amino acid sequence and the molecular SMILES string.

[0086] (v) Nucleotide + Amino acid: Multi-instance datasets containing both nucleic acids and proteins used the nucleotide sequence and protein amino acid sequence.

[0087] (vi) SMILES + Text Multi-instance: datasets containing small molecules and other feature types used the molecular SMILES string and English text to represent theadditional features, such as disease or cell line names and descriptions. Notable datasets in this category include Phase I, Phase II, and Phase III clinical trial datasets. These datasets contain information about the SMILES strings of candidate drugs, the names of targeted diseases for various clinical trial phases, and whether the trial ultimately received approval.

[0088] (vii) Amino acid + Text: Multi-instance datasets containing proteins and other feature types used the protein amino acid sequence and text to represent the other features.

[0089] Data splits for TxT may be constructed using TDC functions with recommended split methods (random, scaffold, cold-start, combination, temporal). For datasets in the ADMET, DrugCombo, or DTI DG leaderboards, splits were generated with a seed of 1.

[0090] Examples of training inputs from TxT are provided herein. Example of prompts for binary classification datasets:

[0091] EXAMPLE Instructions: Answer the following question about drug properties. Context: As a membrane separating circulating blood and brain extracellular fluid, the blood-brain barrier (BBB) is the protection layer that blocks most foreign drugs. Thus the ability of a drug to penetrate the barrier to deliver to the site of action forms a crucial challenge in development of drugs for central nervous system. Question: Given a drug SMILES string, predict whether it (A) does not cross the BBB (B) crosses the BBB Drug SMILES: CN1C(=O)CN=C(C2=CCCCC2)c2cc(Cl)ccc21 Answer: (B)

[0092] EXAMPLE Instructions: Answer the following question about peptide-MHC binding. Context: In the human body, T cells monitor the existing peptides and trigger an immune response if the peptide is foreign. To decide whether or not if the peptide is not foreign, the peptide must bind to a major histocompatibility complex (MHC) molecule. Therefore, predicting peptide-MHCbinding affinity is pivotal for determining immunogenicity. In some experiments, the peptide binding is measured against cells that express multiple MHCs, so the peptide could be binding any one of the possible MHCs. Class 1 MHC molecules bind to peptides that are usually 8-14 amino acids long and activate CD8 T cells. Question: Given the amino acid sequence of the peptide and possible pseudo amino acid sequences of MHC 1, predict whether the peptide (A) does not bind to any of the MHCs (B) binds to any of the MHCs Peptide amino acid sequence: QLADETLLKV Possible MHC pseudosequences: YFAMYGEKVAHTHVDTLYVRYHYYTWAEWAYTWY Answer: (B)

[0093] EXAMPLE Instructions: Answer the following question about miRNA protein interactions. Context: MicroRNAs (miRNAs) are, small non-coding RNAs with 18–25 nucleotides, which are central regulators at the post-transcriptional level in both animals and plants. Perfect or near-perfect complementary binding of miRNAs and their target mRNA negatively regulates gene expression by accelerating mRNA degradation or suppressing mRNA translation. Question: Given the miRNA mature sequence and target amino acid sequence, predict whether (A) the miRNA and target do not interact (B) the miRNA and target interact miRNA sequence: UUCCUGUCAGCCGUGGGUGCC Target amino acid sequence: MSVNMDELRHQVMINQFVLAAGCAADQAKQLLQAAHWQFETALSTFF QETNIPNSHHHHQMMCTPSNTPATPPNFPDALAMFSKLRASEGLQSSNSPMTAAACSPPANF SPFWASSPPSHQAPWIPPSSPTTFHHLHRPQPTWPPGAQQGGAQQKAMAAMDGQR Answer: (A)

[0094] EXAMPLEInstructions: Answer the following question about clinical trials. Context: Clinical trial is the most time and cost- consuming step in the drug discovery process. Phase 1 clinical trials test the safety and basic properties of a new drug or treatment in a small group of people for the first time. Optimizing and designing trials with machine learning could drastically lead to the speedup of delivery of life-saving therapeutics to patients. Clinical trial outcome prediction is a machine learning task that aims to forecast the outcome of clinical trials, such as the approval rate of a drug or treatment. It utilizes various clinical trial features, including the drug’s molecular structure and patient disease. Question: Given a drug SMILES string and disease, predict if the phase 1 trial (A) would not be approved (B) would be approved Drug SMILES: COC1=NC(N)=NC2=C1N=CN2[C@@H]1O[C@H](CO)[C@@H](O)[C@@H]1O Disease: Chronic myeloproliferative disease Answer: (A)

[0095] Example of prompts for regression and generation datasets:

[0096] EXAMPLE Instructions: Answer the following question about drug properties. Context: The human colon epithelial cancer cell line, Caco-2, is used as an in vitro model to simulate the human intestinal tissue. The experimental result on the rate of drug passing through the Caco-2 cells can approximate the rate at which the drug permeates through the human intestinal tissue. Question: Given a drug SMILES string, predict its normalized Caco-2 cell effective permeability from 000 to 1000, where 000 is minimum permeability and 1000 is maximum permeability.Drug SMILES: O=C(O)COC(=O)Cc1ccccc1Nc1c(Cl)cccc1Cl Answer: 788

[0097] EXAMPLE Instructions: Answer the following question about drug responses. Context: The same drug compound could have various levels of responses in different patients. To design drug for individual or a group with certain characteristics is the central goal of precision medicine. In experiments, IC50s of drugs were measured against cancer cell lines. Question: Given a drug SMILES string and a cell line description, predict the normalized drug sensitivity from 000 to 1000, where 000 is minimum drug sensitivity and 1000 is maximum drug sensitivity. Drug SMILES: CN1C=C(C2=CC=CC=C21) / C=C\3 / C4=C(C=CC=N4)NC3=O Cell line description: SNU-1, stomach cell sourced from cancer Answer: 615

[0098] EXAMPLE Instructions: Answer the following question about drug target interactions. Context: Drug-target binding is the physical interaction between a drug and a specific biological molecule, such as a protein or enzyme. This interaction is essential for the drug to exert its pharmacological effect. The strength of the drug- target binding is determined by the binding affinity, which is a measure of how tightly the drug binds to the target. Kd is the dissociation constant of a drug-target complex. It is the concentration of drug at which half of the drug-target complexes have dissociated. A lower Kd value indicates a stronger binding affinity.Question: Given the target amino acid sequence and compound SMILES string, predict their normalized binding affinity Kd from 000 to 1000, where 000 is minimum Kd and 1000 is maximum Kd. Drug SMILES: O=S(=O)(O)c1cccc2cccc(Nc3ccccc3)c12 Target amino acid sequence: MATVQQLEGRWRLVDSKGFDEYMKELGVGIALRKMGAMAKPDC IITCDGKNLTIKTESTLKTTQFSCTLGEKFEETTADGRKTQTVCNFTDGALVQHQEWDGKES TITRKLKDGKLVVECVMNNVTCTRIYEKVE Answer: 397

[0099] EXAMPLE Instructions: Answer the following question about reactions. Context: Retrosynthesis is the process of finding a set of reactants that can synthesize a target molecule, i.e., product, which is a fundamental task in drug manufacturing. The target is recursively transformed into simpler precursor molecules until commercially available "starting" molecules are identified. In a data sample, there is only one product molecule, reactants can be one or multiple molecules. Question: Given a product SMILES string, predict the reactant SMILES string. Product SMILES: [CH2:12]1[C:7]2([CH2:6][CH2:5][O:15][CH2:1][CH2:8]2)[CH2:13][C H2:14][O:10][C:11]1=[O:17] Answer: [CH:1]12B[CH:5]([CH2:6][CH2:7][CH2:8]1)CCC2.[O:10]1[CH2:14][CH 2:13][CH2:12] [CH2:11]1.[OH-:15].[Na+].[OH:17]O.Cl

[0100] Example of a 10-shot prompt for a binary classification dataset: Instructions: Answer the following question about drug properties.Context: As a membrane separating circulating blood and brain extracellular fluid, the blood-brain barrier (BBB) is the protection layer that blocks most foreign drugs. Thus the ability of a drug to penetrate the barrier to deliver to the site of action forms a crucial challenge in development of drugs for central nervous system. Question: Given a drug SMILES string, predict whether it (A) does not cross the BBB (B) crosses the BBB Drug SMILES: CN1C(=O)CN=C(c2ccccc2)c2cc(Cl)ccc21 Answer: (B) Drug SMILES: CN1C(=O)CN=C(c2ccccc2F)c2cc(Cl)ccc21 Answer: (B) Drug SMILES: CN1C(=S)CN=C(c2ccccc2)c2cc(Cl)ccc21 Answer: (B) Drug SMILES: CP(C)(=O)CN1C(=O)CN=C(c2ccccc2)c2cc(Cl)ccc21 Answer: (B) Drug SMILES: CN1C(=O)CN=C(c2ccccc2)c2cc([N+](=O)[O- ])ccc21 Answer: (B) Drug SMILES: CCN(CC)CCN1C(=O)CN=C(c2ccccc2F)c2cc(Cl)ccc21 Answer: (B) Drug SMILES: O=C1CN=C(c2ccccc2)c2cc(Cl)ccc2N1CC1CC1 Answer: (B) Drug SMILES: C#CCN1C(=O)CN=C(c2ccccc2)c2cc(Cl)ccc21 Answer: (B) Drug SMILES: O=C1CN=C(c2ccccc2)c2cc(Cl)ccc2N1CC(F)(F)F Answer: (B) Drug SMILES: CCS(=O)(=O)CCN1C(=O)CN=C(c2ccccc2F)c2cc(Cl)ccc21 Answer: (B) Drug SMILES: CN1C(=O)CN=C(C2=CCCCC2)c2cc(Cl)ccc21 Answer: (B)

[0101] In general, training data 100 can be constructed by populating a default prompt template using various data sources.

[0102] For example, a prompt template for drug-drug interaction task can be composed as follows: **Instructions:** Answer the following question about {Prediction_Output}. **Context:** {Context} **Question:** Given two drugs represented as {Drug_Representation_Type} and {Target_Description_Type}, predict the normalized {Prediction_Output} from 000 to 1000, where 000 is the minimum {Prediction_Output} and 1000 is the maximum {Prediction_Output}. Drug1: {Exemplar_Drug1} Drug2: {Exemplar_Drug2} Target: {Exemplar_Target_Description} Answer: {Exemplar_Answer} Drug1: {Query_Drug1 } Drug2: {Query_Drug2 } Cell line description: {Query_Target_Description} Answer:

[0103] In this example, the placeholders in the template can be defined as follows:

[0104] {Prediction_Output}: This placeholder defines the specific output the model should predict. For instance, this could be “drug synergy,” “efficacy,” or other measurable outcome.

[0105] {Context}: This placeholder holds the background information relevant to the prediction task. This could include definitions, explanations of the concepts involved, or details about the data used.

[0106] {Drug_Representation_Type}: This placeholder specifies how the drugs are represented in the prompt. For example, a SMILES string may be used, or other structural representations.

[0107] {Target_Description_Type}: This placeholder defines how the target is described. For example, the value may be a Cell line description or other descriptions like gene sequences, protein structures, or disease names.

[0108] {Exemplar_Drug1}: This may be, for example, a SMILES string representing the first drug in the exemplar pair.

[0109] {Exemplar_Drug2}: This may be, for example, a SMILES string representing the second drug in the exemplar pair.

[0110] {Exemplar_Target _Description}: The description of the target (e.g., cell line) used in the exemplar.

[0111] {Exemplar_Answer}: The known answer (ground truth) for the exemplar, which is the normalized {Prediction_Output} value.

[0112] {Query_Drug1 }: This may be, for example, a SMILES string representing the first drug in the query pair for which the model needs to make a prediction.

[0113] {Query_Drug2 }: This may be, for example, a SMILES string representing the second drug in the query pair.

[0114] {Query_Target_Description}: The description of the target (e.g., cell line) that is the subject of the query.

[0115] Any one or more of the placeholder fields may be populated from one or more different data sources. For example, one or more fields may be populated from a dataset such as the Therapeutic Data Commons. One or more fields, or parts of a field, may be populated using a retrieval tool that performs a search query (e.g., over a corpus of scientific literature) to retrieve descriptive content for insertion into the template.

[0116] For example, a textual query portion of an input sequence can be augmented with data retrieved from a search query (e.g., executed by a web-based search engine, a database query, etc.). For example, context for a task can be retrieved based on a search query that is formulated based on an initial portion of the textual query portion of an input sequence. The context can be returned from a search system (e.g., a web search engine, a database query engine, etc.) and input to the textual query portion of the input sequence. In another example, a query portion of a non-textual modality an input sequence can be augmented with data retrieved from a search query (e.g., executed by a web-based search engine, a database query, etc.). For example, image data, audio data, sensor data, etc. may be retrieved for inclusion in a query.

[0117] In an example, context for a task can be retrieved based on a search query that is formulated based on an initial portion of the textual query portion of an input sequence. The context can be returned from a search system (e.g., a web search engine, a database query engine, etc.) and input to the textual query portion of the input sequence. For instance, in the examples shown herein, the textual data associated with the “Context:” portion can be retrieved from a search system and populated in a templated prompt format.

[0118] In an example, a model can be fine-tuned (e.g., instruction tuned) using training data 100 (e.g., TxT). A model can be trained across all datasets using dataset mixture ratios proportional to the number of datapoints in each dataset. Other mixture proportions may be used. Example training hyperparameters include: Learning rate 1 × 10−4; Dropout rate 0.15; Batch size 256; Max token input length 2048; Max token output length 512.

[0119] In some implementations, training dataset 100 can include transcript data. For instance, in some situations fine-tuning a model based on query-response data alone can limit conversational capacity. In some example implementations, a training dataset can be augmented to train a model to maintain conversational ability alongside predictive performance.

[0120] For example, training data can include transcript data including a plurality of multi-turn query-response dialog sequences. A respective multi-turn query-response dialog can include a first portion indicating a query from a first entity and a second portion indicating a response from a second entity. For instance, a “user” portion and an “assistant” portion can designate roles associated with the respective portions. The portions can form a dialog of messages between the entities.

[0121] The transcript data can be mixed with examples from training data 100 (e.g., therapeutic data sequences). The mixture can be mixed according to a mixture ratio. An example mixture ratio is 30% therapeutic data sequences and 70% general instruction-tuning data sequences.

[0122] The training examples can be formatted into a multi-turn query-response dialog sequence format. For example, an example dialog sequence format can use delimiter tokens that specify conversational turns and identifiers of entities associated with portions of the input sequence. An example dialog sequence format can be as follows: First Turn Input Format: <start_of_turn>{role_1} {role_1_message_content}<end_of_turn><start_of_turn>{role_2} First Turn Output Format: {role_2_message_content}<end_of_turn><eos> Second Turn Input Format: <start_of_turn>{role_1} {role_1_message_content}<end_of_turn> <start_of_turn>{role_2} {role_2_message_content}<end_of_turn> <start_of_turn>{role_1} {role_1_next_message_content}<end_of_turn> <start_of_turn>{role_2} Second Turn Output Format: {role_2_next_message_content}<end_of_turn><eos>

[0123] Example roles include, “client,” “user,” “assistant,” “agent,” “system,” “tool,” “function,” etc. Multiple roles (e.g., two or more) may be used to collect messages from multiple entities. A machine-learned model may generate responses for one or multiple entities. For instance, a model may generate outputs associated with an “assistant” message. A “tool” entity role can be associated with outputs from one or more external tools.

[0124] For this example template, the placeholders may be defined as follows:

[0125] {role_1_message_content}: an initial query, such as corresponding to an input sequence from dataset 100 or another dataset (e.g., a general dataset not limited to therapeutic domain data).

[0126] {role_2_message_content}: a response to the initial query, such as corresponding to an output sequence from dataset 100 or another dataset (e.g., a general dataset not limited to therapeutic domain data).

[0127] {role_1_next_message_content}: a follow-up query associated with the response to the initial query, such as a request for clarification or explanation.

[0128] {role_2_next_message_content}: a response to the follow-up query.

[0129] Figure 3 provides example input sequence values and output sequence values for example input sequence portions and example output sequences.

[0130] In some implementations, inputs to machine-learned sequence processing model 110 include few-shot prompt inputs. In an example, machine-learned sequence processing model 110 can be trained using few-shot training inputs. In an example trainingapproach, a number of shots can be chosen between 1 and 10. A number of shots can be randomly selected (e.g., based on random sampling). In some examples, a training dataset (e.g., training dataset 100) can include a mixture of 70% 0-shot and 30% few-shot prompts with the number of few shots randomly chosen between 1 and 10. To manage a prompt length, in some implementations if the shots caused the prompt to exceed the maximum length, then the number of shots was reduced until the length was below the maximum. Nearest neighbor shots may also be used.

[0131] Results are provided herein for example machine-learned models trained according to example aspects of the present disclosure. One example is referred to herein as “Tx-LLM,” with differently-sized variants indicated in parentheses (e.g., small as “(S)”, medium as “(M)”, etc.). Table 4. Tx-LLM (M) performance compared with SOTA for each binary classification dataset, along with the feature types and metric type. Split method is Scaffold unless indicated otherwise. Dataset name Feature type SOTA Tx-LLM PAMPA NCATS* SMILES 0.900 0.668 HIA Hou* SMILES 0.988 0.99 Pgp Broccatelli* SMILES 0.935 0.939 Bioavailability Ma* SMILES 0.748 0.702 BBB Martins* SMILES 0.915 0.882 CYP2C19 Veith* SMILES 0.890 0.895 CYP2D6 Veith** SMILES 0.739 0.659 CYP3A4 Veith** SMILES 0.904 0.84 CYP1A2 Veith** SMILES 0.900 0.914 CYP2C9 Veith** SMILES 0.839 0.788 CYP2C9 Substrate CarbonMangels** SMILES 0.441 0.436 CYP2D6 Substrate CarbonMangels** SMILES 0.736 0.6 CYP3A4 Substrate CarbonMangels* SMILES 0.662 0.647 hERG* SMILES 0.874 0.909 AMES* SMILES 0.871 0.786 DILI* SMILES 0.925 0.882 Skin Reaction* SMILES 0.840 0.615 Carcinogens Lagunin*** SMILES 0.770 0.786Dataset name Feature type SOTA Tx-LLM Tox21* SMILES 0.961 0.882 ClinTox* SMILES 0.948 0.863 herg central* SMILES 0.860 0.888 hERG Karim*** SMILES 0.770 0.745 ToxCast* SMILES 0.777 0.792 SARSCoV2 Vitro Touret* SMILES 0.640 0.601 SARSCOV2 3CLPro Diamond* SMILES 0.800 0.712 HIV* SMILES 0.851 0.732 SAbDab Chen**† Amino acid 0.510 0.473 HuRI**†† Amino acid 0.724 0.753 miRTarBase***†Nucleotide +Amino acid 0.804 0.799MHC1 IEDB IMGT Nielsen*† Amino acid 0.986 0.907 Amino acid 0.940 0.863 Amino acid 0.870 0.743 SMILES + Text 0.576 0.667 SMILES + Text 0.645 0.676 SMILES + Text 0.723 0.728SMILES 0.840 0.566 *Metric: AUROC **Metric: AUPRC ***Metric: Accuracy † Split Type: Random †† Split Type: Cold-start Table 5. Tx-LLM (M) performance compared with SOTA for each regression and generation dataset, along with the feature types and metric type. Split method is Scaffold unless indicated otherwise. Dataset name Feature type SOTA Tx-LLM Caco2 Wang* SMILES 0.285 0.432 Lipophilicity AstraZeneca* SMILES 0.467 0.587 Solubility AqSolDB* SMILES 0.761 0.987 PPBR AZ* SMILES 7.788 9.108Dataset name Feature type SOTA Tx-LLM VDss Lombardo** SMILES 0.627 0.609 Half Life Obach** SMILES 0.547 0.448 Clearance Hepatocyte AZ** SMILES 0.440 0.385 Clearance Microsome AZ** SMILES 0.625 0.413 LD50 Zhu* SMILES 0.552 0.618 USPTO Yields***† SMILES 0.361 0.07 Buchwald Hartwig***† SMILES 0.786 0.905 TAP*† Amino acid N / A 4.983 Leenay**† Nucleotide 0.740 0.083 BindingDB kd***††† Amino acid + SMILES 0.712 0.391 BindingDB ic50**††† Amino acid + SMILES 0.637 0.311 BindingDB ki***††† Amino acid + SMILES 0.840 0.726 BindingDB Patent***†††† Amino acid + SMILES 0.588 0.531 Amino acid + SMILES 0.219 0.704 Amino acid + SMILES 0.154 0.548 Amino acid + SMILES N / A 0.57 SMILES + Text 0.860 0.887SMILES + Text 0.860 0.9 DrugComb CSS*†† SMILES + Text 16.858 14.57 OncoPolyPharmacology***†† SMILES + Text 0.730 0.552 Protein SAbDab*† Amino acid N / A 1.268 DrugComb HAS*†† SMILES + Text 4.453 4.118 DrugComb Loewe*†† SMILES + Text 9.184 17.381 DrugComb Bliss*†† SMILES + Text 4.560 4.104 DrugComb ZIP*†† SMILES + Text 4.027 3.777 USPTO*****† SMILES 0.415 0.239 *Metric: MAE **Metric: Spearman ***Metric: Pearson ****Metric: MSE *****Metric: Generation Accuracy † Split Type: Random †† Split Type: Combination††† Split Type: Cold-start †††† Split Type: Temporal

[0132] Another example model is referred to herein as “TxGemma,” with differently- sized variants indicated via designation of parameter count (e.g., 2B, 9B, 27B, etc.). The general-purpose pretrained base model, the starting point from which TxGemma was fine- tuned, is referred to as “Gemma-2.” Table 6. Model performance on binary classification tasks. TxGemma-Predict and Gemma-2 performances compared with specialist SOTA for each binary classification task, along with the metric type. Gemma-2 TxGemma-Predict Task Name SOTA 2B 9B 27B 2B 9B 27B AMES* 0.871 0.487 0.605 0.508 0.796 0.798 0.816 BBB Martins* 0.915 0.250 0.645 0.546 0.864 0.874 0.907 Bioavailability Ma* 0.748 0.479 0.584 0.579 0.715 0.655 0.696 CYP1A2 Veith** 0.900 0.388 0.533 0.562 0.910 0.916 0.922 CYP2C19 Veith* 0.890 0.456 0.595 0.619 0.905 0.906 0.899 CYP2C9 Substrate CarbonMangels** 0.441 0.293 0.336 0.367 0.457 0.468 0.427 CYP2C9 Veith** 0.839 0.283 0.374 0.417 0.801 0.799 0.798 CYP2D6 Substrate CarbonMangels** 0.736 0.233 0.329 0.386 0.605 0.603 0.706 CYP2D6 Veith** 0.739 0.145 0.166 0.185 0.637 0.664 0.681 CYP3A4 Substrate CarbonMangels* 0.662 0.514 0.585 0.596 0.669 0.622 0.690 CYP3A4 Veith** 0.904 0.427 0.531 0.535 0.844 0.839 0.854 Carcinogens Lagunin*** 0.770 0.250 0.286 0.339 0.821 0.839 0.857 ClinTox* 0.948 0.437 0.482 0.424 0.810 0.831 0.888 DILI* 0.925 0.320 0.651 0.627 0.875 0.848 0.887 HIA Hou* 0.988 0.257 0.932 0.783 0.937 0.967 0.988 HIV* 0.851 0.491 0.495 0.537 0.737 0.734 0.764 HuRI** 0.724 0.496 0.484 0.526 0.751 0.779 0.799 MHC1 IEDB IMGT Nielsen* 0.986 0.498 0.504 0.517 0.910 0.927 0.929*Metric: AUROC **Metric: AUPRC ***Metric: Accuracy Table 7. Model performance on regression and generation tasks. TxGemma-Predict and Gemma-2 performances compared with specialist SOTA for each regression and generation task, along with the metric type. Tasks for which we did not find a specialist SOTA value are indicated with N / A. Gemma-2 TxGemma-Predict Task Name SOTA 2B 9B 27B 2B 9B 27BBindingDB Patent** 0.588 -0.066 -0.039 0.030 0.422 0.524 0.538 BindingDB ic50*** 0.637 0.001 0.002 0.044 0.399 0.398 0.445 BindingDB kd** 0.712 0.197 -0.009 0.119 0.352 0.370 0.456*Metric: MAE **Metric: PCC ***Metric: Spearman ****Metric: MSE *****Metric: Generation Accuracy

[0133] Figure 4A and Figure 4B are each a bar chart demonstrating relative performance of TxGemma-Predict, TxGemma-Chat, and the baseline Gemma models on MMLU. While TxGemma-Predict appears to regress somewhat from the baseline Gemma model on general domain skills, TxGemma-Chat maintains near parity with the baseline model on these general domains while offering the above-noted performance increases on therapeutics-related domains.

[0134] Figure 5 is a block diagram of example workflows using machine-learned sequence processing model 110 over multiple stages of therapeutic production for multiple different tasks. Advantageously, machine-learned sequence processing model 110 can perform the different tasks using the same architectures as a generalist model. Machine- learned sequence processing model 110 can use the same input interfaces (e.g., user interface, API, etc.), input formats (e.g., textual, multimodal), etc. for all such queries, increasing stability, uniformity, and ease-of-use.

[0135] In an example implementation, machine-learned sequence processing model 110 can process queries relating to multiple stages or tasks in parallel. Machine-learned sequence processing model 110 can process queries relating to multiple stages or tasks in series without requiring user interaction or instruction between each query (e.g., recursively feeding outputs into subsequent inputs). As such, comprehensive results for queries relating to multiple stages or tasks can be obtained with fewer manual commands (e.g., user inputs, sessions, scheduled tasks, etc.), increasing efficiency. For instance, comprehensive results for queries relating to multiple stages or tasks can be obtained without requiring domain-specific models to be created, adapted, or otherwise configured and instantiated for querying over each stage of the process. This streamlining can unlock efficient and highly scalable searches for new improved therapeutic materials. For instance, multiple queries can be executed along a batch dimension of a parallelized instances of machine-learned sequence processing model 110. These queries can be executed in parallel with high efficiency to obtain multiple query results with low latency using the same or shared accelerator devices (e.g., GPUs, TPUs, NPUs, FPGAs, or other devices configured for matmul acceleration).

[0136] In some instances, queries with shared context can leverage shared values in memory. For instance, queries for each stage of the development process may each use some shared context data about a given drug, disease, etc. that is the subject of all the queries. This context data, and internal latent states computed for the context data (e.g., attention values,such as KV cache values) can be shared across the queries to reduce computational load. This context sharing may be impossible or impractical for traditional approaches which use distinct, different specialist models.

[0137] Figure 6 is a block diagram of an example machine-learned agent system 600. Machine-learned agent system 600 can engage a machine-learned sequence processing policy model 602 to control a computing environment to perform tasks. For instance, machine- learned agent system 600 can provide as an input to machine-learned sequence processing policy model 602 with an observation 604-0 describing a state of an environment, a task to be performed, or other context for processing. Machine-learned sequence processing policy model 602 can generate, based on observation 604-0, an output descriptive of action 606-0 to perform. Machine-learned agent system 600 can process the output to identify action 606-0 and execute action 606-0.

[0138] In an example, action 606-0 can correspond to operating a tool to perform a tool operation. For instance, action 606-0 can include a direction to cause machine-learned agent system 600 to provide a tool input 608 to tool system(s) 610 to obtain a tool output 612 to assist in performing a task. The tool invoked may be different based on the task or subtask to be performed. Example tools include a machine-learned sequence processing model 110 (e.g., trained on dataset 100), one or more data retrieval system(s) 614, other tool(s), etc. Machine-learned agent system 600 can process the tool output 612 to construct a new observation 604-1 describing an updated state of an environment, a next task to be performed, or other context for processing based on data returned in tool output 612.

[0139] Machine-learned agent system 600 can provide as an input to machine-learned sequence processing policy model 602 with observation 604-1. Machine-learned sequence processing policy model 602 can generate, based on observation 604-1, an output descriptive of action 606-1 to perform. In an example, machine-learned sequence processing policy model 602 can process observation 604-1 based on observation 604-0 and action 606-0 (e.g., by applying an attention operation over observation 604-0 and action 606-0). Machine- learned agent system 600 can process the output to identify action 606-1 and execute action 606-1. This sequence can continue for a number of turns until a stopping criterion is satisfied (e.g., generation by model 602 of an output indicating completion of an objective).

[0140] Machine-learned agent system 600 can be or include processing logic, software, firmware, or hardware configured to automate one or more operations of or interactions with a computing device or system. For instance, machine-learned agent system600 can be hosted on a local device or a cloud server to control operations of the host device or other devices. Machine-learned agent system 600 can receive inputs and initiate actions or tasks based on the inputs.

[0141] Machine-learned agent system 600 can be or include an artificial intelligence (“AI”) agent. Machine-learned agent system 600 can control machine-learned models and AI- enabled systems to help users solve tasks. For instance, machine-learned agent system 600 can employ one or more machine-learned models (e.g., models 602, 110, etc.) to generate outputs responsive to queries from users. As one example, an agent system can operate on a computing system configured to receive an input from a user device and provide an output responsive to the input to the user device. The agent system can be or can implement a multi- modal agent (e.g., a multi-modal artificial intelligence agent). For instance, a multi-modal agent can process inputs from one or more data modalities. In some implementations, the agent system can be implemented as a “situated agent” in which the agent system shares one or more perceptual inputs with a human user. For example, the situated agent can receive and process various data inputs, including video, audio, and / or textual data which are also observable by the human user. The agent system can process these inputs to generate responses that are contextually-relevant for the user’s physical or digital environment, for example enabling the agent system to generate dialogue or other responses or outputs which assist the user in understanding and / or navigating the environment.

[0142] Machine-learned agent system 600 can execute operations that include both learned operators (e.g., operators that execute predictions using machine-learned models having learned values, or operators that execute code generated based on predictions using machine-learned models having learned values) and non-learned operators. In some implementations, machine-learned agent system 600 can execute one or multiple learned operators to perform tasks and make decisions within a non-learned framework of rules and software infrastructure. For instance, an agent framework can include routing layers, i / o callbacks, or other subroutines that route and trigger processing of incoming information with various learned operators. For some processing stages, learned operators can apply predetermined recipes or templates for processing the information (e.g., using a series of prompt templates to ingest new information or format output information). For some processing stages, learned operators can use the outputs of a first prediction to control the inputs for downstream operations, such as by predicting parameters for applicationprogramming interface calls, invoking code interpreter environments for executing generated code, etc.

[0143] Machine-learned agent system 600 and any components thereof can engage one or more machine-learned models to generate inferences for performing various tasks. Machine-learned agent system 600 and any components thereof can interact with machine- learned model system(s) to obtain inferences from one or multiple models. As described herein, reference to machine-learned agent system 600 and any components thereof using a machine-learned model can include machine-learned agent system 600 and any components thereof interacting with machine-learned model system(s). As described herein, reference to machine-learned agent system 600 and any components thereof using a machine-learned model can include machine-learned agent system 600 and any components thereof interacting with machine-learned models other than machine-learned model system(s).

[0144] Machine-learned agent system 600 can operate responsive to queries obtained from one or more input interfaces. Machine-learned agent system 600 can execute to assist a user with a task by processing a query based on a user input received from a user. For instance, machine-learned agent system 600 can reduce a complexity of inputs to perform various tasks on a computing device or system. For example, machine-learned agent system 600 can use machine-learned models to recognize tasks to perform and execute operations to achieve the tasks based on inputs in view of accumulated context from prior inputs. In this manner, for instance, each input can be augmented by the model’s learned skillset as well as the available context from an interaction memory, so that even minimal inputs can be effective to initiate execution of complex tasks.

[0145] As used herein, a “user” can refer to a number of different entities including, as some examples, an account (e.g., a “user account” associated with a software or a service), a sub-account of an account, a person or individual, a corporation or corporate user, a legal entity or other defined entity, an administrator, a system manager, a computer-implemented user (e.g., an agent system, a debug user or testing user, etc.), and / or other suitable users. A “user” associated with an interaction can be a profile associated with an interaction submitted via an entity user. For instance, a “user” can be an instance of a profile contained in a superset of profiles, wherein the superset can be associated with an individual or an entity or organization.

[0146] A user can be associated with a key or other credential that can authenticate inputs and outputs received from and output to the user. A user can be specified using a key or credential used to accompany or sign calls to an application programming interface.

[0147] Machine-learned sequence processing policy model 602 can be the same as or different from machine-learned sequence processing model 110. Machine-learned sequence processing policy model 602 can be implemented by a machine-learned model 1 or a machine-learned sequence processing model 4.

[0148] Observations 604-0, 604-1 can include an input descriptive of an environment in which the agent system is acting. Observations can include one or more input sequences for input to model 602.

[0149] Actions 606-0, 606-1 can include or be based on an output from model 602. For instance, model 602 can generate an output sequence that describes a function call to invoke to perform an action in the environment. For instance, model 602 can generate an output sequence containing an identifier of a tool available in tool system 610.

[0150] For instance, in an example, at time t, the agent may receive an observation o1. The agent can generate an action a1 sampled from a base policy (e.g., via generating an output sampled from model 602). A context for generating the action a1 can be a sequence of observations and actions at time steps preceding t. In an example, an action can be a sequence representing a chain-of-thought (CoT) reasoning sequence followed by a tool-use command. This action interfaces with a selected tool of tool system 610. The tool system 610 can output data that agent system 600 can use to generate an observation ot.

[0151] Machine-learned agent system 600 can parse action 606-0 to identify tools identified in action 606-0. For example, action 606-0 can include textual content generated by model 602. Machine-learned agent system 600 can parse the textual content to recognize actionable invocations of defined tools (e.g., tool names, function calls, etc.).

[0152] Tool input 608 can be or include a data value configured for input to an application programming interface associated with tool system(s) 610. Machine-learned agent system 600 can generate tool input 608 based on content generated by model 602 (e.g., obtained in action 606-0). Tool input 608 can be any suitable data modality. Example data modalities are described herein with respect to inputs to machine-learned model 1 and variants thereof.

[0153] Tool systems 610 can be or include one or more computing systems that are the same as or different from a computing system implementing machine-learned agentsystem 600 or machine-learned sequence processing policy model 602. Tool system(s) 610 can include a local computing device (e.g., a device implementing machine-learned agent system), a remote computing device (e.g., a device hosting a database from which a data retrieval system 614 retrieves data), or both.

[0154] In some implementations, one or more tools may be powered by a machine- learned sequence processing model 110. For example, a tool may provide an interface for invoking a machine-learned sequence processing model to process a query based on tool input 608. For instance, a tool may receive tool input 608 and format data from tool input 608 into a query for processing by machine-learned sequence processing model 110 (e.g., by populating a prompt template as described herein for a particular task or task domain).

[0155] Tool output 612 can be or include content generated by a tool executed or invoked by tool system(s) 610. For example, tool output 612 can include an output of a model invoked by tool system(s) 610 to generate a prediction based on tool input 608. Tool output 612 can be or include a document returned based on a query over a database or other repository of documents. Tool output 612 can be any suitable data modality. Example data modalities are described herein with respect to outputs of machine-learned model 1 and variants thereof.

[0156] Data retrieval system(s) 614 can operate to retrieve information from a data source. Data retrieval system(s) 614 can include general-purpose search engines, domain- specific search systems (e.g., scientific or research databases), vector database retrieval systems, SQL or NoSQL databases, or other systems that enable retrieval of data based on a query.

[0157] An example data retrieval tool includes a molecule tool that accesses a domain-specific library for tasks such as retrieving molecular descriptors (e.g., from PubChem) and performing chemical structure conversions.

[0158] An example data retrieval tool includes gene and protein tools that access domain-specific libraries for tasks involving genes or proteins, such as retrieving gene descriptions and protein descriptions (e.g., from the NCBI Gene database).

[0159] Example tools are described in tables 8 and 9.Table 8. Descriptions of example tools based on a machine-learned model 110 Tool Name Description Uses TxGemma to predict the toxicity of a given drug (SMILES string) ToxCast in various ToxCast assays based on the provided context. Returns results indicating whether the drug is toxic or not in each selected assay. Uses TxGemma to predict the clinical toxicity of a given drug (SMILESClinicalToxstring) for humans. Returns a result indicating whether the drug is predicted to be toxic or not.Allows conversational interaction with TxGemma-Chat. Enables posing therapeutics- related questions and receiving responses. Uses TxGemma to predict whether a given drug (SMILES) is mutagenic Mutagenicity based on the Ames test. Returns a result indicating if the drug is mutagenic or not. Uses TxGemma to predict the normalized IC50 between a drug (SMILES) and a target protein (amino acid sequence). Returns a IC50 value, with lower values suggesting potent inhibition. Uses TxGemma to predict the approval outcome of a Phase 1 clinicalPhase 1 Trialtrial for a drug (SMILES) against a specified disease. Returns a result indicating whether the trial would be approved or not.Table 9. Descriptions of example tools used by data retrieval system(s) 614 Tool Name Description Search Searches Wikipedia for a given text query. Returns the top matching article’s title, link, and a short summary. Queries PubMed for scientific articles based on a search text. PubMed Search Returns metadata (PMID, title, authors, journal, date, abstract) for the top few articles. Web Search Performs a general web search. Returns titles, links, and snippets for the top search results. Fetches the raw HTML content of a given URL. Useful forinspecting webpage details. Retrieves molecular information from PubChem for a given Smiles to Description SMILES string. Returns properties like PubChem CID, molecular formula, IUPAC name, XLogP, and synonyms.Retrieves therapeutic information (ChEMBL ID, mechanisms of Smiles Therapy action, drug indications, ATC classifications) for a drug given its SMILES string. Provides molecule-related functions: searching for compounds by Molecule Tool name (returns properties and IDs) and converting between molecular representations (InChI, SMILES, InChIKey, Mol). WikiCrow Retrieves a comprehensive set of data and related articles about a specified human protein-coding gene from the WikiCrow database. Retrieves amino acid sequences for a given gene name and Gene Sequence organism. Searches NCBI Nucleotide, fetches records, and translates DNA to protein sequences. Gene Description Retrieves descriptive information about a gene from NCBI Gene, including official symbol, full name, description, and summary. Runs a BLASTP search against NCBI databases for a given amino BlastP acid sequence. Returns hits with gene names, organisms, and accessions. Provides descriptive information (organism, definition, accession) Protein Description for a protein, either by name or amino acid sequence. Uses NCBI Protein database or BLASTP.

[0160] An example implementation of machine-learned agent system 600 is referred to herein as TxAgent. TxAgent was constructed using general-purpose Gemini-based models as the agent policy model (e.g., model 602).

[0161] TxAgent effectively leverages various tools based on the therapeutic task requirement. An investigation of tool usage frequency within the TxAgent system across the ChemBench-Preference and Chem+Bio HLE datasets reveals that TxAgent tool usage distribution can vary significantly depending on the task and dataset. For the ChemBench- Chemical Preference task, which focuses on selecting ideal candidate molecules for therapeutic development, the TxAgent system exhibits a high frequency of usage for tools such as SMILES Description and toxicity prediction. This suggests a strong emphasis on molecular characterization and safety assessment within this task correctly invoked by TxAgent. In contrast, on the B&C HLE dataset, tool usage is predominantly concentrated on general knowledge retrieval tools like PubMed or Wikipedia search. This indicates that the TxAgent system accesses and syntheses broad biomedical knowledge to address questions in this domain. In some tests, analysis shows that each question can involve up to 8 tool calls.Furthermore, the overall high usage of tools such as SMILES description and toxicity prediction tools correlates with overall performance improvement.

[0162] An example demonstration of the capabilities of TxAgent to perform end-to- end therapeutic development using ovarian cancer follows. The process begins with target identification, where TxAgent suggests several genes mutated in cancer, including BRCA1, mTOR, and PIK3CA, and obtains information about them using the Gene Description and PubMed Search tools. This initial exploration suggests PIK3CA as a potential therapeutic target. TxAgent then focuses on identifying potential therapeutics from a curated list of existing cancer therapies (afatinib, alpelisib) and novel molecules generated by TxAgent. To reflect developing novel therapeutics rather than repurposing existing therapeutics, TxAgent primarily filters candidates based on TxGemma predictions rather than search tools. TxAgent investigates candidates based on their predicted IC50 to the PI3KCA E545K mutant (a known oncogenic mutation), their toxicity profile, and their potential for success in clinical trials. TxAgent first retrieves the full amino acid sequence produced by PIK3CA using the Gene Sequence tool and then uses the TxGemma IC50 tool. Afatinib and the novel molecule show high predicted IC50 values above 1000 nM, indicating weak inhibition. Alpelisib, however, exhibits a much lower predicted IC50 of 30 nM, suggestive of potent inhibition and relatively close to the experimental value of 5 nM. Based on alpelisib’s predicted inhibition, TxAgent assesses its safety and clinical viability. The TxGemma Mutagenicity Tool predicts that alpelisib is not mutagenic, and the TxGemma Phase 1 Trial Tool predicts alpelisib would be approved in a phase 1 clinical trial for ovarian cancer. TxAgent thus identifies alpelisib as the most promising candidate, which is also corroborated by existing evidence: alpelisib is approved for breast cancer and has shown activity in ovarian cancer.

[0163] Internally, machine-learned agent system 600 can process observations to generate actions as illustrated in the following example inputs and outputs:

[0164] Observation 0 (e.g., a user query) Consider the following two drug candidates: A. N#Cc1c(NC(=O)c2cc([N+](=O)[O-])ccc2N2CCOCC2)sc2c1CCCC2 B. O=C(C=Cc1ccccn1)c1ccccc1. Which is more preferable for further development?

[0165] Based on processing observation 0, the policy model can generate an internal observation or thought.

[0166] Thought 1 (e.g., second, internal observation generated by the policy model)First, I need to obtain more information about each drug candidate. I will use the SMILES2DESC tool to get detailed descriptions of each molecule from their SMILES strings, starting with candidate.

[0167] Based on processing observation 0 and thought 1 (e.g., as a list of messages in a transcript of messages, or together in a single textual message), the policy model can generate an action.

[0168] Action 1 SMILES2DESC Input SMILES: N#Cc1c(NC(=O)c2cc([N+](=O)[O-])ccc2N2CCOCC2)sc2c1CCCC2

[0169] Based on receiving generated action 1, machine-learned agent system 600 can parse a tool name from the action (e.g., SMILES2DESC) and map that to a defined tool (e.g., the “Smiles to Description” tool). Machine-learned agent system 600 can parse the input from action 1 (e.g., the Input SMILES value) and execute the tool with the input.

[0170] Based on executing the generated action 1, machine-learned agent system 600 can provide to the policy model an observation.

[0171] Observation 1 PubChem CID: 3934361 Molecular Formula: C20H20N4O4S Molecular Weight: 412.5 Charge: 0 IUPAC Name: N-(3-cyano-4,5,6,7-tetrahydro-1-benzothiophen-2-yl)-2-morpholin-4- yl-5-nitrobenzamide XLogP: 3.8 Synonyms: MLS000335194, CHEMBL1549645, HMS2597A10, HMS3379H10, AKOS001044982, SMR000249952, SR-01000056848, SR-01000056848-1, Z27367728

[0172] The policy model or a different model can be used to generate a summarization of the observation.

[0173] Observation 2 The provided information describes a single molecule (PubChem CID 3934361) with a cyano- tetrahydro-benzothiophene core, a morpholino-nitrobenzamide substituent, and an XLogP of 3.8, indicating its lipophilicity.

[0174] Based on the preceding context (e.g., by attending over an input sequence containing observation 0, thought 1, action 1, observation 1, and observation 2), the policy model can generate another internal observation or thought.

[0175] Thought 2 Now, I will use the SMILES2DESC tool to get detailed descriptions of candidate B from its SMILES string. After that, I will compare the information obtained for both candidates to determine which is more preferable for further development.

[0176] Based on the preceding context (e.g., by attending over an input sequence containing observation 0, thought 1, action 1, observation 1, observation 2, and thought 2), the policy model can generate an action.

[0177] Action 2 SMILES2DESC Input SMILES: O=C(C=Cc1ccccn1)c1ccccc1 PubChem CID: 219207

[0178] Based on receiving generated action 2, machine-learned agent system 600 can parse a tool name from the action (e.g., SMILES2DESC) and map that to a defined tool (e.g., the “Smiles to Description” tool). Machine-learned agent system 600 can parse the input from action 2 (e.g., the Input SMILES value) and execute the tool with the input.

[0179] Based on executing the generated action 2, machine-learned agent system 600 can provide to the policy model an observation.

[0180] Observation 3 Molecular Formula: C14H11NO Molecular Weight: 209.24 Charge: 0 IUPAC Name: 1-phenyl-3-pyridin-2-ylprop-2-en-1-one XLogP: 2.7 Synonyms: 3-(2-PYRIDYL)-ACRYLOPHENONE, MLS002637493, azachalcone, CHEMBL1717486, DTXSID601279307, HMS3079I05, SMR001547031, 1-Phenyl-3-(2- pyridinyl)-2-propen-1-one

[0181] The policy model or a different model can be used to generate a summarization of the observation.

[0182] Observation 4The molecule (B) represented by the SMILES O=C(C=Cc1ccccn1)c1ccccc1, also known as 1-phenyl-3-pyridin-2-ylprop-2-en-1-one, has a molecular weight of 209.24 g / mol and a calculated XLogP value of 2.7.

[0183] Based on the preceding context (e.g., by attending over an input sequence containing observation 0, thought 1, action 1, observation 1, observation 2, thought 2, action 2, observation 3, and observation 4), the policy model can generate another internal observation or thought.

[0184] Thought 3 Based on the descriptions, candidate B (XLogP = 2.7) is less lipophilic than candidate A (XLogP = 3.8). Lower lipophilicity can often be associated with better absorption and distribution properties. I will now use the CLINICALTOX tool to assess the clinical toxicity of candidate B.

[0185] Based on the preceding context (e.g., by attending over an input sequence containing observation 0, thought 1, action 1, observation 1, observation 2, thought 2, action 2, observation 3, observation 4, and thought 3), the policy model can generate another action.

[0186] Action 3 CLINICALTOX Input SMILES: O=C(C=Cc1ccccn1)c1ccccc1

[0187] Based on receiving generated action 3, machine-learned agent system 600 can parse a tool name from the action (e.g., CLINICALTOX) and map that to a defined tool (e.g., the “CLINICALTOX” tool). Machine-learned agent system 600 can parse the input from action 3 (e.g., the Input SMILES value) and execute the tool with the input.

[0188] Based on executing the generated action 3, machine-learned agent system 600 can provide to the policy model an observation.

[0189] Observation 5 Context: Humans are exposed to a variety of chemicals through food, household products, and medicines, some of which can be toxic, leading to over 30% of promising pharmaceuticals failing in human trials due to toxicity. Toxic drugs can be identified from clinical trials that failed due to toxicity, while non-toxic drugs can be identified from FDA approval status or from clinical trials that report no toxicity. Prediction returned: O=C(C=Cc1ccccn1)c1ccccc1 is not toxic!

[0190] The policy model or a different model can be used to generate a summarization of the observation.

[0191] Observation 6 Based on the provided information, drug candidate B (O=C(C=Cc1ccccn1)c1ccccc1) is predicted to be non-toxic, suggesting it might be more preferable for further development.

[0192] Based on the preceding context (e.g., by attending over an input sequence containing observation 0, thought 1, action 1, observation 1, observation 2, thought 2, action 2, observation 3, observation 4, action 3, observation 5, and observation 6), the policy model can generate a final response.

[0193] Agent Response Candidate B is more preferable for further development. Here’s why: - Lipophilicity (XLogP): Candidate B has a lower XLogP value (2.7) compared to Candidate A (3.8). Lower lipophilicity is generally favored in drug development. Excessive lipophilicity (high XLogP) can lead to problems like poor solubility, increased risk of off-target binding and toxicity, and difficulties in achieving good absorption and distribution in the body. A value closer to the range of many oral drugs is preferred. - Toxicity: The clinical toxicity tool states that candidate B is predicted to be non-toxic.

[0194] In some implementations, machine-learned agent system 600 can replace observations in the context sequence with summarized observations. For example, content returned from a retrieval tool may be lengthy (e.g., multiple documents, a long document, dense data formats, etc.). This can be expensive to maintain in context for all turns of the agent system. To reduce a cost of executing each turn of the agent using the policy model, a summarized or otherwise compressed representation of an observation can be generated. For instance, a tool output 612 can be provided to policy model 602 or another model, with the full context of the interaction record or without, to generate a summary of the tool output 612. This summary can be used in place of the original tool output within the multi-turn observation-action contextual record.

[0195] Figure 7 depicts a flowchart of a method 700 for training one or more machine-learned models according to aspects of the present disclosure. For instance, an example machine-learned model can include a machine-learned sequence processing model 110.

[0196] One or more portion(s) of example method 700 can be implemented by a computing system that includes one or more computing devices such as, for example, computing systems described with reference to the other figures. Each respective portion of example method 700 can be performed by any (or any combination) of one or morecomputing devices. Moreover, one or more portion(s) of example method 700 can be implemented on the hardware components of the device(s) described herein, for example, to train one or more systems or models. Figure 7 depicts elements performed in a particular order for purposes of illustration and discussion. Those of ordinary skill in the art, using the disclosures provided herein, will understand that the elements of any of the methods discussed herein can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure. Figure 7 is described with reference to elements / terms described with respect to other systems and figures for exemplary illustrated purposes and is not meant to be limiting. One or more portions of example method 700 can be performed additionally, or alternatively, by other systems.

[0197] At 702, example method 700 can include obtaining a training instance. A set of training data can include a plurality of training instances divided between multiple datasets (e.g., a training dataset, a validation dataset, or testing dataset). A training instance can be labeled or unlabeled. Although referred to in example method 700 as a “training” instance, it is to be understood that runtime inferences can form training instances when a model is trained using an evaluation of the model’s performance on that runtime instance (e.g., online training / learning). Example data types for the training instance and various tasks associated therewith are described throughout the present disclosure.

[0198] At 704, example method 700 can include processing, using one or more machine-learned models, the training instance to generate an output. The output can be directly obtained from the one or more machine-learned models or can be a downstream result of a chain of processing operations that includes an output of the one or more machine- learned models.

[0199] At 706, example method 700 can include receiving an evaluation signal associated with the output. The evaluation signal can be obtained using a loss function. Various determinations of loss can be used, such as mean squared error, likelihood loss, cross entropy loss, hinge loss, contrastive loss, or various other loss functions. The evaluation signal can be computed using known ground-truth labels (e.g., supervised learning), predicted or estimated labels (e.g., semi- or self-supervised learning), or without labels (e.g., unsupervised learning). The evaluation signal can be a reward (e.g., for reinforcement learning). The reward can be computed using a machine-learned reward model configured to generate rewards based on output(s) received. The reward can be computed using feedback data describing human feedback on the output(s).

[0200] At 708, example method 700 can include updating the machine-learned model using the evaluation signal. For example, values for parameters of the machine-learned model(s) can be learned, in some embodiments, using various training or learning techniques, such as, for example, backwards propagation. For example, the evaluation signal can be backpropagated from the output (or another source of the evaluation signal) through the machine-learned model(s) to update one or more parameters of the model(s) (e.g., based on a gradient of the evaluation signal with respect to the parameter value(s)). For example, system(s) containing one or more machine-learned models can be trained in an end-to-end manner. Gradient descent techniques can be used to iteratively update the parameters over a number of training iterations. In some implementations, performing backwards propagation of errors can include performing truncated backpropagation through time. Example method 700 can include implementing a number of generalization techniques (e.g., weight decays, dropouts, etc.) to improve the generalization capability of the models being trained.

[0201] In some implementations, example method 700 can be implemented for training a machine-learned model from an initialized state to a fully trained state (e.g., when the model exhibits a desired performance profile, such as based on accuracy, precision, recall, etc.).

[0202] In some implementations, example method 700 can be implemented for particular stages of a training procedure. For instance, in some implementations, example method 700 can be implemented for pre-training a machine-learned model. Pre-training can include, for instance, large-scale training over potentially noisy data to achieve a broad base of performance levels across a variety of tasks / data types. In some implementations, example method 700 can be implemented for fine-tuning a machine-learned model. Fine-tuning can include, for instance, smaller-scale training on higher-quality (e.g., labeled, curated, etc.) data. Fine-tuning can affect all or a portion of the parameters of a machine-learned model. For example, various portions of the machine-learned model can be “frozen” for certain training stages. For example, parameters associated with an embedding space can be “frozen” during fine-tuning (e.g., to retain information learned from a broader domain(s) than present in the fine-tuning dataset(s)). An example fine-tuning approach includes reinforcement learning. Reinforcement learning can be based on user feedback on model performance during use.

[0203] In some implementations, example method 700 can be implemented to execute parameter-efficient fine-tuning methods, such as Low-Rank Adaptation (LoRA).LoRA can refine pre-trained models with minimal adjustments to the original parameters. This can be achieved by introducing trainable low-rank matrices that modify the behavior of the pre-trained weights without directly altering them. In some implementations, during fine- tuning, only these auxiliary matrices are updated, which significantly reduces the number of parameters that are trained.

[0204] Figure 8 is a block diagram of an example processing flow for using machine- learned model(s) 1 to process input(s) 2 to generate output(s) 3.

[0205] Machine-learned model(s) 1 can be or include one or multiple machine- learned models or model components. Example machine-learned models can include neural networks (e.g., deep neural networks). Example machine-learned models can include non- linear models or linear models. Example machine-learned models can use other architectures in lieu of or in addition to neural networks. Example machine-learned models can include decision tree based models, support vector machines, hidden Markov models, Bayesian networks, linear regression models, k-means clustering models, etc.

[0206] Example neural networks can include feed-forward neural networks, recurrent neural networks (RNNs), including long short-term memory (LSTM) based recurrent neural networks, convolutional neural networks (CNNs), diffusion models, generative-adversarial networks, or other forms of neural networks. Example neural networks can be deep neural networks. Some example machine-learned models can leverage an attention mechanism such as self-attention. For example, some example machine-learned models can include multi- headed self-attention models.

[0207] Machine-learned model(s) 1 can include a single or multiple instances of the same model configured to operate on data from input(s) 2. Machine-learned model(s) 1 can include an ensemble of different models that can cooperatively interact to process data from input(s) 2. For example, machine-learned model(s) 1 can employ a mixture-of-experts structure. See, e.g., Zhou et al., Mixture-of-Experts with Expert Choice Routing, ARXIV:2202.09368v2 (Oct.14, 2022).

[0208] Input(s) 2 can generally include or otherwise represent various types of data. Input(s) 2 can include one type or many different types of data. Output(s) 3 can be data of the same type(s) or of different types of data as compared to input(s) 2. Output(s) 3 can include one type or many different types of data.

[0209] Example data types for input(s) 2 or output(s) 3 include natural language text data, software code data (e.g., source code, object code, machine code, or any other form ofcomputer-readable instructions or programming languages), machine code data (e.g., binary code, assembly code, or other forms of machine-readable instructions that can be executed directly by a computer's central processing unit), assembly code data (e.g., low-level programming languages that use symbolic representations of machine code instructions to program a processing unit), genetic data or other chemical or biochemical data, image data, audio data, audiovisual data, haptic data, biometric data, medical data, financial data, statistical data, geographical data, astronomical data, historical data, sensor data generally (e.g., digital or analog values, such as voltage or other absolute or relative level measurement values from a real or artificial input, such as from an audio sensor, light sensor, displacement sensor, etc.), and the like. Data can be raw or processed and can be in any format or schema.

[0210] In multimodal inputs 2 or outputs 3, example combinations of data types include image data and audio data, image data and natural language data, natural language data and software code data, image data and biometric data, sensor data and medical data, etc. It is to be understood that any combination of data types in an input 2 or an output 3 can be present.

[0211] An example input 2 can include one or multiple data types, such as the example data types noted above. An example output 3 can include one or multiple data types, such as the example data types noted above. The data type(s) of input 2 can be the same as or different from the data type(s) of output 3. It is to be understood that the example data types noted above are provided for illustrative purposes only. Data types contemplated within the scope of the present disclosure are not limited to those examples noted above.

[0212] Figure 9 is a block diagram of an example implementation of an example machine-learned model configured to process sequences of information. For instance, an example implementation of machine-learned model(s) 1 can include machine-learned sequence processing model(s) 4. An example system can pass input(s) 2 to sequence processing model(s) 4. Sequence processing model(s) 4 can include one or more machine- learned components. Sequence processing model(s) 4 can process the data from input(s) 2 to obtain an input sequence 5. Input sequence 5 can include one or more input elements 5-1, 5- 2, ... , 5-M, etc. obtained from input(s) 2. Sequence processing model 4 can process input sequence 5 using prediction layer(s) 6 to generate an output sequence 7. Output sequence 7 can include one or more output elements 7-1, 7-2, ... , 7-N, etc. generated based on input sequence 5. The system can generate output(s) 3 based on output sequence 7.

[0213] Sequence processing model(s) 4 can include one or multiple machine-learned model components configured to ingest, generate, or otherwise reason over sequences of information. For example, some example sequence processing models in the text domain are referred to as “Large Language Models,” or LLMs. See, e.g., PaLM 2 Technical Report, GOOGLE, https: / / ai.google / static / documents / palm2techreport.pdf (n.d.). Other example sequence processing models can operate in other domains, such as image domains, see, e.g., Dosovitskiy et al., An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale, ARXIV:2010.11929v2 (Jun.3, 2021), audio domains, see, e.g., Agostinelli et al., MusicLM: Generating Music From Text, ARXIV:2301.11325v1 (Jan.26, 2023), biochemical domains, see, e.g., Jumper et al., Highly accurate protein structure prediction with AlphaFold, 596 Nature 583 (Aug.26, 2021), by way of example. Sequence processing model(s) 4 can process one or multiple types of data simultaneously. Sequence processing model(s) 4 can include relatively large models (e.g., more parameters, computationally expensive, etc.), relatively small models (e.g., fewer parameters, computationally lightweight, etc.), or both.

[0214] In general, sequence processing model(s) 4 can obtain input sequence 5 using data from input(s) 2. For instance, input sequence 5 can include a representation of data from input(s) 2 in a format understood by sequence processing model(s) 4. One or more machine- learned components of sequence processing model(s) 4 can ingest the data from input(s) 2, parse the data into pieces compatible with the processing architectures of sequence processing model(s) 4 (e.g., via “tokenization”), and project the pieces into an input space associated with prediction layer(s) 6 (e.g., via “embedding”).

[0215] Sequence processing model(s) 4 can ingest the data from input(s) 2 and parse the data into a sequence of elements to obtain input sequence 5. For example, a portion of input data from input(s) 2 can be broken down into pieces that collectively represent the content of the portion of the input data. The pieces can provide the elements of the sequence.

[0216] Elements 5-1, 5-2, ... , 5-M can represent, in some cases, building blocks for capturing or expressing meaningful information in a particular data domain. For instance, the elements can describe “atomic units” across one or more domains. For example, for textual input source(s), the elements can correspond to groups of one or more words or sub-word components, such as sets of one or more characters.

[0217] For example, elements 5-1, 5-2, ... , 5-M can represent tokens obtained using a tokenizer. For instance, a tokenizer can process a given portion of an input source and output a series of tokens (e.g., corresponding to input elements 5-1, 5-2, ... , 5-M) thatrepresent the portion of the input source. Various approaches to tokenization can be used. For instance, textual input source(s) can be tokenized using a byte-pair encoding (BPE) technique. See, e.g., Kudo et al., SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processing, PROCEEDINGS OF THE 2018 CONFERENCE ON EMPIRICAL METHODS IN NATURAL LANGUAGE PROCESSING (System Demonstrations), pages 66–71 (October 31–November 4, 2018), https: / / aclanthology.org / D18-2012.pdf. Image-based input source(s) can be tokenized by extracting and serializing patches from an image.

[0218] In general, arbitrary data types can be serialized and processed into input sequence 5. It is to be understood that element(s) 5-1, 5-2, ... , 5-M depicted in Figure 9 can be the tokens or can be the embedded representations thereof.

[0219] Prediction layer(s) 6 can predict one or more output elements 7-1, 7-2, ... , 7- N based on the input elements. Prediction layer(s) 6 can include one or more machine-learned model architectures, such as one or more layers of learned parameters that manipulate and transform the input(s) to extract higher-order meaning from, and relationships between, input element(s) 5-1, 5-2, ... , 5-M. In this manner, for instance, example prediction layer(s) 6 can predict new output element(s) in view of the context provided by input sequence 5.

[0220] Prediction layer(s) 6 can evaluate associations between portions of input sequence 5 and a particular output element. These associations can inform a prediction of the likelihood that a particular output follows the input context. For example, consider the textual snippet, “The carpenter’s toolbox was small and heavy. It was full of ___.” Example prediction layer(s) 6 can identify that “It” refers back to “toolbox” by determining a relationship between the respective embeddings. Example prediction layer(s) 6 can also link “It” to the attributes of the toolbox, such as “small” and “heavy.” Based on these associations, prediction layer(s) 6 can, for instance, assign a higher probability to the word “nails” than to the word “sawdust.”

[0221] A transformer is an example architecture that can be used in prediction layer(s) 4. See, e.g., Vaswani et al., Attention Is All You Need, ARXIV:1706.03762v7 (Aug.2, 2023). A transformer is an example of a machine-learned model architecture that uses an attention mechanism to compute associations between items within a context window. The context window can include a sequence that contains input sequence 5 and potentially one or more output element(s) 7-1, 7-2, ... , 7-N. A transformer block can include one or moreattention layer(s) and one or more post-attention layer(s) (e.g., feedforward layer(s), such as a multi-layer perceptron).

[0222] Prediction layer(s) 6 can include other machine-learned model architectures in addition to or in lieu of transformer-based architectures. For example, recurrent neural networks (RNNs) and long short-term memory (LSTM) models can also be used, as well as convolutional neural networks (CNNs). In general, prediction layer(s) 6 can leverage various kinds of artificial neural networks that can understand or generate sequences of information.

[0223] Output sequence 7 can include or otherwise represent the same or different data types as input sequence 5. For instance, input sequence 5 can represent textual data, and output sequence 7 can represent textual data. Input sequence 5 can represent image, audio, or audiovisual data, and output sequence 7 can represent textual data (e.g., describing the image, audio, or audiovisual data). It is to be understood that prediction layer(s) 6, and any other interstitial model components of sequence processing model(s) 4, can be configured to receive a variety of data types in input sequence(s) 5 and output a variety of data types in output sequence(s) 7.

[0224] Output sequence 7 can have various relationships to input sequence 5. Output sequence 7 can be a continuation of input sequence 5. Output sequence 7 can be complementary to input sequence 5. Output sequence 7 can translate, transform, augment, or otherwise modify input sequence 5. Output sequence 7 can answer, evaluate, confirm, or otherwise respond to input sequence 5. Output sequence 7 can implement (or describe instructions for implementing) an instruction provided via input sequence 5.

[0225] Output sequence 7 can be generated autoregressively. For instance, for some applications, an output of one or more prediction layer(s) 6 can be passed through one or more output layers (e.g., softmax layer) to obtain a probability distribution over an output vocabulary (e.g., a textual or symbolic vocabulary) conditioned on a set of input elements in a context window. In this manner, for instance, output sequence 7 can be autoregressively generated by sampling a likely next output element, adding that element to the context window, and re-generating the probability distribution based on the updated context window, and sampling a likely next output element, and so forth.

[0226] Output sequence 7 can also be generated non-autoregressively. For instance, multiple output elements of output sequence 7 can be predicted together without explicit sequential conditioning on each other. See, e.g., Saharia et al., Non-Autoregressive Machine Translation with Latent Alignments, ARXIV:2004.07437v3 (Nov.16, 2020).

[0227] Output sequence 7 can include one or multiple portions or elements. In an example content generation configuration, output sequence 7 can include multiple elements corresponding to multiple portions of a generated output sequence (e.g., a textual sentence, values of a discretized waveform, computer code, etc.). In an example classification configuration, output sequence 7 can include a single element associated with a classification output. For instance, an output “vocabulary” can include a set of classes into which an input sequence is to be classified. For instance, a vision transformer block can pass latent state information to a multilayer perceptron that outputs a likely class value associated with an input image.

[0228] Figure 10 is a block diagram of an example technique for populating an example input sequence 8. Input sequence 8 can include various functional elements that form part of the model infrastructure, such as an element 8-0 obtained from a task indicator 9 that signals to any model(s) that process input sequence 8 that a particular task is being performed (e.g., to help adapt a performance of the model(s) to that particular task). Input sequence 8 can include various data elements from different data modalities. For instance, an input modality 10-1 can include one modality of data. A data-to-sequence model 11-1 can process data from input modality 10-1 to project the data into a format compatible with input sequence 8 (e.g., one or more vectors dimensioned according to the dimensions of input sequence 8) to obtain elements 8-1, 8-2, 8-3. Another input modality 10-2 can include a different modality of data. A data-to-sequence model 11-2 can project data from input modality 10-2 into a format compatible with input sequence 8 to obtain elements 8-4, 8-5, 8- 6. Another input modality 10-3 can include yet another different modality of data. A data-to- sequence model 11-3 can project data from input modality 10-3 into a format compatible with input sequence 8 to obtain elements 8-7, 8-8, 8-9.

[0229] Input sequence 8 can be the same as or different from input sequence 5. Input sequence 8 can be a multimodal input sequence that contains elements that represent data from different modalities using a common dimensional representation. For instance, an embedding space can have P dimensions. Input sequence 8 can be configured to contain a plurality of elements that have P dimensions. In this manner, for instance, example implementations can facilitate information extraction and reasoning across diverse data modalities by projecting data into elements in the same embedding space for comparison, combination, or other computations therebetween.

[0230] For example, elements 8-0, ... , 8-9 can indicate particular locations within a multidimensional embedding space. Some elements can map to a set of discrete locations in the embedding space. For instance, elements that correspond to discrete members of a predetermined vocabulary of tokens can map to discrete locations in the embedding space that are associated with those tokens. Other elements can be continuously distributed across the embedding space. For instance, some data types can be broken down into continuously defined portions (e.g., image patches) that can be described using continuously distributed locations within the embedding space.

[0231] In some implementations, the expressive power of the embedding space may not be limited to meanings associated with any particular set of tokens or other building blocks. For example, a continuous embedding space can encode a spectrum of high-order information. An individual piece of information (e.g., a token) can map to a particular point in that space: for instance, a token for the word “dog” can be projected to an embedded value that points to a particular location in the embedding space associated with canine-related information. Similarly, an image patch of an image of a dog on grass can also be projected into the embedding space. In some implementations, the projection of the image of the dog can be similar to the projection of the word “dog” while also having similarity to a projection of the word “grass,” while potentially being different from both. In some implementations, the projection of the image patch may not exactly align with any single projection of a single word. In some implementations, the projection of the image patch can align with a combination of the projections of the words “dog” and “grass.” In this manner, for instance, a high-order embedding space can encode information that can be independent of data modalities in which the information is expressed.

[0232] Task indicator 9 can include a model or model component configured to identify a task being performed and inject, into input sequence 8, an input value represented by element 8-0 that signals which task is being performed. For instance, the input value can be provided as a data type associated with an input modality and projected along with that input modality (e.g., the input value can be a textual task label that is embedded along with other textual data in the input; the input value can be a pixel-based representation of a task that is embedded along with other image data in the input; etc.). The input value can be provided as a data type that differs from or is at least independent from other input(s). For instance, the input value represented by element 8-0 can be a learned within a continuous embedding space.

[0233] Input modalities 10-1, 10-2, and 10-3 can be associated with various different data types (e.g., as described above with respect to input(s) 2 and output(s) 3).

[0234] Data-to-sequence models 11-1, 11-2, and 11-3 can be the same or different from each other. Data-to-sequence models 11-1, 11-2, and 11-3 can be adapted to each respective input modality 10-1, 10-2, and 10-3. For example, a textual data-to-sequence model can subdivide a portion of input text and project the subdivisions into element(s) in input sequence 8 (e.g., elements 8-1, 8-2, 8-3, etc.). An image data-to-sequence model can subdivide an input image and project the subdivisions into element(s) in input sequence 8 (e.g., elements 8-4, 8-5, 8-6, etc.). An arbitrary datatype data-to-sequence model can subdivide an input of that arbitrary datatype and project the subdivisions into element(s) in input sequence 8 (e.g., elements 8-7, 8-8, 8-9, etc.).

[0235] Data-to-sequence models 11-1, 11-2, and 11-3 can form part of machine- learned sequence processing model(s) 4. Data-to-sequence models 11-1, 11-2, and 11-3 can be jointly trained with or trained independently from machine-learned sequence processing model(s) 4. Data-to-sequence models 11-1, 11-2, and 11-3 can be trained end-to-end with machine-learned sequence processing model(s) 4.

[0236] Figure 11 is a block diagram of an example model development platform 12 that can facilitate creation, adaptation, and refinement of example machine-learned models (e.g., machine-learned model(s) 1, sequence processing model(s) 4, etc.). Model development platform 12 can provide a number of different toolkits that developer systems can employ in the development of new or adapted machine-learned models.

[0237] Model development platform 12 can provide one or more model libraries 13 containing building blocks for new models. Model libraries 13 can include one or more pre- trained foundational models 13-1, which can provide a backbone of processing power across various tasks. Model libraries 13 can include one or more pre-trained expert models 13-2, which can be focused on performance in particular domains of expertise. Model libraries 13 can include various model primitives 13-3, which can provide low-level architectures or components (optionally pre-trained), which can be assembled in various arrangements as desired.

[0238] Model development platform 12 can receive selections of various model components 14. Model development platform 12 can pass selected model components 14 to a workbench 15 that combines selected model components 14 into a development model 16.

[0239] Workbench 15 can facilitate further refinement and adaptation of development model 16 by leveraging a number of different toolkits integrated with model development platform 12. For example, workbench 15 can facilitate alignment of the development model 16 with a desired performance profile on various tasks using a model alignment toolkit 17.

[0240] Model alignment toolkit 17 can provide a number of tools for causing development model 16 to generate outputs aligned with desired behavioral characteristics. Alignment can include increasing an accuracy, precision, recall, etc. of model outputs. Alignment can include enforcing output styles, schema, or other preferential characteristics of model outputs. Alignment can be general or domain-specific. For instance, a pre-trained foundational model 13-1 can begin with an initial level of performance across multiple domains. Alignment of the pre-trained foundational model 13-1 can include improving a performance in a particular domain of information or tasks (e.g., even at the expense of performance in another domain of information or tasks).

[0241] Model alignment toolkit 17 can integrate one or more dataset(s) 17-1 for aligning development model 16. Curated dataset(s) 17-1 can include labeled or unlabeled training data. Dataset(s) 17-1 can be obtained from public domain datasets. Dataset(s) 17-1 can be obtained from private datasets associated with one or more developer system(s) for the alignment of bespoke machine-learned model(s) customized for private use-cases.

[0242] Pre-training pipelines 17-2 can include a machine-learned model training workflow configured to update development model 16 over large-scale, potentially noisy datasets. For example, pre-training can leverage unsupervised learning techniques (e.g., de- noising, etc.) to process large numbers of training instances to update model parameters from an initialized state and achieve a desired baseline performance. Pre-training pipelines 17-2 can leverage unlabeled datasets in dataset(s) 17-1 to perform pre-training. Workbench 15 can implement a pre-training pipeline 17-2 to pre-train development model 16.

[0243] Fine-tuning pipelines 17-3 can include a machine-learned model training workflow configured to refine the model parameters of development model 16 with higher- quality data. Fine-tuning pipelines 17-3 can update development model 16 by conducting supervised training with labeled dataset(s) in dataset(s) 17-1. Fine-tuning pipelines 17-3 can update development model 16 by conducting reinforcement learning using reward signals from user feedback signals. Workbench 15 can implement a fine-tuning pipeline 17-3 to fine- tune development model 16.

[0244] Prompt libraries 17-4 can include sets of inputs configured to induce behavior aligned with desired performance criteria. Prompt libraries 17-4 can include few-shot prompts (e.g., inputs providing examples of desired model outputs for prepending to a desired runtime query), chain-of-thought prompts (e.g., inputs providing step-by-step reasoning within the exemplars to facilitate thorough reasoning by the model), and the like.

[0245] Example prompts can be retrieved from an available repository of prompt libraries 17-4. Example prompts can be contributed by one or more developer systems using workbench 15.

[0246] In some implementations, pre-trained or fine-tuned models can achieve satisfactory performance without exemplars in the inputs. For instance, zero-shot prompts can include inputs that lack exemplars. Zero-shot prompts can be within a domain within a training dataset or outside of the training domain(s).

[0247] Prompt libraries 17-4 can include one or more prompt engineering tools. Prompt engineering tools can provide workflows for retrieving or learning optimized prompt values. Prompt engineering tools can facilitate directly learning prompt values (e.g., input element values) based on one or more training iterations. Workbench 15 can implement prompt engineering tools in development model 16.

[0248] Prompt libraries 17-4 can include pipelines for prompt generation. For example, inputs can be generated using development model 16 itself or other machine- learned models. In this manner, for instance, a first model can process information about a task and output an input for a second model to process in order to perform a step of the task. The second model can be the same as or different from the first model. Workbench 15 can implement prompt generation pipelines in development model 16.

[0249] Prompt libraries 17-4 can include pipelines for context injection. For instance, a performance of development model 16 on a particular task can improve if provided with additional context for performing the task. Prompt libraries 17-4 can include software components configured to identify desired context, retrieve the context from an external source (e.g., a database, a sensor, etc.), and add the context to the input prompt. Workbench 15 can implement context injection pipelines in development model 16.

[0250] Although various training examples described herein with respect to model development platform 12 refer to “pre-training” and “fine-tuning,” it is to be understood that model alignment toolkit 17 can generally support a wide variety of training techniquesadapted for training a wide variety of machine-learned models. Example training techniques can correspond to the example training method 700 described above.

[0251] Model development platform 12 can include a model plugin toolkit 18. Model plugin toolkit 18 can include a variety of tools configured for augmenting the functionality of a machine-learned model by integrating the machine-learned model with other systems, devices, and software components. For instance, a machine-learned model can use tools to increase performance quality where appropriate. For instance, deterministic tasks can be offloaded to dedicated tools in lieu of probabilistically performing the task with an increased risk of error. For instance, instead of autoregressively predicting the solution to a system of equations, a machine-learned model can recognize a tool to call for obtaining the solution and pass the system of equations to the appropriate tool. The tool can be a traditional system of equations solver that can operate deterministically to resolve the system of equations. The output of the tool can be returned in response to the original query. In this manner, tool use can allow some example models to focus on the strengths of machine-learned models—e.g., understanding an intent in an unstructured request for a task—while augmenting the performance of the model by offloading certain tasks to a more focused tool for rote application of deterministic algorithms to a well-defined problem.

[0252] Model plugin toolkit 18 can include validation tools 18-1. Validation tools 18- 1 can include tools that can parse and confirm output(s) of a machine-learned model. Validation tools 18-1 can include engineered heuristics that establish certain thresholds applied to model outputs. For example, validation tools 18-1 can ground the outputs of machine-learned models to structured data sources (e.g., to mitigate “hallucinations”).

[0253] Model plugin toolkit 18 can include tooling packages 18-2 for implementing one or more tools that can include scripts or other executable code that can be executed alongside development model 16. Tooling packages 18-2 can include one or more inputs configured to cause machine-learned model(s) to implement the tools (e.g., few-shot prompts that induce a model to output tool calls in the proper syntax, etc.). Tooling packages 18-2 can include, for instance, fine-tuning training data for training a model to use a tool.

[0254] Model plugin toolkit 18 can include interfaces for calling external application programming interfaces (APIs) 18-3. For instance, in addition to or in lieu of implementing tool calls or tool code directly with development model 16, development model 16 can be aligned to output instruction that initiate API calls to send or obtain data via external systems.

[0255] Model plugin toolkit 18 can integrate with prompt libraries 17-4 to build a catalog of available tools for use with development model 16. For instance, a model can receive, in an input, a catalog of available tools, and the model can generate an output that selects a tool from the available tools and initiates a tool call for using the tool.

[0256] Model development platform 12 can include a computational optimization toolkit 19 for optimizing a computational performance of development model 16. For instance, tools for model compression 19-1 can allow development model 16 to be reduced in size while maintaining a desired level of performance. For instance, model compression 19-1 can include quantization workflows, weight pruning and sparsification techniques, etc. Tools for hardware acceleration 19-2 can facilitate the configuration of the model storage and execution formats to operate optimally on different hardware resources. For instance, hardware acceleration 19-2 can include tools for optimally sharding models for distributed processing over multiple processing units for increased bandwidth, lower unified memory requirements, etc. Tools for distillation 19-3 can provide for the training of lighter-weight models based on the knowledge encoded in development model 16. For instance, development model 16 can be a highly performant, large machine-learned model optimized using model development platform 12. To obtain a lightweight model for running in resource-constrained environments, a smaller model can be a “student model” that learns to imitate development model 16 as a “teacher model.” In this manner, for instance, the investment in learning the parameters and configurations of development model 16 can be efficiently transferred to a smaller model for more efficient inference.

[0257] Workbench 15 can implement one, multiple, or none of the toolkits implemented in model development platform 12. Workbench 15 can output an output model 20 based on development model 16. Output model 20 can be a deployment version of development model 16. Output model 20 can be a development or training checkpoint of development model 16. Output model 20 can be a distilled, compressed, or otherwise optimized version of development model 16.

[0258] Figure 12 is a block diagram of an example training flow for training a machine-learned development model 16. One or more portion(s) of the example training flow can be implemented by a computing system that includes one or more computing devices such as, for example, computing systems described with reference to the other figures. Each respective portion of the example training flow can be performed by any (or any combination) of one or more computing devices. Moreover, one or more portion(s) of theexample training flow can be implemented on the hardware components of the device(s) described herein, for example, to train one or more systems or models. FIG.12 depicts elements performed in a particular order for purposes of illustration and discussion. Those of ordinary skill in the art, using the disclosures provided herein, will understand that the elements of any of the methods discussed herein can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure. FIG.12 is described with reference to elements / terms described with respect to other systems and figures for exemplary illustrated purposes and is not meant to be limiting. One or more portions of the example training flow can be performed additionally, or alternatively, by other systems.

[0259] Initially, development model 16 can persist in an initial state as an initialized model 21. Development model 16 can be initialized with weight values. Initial weight values can be random or based on an initialization schema. Initial weight values can be based on prior pre-training for the same or for a different model.

[0260] Initialized model 21 can undergo pre-training in a pre-training stage 22. Pre- training stage 22 can be implemented using one or more pre-training pipelines 17-2 over data from dataset(s) 17-1. Pre-training can be omitted, for example, if initialized model 21 is already pre-trained (e.g., development model 16 contains, is, or is based on a pre-trained foundational model or an expert model).

[0261] Pre-trained model 23 can then be a new version of development model 16, which can persist as development model 16 or as a new development model. Pre-trained model 23 can be the initial state if development model 16 was already pre-trained. Pre-trained model 23 can undergo fine-tuning in a fine-tuning stage 24. Fine-tuning stage 24 can be implemented using one or more fine-tuning pipelines 17-3 over data from dataset(s) 17-1. Fine-tuning can be omitted, for example, if a pre-trained model as satisfactory performance, if the model was already fine-tuned, or if other tuning approaches are preferred.

[0262] Fine-tuned model 25 can then be a new version of development model 16, which can persist as development model 16 or as a new development model. Fine-tuned model 25 can be the initial state if development model 16 was already fine-tuned. Fine-tuned model 25 can undergo refinement with user feedback 26. For instance, refinement with user feedback 26 can include reinforcement learning, optionally based on human feedback from human users of fine-tuned model 25. As reinforcement learning can be a form of fine-tuning, it is to be understood that fine-tuning stage 24 can subsume the stage for refining with userfeedback 26. Refinement with user feedback 26 can produce a refined model 27. Refined model 27 can be output to downstream system(s) 28 for deployment or further development.

[0263] In some implementations, computational optimization operations can be applied before, during, or after each stage. For instance, initialized model 21 can undergo computational optimization 29-1 (e.g., using computational optimization toolkit 19) before pre-training stage 22. Pre-trained model 23 can undergo computational optimization 29-2 (e.g., using computational optimization toolkit 19) before fine-tuning stage 24. Fine-tuned model 25 can undergo computational optimization 29-3 (e.g., using computational optimization toolkit 19) before refinement with user feedback 26. Refined model 27 can undergo computational optimization 29-4 (e.g., using computational optimization toolkit 19) before output to downstream system(s) 28. Computational optimization(s) 29-1, ... , 29-4 can all be the same, all be different, or include at least some different optimization techniques.

[0264] Figure 13 is a block diagram of an inference system for operating one or more machine-learned model(s) 1 to perform inference (e.g., for training, for deployment, etc.). A model host 31 can receive machine-learned model(s) 1. Model host 31 can host one or more model instance(s) 31-1, which can be one or multiple instances of one or multiple models. Model host 31 can host model instance(s) 31-1 using available compute resources 31-2 associated with model host 31.

[0265] Model host 31 can perform inference on behalf of one or more client(s) 32. Client(s) 32 can transmit an input request 33 to model host 31. Using input request 33, model host 31 can obtain input(s) 2 for input to machine-learned model(s) 1. Machine-learned model(s) 1 can process input(s) 2 to generate output(s) 3. Using output(s) 3, model host 31 can return an output payload 34 for responding to input request 33 from client(s) 32. Output payload 34 can include or be based on output(s) 3.

[0266] Model host 31 can leverage various other resources and tools to augment the inference task. For instance, model host 31 can communicate with tool interfaces 35 to facilitate tool use by model instance(s) 31-1. Tool interfaces 35 can include local or remote APIs. Tool interfaces 35 can include integrated scripts or other software functionality.

[0267] In an example, machine-learned model(s) 1 can be a model configured to be executed by an agent system. The agent system can implement machine-learned and hand- tuned logic to perform multi-step tasks on behalf of a requesting user or system. The agent system may be a general-purpose agent. The agent system can be configured to directrequests relating to different domains to different tools. For example, the agent system can be configured to direct therapeutics-related queries to a model trained to understand therapeutics information. For instance, machine-learned model(s) 1 can generate a query. Model host 31 can pass the query via a tool interface 35 to a system implementing an example machine- learned sequence processing model 110 to obtain therapeutics-related predictions.

[0268] For instance, an example method can include processing an initial query using machine-learned model 1. The example method can include constructing, based on the initial query, the input sequence using machine-learned model 1. The example method can include providing, via one or more application programming interfaces (APIs), the input sequence for processing by the machine-learned sequence processing model 110. The example method can include receiving, via the APIs, the output sequence. The example method can include processing, using the first machine-learned sequence processing model, the output sequence to generate a response to the initial query.

[0269] Model host 31 can engage online learning interface(s) 36 to facilitate ongoing improvements to machine-learned model(s) 1. For instance, online learning interface(s) 36 can be used within reinforcement learning loops to retrieve user feedback on inferences served by model host 31. Model host 31 can access runtime data source(s) 37 for augmenting input(s) 2 with additional contextual information. For instance, runtime data source(s) 37 can include a knowledge graph 37-1 that facilitates structured information retrieval for information associated with input request(s) 33 (e.g., a search engine service). Runtime data source(s) 37 can include public or private, external or local database(s) 37-2 that can store information associated with input request(s) 33 for augmenting input(s) 2. Runtime data source(s) 37 can include account data 37-3 which can be retrieved in association with a user account corresponding to a client 32 for customizing the behavior of model host 31 accordingly.

[0270] An example runtime data source 37 can include a data source providing context data for runtime inferences of machine-learned sequence processing model 110. A system can retrieve context data from the data source by querying a database (e.g., a vector- based database, a relational database, an unstructured database, etc.). The system can inject the context data into an input sequence for processing by the machine-learned sequence processing model 110. The context data can be retrieved using, for instance, similarity-based retrieval methods. Example techniques for retrieving context data can include, for instance, retrieval augmented generation (RAG) techniques.

[0271] Model host 31 can be a model execution system implemented by one or multiple computing devices or systems. Client(s) 2 can be implemented by one or multiple computing devices or systems, which can include computing devices or systems shared with model host 31.

[0272] For example, model host 31 can operate on a server system that provides a machine-learning service to client device(s) that operate client(s) 32 (e.g., over a local or wide-area network). Client device(s) can be end-user devices used by individuals. Client device(s) can be server systems that operate client(s) 32 to provide various functionality as a service to downstream end-user devices.

[0273] In some implementations, model host 31 can operate on a same device or system as client(s) 32. Model host 31 can be a machine-learning service that runs on-device to provide machine-learning functionality to one or multiple applications operating on a client device, which can include an application implementing client(s) 32. Model host 31 can be a part of a same application as client(s) 32. For instance, model host 31 can be a subroutine or method implemented by one part of an application, and client(s) 32 can be another subroutine or method that engages model host 31 to perform inference functions within the application. It is to be understood that model host 31 and client(s) 32 can have various different configurations.

[0274] Model instance(s) 31-1 can include one or more machine-learned models that are available for performing inference. Model instance(s) 31-1 can include weights or other model components that are stored on in persistent storage, temporarily cached, or loaded into high-speed memory. Model instance(s) 31-1 can include multiple instance(s) of the same model (e.g., for parallel execution of more requests on the same model). Model instance(s) 31-1 can include instance(s) of different model(s). Model instance(s) 31-1 can include cached intermediate states of active or inactive model(s) used to accelerate inference of those models. For instance, an inference session with a particular model may generate significant amounts of computational results that can be re-used for future inference runs (e.g., using a KV cache for transformer-based models). These computational results can be saved in association with that inference session so that session can be executed more efficiently when resumed.

[0275] Compute resource(s) 31-2 can include one or more processors (central processing units, graphical processing units, tensor processing units, machine-learning accelerators, etc.) connected to one or more memory devices. Compute resource(s) 31-2 caninclude a dynamic pool of available resources shared with other processes. Compute resource(s) 31-2 can include memory devices large enough to fit an entire model instance in a single memory instance. Compute resource(s) 31-2 can also shard model instance(s) across multiple memory devices (e.g., using data parallelization or tensor parallelization, etc.). This can be done to increase parallelization or to execute a large model using multiple memory devices which individually might not be able to fit the entire model into memory.

[0276] Input request 33 can include data for input(s) 2. Model host 31 can process input request 33 to obtain input(s) 2. Input(s) 2 can be obtained directly from input request 33 or can be retrieved using input request 33. Input request 33 can be submitted to model host 31 via an API.

[0277] Model host 31 can perform inference over batches of input requests 33 in parallel. For instance, a model instance 31-1 can be configured with an input structure that has a batch dimension. Separate input(s) 2 can be distributed across the batch dimension (e.g., rows of an array). The separate input(s) 2 can include completely different contexts. The separate input(s) 2 can be multiple inference steps of the same task. The separate input(s) 2 can be staggered in an input structure, such that any given inference cycle can be operating on different portions of the respective input(s) 2. In this manner, for instance, model host 31 can perform inference on the batch in parallel, such that output(s) 3 can also contain the batch dimension and return the inference results for the batched input(s) 2 in parallel. In this manner, for instance, batches of input request(s) 33 can be processed in parallel for higher throughput of output payload(s) 34.

[0278] Output payload 34 can include or be based on output(s) 3 from machine- learned model(s) 1. Model host 31 can process output(s) 3 to obtain output payload 34. This can include chaining multiple rounds of inference (e.g., iteratively, recursively, across the same model(s) or different model(s)) to arrive at a final output for a task to be returned in output payload 34. Output payload 34 can be transmitted to client(s) 32 via an API.

[0279] Online learning interface(s) 36 can facilitate reinforcement learning of machine-learned model(s) 1. Online learning interface(s) 36 can facilitate reinforcement learning with human feedback (RLHF). Online learning interface(s) 36 can facilitate federated learning of machine-learned model(s) 1.

[0280] Model host 31 can execute machine-learned model(s) 1 to perform inference for various tasks using various types of data. For example, various different input(s) 2 and output(s) 3 can be used for various different tasks. In some implementations, input(s) 2 canbe or otherwise represent image data. Machine-learned model(s) 1 can process the image data to generate an output. As an example, machine-learned model(s) 1 can process the image data to generate an image recognition output (e.g., a recognition of the image data, a latent embedding of the image data, an encoded representation of the image data, a hash of the image data, etc.). As another example, machine-learned model(s) 1 can process the image data to generate an image segmentation output. As another example, machine-learned model(s) 1 can process the image data to generate an image classification output. As another example, machine-learned model(s) 1 can process the image data to generate an image data modification output (e.g., an alteration of the image data, etc.). As another example, machine- learned model(s) 1 can process the image data to generate an encoded image data output (e.g., an encoded and / or compressed representation of the image data, etc.). As another example, machine-learned model(s) 1 can process the image data to generate an upscaled image data output. As another example, machine-learned model(s) 1 can process the image data to generate a prediction output.

[0281] In some implementations, the task is a computer vision task. In some cases, input(s) 2 includes pixel data for one or more images and the task is an image processing task. For example, the image processing task can be image classification, where the output is a set of scores, each score corresponding to a different object class and representing the likelihood that the one or more images depict an object belonging to the object class. The image processing task may be object detection, where the image processing output identifies one or more regions in the one or more images and, for each region, a likelihood that region depicts an object of interest. As another example, the image processing task can be image segmentation, where the image processing output defines, for each pixel in the one or more images, a respective likelihood for each category in a predetermined set of categories. For example, the set of categories can be foreground and background. As another example, the set of categories can be object classes. As another example, the image processing task can be depth estimation, where the image processing output defines, for each pixel in the one or more images, a respective depth value. As another example, the image processing task can be motion estimation, where the network input includes multiple images, and the image processing output defines, for each pixel of one of the input images, a motion of the scene depicted at the pixel between the images in the network input.

[0282] In some implementations, input(s) 2 can be or otherwise represent natural language data. Machine-learned model(s) 1 can process the natural language data to generatean output. As an example, machine-learned model(s) 1 can process the natural language data to generate a language encoding output. As another example, machine-learned model(s) 1 can process the natural language data to generate a latent text embedding output. As another example, machine-learned model(s) 1 can process the natural language data to generate a translation output. As another example, machine-learned model(s) 1 can process the natural language data to generate a classification output. As another example, machine-learned model(s) 1 can process the natural language data to generate a textual segmentation output. As another example, machine-learned model(s) 1 can process the natural language data to generate a semantic intent output. As another example, machine-learned model(s) 1 can process the natural language data to generate an upscaled text or natural language output (e.g., text or natural language data that is higher quality than the input text or natural language, etc.). As another example, machine-learned model(s) 1 can process the natural language data to generate a prediction output (e.g., one or more predicted next portions of natural language content).

[0283] In some implementations, input(s) 2 can be or otherwise represent speech data (e.g., data describing spoken natural language, such as audio data, textual data, etc.). Machine-learned model(s) 1 can process the speech data to generate an output. As an example, machine-learned model(s) 1 can process the speech data to generate a speech recognition output. As another example, machine-learned model(s) 1 can process the speech data to generate a speech translation output. As another example, machine-learned model(s) 1 can process the speech data to generate a latent embedding output. As another example, machine-learned model(s) 1 can process the speech data to generate an encoded speech output (e.g., an encoded and / or compressed representation of the speech data, etc.). As another example, machine-learned model(s) 1 can process the speech data to generate an upscaled speech output (e.g., speech data that is higher quality than the input speech data, etc.). As another example, machine-learned model(s) 1 can process the speech data to generate a textual representation output (e.g., a textual representation of the input speech data, etc.). As another example, machine-learned model(s) 1 can process the speech data to generate a prediction output.

[0284] In some implementations, input(s) 2 can be or otherwise represent latent encoding data (e.g., a latent space representation of an input, etc.). Machine-learned model(s) 1 can process the latent encoding data to generate an output. As an example, machine- learned model(s) 1 can process the latent encoding data to generate a recognition output. Asanother example, machine-learned model(s) 1 can process the latent encoding data to generate a reconstruction output. As another example, machine-learned model(s) 1 can process the latent encoding data to generate a search output. As another example, machine- learned model(s) 1 can process the latent encoding data to generate a reclustering output. As another example, machine-learned model(s) 1 can process the latent encoding data to generate a prediction output.

[0285] In some implementations, input(s) 2 can be or otherwise represent statistical data. Statistical data can be, represent, or otherwise include data computed and / or calculated from some other data source. Machine-learned model(s) 1 can process the statistical data to generate an output. As an example, machine-learned model(s) 1 can process the statistical data to generate a recognition output. As another example, machine-learned model(s) 1 can process the statistical data to generate a prediction output. As another example, machine- learned model(s) 1 can process the statistical data to generate a classification output. As another example, machine-learned model(s) 1 can process the statistical data to generate a segmentation output. As another example, machine-learned model(s) 1 can process the statistical data to generate a visualization output. As another example, machine-learned model(s) 1 can process the statistical data to generate a diagnostic output.

[0286] In some implementations, input(s) 2 can be or otherwise represent sensor data. Machine-learned model(s) 1 can process the sensor data to generate an output. As an example, machine-learned model(s) 1 can process the sensor data to generate a recognition output. As another example, machine-learned model(s) 1 can process the sensor data to generate a prediction output. As another example, machine-learned model(s) 1 can process the sensor data to generate a classification output. As another example, machine-learned model(s) 1 can process the sensor data to generate a segmentation output. As another example, machine-learned model(s) 1 can process the sensor data to generate a visualization output. As another example, machine-learned model(s) 1 can process the sensor data to generate a diagnostic output. As another example, machine-learned model(s) 1 can process the sensor data to generate a detection output.

[0287] In some implementations, machine-learned model(s) 1 can be configured to perform a task that includes encoding input data for reliable and / or efficient transmission or storage (and / or corresponding decoding). For example, the task may be an audio compression task. The input may include audio data and the output may comprise compressed audio data. In another example, the input includes visual data (e.g. one or more images or videos), theoutput comprises compressed visual data, and the task is a visual data compression task. In another example, the task may comprise generating an embedding for input data (e.g. input audio or visual data). In some cases, the input includes audio data representing a spoken utterance and the task is a speech recognition task. The output may comprise a text output which is mapped to the spoken utterance. In some cases, the task comprises encrypting or decrypting input data. In some cases, the task comprises a microprocessor performance task, such as branch prediction or memory address translation.

[0288] In some implementations, the task is a generative task, and machine-learned model(s) 1 can be configured to output content generated in view of input(s) 2. For instance, input(s) 2 can be or otherwise represent data of one or more modalities that encodes context for generating additional content.

[0289] In some implementations, the task can be a text completion task. Machine- learned model(s) 1 can be configured to process input(s) 2 that represent textual data and to generate output(s) 3 that represent additional textual data that completes a textual sequence that includes input(s) 2. For instance, machine-learned model(s) 1 can be configured to generate output(s) 3 to complete a sentence, paragraph, or portion of text that follows from a portion of text represented by input(s) 2.

[0290] In some implementations, the task can be an instruction following task. Machine-learned model(s) 1 can be configured to process input(s) 2 that represent instructions to perform a function and to generate output(s) 3 that advance a goal of satisfying the instruction function (e.g., at least a step of a multi-step procedure to perform the function). Output(s) 3 can represent data of the same or of a different modality as input(s) 2. For instance, input(s) 2 can represent textual data (e.g., natural language instructions for a task to be performed) and machine-learned model(s) 1 can process input(s) 2 to generate output(s) 3 that represent textual data responsive to the instructions (e.g., natural language responses, programming language responses, machine language responses, etc.). Input(s) 2 can represent image data (e.g., image-based instructions for a task to be performed, optionally accompanied by textual instructions) and machine-learned model(s) 1 can process input(s) 2 to generate output(s) 3 that represent textual data responsive to the instructions (e.g., natural language responses, programming language responses, machine language responses, etc.). One or more output(s) 3 can be iteratively or recursively generated to sequentially process and accomplish steps toward accomplishing the requested functionality. For instance, an initial output can be executed by an external system or be processed by machine-learnedmodel(s) 1 to complete an initial step of performing a function. Multiple steps can be performed, with a final output being obtained that is responsive to the initial instructions.

[0291] In some implementations, the task can be a question answering task. Machine- learned model(s) 1 can be configured to process input(s) 2 that represent a question to answer and to generate output(s) 3 that advance a goal of returning an answer to the question (e.g., at least a step of a multi-step procedure to perform the function). Output(s) 3 can represent data of the same or of a different modality as input(s) 2. For instance, input(s) 2 can represent textual data (e.g., natural language instructions for a task to be performed) and machine- learned model(s) 1 can process input(s) 2 to generate output(s) 3 that represent textual data responsive to the question (e.g., natural language responses, programming language responses, machine language responses, etc.). Input(s) 2 can represent image data (e.g., image-based instructions for a task to be performed, optionally accompanied by textual instructions) and machine-learned model(s) 1 can process input(s) 2 to generate output(s) 3 that represent textual data responsive to the question (e.g., natural language responses, programming language responses, machine language responses, etc.). One or more output(s) 3 can be iteratively or recursively generated to sequentially process and accomplish steps toward answering the question. For instance, an initial output can be executed by an external system or be processed by machine-learned model(s) 1 to complete an initial step of obtaining an answer to the question (e.g., querying a database, performing a computation, executing a script, etc.). Multiple steps can be performed, with a final output being obtained that is responsive to the question.

[0292] In some implementations, the task can be an image generation task. Machine- learned model(s) 1 can be configured to process input(s) 2 that represent context regarding a desired portion of image content. The context can include text data, image data, audio data, etc. Machine-learned model(s) 1 can be configured to generate output(s) 3 that represent image data that depicts imagery related to the context. For instance, machine-learned model(s) 1 can be configured to generate pixel data of an image. Values for channel(s) associated with the pixels in the pixel data can be selected based on the context (e.g., based on a probability determined based on the context).

[0293] In some implementations, the task can be an audio generation task. Machine- learned model(s) 1 can be configured to process input(s) 2 that represent context regarding a desired portion of audio content. The context can include text data, image data, audio data, etc. Machine-learned model(s) 1 can be configured to generate output(s) 3 that representaudio data related to the context. For instance, machine-learned model(s) 1 can be configured to generate waveform data in the form of an image (e.g., a spectrogram). Values for channel(s) associated with pixels of the image can be selected based on the context. Machine- learned model(s) 1 can be configured to generate waveform data in the form of a sequence of discrete samples of a continuous waveform. Values of the sequence can be selected based on the context (e.g., based on a probability determined based on the context).

[0294] In some implementations, the task can be a data generation task. Machine- learned model(s) 1 can be configured to process input(s) 2 that represent context regarding a desired portion of data (e.g., data from various data domains, such as sensor data, image data, multimodal data, statistical data, etc.). The desired data can be, for instance, synthetic data for training other machine-learned models. The context can include arbitrary data type(s). Machine-learned model(s) 1 can be configured to generate output(s) 3 that represent data that aligns with the desired data. For instance, machine-learned model(s) 1 can be configured to generate data values for populating a dataset. Values for the data object(s) can be selected based on the context (e.g., based on a probability determined based on the context).

[0295] Figure 14 is a block diagram of an example networked computing system that can perform aspects of example implementations of the present disclosure. The system can include a number of computing devices and systems that are communicatively coupled over a network 49. An example computing device 50 is described to provide an example of a computing device that can perform any aspect of the present disclosure (e.g., implementing model host 31, client(s) 32, or both). An example server computing system 60 is described as an example of a server computing system that can perform any aspect of the present disclosure (e.g., implementing model host 31, client(s) 32, or both). Computing device 50 and server computing system(s) 60 can cooperatively interact (e.g., over network 49) to perform any aspect of the present disclosure (e.g., implementing model host 31, client(s) 32, or both). Model development platform system 70 is an example system that can host or serve model development platform(s) 12 for development of machine-learned models. Third-party system(s) 80 are example system(s) with which any of computing device 50, server computing system(s) 60, or model development platform system(s) 70 can interact in the performance of various aspects of the present disclosure (e.g., engaging third-party tools, accessing third-party databases or other resources, etc.).

[0296] Network 49 can be any type of communications network, such as a local area network (e.g., intranet), wide area network (e.g., Internet), or some combination thereof andcan include any number of wired or wireless links. In general, communication over network 49 can be carried via any type of wired or wireless connection, using a wide variety of communication protocols (e.g., TCP / IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML), or protection schemes (e.g., VPN, secure HTTP, SSL). Network 49 can also be implemented via a system bus. For instance, one or more devices or systems of Figure 14 can be co-located with, contained by, or otherwise integrated into one or more other devices or systems.

[0297] Computing device 50 can be any type of computing device, such as, for example, a personal computing device (e.g., laptop or desktop), a mobile computing device (e.g., smartphone or tablet), a gaming console or controller, a wearable computing device, an embedded computing device, a server computing device, a virtual machine operating on a host device, or any other type of computing device. Computing device 50 can be a client computing device. Computing device 50 can be an end-user computing device. Computing device 50 can be a computing device of a service provided that provides a service to an end user (who may use another computing device to interact with computing device 50).

[0298] Computing device 50 can include one or more processors 51 and a memory 52. Processor(s) 51 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. Memory 52 can include one or more non-transitory computer-readable storage media, such as HBM, RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. Memory 52 can store data 53 and instructions 54 which can be executed by processor(s) 51 to cause computing device 50 to perform operations. The operations can implement any one or multiple features described herein. The operations can implement example methods and techniques described herein.

[0299] Computing device 50 can also include one or more input components that receive user input. For example, a user input component can be a touch-sensitive component (e.g., a touch-sensitive display screen or a touch pad) that is sensitive to the touch of a user input object (e.g., a finger or a stylus). The touch-sensitive component can serve to implement a virtual keyboard. Other example user input components include a microphone, camera, LIDAR, a physical keyboard or other buttons, or other means by which a user can provide user input.

[0300] Computing device 50 can store or include one or more machine-learned models 55. Machine-learned models 55 can include one or more machine-learned model(s) 1, such as a sequence processing model 4. Machine-learned models 55 can include one or multiple model instance(s) 31-1. Machine-learned model(s) 55 can be received from server computing system(s) 60, model development platform system 70, third party system(s) 80 (e.g., an application distribution platform), or developed locally on computing device 50. Machine-learned model(s) 55 can be loaded into memory 52 and used or otherwise implemented by processor(s) 51. Computing device 50 can implement multiple parallel instances of machine-learned model(s) 55.

[0301] Server computing system(s) 60 can include one or more processors 61 and a memory 62. Processor(s) 61 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. Memory 62 can include one or more non-transitory computer-readable storage media, such as HBM, RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. Memory 62 can store data 63 and instructions 64 which can be executed by processor(s) 61 to cause server computing system(s) 60 to perform operations. The operations can implement any one or multiple features described herein. The operations can implement example methods and techniques described herein.

[0302] In some implementations, server computing system 60 includes or is otherwise implemented by one or multiple server computing devices. In instances in which server computing system 60 includes multiple server computing devices, such server computing devices can operate according to sequential computing architectures, parallel computing architectures, or some combination thereof.

[0303] Server computing system 60 can store or otherwise include one or more machine-learned models 65. Machine-learned model(s) 65 can be the same as or different from machine-learned model(s) 55. Machine-learned models 65 can include one or more machine-learned model(s) 1, such as a sequence processing model 4. Machine-learned models 65 can include one or multiple model instance(s) 31-1. Machine-learned model(s) 65 can be received from computing device 50, model development platform system 70, third party system(s) 80, or developed locally on server computing system(s) 60. Machine-learned model(s) 65 can be loaded into memory 62 and used or otherwise implemented byprocessor(s) 61. Server computing system(s) 60 can implement multiple parallel instances of machine-learned model(s) 65.

[0304] In an example configuration, machine-learned models 65 can be included in or otherwise stored and implemented by server computing system 60 to establish a client-server relationship with computing device 50 for serving model inferences. For instance, server computing system(s) 60 can implement model host 31 on behalf of client(s) 32 on computing device 50. For instance, machine-learned models 65 can be implemented by server computing system 60 as a portion of a web service (e.g., remote machine-learned model hosting service, such as an online interface for performing machine-learned model operations over a network on server computing system(s) 60). For instance, server computing system(s) 60 can communicate with computing device 50 over a local intranet or internet connection. For instance, computing device 50 can be a workstation or endpoint in communication with server computing system(s) 60, with implementation of machine-learned models 65 being managed by server computing system(s) 60 to remotely perform inference (e.g., for runtime or training operations), with output(s) returned (e.g., cast, streamed, etc.) to computing device 50. Machine-learned models 65 can work cooperatively or interoperatively with machine- learned models 55 on computing device 50 to perform various tasks.

[0305] Model development platform system(s) 70 can include one or more processors 71 and a memory 72. Processor(s) 71 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. Memory 72 can include one or more non-transitory computer-readable storage media, such as HBM, RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. Memory 72 can store data 73 and instructions 74 which can be executed by processor(s) 71 to cause model development platform system(s) 70 to perform operations. The operations can implement any one or multiple features described herein. The operations can implement example methods and techniques described herein. Example operations include the functionality described herein with respect to model development platform 12. This and other functionality can be implemented by developer tool(s) 75.

[0306] Third-party system(s) 80 can include one or more processors 81 and a memory 82. Processor(s) 81 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. Memory 82 can includeone or more non-transitory computer-readable storage media, such as HBM, RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. Memory 82 can store data 83 and instructions 84 which can be executed by processor(s) 81 to cause third-party system(s) 80 to perform operations. The operations can implement any one or multiple features described herein. The operations can implement example methods and techniques described herein. Example operations include the functionality described herein with respect to tools and other external resources called when training or performing inference with machine-learned model(s) 1, 4, 16, 20, 55, 65, etc. (e.g., third-party resource(s) 85).

[0307] Figure 14illustrates one example arrangement of computing systems that can be used to implement the present disclosure. Other computing system configurations can be used as well. For example, in some implementations, one or both of computing system 50 or server computing system(s) 60 can implement all or a portion of the operations of model development platform system 70. For example, computing system 50 or server computing system(s) 60 can implement developer tool(s) 75 (or extensions thereof) to develop, update / train, or refine machine-learned models 1, 4, 16, 20, 55, 65, etc. using one or more techniques described herein with respect to model alignment toolkit 17. In this manner, for instance, computing system 50 or server computing system(s) 60 can develop, update / train, or refine machine-learned models based on local datasets (e.g., for model personalization / customization, as permitted by user data preference selections).

[0308] Figure 15 is a block diagram of an example computing device 98 that performs according to example embodiments of the present disclosure. Computing device 98 can be a user computing device or a server computing device (e.g., computing device 50, server computing system(s) 60, etc.). Computing device 98 can implement model host 31. For instance, computing device 98 can include a number of applications (e.g., applications 1 through N). Each application can contain its own machine learning library and machine- learned model(s). For example, each application can include a machine-learned model. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc. As illustrated in Figure 15, each application can communicate with a number of other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, or additional components. In some implementations, each application cancommunicate with each device component using an API (e.g., a public API). In some implementations, the API used by each application is specific to that application.

[0309] Figure 16 is a block diagram of an example computing device 99 that performs according to example embodiments of the present disclosure. Computing device 99 can be the same as or different from computing device 98. Computing device 99 can be a user computing device or a server computing device (e.g., computing device 50, server computing system(s) 60, etc.). Computing device 98 can implement model host 31. For instance, computing device 99 can include a number of applications (e.g., applications 1 through N). Each application can be in communication with a central intelligence layer. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc. In some implementations, each application can communicate with the central intelligence layer (and model(s) stored therein) using an API (e.g., a common API across all applications).

[0310] The central intelligence layer can include a number of machine-learned models. For example, as illustrated in Figure 16, a respective machine-learned model can be provided for each application and managed by the central intelligence layer. In other implementations, two or more applications can share a single machine-learned model. For example, in some implementations, the central intelligence layer can provide a single model for all of the applications. In some implementations, the central intelligence layer is included within or otherwise implemented by an operating system of computing device 99.

[0311] The central intelligence layer can communicate with a central device data layer. The central device data layer can be a centralized repository of data for computing device 99. As illustrated in Figure 16, the central device data layer can communicate with a number of other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, or additional components. In some implementations, the central device data layer can communicate with each device component using an API (e.g., a private API).

[0312] Figure 17 depicts a flowchart of a method 1700 for training one or more machine-learned models according to aspects of the present disclosure. For instance, an example machine-learned model can include a machine-learned sequence processing model 110.

[0313] One or more portion(s) of example method 1700 can be implemented by a computing system that includes one or more computing devices such as, for example,computing systems described with reference to the other figures. Each respective portion of example method 1700 can be performed by any (or any combination) of one or more computing devices. Moreover, one or more portion(s) of example method 1700 can be implemented on the hardware components of the device(s) described herein, for example, to train one or more systems or models.

[0314] Figure 17 depicts elements performed in a particular order for purposes of illustration and discussion. Those of ordinary skill in the art, using the disclosures provided herein, will understand that the elements of any of the methods discussed herein can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure. Figure 17 is described with reference to elements / terms described with respect to other systems and figures for exemplary illustrated purposes and is not meant to be limiting. One or more portions of example method 1700 can be performed additionally, or alternatively, by other systems.

[0315] At 1702, example method 1700 can include obtaining a plurality of training inputs. In some implementations of example method 1700, obtaining a plurality of training inputs can include collecting diverse datasets that encompass a wide range of therapeutic- related tasks, such as drug-target interaction prediction, pharmacokinetic property estimation, and therapeutic effect determination. These training inputs can be sourced from a variety of databases, such as proprietary molecular libraries, public repositories like the Therapeutics Data Commons, and clinical trial databases.

[0316] In some implementations of example method 1700, the plurality of training inputs comprise a plurality of input sequences respectively corresponding to a plurality of representational schemas for representing material structures of a plurality of different materials. Each respective input sequence of the plurality of input sequences may include a respective textual query and a respective sequence-based structural representation of a respective material. Each different respective sequence-based structural representation may be characterized by a different respective representational schema. Different materials can include, for instance, small molecules, biologics, complex formulations, etc. Input sequences can use various representational schemas, such as SMILES for molecules, FASTA or IUPAC formats for nucleic acids, and amino acid sequences for peptides and proteins. The input sequences can additionally contain contextual information, such as annotations regarding biological activity, physicochemical properties, or therapeutic classifications.

[0317] At 1704, example method 1700 can include generating, using a machine- learned sequence processing model, a plurality of training outputs that respectively correspond to the plurality of training inputs. For instance, machine-learned sequence processing model 110 can process training inputs 108 to obtain training outputs 112.

[0318] At 1706, example method 1700 can include evaluating the plurality of training outputs. For instance, a model training system 114 can process training outputs 112 to determine a performance of machine-learned sequence processing model 110. The evaluation can be unsupervised or supervised. In some implementations of example method 1700, evaluating the plurality of training outputs can involve comparing training outputs 112 against reference outputs 116, which can include known properties, interactions, or classifications of therapeutic materials. This evaluation can be performed using a variety of metrics, such as accuracy, precision, recall, and area under the receiver operating characteristic curve (AUROC), to assess model performance. Additionally, specialized evaluation protocols can be applied to specific tasks, such as using rank correlation for regression tasks or similarity measures for generation tasks, to ensure that the model predictions align with established reference values. Other example evaluation metrics are described herein.

[0319] At 1708, example method 1700 can include updating, based on the evaluation of the plurality of training outputs, one or more parameters of the machine-learned sequence processing model. For instance, model training system 114 can generate a loss value based on the evaluation. Updates 118 can be generated based on the loss and be configured to increase a probability of decreasing the loss. For example, a gradient of the loss can be computed with respect to a particular parameter of machine-learned sequence processing model 110. The value of the parameter can be updated based on the gradient in a direction expected to decrease the loss. Similarly, model training system 114 can generate a reward value based on the evaluation. Updates 118 can be generated based on the reward and be configured to increase a probability of increasing the reward. For example, a gradient of the reward can be computed with respect to a particular parameter of machine-learned sequence processing model 110. The value of the parameter can be updated based on the gradient in a direction expected to increase the reward.

[0320] In some implementations of example method 1700, the respective representational schema defines an expression of structural features of the respective material using a sequence of textual characters. In some implementations of example method 1700, arespective representational schema serves as a standardized format for expressing the structural features of various materials to facilitate the use of a shared architecture (e.g., text- processing architecture) to process a wide range of chemical and biological entities, as well as enabling transfer learning across natural language and structural representations.

[0321] In some implementations of example method 1700, a respective material includes a small molecule. In some implementations of example method 1700, a respective material includes a nucleic acid. In some implementations of example method 1700, a respective material includes a protein.

[0322] In some implementations of example method 1700, the plurality of representational schemas includes a Simplified Molecular-Input Line-Entry System (SMILES) schema. In some implementations of example method 1700, the plurality of representational schemas includes a SELF-referencIng Embedded String (SELFIES) schema. In some implementations of example method 1700, the plurality of representational schemas includes an amino acid sequence schema. In some implementations of example method 1700, the plurality of representational schemas includes a nucleotide schema. In some implementations of example method 1700, the plurality of representational schemas includes a genetic sequence schema.

[0323] In some implementations of example method 1700, the plurality of representational schemas includes two or more schemas selected from the group consisting of a Simplified Molecular-Input Line-Entry System (SMILES) schema, a SELF-referencIng Embedded String (SELFIES) schema, an amino acid sequence schema, a nucleotide schema, and a genetic sequence schema.

[0324] In some implementations of example method 1700, the plurality of representational schemas includes a Simplified Molecular-Input Line-Entry System (SMILES) schema, an amino acid sequence schema, and a nucleotide schema.

[0325] In some implementations of example method 1700, the plurality of training inputs includes a plurality of combination sequences that each contain a first sequence-based structural representation according to an amino acid sequence schema and a second sequence- based structural representation according to a SMILES schema.

[0326] In some implementations of example method 1700, the plurality of training inputs includes a plurality of combination sequences that each contain a first sequence-based structural representation according to an amino acid sequence schema and a second sequence- based structural representation according to a nucleotide schema.

[0327] In some implementations of example method 1700, the plurality of training inputs includes a plurality of combination sequences that each contain a first sequence-based structural representation according to a SMILES schema and a second sequence-based structural representation according to a nucleotide schema.

[0328] In some implementations of example method 1700, the plurality of training inputs includes a classification set of input sequences that each query the machine-learned sequence processing model for a classification output based on a respective sequence-based structural representation.

[0329] In some implementations of example method 1700, the plurality of training inputs includes a regression set of input sequences that each query the machine-learned sequence processing model for a regression output based on a respective sequence-based structural representation.

[0330] In some implementations of example method 1700, the plurality of training inputs includes a plurality of therapeutic effect input sequences that each comprise a textual query directed to a therapeutic effect of a respective material having a respective sequence- based structural representation.

[0331] In some implementations of example method 1700, one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of a drug target identification task and a drug target validation task.

[0332] In some implementations of example method 1700, one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of a gene-disease association task and a protein-protein interaction task.

[0333] In some implementations of example method 1700, one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of a lead discovery task and a compound screening task.

[0334] In some implementations of example method 1700, one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of a drug-target interaction task, a high throughput screening task, and a reaction yields prediction task.

[0335] In some implementations of example method 1700, one or more of the plurality of training inputs corresponds to a pre-clinical task. For instance, a preclinical task can be a processing task that relates to analysis in preparation for or in lieu of clinical trial evaluations. An example pre-clinical task is predicting a success of clinical trials.

[0336] In some implementations of example method 1700, one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of a pharmacokinetics task and an in-vitro toxicity task.

[0337] In some implementations of example method 1700, one or more of the plurality of training inputs corresponds to a clinical task. For instance, a clinical task can be a processing task that relates to analysis during, in combination with, or after clinical trial evaluations. For example, a clinical task can include processing data collected during a clinical trial.

[0338] In some implementations of example method 1700, one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of a dosing task, an in-vivo toxicity task, a drug efficacy task, and a drug-drug interaction task.

[0339] In some implementations of example method 1700, the therapeutic effect is queried with respect to a specified disease or specified cell line.

[0340] In some implementations of example method 1700, one or more of the plurality of training inputs comprise a context portion comprising context data descriptive of a corresponding textual query or a corresponding sequence-based structural representation.

[0341] In some implementations of example method 1700, generating the plurality of training outputs includes, for a respective training output, performing an attention operation over a latent representation of a plurality of tokens of a respective input sequence. In some implementations of example method 1700, generating the plurality of training outputs includes, for a respective training output, predicting one or more output tokens of a respective output sequence based on the attention operation.

[0342] In some implementations of example method 1700, the attention operation includes self-attention.

[0343] In some implementations of example method 1700, the one or more output tokens are predicted to follow the plurality of tokens of the respective input sequence.

[0344] In some implementations of example method 1700, the one or more output tokens are predicted autoregressively.

[0345] In some implementations of example method 1700, the machine-learned sequence processing model was pretrained using unsupervised learning over a pretraining dataset of natural language data.

[0346] In some implementations of example method 1700, the machine-learned sequence processing model was trained using unsupervised learning over a training dataset of medical texts.

[0347] Figure 18 depicts a flowchart of a method 1800 for training a machine-learned model according to aspects of the present disclosure. For instance, an example machine- learned model includes machine-learned sequence processing model 110. In some implementations, example method 1800 can be implemented for training machine-learned sequence processing models to process queries over material structures using a dialog-based interface.

[0348] One or more portion(s) of example method 1800 can be implemented by a computing system that includes one or more computing devices such as, for example, computing systems described with reference to the other figures. Each respective portion of example method 1800 can be performed by any (or any combination) of one or more computing devices. Moreover, one or more portion(s) of example method 1800 can be implemented on the hardware components of the device(s) described herein, for example, to train one or more systems or models.

[0349] Figure 18 depicts elements performed in a particular order for purposes of illustration and discussion. Those of ordinary skill in the art, using the disclosures provided herein, will understand that the elements of any of the methods discussed herein can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure. Figure 18 is described with reference to elements / terms described with respect to other systems and figures for exemplary illustrated purposes and is not meant to be limiting. One or more portions of example method 1800 can be performed additionally, or alternatively, by other systems.

[0350] At 1802, example method 1800 includes accessing a plurality of therapeutic data sequences respectively comprising sequence-based structural representations of materials and corresponding textual queries. In some implementations, the plurality of therapeutic data sequences respectively correspond to the plurality of input sequences as described above with respect to example method 1700. For instance, the plurality of therapeutic data sequences can correspond to training examples drawn from training dataset 100.

[0351] At 1804, example method 1800 includes accessing transcript data comprising a plurality of multi-turn query-response dialog sequences, wherein a respective multi-turnquery-response dialog sequence comprises a first portion indicating a query from a first entity and a second portion indicating a response from a second entity. For example, a first portion can be associated with a first role indicator associated with the first entity (e.g., a “user” portion). A second portion can be associated with a second role indicator associated with the second entity (e.g., an “assistant” portion).

[0352] At 1806, example method 1800 includes obtaining a plurality of training inputs comprising the plurality of therapeutic data sequences and the transcript data in proportions according to a mixture ratio, wherein the plurality of therapeutic data sequences are formatted into a multi-turn query-response dialog sequence format.

[0353] At 1808, example method 1800 includes generating, using a machine-learned sequence processing model, a plurality of training outputs that respectively correspond to the plurality of training inputs.

[0354] At 1810, example method 1800 includes evaluating the plurality of training outputs.

[0355] At 1812, example method 1800 includes updating, based on the evaluation of the plurality of training outputs, one or more parameters of the machine-learned sequence processing model.

[0356] In some implementations of example method 1800, formatting the plurality of therapeutic data sequences into the multi-turn query-response dialog sequence format includes interleaving a respective therapeutic data sequence with one or more conversational turn delimiters to indicate a transition between a training input portion and a reference response portion. In an example, the training input portion comprises a sequence-based structural representation of a materials and a corresponding textual query. For instance, a conversational turn delimiter can include a <start_of_turn> token or an <end_of_turn> token. A training input portion can correspond to an input prompt or other input data (e.g., a textual query and structural representation from dataset 100). A reference response portion can include an example of a desired output (e.g., an output sequence from dataset 100).

[0357] In some implementations of example method 1800, the multi-turn query- response dialog sequences are formatted to include indications of conversational roles of a first entity associated with the training input portion and a second entity associated with the reference output portion. For example, an entity can be a role associated with input or generated content. Example roles include, “client,” “user,” “assistant,” “agent,” “system,”“tool,” “function,” etc. Multiple roles (e.g., two or more) may be used to collect messages from multiple entities.

[0358] In some implementations of example method 1800, evaluating the plurality of training outputs is based on a plurality of reference outputs corresponding to the plurality of training inputs.

[0359] In some implementations of example method 1800, the multi-turn query- response dialog sequence format can be used to format the therapeutic data sequences into a single turn input sequence. In some implementations of example method 1800, the multi-turn query-response dialog sequence format can be used to format the therapeutic data sequences into an input that represents multiple turns.

[0360] In some implementations of example method 1800, one or more of the plurality of training inputs is formatted to include a second input portion positioned after a reference output portion and a second reference output portion positioned after the second input portion. The second input portion and the second output portion can correspond to a second turn in a multi-turn dialog.

[0361] In some implementations of example method 1800, obtaining the plurality of training inputs includes constructing one or more training minibatches to contain a subset of therapeutic data sequences and a subset of transcript data in proportions according to the mixture ratio. For example, the training over the mixture of training data can be performed by computing each training update based on a mixture of the training data. Alternatively, the training can be performed in stages or in alternating turns, where one update is obtained based on one data source (e.g., dataset 100) and another update is obtained based on another data source (e.g., general-purpose data).

[0362] Figure 19 depicts a flowchart of a method 1900 for implementing a machine- learned agent according to aspects of the present disclosure. For instance, an example machine-learned agent system can include machine-learned agent system 600.

[0363] One or more portion(s) of example method 1900 can be implemented by a computing system that includes one or more computing devices such as, for example, computing systems described with reference to the other figures. Each respective portion of example method 1900 can be performed by any (or any combination) of one or more computing devices. Moreover, one or more portion(s) of example method 1900 can be implemented on the hardware components of the device(s) described herein, for example, to train one or more systems or models.

[0364] Figure 19 depicts elements performed in a particular order for purposes of illustration and discussion. Those of ordinary skill in the art, using the disclosures provided herein, will understand that the elements of any of the methods discussed herein can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure. Figure 19 is described with reference to elements / terms described with respect to other systems and figures for exemplary illustrated purposes and is not meant to be limiting. One or more portions of example method 1900 can be performed additionally, or alternatively, by other systems.

[0365] At 1902, example method 1900 includes generating an agent model output based on processing a query related to a therapeutic effect using a machine-learned agent model. For example, a machine-learned agent model can include machine-learned sequence processing policy model 602 controlled using machine-learned agent system 600. In an example, the agent model output includes an action output (e.g., action 606-0) generated based on one or more observations input to the model (e.g., observation 604-0).

[0366] At 1904, example method 1900 includes generating, based on the agent model output, a tool input for input to a machine-learned therapeutics analysis model. A tool input can include tool input 608. An example tool input comprises a sequence-based structural representation of a material and a textual query directed to the material. The machine-learned therapeutics analysis model can include a machine-learned model 110. For example, one or more tools of tool system(s) 610 can include a tool that invokes machine-learned model 110 to generate a prediction based on a tool input.

[0367] At 1906, example method 1900 includes receiving a tool output generated by the machine-learned therapeutics analysis model based on the tool input. For example, a tool output 612 can be received from tool system(s) 610.

[0368] At 1908, example method 1900 includes generating, based on the tool output, a response to the query. For instance, machine-learned agent system 600 can invoke machine- learned sequence processing policy model 602 to generate a response based on the tool output. The response can be generated by model 602 based on a context sequence based on one or more preceding interactions of the agent (e.g., prior inputs, prior outputs, prior tool invocations, etc.).

[0369] In some implementations of example method 1900, the machine-learned therapeutics analysis model was trained according example method 1700 or example method 1800.

[0370] In some implementations, example method 1900 includes generating a second agent model output based on processing the query using the machine-learned agent model. In an example, the second agent model output includes an action output (e.g., action 606-1) generated based on one or more observations input to the model (e.g., observation 604-1). In an example, the second agent model output includes an observation output (e.g., a “thought” output containing self-reflective analysis of available context).

[0371] In some implementations, example method 1900 includes generating, based on the second agent model output, a second tool input for input to a second tool. In some example, the second tool may be a search tool (e.g., a data retrieval tool of data retrieval tool(s) 614). In some implementations, example method 1900 includes receiving a second tool output returned by the search tool. In some implementations, example method 1900 includes generating, based on processing the second tool output using the machine-learned agent model, the agent model output (e.g., action 606-0, an internal observation or thought, etc.).

[0372] In some implementations, example method 1900 includes processing the second tool output using the machine-learned agent model to generate a compressed-format representation of the second tool output. For example, a machine-learned model can be used to summarize or otherwise condense data returned from a tool (e.g., from the search tool).

[0373] In some implementations, example method 1900 includes constructing a multi-turn sequence comprising portions corresponding to the query, the second agent model output, and the compressed-format representation of the second tool output. For example, a context sequence can include the more compact representation of the tool output (e.g., in lieu of or in addition to the original tool response). In some implementations, example method 1900 includes generating the agent model output based on processing the multi-turn sequence using the machine-learned agent model.

[0374] In some implementations of example method 1900, the second tool output comprises contents of a document descriptive of the material.

[0375] In some implementations, example method 1900 includes using a first model trained according to example method 1700 and a second model trained according to example method 1800.

[0376] In some implementations of example method 1900, the machine-learned therapeutics analysis model was trained according to one or more implementations of example method 1700. In some implementations, example method 1900 includes generatinga third agent model output based on processing the query using the machine-learned agent model. In some implementations, example method 1900 includes generating, based on the third agent model output, a third tool input for input to a second machine-learned therapeutics analysis model trained according to one or more implementations of example method 1800. In some implementations, example method 1900 includes receiving a third tool output generated by the second machine-learned therapeutics prediction model based on the third tool input. In some implementations, example method 1900 includes generating, based on processing the third tool output using the machine-learned agent model, an agent model output (e.g., the output on which the first tool input is generated).

[0377] Figure 20 depicts a flowchart of a method 2000 for implementing one or more machine-learned models according to aspects of the present disclosure. For instance, an example machine-learned model can include a machine-learned sequence processing model 110.

[0378] One or more portion(s) of example method 2000 can be implemented by a computing system that includes one or more computing devices such as, for example, computing systems described with reference to the other figures. Each respective portion of example method 2000 can be performed by any (or any combination) of one or more computing devices. Moreover, one or more portion(s) of example method 2000 can be implemented on the hardware components of the device(s) described herein, for example, to train one or more systems or models.

[0379] Figure 20 depicts elements performed in a particular order for purposes of illustration and discussion. Those of ordinary skill in the art, using the disclosures provided herein, will understand that the elements of any of the methods discussed herein can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure. Figure 20 is described with reference to elements / terms described with respect to other systems and figures for exemplary illustrated purposes and is not meant to be limiting. One or more portions of example method 2000 can be performed additionally, or alternatively, by other systems.

[0380] At 2002, example method 2000 can include constructing an input sequence comprising a textual query and a sequence-based structural representation of a material. For instance, a system can receive inputs from a user device or from an API request.

[0381] At 2004, example method 2000 can include generating, using a machine- learned therapeutics analysis model, an output sequence based on the query. In someimplementations, the machine-learned therapeutics analysis model includes a sequence processing model that was trained according to an implementation of example method 1700.

[0382] In some implementations, example method 2000 includes processing an initial query using a first machine-learned sequence processing model. For instance, the first machine-learned sequence processing model can correspond to a user assistant or agent that invokes the machine-learned therapeutics analysis model as an external tool. In some implementations, example method 2000 includes constructing, based on the initial query, the input sequence using the first machine-learned sequence processing model. In some implementations, example method 2000 includes providing, via one or more application programming interfaces (APIs), the input sequence for processing by the machine-learned therapeutics analysis model. In some implementations, example method 2000 includes receiving, via the APIs, the output sequence. In some implementations, example method 2000 includes processing, using the first machine-learned sequence processing model, the output sequence to generate a response to the initial query.

[0383] In some implementations of example method 2000, constructing the input sequence includes populating a prompt template based on information in the initial query.

[0384] In some implementations of example method 2000, constructing the input sequence includes retrieving, using an information retrieval tool, context data associated with the initial query. In some implementations of example method 2000, constructing the input sequence includes constructing the input sequence to include the context data.

[0385] In some implementations of example method 2000, retrieving, using the information retrieval tool, context data associated with the initial query includes generating, using the first machine-learned sequence processing model, a search query. In some implementations of example method 2000, retrieving, using the information retrieval tool, context data associated with the initial query includes passing, via one or more application programming interfaces (APIs), the search query to the information retrieval tool to query one or more data sources using the search query. In some implementations of example method 2000, retrieving, using the information retrieval tool, context data associated with the initial query includes receiving, from the information retrieval tool, the context data.

[0386] In some implementations of example method 2000, the initial query is directed to a therapeutic effect of the material.

[0387] In some implementations of example method 2000, the initial query specifies a disease or a cell line. In some implementations of example method 2000, the therapeutic effect is queried with respect to a specified disease or specified cell line.

[0388] In some implementations of example method 2000, the initial query includes a drug target identification task or a drug target validation task.

[0389] In some implementations of example method 2000, the initial query includes a task selected from the group consisting of a gene-disease association task. In some implementations of example method 2000, the initial query includes a task selected from the group consisting of a protein-protein interaction task.

[0390] In some implementations of example method 2000, the initial query includes a lead discovery task or a compound screening task.

[0391] In some implementations of example method 2000, the initial query includes a task selected from the group consisting of a drug-target interaction task. In some implementations of example method 2000, the initial query includes a task selected from the group consisting of a high throughput screening task. In some implementations of example method 2000, the initial query includes a task selected from the group consisting of a reaction yields prediction task.

[0392] In some implementations of example method 2000, the initial query includes a pre-clinical task.

[0393] In some implementations of example method 2000, the initial query includes a task selected from the group consisting of a pharmacokinetics task. In some implementations of example method 2000, the initial query includes a task selected from the group consisting of an in-vitro toxicity task.

[0394] In some implementations of example method 2000, the initial query includes a clinical task.

[0395] In some implementations of example method 2000, the initial query includes a task selected from the group consisting of a dosing task. In some implementations of example method 2000, the initial query includes a task selected from the group consisting of an in- vivo toxicity task. In some implementations of example method 2000, the initial query includes a task selected from the group consisting of a drug efficacy task. In some implementations of example method 2000, the initial query includes a task selected from the group consisting of a drug-drug interaction task.

[0396] The technology discussed herein makes reference to servers, databases, software applications, and other computer-based systems, as well as actions taken and information sent to and from such systems. The inherent flexibility of computer-based systems allows for a great variety of possible configurations, combinations, and divisions of tasks and functionality between and among components. For instance, processes discussed herein can be implemented using a single device or component or multiple devices or components working in combination. Databases and applications can be implemented on a single system or distributed across multiple systems. Distributed components can operate sequentially or in parallel.

[0397] For example, the present disclosure provides, in an aspect, one or more non- transitory computer-readable media storing instructions that are executable by one or more processors to cause a computing system to perform operations, the operations comprising any implementation of example method 1700, any implementation of example method 1800, any implementation of example method 1900, any implementation of example method 2000, or combinations thereof.

[0398] For example, the present disclosure provides, in an aspect, a computing system including one or more processors; and one or more non-transitory computer-readable media storing instructions that are executable by the one or more processors to cause the computing system to perform operations, the operations comprising any implementation of example method 1700, any implementation of example method 1800, any implementation of example method 1900, any implementation of example method 2000, or combinations thereof.

[0399] For example, the present disclosure provides, in an aspect, one or more non- transitory computer-readable media storing a machine-learned sequence processing model trained according to any implementation of example method 1700, any implementation of example method 1800, or combinations thereof.

[0400] For example, the present disclosure provides, in an aspect, a neural network trained according to any implementation of example method 1700, any implementation of example method 1800, or combinations thereof.

[0401] For example, the present disclosure provides, in an aspect, a computing system including one or more processors; and one or more non-transitory computer-readable media storing a neural network (e.g., a machine-learned sequence processing model) trained according to any implementation of example method 1700, any implementation of example method 1800, or combinations thereof. The one or more non-transitory computer-readablemedia can further store instructions that are executable by the one or more processors to cause the computing system to perform operations, the operations comprising: obtaining a query comprising an input sequence; processing the input sequence using the machine- learned sequence processing model to generate an output sequence; and outputting, responsive to the query, a response based on the output sequence.

[0402] For example, the present disclosure provides, in an aspect, a computing system including one or more processors; and one or more non-transitory computer-readable media storing instructions that are executable by the one or more processors to cause the computing system to perform operations, the operations comprising obtaining a query comprising an input sequence; providing the query to a model execution system for processing the input sequence using a machine-learned sequence processing model trained according to any implementation of example method 1700, any implementation of example method 1800, or combinations thereof; receiving, from the model execution system, an output sequence generated based on processing the input sequence using the machine-learned sequence processing model; and outputting, responsive to the query, a response based on the output sequence.

[0403] While the present subject matter has been described in detail with respect to various specific example embodiments thereof, each example is provided by way of explanation, not limitation of the disclosure. Those skilled in the art, upon attaining an understanding of the foregoing, can readily produce alterations to, variations of, and equivalents to such embodiments. Accordingly, the subject disclosure does not preclude inclusion of such modifications, variations or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. For instance, features illustrated or described as part of one embodiment can be used with another embodiment to yield a still further embodiment. Thus, it is intended that the present disclosure cover such alterations, variations, and equivalents.

[0404] Aspects of the disclosure have been described in terms of illustrative embodiments thereof. Any and all features in the following claims can be combined or rearranged in any way possible, including combinations of claims not explicitly enumerated in combination together, as the example claim dependencies listed herein should not be read as limiting the scope of possible combinations of features disclosed herein. Accordingly, the scope of the present disclosure is by way of example rather than by way of limitation, and the subject disclosure does not preclude inclusion of such modifications, variations or additionsto the present subject matter as would be readily apparent to one of ordinary skill in the art. Moreover, terms are described herein using lists of example elements joined by conjunctions such as “and,” “or,” “but,” etc. It should be understood that such conjunctions are provided for explanatory purposes only. Clauses and other sequences of items joined by a particular conjunction such as “or,” for example, can refer to “and / or,” “at least one of”, “any combination of” example elements listed therein, etc. Terms such as “based on” should be understood as “based at least in part on.”

[0405] The term “can” should be understood as referring to a possibility of a feature in various implementations and not as prescribing an ability that is necessarily present in every implementation. For example, the phrase “X can perform Y” should be understood as indicating that, in various implementations, X has the potential to be configured to perform Y, and not as indicating that in every instance X must always be able to perform Y. It should be understood that, in various implementations, X might be unable to perform Y and remain within the scope of the present disclosure.

[0406] The term “may” should be understood as referring to a possibility of a feature in various implementations and not as prescribing an ability that is necessarily present in every implementation. For example, the phrase “X may perform Y” should be understood as indicating that, in various implementations, X has the potential to be configured to perform Y, and not as indicating that in every instance X must always be able to perform Y. It should be understood that, in various implementations, X might be unable to perform Y and remain within the scope of the present disclosure.

Claims

WHAT IS CLAIMED IS:

1. A computer-implemented method for training a machine-learned sequence processing model to process queries over material structures, the method comprising: obtaining a plurality of training inputs comprising a plurality of input sequences respectively corresponding to a plurality of representational schemas for representing material structures of a plurality of different materials, wherein each respective input sequence of the plurality of input sequences comprises a respective textual query and a respective sequence-based structural representation of a respective material, wherein each different respective sequence-based structural representation is characterized by a different respective representational schema; generating, using a machine-learned sequence processing model, a plurality of training outputs that respectively correspond to the plurality of training inputs; evaluating the plurality of training outputs; and updating, based on the evaluation of the plurality of training outputs, one or more parameters of the machine-learned sequence processing model.

2. The method of any one or more of the preceding claims, wherein the respective representational schema defines an expression of structural features of the respective material using a sequence of textual characters.

3. The method of any one or more of the preceding claims, wherein the respective material comprises: a small molecule; a nucleic acid; or a protein.

4. The method of any one or more of the preceding claims, wherein the plurality of representational schemas comprises: a Simplified Molecular-Input Line-Entry System (SMILES) schema; a SELF-referencIng Embedded String (SELFIES) schema; an amino acid sequence schema;a nucleotide schema; or a genetic sequence schema.

5. The method of any one or more of the preceding claims, wherein the plurality of representational schemas comprises two or more schemas selected from the group consisting of: a Simplified Molecular-Input Line-Entry System (SMILES) schema; a SELF-referencIng Embedded String (SELFIES) schema; an amino acid sequence schema; a nucleotide schema; and a genetic sequence schema.

6. The method of any one or more of the preceding claims, wherein the plurality of representational schemas comprises: a Simplified Molecular-Input Line-Entry System (SMILES) schema; an amino acid sequence schema; and a nucleotide schema.

7. The method of any one or more of the preceding claims, wherein the plurality of training inputs comprises a plurality of combination sequences that each contain: a first sequence-based structural representation according to an amino acid sequence schema, and a second sequence-based structural representation according to a SMILES schema.

8. The method of any one or more of the preceding claims, wherein the plurality of training inputs comprises a plurality of combination sequences that each contain: a first sequence-based structural representation according to an amino acid sequence schema, and a second sequence-based structural representation according to a nucleotide schema.

9. The method of any one or more of the preceding claims, wherein the plurality of training inputs comprises a plurality of combination sequences that each contain: a first sequence-based structural representation according to a SMILES schema, anda second sequence-based structural representation according to a nucleotide schema.

10. The method of any one or more of the preceding claims, wherein the plurality of training inputs comprises: a classification set of input sequences that each query the machine-learned sequence processing model for a classification output based on a respective sequence-based structural representation.

11. The method of any one or more of the preceding claims, wherein the plurality of training inputs comprises: a regression set of input sequences that each query the machine-learned sequence processing model for a regression output based on a respective sequence-based structural representation.

12. The method of any one or more of the preceding claims, wherein the plurality of training inputs comprises: a plurality of therapeutic effect input sequences that each comprise a textual query directed to a therapeutic effect of a respective material having a respective sequence-based structural representation.

13. The method of any one or more of the preceding claims, wherein one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of: a drug target identification task; and a drug target validation task.

14. The method of any one or more of the preceding claims, wherein one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of: a gene-disease association task; and a protein-protein interaction task.

15. The method of any one or more of the preceding claims, wherein one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of: a lead discovery task; and a compound screening task.

16. The method of any one or more of the preceding claims, wherein one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of: a drug-target interaction task; a high throughput screening task; and a reaction yields prediction task.

17. The method of any one or more of the preceding claims, wherein one or more of the plurality of training inputs corresponds to a pre-clinical task.

18. The method of any one or more of the preceding claims, wherein one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of: a pharmacokinetics task; and an in-vitro toxicity task.

19. The method of any one or more of the preceding claims, wherein one or more of the plurality of training inputs corresponds to a clinical task.

20. The method of any one or more of the preceding claims, wherein one or more of the plurality of training inputs corresponds to one or more tasks selected from the group consisting of: a dosing task; an in-vivo toxicity task; a drug efficacy task; and a drug-drug interaction task.

21. The method of any one or more of the preceding claims (e.g., at least claim 12), wherein the therapeutic effect is queried with respect to a specified disease or specified cell line.

22. The method of any one or more of the preceding claims, wherein one or more of the plurality of training inputs comprise: a context portion comprising context data descriptive of a corresponding textual query or a corresponding sequence-based structural representation.

23. The method of any one or more of the preceding claims, wherein generating the plurality of training outputs comprises, for a respective training output: performing an attention operation over a latent representation of a plurality of tokens of a respective input sequence; and predicting one or more output tokens of a respective output sequence based on the attention operation.

24. The method of claim 23, wherein the attention operation comprises self-attention.

25. The method of any one or more of claims 23 to 24, wherein the one or more output tokens are predicted to follow the plurality of tokens of the respective input sequence.

26. The method of any one or more of claims 23 to 25, wherein the one or more output tokens are predicted autoregressively.

27. The method of any one or more of the preceding claims, wherein the machine-learned sequence processing model was pretrained using unsupervised learning over a pretraining dataset of natural language data.

28. The method of any one or more of the preceding claims, wherein the machine-learned sequence processing model was trained using unsupervised learning over a training dataset of medical texts.

29. A computer-implemented method for training machine-learned sequence processing models to process queries over material structures using a dialog-based interface, the method comprising: accessing a plurality of therapeutic data sequences respectively comprising sequence- based structural representations of materials and corresponding textual queries; accessing transcript data comprising a plurality of multi-turn query-response dialog sequences, wherein a respective multi-turn query-response dialog sequence comprises a first portion indicating a query from a first entity and a second portion indicating a response from a second entity; obtaining a plurality of training inputs comprising the plurality of therapeutic data sequences and the transcript data in proportions according to a mixture ratio, wherein the plurality of therapeutic data sequences are formatted into a multi-turn query-response dialog sequence format; generating, using a machine-learned sequence processing model, a plurality of training outputs that respectively correspond to the plurality of training inputs; evaluating the plurality of training outputs; and updating, based on the evaluation of the plurality of training outputs, one or more parameters of the machine-learned sequence processing model.

30. The computer-implemented method of claim 29, wherein the plurality of therapeutic data sequences respectively correspond to the plurality of input sequences of any of claims 1 to 28.

31. The computer-implemented method of claim 29 or 30, wherein formatting the plurality of therapeutic data sequences into the multi-turn query-response dialog sequence format comprises: interleaving a respective therapeutic data sequence with one or more conversational turn delimiters to indicate a transition between a training input portion and a reference response portion, wherein the training input portion comprises a sequence-based structural representation of a materials and a corresponding textual query.

32. The computer-implemented method of any of claims 29 to 31, wherein the multi-turn query-response dialog sequences are formatted to include indications of conversational rolesof a first entity associated with the training input portion and a second entity associated with the reference output portion.

33. The computer-implemented method of any of claims 29 to 32, wherein evaluating the plurality of training outputs is based on a plurality of reference outputs corresponding to the plurality of training inputs.

34. The computer-implemented method of any of claims 29 to 33, wherein one or more of the plurality of training inputs is formatted to include a second input portion positioned after a reference output portion and a second reference output portion positioned after the second input portion.

35. The computer-implemented method of any of claims 29 to 34, wherein obtaining the plurality of training inputs comprises: constructing one or more training minibatches to contain a subset of therapeutic data sequences and a subset of transcript data in proportions according to the mixture ratio.

36. A computer-implemented method for using a machine-learned therapeutics analysis model trained to analyze therapeutic effects of materials, the method comprising: constructing an input sequence comprising a textual query and a sequence-based structural representation of a material; and generating, using the machine-learned therapeutics analysis model, an output sequence based on the query; wherein the machine-learned therapeutics analysis model comprises a machine- learned sequence processing model that was trained according to any one or more of the preceding claims.

37. The method of claim 36, comprising: processing an initial query using a first machine-learned sequence processing model; constructing, based on the initial query, the input sequence using the first machine- learned sequence processing model; providing, via one or more application programming interfaces (APIs), the input sequence for processing by the machine-learned therapeutics analysis model;receiving, via the APIs, the output sequence; processing, using the first machine-learned sequence processing model, the output sequence to generate a response to the initial query.

38. The method of claim 36 or 37, wherein constructing the input sequence comprises: populating a prompt template based on information in the initial query.

39. The method of any one or more of claims 36 to 38, wherein constructing the input sequence comprises: retrieving, using an information retrieval tool, context data associated with the initial query; and constructing the input sequence to include the context data.

40. The method of claim 39, wherein retrieving, using the information retrieval tool, context data associated with the initial query comprises: generating, using the first machine-learned sequence processing model, a search query; passing, via one or more application programming interfaces (APIs), the search query to the information retrieval tool to query one or more data sources using the search query; and receiving, from the information retrieval tool, the context data.

41. The method of any one or more of claims 36 to 40, wherein the initial query is directed to a therapeutic effect of the material.

42. The method of any one or more of claims 36 to 41, wherein: the initial query specifies a disease or a cell line; and the therapeutic effect is queried with respect to a specified disease or specified cell line.

43. The method of any one or more of claims 36 to 42, wherein the initial query comprises a drug target identification task or a drug target validation task.

44. The method of any one or more of claims 36 to 43, wherein the initial query comprises a task selected from the group consisting of: a gene-disease association task; and a protein-protein interaction task.

45. The method of any one or more of claims 36 to 44, wherein the initial query comprises a lead discovery task or a compound screening task.

46. The method of any one or more of claims 36 to 45, wherein the initial query comprises a task selected from the group consisting of: a drug-target interaction task; a high throughput screening task; and a reaction yields prediction task.

47. The method of any one or more of claims 36 to 46, wherein the initial query comprises a pre-clinical task.

48. The method of any one or more of claims 36 to 47, wherein the initial query comprises a task selected from the group consisting of: a pharmacokinetics task; and an in-vitro toxicity task.

49. The method of any one or more of claims 36 to 48, wherein the initial query comprises a clinical task.

50. The method of any one or more of claims 36 to 49, wherein the initial query comprises a task selected from the group consisting of: a dosing task; an in-vivo toxicity task; a drug efficacy task; and a drug-drug interaction task.

51. A computer-implemented method for machine-learned agent system control of fine- tuned therapeutics prediction models, the method comprising: generating an agent model output based on processing a query related to a therapeutic effect using a machine-learned agent model; generating, based on the agent model output, a tool input for input to a machine- learned therapeutics analysis model, wherein the tool input comprises a sequence-based structural representation of a material and a textual query directed to the material; receiving a tool output generated by the machine-learned therapeutics analysis model based on the tool input; and generating, based on the tool output, a response to the query.

52. The computer-implemented method of claim 51, wherein the machine-learned therapeutics analysis model was trained according to the method of any of claims 1 to 28 or 44 to 50.

53. The computer-implemented method of any of claims 51 to 52, comprising: generating a second agent model output based on processing the query using the machine-learned agent model; generating, based on the second agent model output, a second tool input for input to a search tool; receiving a second tool output returned by the search tool; and generating, based on processing the second tool output using the machine-learned agent model, the agent model output.

54. The computer-implemented method of claim 53, comprising: processing the second tool output using the machine-learned agent model to generate a compressed-format representation of the second tool output; constructing a multi-turn sequence comprising portions corresponding to the query, the second agent model output, and the compressed-format representation of the second tool output; and generating the agent model output based on processing the multi-turn sequence using the machine-learned agent model.

55. The computer-implemented method of claim 53 or 54, wherein the second tool output comprises contents of a document descriptive of the material.

56. The computer-implemented method of any of claims 51 to 55, wherein the machine- learned therapeutics analysis model was trained according to the method of any of claims 29 to 35, and wherein the method comprises: generating a third agent model output based on processing the query using the machine-learned agent model; generating, based on the third agent model output, a third tool input for input to a second machine-learned therapeutics analysis model trained according to any one of claim 1 to 28; receiving a third tool output generated by the second machine-learned therapeutics analysis model based on the third tool input; and generating, based on processing the third tool output using the machine-learned agent model, the agent model output.

57. One or more non-transitory computer-readable media storing instructions that are executable by one or more processors to cause a computing system to perform operations, the operations comprising the method of any one or more of the preceding claims.

58. A computing system, comprising: one or more processors; and one or more non-transitory computer-readable media storing instructions that are executable by the one or more processors to cause the computing system to perform operations, the operations comprising the method of any one or more of the preceding claims.

59. One or more non-transitory computer-readable media storing a machine-learned sequence processing model trained according to the method of any one or more of claims 1 to 35.

60. A neural network trained according to the method of any one or more of claims 1 to 35.

61. A computing system, comprising: one or more processors; and one or more non-transitory computer-readable media storing: a machine-learned sequence processing model trained according to the method of any one or more of claims 1 to 35; and instructions that are executable by the one or more processors to cause the computing system to perform operations, the operations comprising: obtaining a query comprising an input sequence; processing the input sequence using the machine-learned sequence processing model to generate an output sequence; and outputting, responsive to the query, a response based on the output sequence.

62. A computing system, comprising: one or more processors; and one or more non-transitory computer-readable media storing instructions that are executable by the one or more processors to cause the computing system to perform operations, the operations comprising: obtaining a query comprising an input sequence; providing the query to a model execution system for processing the input sequence using a machine-learned sequence processing model trained according to the method of any one or more of claims 1 to 35; receiving, from the model execution system, an output sequence generated based on processing the input sequence using the machine-learned sequence processing model; and outputting, responsive to the query, a response based on the output sequence.

Citation Information

Patent Citations

  • Data platform for automated pharmaceutical research using knowledge graph

    US11080607B1

  • Techniques for predicting the spectra of materials using molecular metadata

    US20220101276A1

  • Protein database search using learned representations

    US20230123770A1

Cited By

  • Mine dispatching question and answer method, device and system

    CN121561045A