Medical query processing using a sequence processing model

By employing an iterative self-training framework, uncertainty guidance, and a multi-stage cue chain method, combined with a Transformer model that uses a sparse feedforward network layer as a decoder, the problem of integrating external knowledge sources and processing complex multimodal data in the medical field was solved, achieving efficient and accurate medical response generation.

CN123165804APending Publication Date: 2026-11-24GOOGLE LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202580030300.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-26
Filing Date
2025-04-25
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing sequence processing models struggle to effectively integrate external knowledge sources and process complex, multimodal medical data in the medical field, resulting in inaccurate and inefficient responses to medical queries.

Method used

By employing an iterative self-training framework, uncertainty-guided retrieval, and a multi-stage cue chain approach, combined with a decoder Transformer model using sparse feedforward network layers, external knowledge sources are integrated and the model's learning process is optimized to generate accurate and reliable medical responses.

Benefits of technology

It improves the accuracy and efficiency of sequence processing models in medical data processing, enabling reliable diagnosis and decision support in complex environments, reducing computational resource consumption, and improving the efficiency and accuracy of medical diagnostic systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123165804A_ABST
    Figure CN123165804A_ABST
Patent Text Reader

Abstract

A variety of systems and methods are provided that enhance the performance and reliability of sequence processing models, particularly when applied to the processing of medical data and queries. The proposed techniques collectively address the challenges of integrating large, evolving external knowledge sources, improving responses to uncertainty, and efficiently managing complex multimodal datasets, such as those common in the medical field. Specifically, by leveraging iterative self-training, uncertainty-guided retrieval, multi-stage hints, and / or advanced model architectures, the disclosed techniques improve how machine learning models can process, analyze, and / or utilize complex information, resulting in improved computer systems suitable for a variety of applications or use cases, including medical diagnostics and / or other medical applications.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Priority Statement

[0002] This application is based on and claims priority to U.S. Provisional Application No. 63 / 639,476, filed April 26, 2024. This application claims priority and benefit to each of these applications, and the entire contents of all such applications are incorporated herein by reference. Technical Field

[0003] This disclosure generally relates to machine learning processes and apparatuses and systems that utilize machine learning. More specifically, this disclosure relates to systems and methods for improving the ability of sequence processing models to leverage external knowledge sources and process large amounts of contextual data, for example, for facilitating the processing of medical queries. Background Technology

[0004] The application of sequence processing models, such as large language models (LLMs) and large multimodal models (LMMs), in complex domains presents numerous technical challenges. For example, in healthcare, conventional models often struggle to provide accurate and reliable answers to medical queries requiring complex clinical reasoning or knowledge from up-to-date medical research. These models typically fall short in integrating real-time data from external sources that could help provide responses consistent with evolving medical knowledge. Furthermore, the learning process of these models needs to be optimized to better simulate the complex decision-making required in clinical settings.

[0005] Moreover, healthcare professionals often face the task of sifting through large and complex datasets, such as massive amounts of electronic health records (EHRs), high-resolution medical images, and genomic sequences. Conventional data processing systems can become overwhelmed by the sheer volume and diversity of this data, leading to inefficiencies and difficulty in extracting accurate and relevant information.

[0006] Therefore, the technical challenges faced by healthcare information technology systems include ensuring that artificial intelligence systems generate reliable and accurate medical responses from complex medical data, and completing this process efficiently to minimize resource usage and accelerate decision-making. Summary of the Invention

[0007] Aspects and advantages of embodiments of this disclosure will be set forth in part in the description which follows, or may be learned from the description or by practice of the embodiments.

[0008] One example aspect of this disclosure relates to a computer-implemented method for performing self-training of a sequence processing model to utilize external knowledge sources. The method includes: performing multiple self-training iterations by a computing system including one or more computing devices. Each self-training iteration includes: obtaining, by the computing system, a tuple of example queries and example responses, wherein the example response includes an example analysis chain that yields an example answer to the example query, and wherein the example analysis chain depends on or references one or more example content items obtained from one or more external knowledge sources; generating a training hint by the computing system, the training hint including the tuple of examples, the training query, and one or more training content items obtained from the one or more external knowledge sources; processing the training hint by the computing system using the sequence processing model to generate candidate responses as output of the sequence processing model, wherein the candidate responses include model-generated analysis chains that yield candidate answers to the training query; determining by the computing system whether the candidate response corresponds to a truth answer to the training query; and fine-tuning the sequence processing model based on the candidate response in response to determining that the candidate response corresponds to the truth answer. Other examples involve computer systems and non-transitory computer-readable media that are configured to perform or enable the execution of the method.

[0009] Another example aspect of this disclosure relates to a computer-implemented method for performing uncertainty-guided external knowledge source usage to generate a response. The method includes: obtaining an input query by a computing system including one or more computing devices. The method includes: processing the input query by the computing system using a sequence processing model to generate a plurality of distinct responses to the input query as corresponding outputs of the sequence processing model. The method includes: determining by the computing system whether the plurality of distinct responses satisfy a consensus metric. The method includes: in response to determining that the plurality of distinct responses do not satisfy the consensus metric: retrieving one or more additional content items from one or more external knowledge sources by the computing system; and processing the input query and the one or more additional content items by the computing system using the sequence processing model to generate at least one additional response to the input query as an additional output of the sequence processing model. Other example aspects relate to computer systems and non-transitory computer-readable media configured to perform or enable the performance of such methods.

[0010] Another example aspect of this disclosure relates to a computer-implemented method for facilitating the processing of large medical context inputs with improved accuracy. The method includes: obtaining an input medical query and a set of medical context data by a computing system including one or more computing devices. The method includes: performing a multi-stage cue chaining method by the computing system to process the input medical query and the set of medical context data using a sequence processing model to generate an output response as the output of the sequence processing model. The method includes: providing the output response by the computing system in response to the input medical query. Performing the multi-stage cue chaining method by the computing system includes iteratively cueing the sequence processing model by the computing system using at least partially predefined cues. During the cues, the sequence processing model performs an analysis chain on the input query and the set of medical context data to generate the output response. Other example aspects relate to computer systems and non-transitory computer-readable media configured to perform or enable the performance of such methods.

[0011] Another example aspect of this disclosure relates to a computer-implemented method for facilitating the processing of large medical context inputs with improved accuracy. The method includes: obtaining an input medical query and a multimodal medical context data set by a computing system including one or more computing devices, wherein the multimodal medical context data set includes data associated with at least two different data modalities. The method includes: processing the input medical query and the multimodal medical context data set by the computing system using a sequence processing model to generate one or more responses to the medical query as the output of the sequence processing model. The sequence processing model includes a decoder Transformer model comprising a plurality of Transformer blocks, wherein at least one of the plurality of Transformer blocks includes a sparse feedforward network layer comprising a hybrid expert network. Other example aspects relate to computer systems and non-transitory computer-readable media configured to perform or enable the performance of such methods.

[0012] Other aspects of this disclosure relate to various systems, devices, non-transitory computer-readable media, user interfaces, and electronic devices.

[0013] These and other features, aspects, and advantages of the various embodiments of this disclosure will be better understood with reference to the following description and the appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the disclosure and, together with the description, serve to explain the relevant principles.

[0014] The appendix, which is incorporated in its entirety into and forms part of this disclosure, describes exemplary implementations of the systems and methods described herein. This disclosure is not limited to the exemplary implementations described in the appendix. Attached Figure Description

[0015] This specification provides a detailed discussion of exemplary embodiments for those skilled in the art, and refers to the accompanying drawings, in which:

[0016] Figure 1 This is a block diagram of an example self-training method based on various aspects of this disclosure;

[0017] Figure 2 This is a block diagram of an example self-training method based on various aspects of this disclosure;

[0018] Figure 3 This is a flowchart illustrating an example implementation of various aspects of this disclosure for performing a self-training method;

[0019] Figure 4 This is a block diagram of an example uncertainty-guided search method based on example implementations of various aspects of this disclosure;

[0020] Figure 5 This is a flowchart of an example method for performing an uncertainty-guided search, based on example implementations of various aspects of this disclosure;

[0021] Figure 6 This is a flowchart of an example method for executing a prompt chain for long contextual medical input, based on example implementations of various aspects of this disclosure;

[0022] Figure 7 This is a block diagram of an example application that utilizes a decoder Transformer with hybrid experts to perform multimodal medical data processing, according to an example implementation of this disclosure.

[0023] Figure 8 This is a flowchart illustrating an example method for training a machine learning-based model, according to various aspects of this disclosure.

[0024] Figure 9 This is a block diagram of an example processing flow for processing inputs to generate outputs using a machine learning-enabled model, based on various aspects of this disclosure.

[0025] Figure 10 This is a block diagram of an example sequence processing model based on various aspects of the present disclosure;

[0026] Figure 11It is a block diagram of an example technique for filling example input sequences for processing by a sequence processing model, based on example implementations of various aspects of this disclosure;

[0027] Figure 12 This is a block diagram of an example model development platform based on example implementations of various aspects of this disclosure;

[0028] Figure 13 This is a block diagram of an example training workflow for training a machine learning model, based on example implementations of various aspects of this disclosure.

[0029] Figure 14 It is a block diagram of an inference system for running one or more machine learning-based models to perform inference, based on example implementations of various aspects of this disclosure;

[0030] Figure 15 This is a block diagram of an example networked computing system based on various aspects of the present disclosure;

[0031] Figure 16 This is a block diagram of an example computing device implementing various aspects of this disclosure; and

[0032] Figure 17 This is a block diagram of an example computing device that embodies various aspects of this disclosure. Detailed Implementation

[0033] This disclosure provides a variety of systems and methods that enhance the performance and reliability of sequence processing models, particularly when applied to the processing of medical data and queries. The proposed techniques collectively address the challenges of integrating large, evolving external knowledge sources, improving responses to uncertainty, and efficiently managing complex multimodal datasets, such as those common in the medical field. Specifically, by leveraging iterative self-training, uncertainty-guided retrieval, multi-stage hints, and / or advanced model architectures, the disclosed techniques improve how machine learning models can process, analyze, and / or utilize complex information, resulting in improved computer systems suitable for a variety of applications or use cases, including medical diagnostics and / or other medical applications.

[0034] More specifically, one example aspect of this disclosure relates to an iterative self-training framework for teaching sequence processing models to utilize external knowledge sources. This framework can use a combination of self-play and simulated data to teach the model how to effectively construct information retrieval queries and integrate the retrieved information into the model's reasoning process. For example, the model can learn to distinguish different types of medical terms and understand when it is necessary to search for definitions, symptoms, treatments, or research findings to accurately answer questions.

[0035] The proposed self-training framework can begin by generating multiple example tuples, which can serve as seeds for the process. Specifically, each example tuple can include an example query and a corresponding example response, which depends on and references one or more content items from an external source. More specifically, the example response can include an analytical chain or inference chain from the query to an example answer to that query, where the analytical chain depends on or references individual content items. In practice, this can include manually creating example tuples by human experts or otherwise sifting and organizing them. As an example, a query might ask about the side effects of a new drug, and the response could include information from recent articles found in medical databases or trusted health websites. Thus, each example tuple can represent a useful demonstration of how to create and follow an analytical chain from query to answer while utilizing content items from external knowledge sources.

[0036] Next, the sequence processing model can be prompted to attempt to create additional synthetic data examples and / or demonstrate its ability to execute analytical chains. Specifically, one or more paradigm tuples can be included as few-shot examples in the training prompt, which guides the sequence processing model to generate candidate synthetic responses. In particular, the training prompt can include one or more paradigm tuples from the paradigm tuples, a training query, and one or more additional training content items obtained from an external knowledge source. The training query can be a different query than the paradigm queries included in the paradigm tuples. Therefore, a training prompt can be constructed that includes paradigms, each demonstrating an analytical chain utilizing external knowledge. The training prompt can also prompt the sequence processing model to create new analytical chains using new external knowledge.

[0037] In some implementations, the step of constructing training prompts may include retrieving training content items to be included in the training prompts. As an example, training content items included in the training prompts can be retrieved by processing the training query using the same sequence processing model or different models to generate an information retrieval query (e.g., a web search query, a database query, etc.). For example, a training query can be given to the model, and the model can be prompted to generate an information retrieval query that will return relevant content items. The generated information retrieval query can then be executed to retrieve the training content items. As an example, this step may include using natural language processing techniques to transform a complex medical question into a simplified search query, which can be used to retrieve relevant articles or data from a web search engine or a specialized medical database.

[0038] External knowledge sources used in this disclosure can be diverse, including search engines, the Internet, knowledge graphs, databases of domain-specific knowledge or information (e.g., medical knowledge or e-medical or health records), application programming interface calls to knowledge sources, and / or various other sources of knowledge, data, or information, which may be referred to as “tools” in some cases. For example, a model may use a general-purpose search engine to find information about common medical conditions, or use a specialized medical database to access peer-reviewed articles and clinical guidelines for more complex or rare diseases.

[0039] The sequence processing model can then process the complete training cues to generate candidate responses. Specifically, candidate responses can include analytical chains generated by the model that rely on or reference training content items when deriving candidate answers to the training query. Thus, by processing the training cues, the sequence processing model creates synthetic candidate responses that can include additional representations of using external knowledge within the analytical chains. The analytical chains generated by the model can demonstrate the model's (current) ability to reason and derive candidate answers to the training query by leveraging training content items. For example, the analytical chains generated by the model can include a sequence of logical steps for diagnosing a condition based on symptoms described in the training query and content from medical journals.

[0040] Next, the candidate responses generated by the sequence processing model in response to the training query can be evaluated against the ground truth answer to the training query. As an example, this evaluation can be performed by comparing the candidate answers in the model-generated responses with the verified answers to the training query. Therefore, the ground truth answer can serve as a benchmark for correctness or accuracy. For example, the ground truth answer can be derived from reliable sources or expert knowledge within the relevant domain. By determining the correspondence between candidate responses and ground truth answers, the computational system can evaluate the current performance level of the model.

[0041] Furthermore, this comparison can also be used to determine whether candidate responses should be used for further fine-tuning of the model or discarded to prevent reinforcement of incorrect reasoning. For example, if a candidate response correctly corresponds to a true answer, the model can be fine-tuned based on the candidate response. However, if a candidate response does not correspond to a true answer, the candidate response can be discarded (e.g., removed from memory), and the model will no longer be fine-tuned or trained based on the candidate response.

[0042] Specifically, after confirming that the candidate response generated by the sequence processing model matches the true answer, subsequent steps in the training process can include fine-tuning the sequence processing model based on the verified candidate response. Because the model is trained on responses it generates itself, this process can be called self-play or self-training. The fine-tuning process can include adjusting the model's parameters to strengthen successful reasoning paths and analytical strategies leading to the correct answer. Fine-tuning not only enhances the model's ability to reproduce expert-level reasoning for similar future queries but also promotes the model's overall robustness by expanding its knowledge base through newly encountered training hints.

[0043] In some implementations, the above process can be performed iteratively. By iteratively updating the model using these validated responses, this technique ensures continuous learning and improvement in the model's accuracy and reliability. In other words, the model's ability to perform analytical chains on external data sources can be improved as it is fine-tuned based on validated responses. Therefore, by iteratively performing candidate response generation, validation, and fine-tuning, the model's performance can improve over time.

[0044] Furthermore, in some implementations, candidate responses may be optionally added to the example corpus once they are validated (e.g., confirmed to correspond to or include a truth answer). For example, the candidate response can then be used as an example within training prompts in subsequent self-training epochs. For instance, a successful response to a query about emergency medical procedures could be added to the example set to improve the model's future performance on similar topics.

[0045] Instead, this disclosure includes a mechanism for discarding candidate responses that do not correspond to a truth answer. This helps reduce the likelihood of the model being reinforced by incorrect information. For example, if the model incorrectly identifies a symptom as indicative of a specific disease, the response is discarded to help prevent future misdiagnosis.

[0046] The proposed self-training framework offers a variety of technical effects and benefits. As an example, the disclosed method for self-training sequence processing models to leverage external medical knowledge sources provides a technical solution to specific technical problems in the medical field. This method proactively utilizes a specific technical system—a sequence processing model—to interpret complex medical data and produce accurate and reliable medical diagnoses.

[0047] As another example, the systems and methods disclosed herein are specifically adapted to a particular technical implementation. Specifically, the disclosed iterative self-training framework, which instructs the sequence processing model to incorporate information obtained through web searches into its analysis process, represents a specific technical framework for integrating machine learning models with external knowledge sources. This framework is tailored for the internal operations of the computational system, encompassing both the sequence processing model and external tool interfaces (e.g., web search APIs). The integration of the sequence processing model with external sources is driven by technical considerations such as the efficient assimilation and processing of large amounts of data from diverse external sources.

[0048] As another example of technical effect, the training method described in this disclosure improves the operation of the sequence processing model and the computational system that executes it. In particular, the computer system's ability to retrieve and analyze content from external knowledge sources is improved.

[0049] Another example aspect of this disclosure relates to systems and methods for enhancing the reliability of responses generated by sequence processing models, particularly when dealing with complex queries such as medical questions. An example implementation of this method may be referred to as inference-time uncertainty-guided search or information retrieval. Therefore, the proposed uncertainty-guided approach can be executed at inference time to assist in generating responses to input queries.

[0050] Specifically, some example implementations may involve obtaining an input query and processing that query to produce multiple different responses. For example, when a user enters a medical question, the system may generate several diagnostic suggestions or treatment options as a response.

[0051] In some implementations, each response generated by the system includes an analytical chain leading from the input query to the corresponding answer. This chain can be a logical reasoning path explaining how the system arrived at the answer. Providing this reasoning can be helpful in fields such as medicine or law where understanding the basis for decision-making is crucial.

[0052] Multiple distinct responses generated can be evaluated to determine whether they meet a consensus metric. This can be done, for example, through various techniques such as comparing the similarity of responses or using statistical methods to measure consistency between responses. For instance, in a medical context, if multiple responses suggest the same diagnosis, the system can determine that consensus exists. As an example, determining whether consensus exists among different responses can include calculating the entropy of the response distribution (e.g., Shannon entropy). This can be compared to a threshold to assess uncertainty. For example, a high entropy value, indicating a more dispersed distribution of different responses, could indicate a lack of consensus, which could then trigger the system to seek additional information to reduce uncertainty.

[0053] Specifically, when the response demonstrates consensus, the consensus answer from the response can be provided as output. However, when the response does not meet consensus metrics, indicating potential uncertainty or conflict in the information, this disclosure may operate to access or otherwise obtain additional information from external knowledge sources to further inform the response generation process. For example, this could include using a search engine to query medical databases, scientific journals, or the wider network or internet to find relevant information that can clarify the uncertainty.

[0054] Furthermore, when initial responses exhibit conflict, the system can identify these conflicting responses and generate targeted information retrieval queries. These queries can be designed to identify and return content that resolves specific points of conflict. For example, if there is disagreement regarding the side effects of a drug, the system can generate a query to find scientific research discussing those specific side effects.

[0055] In some implementations, information retrieval queries are constructed by prompting a sequence processing model or another model with conflict responses and instructions for generating the query. This ensures that the search is focused and relevant to the specific uncertainty at hand. In practice, this can include using natural language processing techniques to construct question-based or structured queries that are likely to retrieve the most informative results from medical databases.

[0056] Content items retrieved from external knowledge sources can then be added to or otherwise used to update the original input, and the sequence processing model can generate multiple additional responses again. These additional responses can be based on (e.g., dependent on and / or referencing) newly retrieved content items. For example, the system can reassess medical questions based on recent clinical guidelines found in the additional content, or it can incorporate statistics from recent studies to provide more evidence-based answers.

[0057] The system can then determine again whether these additional responses, now based on the external content, satisfy the consensus metric. Similar to previous iterations, if the additional responses demonstrate consensus, the consensus answer from the additional responses can be provided as output. This can be achieved, for example, by presenting the most common responses or a model-synthesized response incorporating elements from each mutually consistent response. For instance, if multiple sources recommend a specific drug for a certain symptom, the system can output that drug as a recommended treatment. However, if the additional responses do not satisfy the consensus metric, indicating remaining uncertainty or conflict in the information, this disclosure can operate to access or otherwise obtain more additional information from external knowledge sources.

[0058] Therefore, in some implementations, the uncertainty-guided process for retrieving additional content items is iterative and may include several iterations. For example, after an initial response is generated, the system may access a medical database to find articles related to the symptoms described in the input query. Information from these articles is then used to refine the responses generated in subsequent iterations. If consensus is still not reached, further information can be retrieved and used again to seek a consensus answer, and so on.

[0059] External knowledge sources utilized by the system can include various platforms, such as search engines and the internet, or more specialized databases. For medical queries, the system can access databases containing medical knowledge or records, and the retrieval can help generate articles or records with more comprehensive evidence.

[0060] The proposed uncertainty-guided framework offers a variety of technical effects and benefits. As an example, the disclosed method can enhance the functionality and reliability of medical diagnostic systems by ensuring that the generated responses are accurate and reliable at the factual level. In the context of healthcare where accuracy is paramount, the method's ability to iteratively improve responses using external sources of medical knowledge directly contributes to improved patient outcomes. By incorporating the latest medical research and data into the reasoning process, the method provides a practical solution to the technical problem of outdated or incomplete medical information, which can be beneficial in clinical decision-making scenarios.

[0061] As another example of technical effectiveness, the proposed method demonstrates a specific technical implementation for iteratively enhancing query responses. Utilizing a sequence processing model, this method systematically incorporates external data sources into the inference process, thereby improving the accuracy of its output. In doing so, the method addresses the technical challenges of integrating large and dynamic medical knowledge bases with artificial intelligence systems.

[0062] The proposed uncertainty-guided framework also optimizes computational efficiency within the question-answering system. By employing an uncertainty-guided search strategy, this method selectively processes information until consensus is reached (but stops processing after consensus is reached), thereby reducing unnecessary computational load and improving the speed and accuracy of responses. More specifically, the proposed technique specifically selects and processes content items with the goal of resolving specific points of conflict or uncertainty to achieve consensus. Traditional systems that do not measure uncertainty may indiscriminately include and process large amounts of content, much of which may be irrelevant or redundant to resolving a specific query. This traditional approach not only consumes excessive computational resources but also prolongs query processing latency, and thus also prolongs the time required to reach a conclusive decision. In contrast, the proposed method identifies uncertainty points and iteratively improves the search and processing of content, thereby minimizing the amount of context processed. By focusing only on relevant information and stopping the process when consensus is reached, this method significantly reduces computational waste. Specifically, by precisely locating and resolving specific conflicts in reasoning, the system can reach consensus more quickly, further saving computational overhead and enhancing the overall efficiency and speed of the medical diagnostic system.

[0063] Another aspect of this disclosure relates to systems and methods for processing large amounts of medical data using a multi-stage cue chaining approach. As an example, the computational system can obtain an input medical query and a set of medical context data, and then utilize a sequence processing model to employ a multi-stage cue chaining approach to generate a response. For instance, this computational system can process queries related to various medical conditions and produce accurate outputs by analyzing large sets of EHRs, genomic sequences, and / or medical images.

[0064] In some implementations, the sequence processing model used in this disclosure can be fine-tuned for medical applications to enhance its ability to understand and process complex medical data. For example, a medically-tuned LLM or LMM can be utilized. Example models include those trained to handle millions of words and capable of in-context learning.

[0065] This multi-stage cue chain method achieves high-precision processing of medical queries. The method may include iteratively processing a model with a sequence of cueing actions, at least partially predefined, that guide the model through the analysis chain. For example, the sequence of cueing actions may include a series of cue templates that iteratively complete (e.g., fill in) the cue with prior context and / or response content output by the model in response to previous cueing actions in the series.

[0066] As an example, a first prompt can guide the model to retrieve relevant information from a large medical dataset, while subsequent prompts can instruct the model to analyze the retrieved information for decision-making. Specifically, in some implementations, the first prompt in this series of prompts can instruct the sequence processing model to perform information retrieval from a massive set of medical context data. This step helps to reduce the large volume of data into a smaller, more manageable set of retrieved data that is more relevant to the current medical query. For example, the model can be prompted to extract all mentions of a specific medical condition from a patient's EHR. After the initial retrieval, the series of prompts can include a second prompt that instructs the sequence processing model to perform medical analysis on this smaller set of retrieved data. This step can include evaluating the relevance and meaning of the retrieved mentions, which can include determining the presence of a disease, condition, or procedure. For example, the model can first retrieve and then analyze mentions of "hypothermia" in EHR records to conclude whether the patient has a history of this condition.

[0067] In some implementations, the proposed multi-stage cue chain method can handle medical queries related to specific diseases, conditions, or procedures. These queries can be diagnostic in nature, and the output response generated by the model can be a diagnostic output. For example, a clinician can input a query about a rare genetic condition, and the model will process the relevant EHR and genomic data to provide a diagnosis.

[0068] In some implementations, the medical context data set in this disclosure may include data from various modalities, such as textual data from EHRs, genomic sequences, and image data from medical imaging modalities. This multimodal approach allows for a comprehensive analysis of a patient's medical history and current condition. For example, the model can simultaneously analyze textual descriptions of tumors from EHRs and corresponding radiographic images. As another example, multimodal processing capabilities are particularly useful for tasks such as generating radiographic reports or annotating medical images, where the model can compare and integrate findings from textual and visual data.

[0069] In some implementations, the contextual data set may include the patient's medical history (EHR). The ability to analyze EHRs helps retrieve information from a patient's medical history, which can be extensive and complex. For example, a model can process hundreds of EHR records to identify and confirm the presence of a specific medical condition.

[0070] The long context processing capability achieved through the cue chain method also enables the proposed system to be applied to a variety of different tasks. In particular, the proposed technique achieves efficient processing of large amounts of data, thereby reducing the risk of information overload for clinicians. This technique can assist various clinical workflows, such as identifying rare conditions in lengthy EHRs or annotating complex medical videos, thereby improving the efficiency and effectiveness of patient care. Therefore, the system can be applied to "needle in a haystack" tasks, where the model must identify rare mentions of medical conditions within a large number of EHRs or videos.

[0071] The long context processing capabilities enabled by the cue chain method also allow the proposed system to be applied to a variety of tasks beyond the medical field. For example, in web search scenarios, this technology can assist users in finding specific information within a vast collection of web pages, effectively acting as a "needle in a haystack" tool to extract precise data from the cluttered information of the internet. In library science, the system can be used to sift through large amounts of digital archives to locate rare documents or references crucial to academic research. For long video or audio content (such as movies or podcasts), the technology can quickly and accurately locate moments or segments containing specific topics or dialogues, saving significant time in content analysis. Similarly, in an email inbox containing thousands of messages, the system can quickly present emails relevant to specific topics or senders, simplifying the task of managing digital communications. These applications demonstrate the versatility and adaptability of the cue chain method in processing large amounts of data across different domains, providing users with a powerful tool for information retrieval and content management.

[0072] The proposed multi-stage cue chain method offers numerous technical effects and benefits. As an example, this technique facilitates precise control and enhancement of complex technological systems, particularly in medical diagnostics. By leveraging advanced machine learning methods, it can process massive amounts of medical data with greater accuracy, achieving more accurate condition identification with less time and repetition, thereby contributing to the efficiency and effectiveness of medical diagnostic systems. This practical application of machine learning methods to real-world technological operations not only improves the functionality of such systems but also brings tangible improvements to patient outcomes and healthcare delivery.

[0073] As another example of technical effectiveness and benefit, the multi-stage cue chain method disclosed in this paper significantly improves the computational efficiency of the system by enabling focused processing of carefully selected subsets of medical contextual data. This targeted approach is achieved by applying subsequent cues within the series, which guide the sequence processing model to adjust the scope of its analysis after an initial broad retrieval. Therefore, the system avoids the burden of performing lengthy text generation on inputs including irrelevant data, thus reducing the required computational resources and increasing processing speed. For example, generating responses based on a large amount of context can include attention processing of that context in each generation cycle (e.g., lexical prediction). By reducing the amount of context through the initial query, one or more subsequent queries can be processed with less context, thereby reducing the computational cost of responding to those one or more subsequent queries. This efficient data processing is particularly advantageous in medical applications, where rapid and accurate analysis of large datasets contributes to effective patient care and diagnosis.

[0074] Another example aspect of this disclosure relates to using a long-context multimodal sequence processing model to improve the accuracy of processing multimodal medical data and queries. This technique can be implemented in various healthcare settings, such as hospitals, research institutions, and telemedicine platforms. By obtaining an input medical query and a set of multimodal medical context data, a computational system can process this information using a multimodal sequence processing model. For example, a clinician can enter a query about a patient's symptoms, and the system can analyze relevant radiographic images, laboratory results, and electronic health records to generate a response.

[0075] In some implementations, the example sequence processing model within this disclosure may include a decoder Transformer model, which may include multiple Transformer blocks. Some or all of these Transformer blocks may include sparse feedforward network layers with hybrid expert networks, enabling the model to process large amounts of complex contextual data.

[0076] Specifically, the decoder Transformer model described in this paper can be designed to enhance the processing of complex contextual data by incorporating novel architectures that leverage sparsity and expert knowledge. The model can include multiple Transformer blocks, each potentially equipped with sparse feedforward network layers that integrate hybrid expert networks. This configuration allows the model to selectively activate different subsets of parameters, or "experts," depending on the specific input example being processed. By doing so, the model can expand its parameter space (e.g., achieving richer world knowledge and stronger understanding) while using only a subset of its parameters at inference time, thus at least partially decoupling overall capability from inference cost. The sparsity of the feedforward network layers allows it to apply only the most relevant experts for any given input, thereby optimizing efficiency and performance.

[0077] This decoder Transformer model can be applied to applications involving extremely long-contextualized medical data, which is often characterized by complex patterns and relationships spanning large-scale sequences of clinical records, patient histories, and medical literature. Integrating a sparse feedforward network layer with a hybrid expert network within the model's architecture allows computational resources to be dynamically allocated to the most salient features within such lengthy and complex data. In the medical context, different experts can specialize in identifying and processing different types of medical information, such as symptoms, diagnoses, examination results (in various modalities), treatment responses, and changes in patient condition over time.

[0078] For example, one expert within this hybrid could become adept at interpreting radiology reports, while another could focus on longitudinal patient data, and yet another could specialize in pharmacological interactions. This sparse activation mechanism allows the model to utilize only the most relevant experts when encountering fragments of long-contextual medical data, enabling the model to maintain high performance across multiple data types within a single large input. This allows for efficient and effective analysis of medical data, where the model can provide deep insights into patient outcomes, recommend personalized treatment plans, and even help uncover complex medical relationships that human practitioners might not immediately perceive.

[0079] In some implementations, input medical queries can relate to specific diseases, conditions, or procedures. This allows the computational system to perform targeted analysis and response generation. For example, a query could focus on identifying the presence of a specific type of cancer, understanding the progression of a chronic disease, or determining the most appropriate surgical procedure for a patient's condition.

[0080] In some implementations, this multimodal medical context data set may include data associated with at least two different data modalities. This could include a combination of image data (such as ultrasound images or mammograms) and textual data (including patient history and symptom records). By integrating these different data types, the system can provide a more comprehensive understanding of the patient's condition.

[0081] For example, in some implementations, this multimodal medical context data may include radiographic imaging data. This can be useful in fields such as radiology and orthopedics, where imaging plays a crucial role in diagnosis and treatment planning. For instance, this technique can be used to analyze a series of X-ray images to monitor the progress of fracture healing.

[0082] As another example, in some implementations, this multimodal medical context data can include genomic data, which can be beneficial for personalized medicine and genetic research. For instance, the system could process genomic sequence data to assess the risk of hereditary diseases or customize treatment plans based on genetic markers.

[0083] As another example, in some implementations, this multimodal medical context data can include chemical or molecular data. This capability can be advantageous in pharmacology and toxicology to help understand the interactions between various compounds and biological systems. An example application could be predicting the efficacy of a new drug compound based on its molecular structure and patient-specific factors.

[0084] As another example, in some implementations, this multimodal medical context data may include multiple electronic health records. These example implementations can aid in long-term patient care and population health management. For instance, the system can analyze a patient's entire medical history, including previous diagnoses, treatments, and outcomes, to inform current clinical decisions.

[0085] In some implementations, the input medical query includes a diagnostic query, and the output response includes an output diagnosis. This feature can be particularly helpful for emergency medicine or remote diagnosis. For example, the system could receive a query about a set of symptoms indicating a heart attack and quickly analyze the relevant data to confirm the diagnosis and recommend immediate intervention.

[0086] The proposed system and capabilities can be integrated into existing healthcare information systems, thereby enhancing their functionality. For example, this technology can be used to update hospital electronic medical record systems to improve the accuracy and comprehensiveness of the medical data analysis provided to healthcare providers.

[0087] The proposed techniques represent a substantial improvement in the field of medical data processing by employing long-context multimodal sequence processing models. These models, characterized by an advanced decoder Transformer architecture with hybrid expert networks, enable efficient and accurate analysis of multimodal medical data, including text and images. This technological advancement directly addresses the challenge of processing complex and massive medical datasets by providing a method that significantly enhances the computational efficiency and accuracy of medical diagnosis. By facilitating the integration of multiple data types and providing comprehensive responses to medical queries, the disclosed techniques not only improve the functionality of medical AI systems but also contribute to technological advancements in the healthcare industry.

[0088] The technology disclosed herein can be applied to a variety of use cases in the medical field where accuracy and up-to-date information are critical. For example, in a clinical decision support system, a physician might input a complex patient query about potential drug interactions between two specific drugs. The sequence processing model can then leverage its training to perform a web search to retrieve the latest research on the drugs in question. The output from the model would be a detailed explanation of the interaction for the physician to consider, including any known side effects or contraindications, based on the latest medical literature. In another example, the model could be used in a telemedicine platform where a patient's symptoms are input, and the model searches for similar case studies or clinical guidelines, outputting possible diagnoses and recommended follow-up treatment steps for healthcare professionals to consider. As yet another example, the model could be used in medical education where students input hypothetical patient scenarios, and the model outputs step-by-step clinical reasoning paths, including citations of relevant medical texts and research articles, to aid the learning process.

[0089] As a further example, the disclosed systems and methods provide a framework that can be applied to control and enhance various technological systems or processes within the medical field, such as diagnostic imaging devices, robotic surgical devices, and patient monitoring devices. By incorporating self-training of advanced sequence processing models, uncertainty-guided retrieval, multi-stage prompting, and / or multimodal processing capabilities, these systems can autonomously adjust operating parameters, improve diagnostic outputs, and optimize patient care protocols. For example, imaging devices can utilize these methods to tailor their scanning techniques based on the unique patient history processed by the model, while robotic surgical systems can adjust their surgical plans by analyzing real-time surgical data against a large database of surgical outcomes. This knowledge-driven approach ensures that medical devices operate with increased accuracy and efficiency, and are more in line with the latest medical standards, ultimately contributing to better patient outcomes and streamlined healthcare workflows.

[0090] As a further example, the disclosed technology can enhance healthcare systems' ability to generate radiology reports, summarize medical text, draft referral letters, and conduct multimodal diagnostic dialogues. In radiology report generation, the system can process input modalities such as radiographic images and accompanying clinical records to output structured reports detailing findings, comparisons, and recommendations in a standardized format. For medical text summarization, the system can receive a large amount of medical literature or patient records as input and generate concise summaries that capture the semantics of the content, thus facilitating rapid information absorption. Customized referral letters that efficiently communicate relevant information to specialists can be generated by inputting the patient's medical history and current condition, simplifying the creation of referral letters. Furthermore, the system can facilitate multimodal diagnostic dialogues by integrating inputs from textual patient interactions and associated medical imaging or examination results, with outputs including comprehensive conversational exchanges supporting diagnostic and treatment planning. Each of these applications leverages the system's ability to synthesize large amounts of complex data and place it within context.

[0091] Beyond the medical field, the disclosed technology can be applied to a variety of non-medical use cases where accessing and integrating external information is beneficial. For example, in the legal industry, legal professionals can input queries about specific points of case law; the model will then search legal databases to provide the latest and most relevant legal precedents and codified law, and output a comprehensive legal argument or memorandum. As another example, the technology can be used in customer service agents where customers input inquiries about product features or issues, and the model outputs customized solutions or guidance by searching for similar queries and solutions in product brochures, FAQs, and customer forums. As yet another example, the disclosed technology can be used as a search engine assistant or aggregator. For instance, a user can input a search query. The system can retrieve several web results and then provide the user with an analytical chain that provides an answer to the query while relying on and referencing these web results.

[0092] This article describes various example implementations with reference to the accompanying drawings.

[0093] Example self-training

[0094] Now refer to Figure 1 A schematic block diagram is depicted illustrating an embodiment of an iterative self-training process for a sequence processing model 122 according to the disclosed techniques. The process begins with the creation of an example tuple 102, which includes an example query 104 and a corresponding example response 106. The example response 106 includes an example analysis chain 108 that ultimately yields an example answer 110. The example analysis chain 108 relies on or references one or more example content items obtained from an external knowledge source 112.

[0095] The computational system then generates training hints 114, which include example tuples 102, training queries 116, and one or more training content items 118. These training content items 118 are also obtained from an external knowledge source 112 and are accompanied by instructions 120 for enabling the sequence processing model 122 to generate candidate responses 124. After processing the training hints 114, the sequence processing model 122 outputs candidate responses 124, which include model-generated analytical chains 126 leading to candidate answers 128.

[0096] The correctness evaluator 130 then evaluates whether the candidate answer 128 corresponds to the truth answer 131 of the training query 116. For example, the correctness evaluator itself may be a machine learning model, or some other heuristic embodied in computer-executable instructions stored on a computer-readable medium.

[0097] If candidate response 124 is determined to be correct, model trainer 132 fine-tunes sequence processing model 122 based on candidate response 124. Conversely, if candidate response 124 is incorrect, discard operator 134 removes candidate response 124 from consideration. In this way, incorrect inference patterns are not reinforced. Model trainer 132 and discard operator 134 may include computer-executable instructions stored on a computer-readable medium.

[0098] For example, example query 104 could be "What are the potential side effects of drug X?", and example response 106 could detail the side effects based on recent research from medical databases, which are part of external knowledge sources 112. Training query 116 can then pose different questions related to drug X, prompting sequence processing model 122 to use the provided data and its own reasoning to generate new, accurate responses based on the latest and most relevant medical information.

[0099] In some implementations, this process can be iterative, where the sequence processing model 122 is continuously updated based on validated responses. This iterative process ensures that the model is continuously improved and adapted to new data and queries.

[0100] Now refer to Figure 2 The diagram schematically illustrates a fine-tuning loop for a sequence processing model 200 according to the disclosed technique. The sequence processing model 200 is depicted as receiving two types of input: training hints 202 without search results and training hints 204 with search results. These inputs instruct the model's ability to process and analyze queries with varying degrees of available information, thereby simulating real-world scenarios where some data may be readily available or not.

[0101] Sequence processing model 200 processes these inputs to generate corresponding candidate responses, which are then subjected to a scoring and filtering process 206. This process evaluates the generated responses according to predefined criteria to ensure their relevance and accuracy. Candidate responses that meet these criteria are fed into a fine-tuning loop 208, in which sequence processing model 200 is iteratively updated to improve its performance.

[0102] Within fine-tuning loop 208, candidate responses can be represented as analytical chains (also known as “mind chains” or “CoTs”) with corresponding answers. These responses are either based solely on the content of the training prompt (e.g., CoTs) or enriched with information retrieved from search results (e.g., CoTs with search). This distinction highlights the model’s ability to adjust its analysis based on the availability of external information, which is important for maintaining the robustness and flexibility of the system.

[0103] For example, training hint 202 without search results could include a medical query, which the sequence processing model 200 attempts to answer based on its existing knowledge and training. In contrast, training hint 204 with search results could include additional data retrieved from medical databases or journals, which the model integrates into its reasoning process to build a more well-founded response.

[0104] The fine-tuning loop 208 represents an iterative learning process in which the sequence processing model 200 is continuously improved by engaging with a wide variety of queries and information sources. This iterative process may include incorporating validated responses into the model's training set, allowing it to learn from its successes and further enhance its analytical capabilities over time.

[0105] In some implementations, the scoring and filtering process 206 can employ machine learning algorithms to evaluate the quality of these candidate responses. In this way, only the most accurate and relevant responses contribute to the fine-tuning of the sequence processing model 200. Furthermore, alternative embodiments may include human experts in the scoring process to provide a layer of domain-specific validation, particularly important for complex medical queries where nuanced understanding is crucial.

[0106] Now refer to Figure 3 Flowchart 300 illustrates an embodiment of an iterative self-training process for a sequence processing model according to the disclosed techniques. The process begins at step 302 with the acquisition of a set of example tuples, which serve as exemplary learning instances for the model. This tuple includes example queries and associated example responses demonstrating how external knowledge sources can be utilized when constructing answers.

[0107] Subsequently, at position 304, the computational system generates a training cue that encompasses the example tuple, the new training query, and additional training content items from an external knowledge base. These components together form a comprehensive context from which the sequence processing model interprets and learns.

[0108] Subsequently, the sequence processing model is tasked with processing the training cue at position 306 to generate candidate responses. These responses can include output generated by the model, comprising a detailed analytical chain of potential answers to the training query, demonstrating the model's current reasoning capabilities.

[0109] An evaluation step is then performed at point 308, where the computational system determines whether the candidate response corresponds to the ground truth answer to the training query. This determination evaluates the accuracy and reliability of the model's output.

[0110] If the candidate response is deemed to be consistent with the true value, then at 310, the model undergoes a fine-tuning process based on this validated response, which is used to reinforce the correct analytical pattern and enhance the model's performance.

[0111] Optionally, at position 312, the validated candidate response can be added to the example corpus. This addition enriches the training dataset and provides more diverse examples for future prompts to learn from.

[0112] Alternatively, if the candidate response does not match the truth value, it is discarded at 314 to prevent erroneous reasoning within the model from being reinforced.

[0113] Example of information retrieval guided by uncertainty

[0114] Now refer to Figure 4 The diagram illustrates an embodiment of an uncertainty-guided search loop utilized by a sequence processing model 400 according to the disclosed technique. The sequence processing model 400 receives input prompts, including instructions, queries, and search results. After processing the input, the model generates multiple thought chains (CoTs), each leading to a potential answer to the query. These CoTs, denoted as CoT #2 402 leading to answer A and CoT #n 406 leading to answer B, demonstrate the model's ability to analyze the input from various perspectives and propose different solutions or answers.

[0115] The diagram further depicts the decision point, which queries whether consensus has been reached among the generated CoTs. If the answer is yes, the model outputs the consensus CoT, thus providing a unified answer, such as answer A, which is considered the most reliable response based on the consistency of multiple CoTs. However, if no consensus is reached, the model enters an uncertainty-guided search loop.

[0116] The loop involves sequence processing model 400 generating targeted search queries to resolve conflicts identified among these CoTs, such as conflicting CoT (Answer A) 402 and CoT (Answer B) 406. The model then performs a web search to retrieve additional context that may support or refute Answer A, or vice versa. The newly obtained context is then fed back into sequence processing model 400, which processes the enriched input to generate additional CoTs and potentially reach a consensus.

[0117] For example, if the initial CoT provides conflicting information about drug side effects, the sequence processing model 400 generates a search query specifically designed to find authoritative medical literature that clarifies the discrepancy. Additional context obtained from this web search can include recent clinical trial results or expert medical opinions that either support or challenge the initial answer provided by the model.

[0118] Figure 4 The uncertainty-guided search loop illustrated in the example can be an iterative process that improves the model's output by incorporating external knowledge, thereby enhancing the reliability and accuracy of these responses. This method ensures that the sequence processing model 400 remains dynamic and adaptable, capable of addressing uncertainty through targeted information retrieval and analysis.

[0119] Now refer to Figure 5 A flowchart 500 is provided, illustrating an embodiment of a search process guided by uncertainty utilized by a sequence processing model according to the disclosed technique. The process begins at operation 502, where an input query is obtained by a computing system. This input query may be of a medical nature, such as a complex inquiry into patient symptoms or a request for information on drug interactions.

[0120] Upon receiving the input query, the sequence processing model proceeds to operation 504, where it processes the input query along with available content items to generate multiple distinct responses. For example, the model could generate different diagnostic suggestions or treatment plans based on the input medical query. Each of these responses could represent a unique analytical chain derived from the input query and the content provided to the model.

[0121] At operation 506, the computational system determines whether the generated responses meet a consensus metric. This metric evaluation may include comparing the similarity of responses or using statistical methods to assess the consistency between these responses. For example, if the responses consistently recommend a particular diagnosis, the system can infer that a consensus has been reached.

[0122] If the consensus metric is satisfied, as indicated by the positive path leading to operation 508, the computational system provides at least a portion of at least one of the plurality of responses as output. This output may be the most common of the plurality of responses, or a composite response incorporating elements from the consensus responses.

[0123] Conversely, if this metric is not met, indicating potential uncertainty or conflicting information within these responses, as indicated by the negative path leading to operation 510, the system identifies two or more responses exhibiting conflict. Subsequently, at operation 512, an information retrieval query specifically designed to return content items related to the identified conflict is generated. For example, if there are discrepancies in the suggested drug side effects among these responses, the generated query could be designed to retrieve scientific research discussing those specific side effects.

[0124] Finally, at operation 514, the system uses this information retrieval query to query one or more external knowledge sources to obtain additional content items. These external sources can include medical databases, scientific journals, or the wider web. The newly retrieved content items are then used to update the original input, and the sequence processing model generates additional responses based on this new content, potentially leading to consensus.

[0125] In some implementations, Figure 5 The operations described can be performed iteratively, where the sequence processing model improves its response through successive rounds of uncertainty-guided search and analysis. This iterative process can include several layers of conflict identification, targeted information retrieval, and response generation until consensus is reached or until the system determines that further searching will not lead to consensus.

[0126] Example suggestion chain for long context input

[0127] Now refer to Figure 6 A flowchart 600 is provided to illustrate an embodiment of a multi-stage cue chain process for a sequence processing model according to the disclosed techniques. The process begins at operation 602, where a computing system obtains an input medical query and a set of medical context data. This set of medical context data may include, for example, electronic health records, genomic data, or radiographic images, thereby providing a comprehensive dataset for analysis.

[0128] At operation 604, the sequence processing model is prompted with current prompts from a set of at least partially predefined prompts. These prompts guide the sequence processing model through a structured analysis chain, which, in some implementations, can be customized for medical queries and medical context data. For example, these prompts can guide the model to focus on specific aspects of the data, such as identifying symptoms, reviewing patient history, or analyzing test results.

[0129] Upon receiving the current prompt, the sequence processing model generates a response at operation 606. This response is the product of the model's processing capabilities, which may include advanced natural language understanding and multimodal data integration to provide reasoned and context-sensitive output.

[0130] The process then proceeds to decision operation 608, where it is determined whether there are any additional prompts in the series of prompts. If additional prompts exist, indicating that the prompts based on the analysis chain have not yet been completed, the process proceeds to operation 612. Here, new prompts are generated based on the previous response and the template prompts included in the series of prompts. This iterative prompting continues, with each new prompt building upon the information and analysis provided in the previous response, thereby progressively improving the output response.

[0131] If, as determined at operation 608, no further prompts are made, the process terminates at operation 610, where the output response is provided. This output response represents the final result of the multi-stage prompt chain process, providing a comprehensive and accurate answer to the input medical query based on extensive analysis of the medical context data.

[0132] Figure 6 The multi-stage cue chain process described illustrates the iterative and dynamic capabilities of the disclosed technique in handling complex medical queries. By utilizing a series of structured cueing, the sequence processing model can systematically dissect and analyze large amounts of medical data to obtain accurate and actionable outputs that can significantly aid in medical diagnosis and decision-making.

[0133] In some implementations, this multi-stage cue chain process can be adapted for various medical applications, such as generating differential diagnoses, recommending treatment plans, or conducting medical research. The flexibility of this process allows these cuees to be customized for specific medical scenarios, thereby enhancing the practicality and applicability of sequence processing models across diverse healthcare environments.

[0134] Example long context model for multimodal medical processing

[0135] Now refer to Figure 7A schematic diagram is presented, illustrating an advanced architecture adapted for a sequence processing model used to handle multimodal medical context data. The depicted model is constructed to enhance the processing of complex datasets. At the heart of the system is the decoder Transformer 706, which can include multiple Transformer blocks, such as Transformer block 708, Transformer block 710, and Transformer block 712. These blocks are designed to sequentially process the input medical query 702 and multimodal medical context data 704, thereby generating a response 714.

[0136] Some or all of these Transformer blocks, such as Transformer block 712, may include sparse feedforward network layers characterized by hybrid expert networks, as highlighted in detailed view 716. This design enables the selective activation of parameters or "experts" based on the input data. For example, detailed view 716 shows possible routes for inputs x1 and x2 through different feedforward networks (FFN1, FFN2, FFN3, FFN4) with associated probabilities (p=0.65, p=0.8), probabilities controlled by routers within the layer. This probabilistic approach to selecting experts allows the model to dynamically allocate computational resources to the most relevant expert networks within the layer, thereby optimizing both efficiency and performance.

[0137] In some implementations, sequence processing models can be fine-tuned for specific medical applications, such as the analysis of radiological imaging data, genomic sequences, or chemical and molecular data. By leveraging the model's multimodal capabilities, healthcare professionals can gain a more comprehensive understanding of a patient's condition, leading to more accurate diagnoses and personalized treatment plans.

[0138] Example training method

[0139] Figure 8 A flowchart depicts a method 800 for training one or more machine learning models according to various aspects of this disclosure. For example, an example machine learning model may include a sequence processing model.

[0140] One or more portions of the example method 800 may be implemented by a computing system including one or more computing devices, such as the computing system described with reference to the other figures. Each corresponding portion of the example method 800 may be executed by any computing device (or any combination thereof) of the one or more computing devices. Furthermore, one or more portions of the example method 800 may be implemented on hardware components of the apparatus described herein, for example, for training one or more systems or models. Figure 8For illustrative and discussion purposes, elements executed in a specific order are depicted. Those skilled in the art will understand using the disclosure provided herein that elements of any method discussed herein can be adapted, rearranged, extended, omitted, combined, or modified in various ways without departing from the scope of this disclosure. Figure 8 The elements / terms described are for illustrative purposes only and with reference to other systems and figures, and are not intended to be limiting. One or more portions of example method 800 may be performed additionally or alternatively by other systems.

[0141] At 802, example method 800 may include obtaining training instances. The training dataset may include multiple training instances partitioned across multiple datasets (e.g., training datasets, validation datasets, or test datasets). Training instances may be labeled or unlabeled. Although referred to as "training" instances in example method 800, it should be understood that runtime inference may form training instances when a model is trained (e.g., online training / learning) using evaluations of the model's performance on that runtime instance. Example data types for training instances and various tasks associated with them are described throughout this disclosure.

[0142] At 804, example method 800 may include using one or more machine learning models to process training instances to generate output. This output may be obtained directly from the one or more machine learning models, or it may be a downstream result of a processing operation chain that includes the output of the one or more machine learning models.

[0143] At 806, example method 800 may include receiving an evaluation signal associated with the output. The evaluation signal can be obtained using a loss function. Various loss determination methods 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-supervised 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 learning-based reward model configured to generate a reward based on the received output. The reward can be computed using feedback data describing human feedback to the output.

[0144] At 808, example method 800 may include using an evaluation signal to update a machine learning-trained model. For example, in some embodiments, various training or learning techniques (e.g., backpropagation) may be used to learn the values ​​of the parameters of the machine learning-trained model. For example, the evaluation signal may be backpropagated from the output (or another source of the evaluation signal) through the machine learning-trained model to update one or more parameters of the model (e.g., based on the gradient of the evaluation signal relative to the parameter values). For example, a system containing one or more machine learning-trained models may be trained in an end-to-end manner. Gradient descent techniques may be used to iteratively update the parameters over multiple training iterations. In some implementations, performing error backpropagation may include performing truncated backpropagation through time. Example method 800 may include implementing various generalization techniques (e.g., weight decay, dropout, etc.) to improve the generalization ability of the model being trained.

[0145] In some implementations, example method 800 can be implemented to train a machine learning model from an initial state to a fully trained state (e.g., when the model exhibits a desired performance profile, such as based on accuracy, precision, recall, etc.).

[0146] In some implementations, example method 800 can be implemented for specific stages of the training process. For example, in some implementations, example method 800 can be implemented for pre-training a machine learning model. Pre-training can include, for example, large-scale training on potentially noisy data to achieve a broad performance level base across multiple tasks / data types. In some implementations, example method 800 can be implemented for fine-tuning a machine learning model. Fine-tuning can include, for example, smaller-scale training based on higher-quality (e.g., labeled, sifted, etc.) data. Fine-tuning can affect all or part of the parameters of the machine learning model. For example, parts of the machine learning model can be “frozen” for certain training stages. For example, parameters associated with the embedding space can be “frozen” during fine-tuning (e.g., to preserve information learned from a broader domain than that present in the fine-tuning dataset). Example fine-tuning methods include reinforcement learning. Reinforcement learning can be based on user feedback on model performance during use.

[0147] Example of a machine learning model

[0148] Figure 9 This is a block diagram of an example processing flow for using a machine learning-engineered model 1 to process input 2 to generate output 3.

[0149] The machine learning model 1 can be or includes one or more machine learning models or model components. Example machine learning models can include neural networks (e.g., deep neural networks). Example machine learning models can include non-linear or linear models. Example machine learning models can use other architectures to replace or supplement neural networks. Example machine learning models can include decision tree-based models, support vector machines, hidden Markov models, Bayesian networks, linear regression models, k-means clustering models, etc.

[0150] Example neural networks can include feedforward neural networks, recurrent neural networks (RNNs) (including long short-term memory (LSTM) based RNNs), convolutional neural networks (CNNs), diffusion models, generative adversarial networks, or other forms of neural networks. Example neural networks can also be deep neural networks. Some example machine learning models may utilize attention mechanisms, such as self-attention. For example, some example machine learning models may include multi-head self-attention models.

[0151] The machine learning-based model 1 may include one or more instances of the same model configured to operate on data from input 2. The machine learning-based model 1 may also include an ensemble of different models that can interact collaboratively to process data from input 2. For example, the machine learning-based model 1 may employ a hybrid expert architecture. See, for example, Zhou et al. Mixture-of-Experts with Expert Choice Routing [Hybrid Experts in Expert-Selected Routing], arXiv:2202.09368v2 (October 14, 2022).

[0152] Input 2 can typically include or otherwise represent various types of data. Input 2 can include one type or many different types of data. Output 3 can be data of the same type or a different type compared to Input 2. Output 3 can include one type or many different types of data.

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

[0154] In multimodal input 2 or output 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 should be understood that any combination of data types in input 2 or output 3 can exist.

[0155] Example input 2 may include one or more data types, such as the example data types noted above. Example output 3 may include one or more data types, such as the example data types noted above. The data type of input 2 may be the same as or different from the data type of output 3. It should be understood that the example data types noted above are provided for illustrative purposes only. The data types contemplated within the scope of this disclosure are not limited to those examples noted above.

[0156] Example of a sequence processing model using machine learning

[0157] Figure 10 This is a block diagram illustrating an example implementation of a machine learning-based model configured to process information sequences. For example, an example implementation of machine learning model 1 could include a machine learning sequence processing model 4. The example system could pass input 2 to sequence processing model 4. Sequence processing model 4 could include one or more machine learning components. Sequence processing model 4 could process the data from input 2 to obtain input sequence 5. Input sequence 5 could include one or more input elements 5-1, 5-2, ..., 5- obtained from input 2. M The sequence processing model 4 can use the prediction layer 6 to process the input sequence 5 to generate the output sequence 7. The output sequence 7 may include one or more output elements 7-1, 7-2, ..., 7- generated based on the input sequence 5.N The system can generate output 3 based on output sequence 7.

[0158] Sequence processing models 4 may include one or more machine learning-based model components configured to ingest, generate, or otherwise reason about sequences of information. For example, some example sequence processing models in the text domain are referred to as “large language models” or LLMs. See, for example, the PaLM 2 technology report, Google, https: / / ai.google / static / documents / palm2techreport.pdf (nd). Other example sequence processing models can operate in other domains, for example, such as the image domain; see, for example, Dosovitskiy et al. An image is 16x16 Words: Transformers for Image Recognition at Scale [An image worth 16x16 words: Transformers for large-scale image recognition], arXiv:2010.11929v2 (June 3, 2021); in the audio domain, see, for example, Agostinelli et al. MusicLM: Generating Music From Text [MusicLM: Generating Music from Text], arXiv:2301.11325v1 (January 26, 2023); in the field of biochemistry, see, for example, Jumper et al., Highly accurate protein structure prediction with AlphaFold, 596 Nature 583 (August 26, 2021). Sequence processing model 4 can process one or more types of data simultaneously. Sequence processing model 4 can include relatively large models (e.g., more parameters, high computational cost), relatively small models (e.g., fewer parameters, computationally lightweight), or both.

[0159] Generally, sequence processing model 4 can obtain input sequence 5 using data from input 2. For example, input sequence 5 may include a representation of the data from input 2 in a format that sequence processing model 4 can understand. One or more machine learning components of sequence processing model 4 may ingest data from input 2, parse the data into fragments compatible with the processing architecture of sequence processing model 4 (e.g., via “word segmentation”), and project these fragments into the input space associated with prediction layer 6 (e.g., via “embedding”).

[0160] Sequence processing model 4 can ingest data from input 2 and parse that data into a sequence of elements to obtain input sequence 5. For example, a portion of the input data from input 2 can be decomposed into fragments that collectively represent that portion of the input data. These fragments can provide the elements of the sequence.

[0161] In some cases, elements 5-1, 5-2, ..., 5- M Elements can represent building blocks used to capture or express meaningful information within a specific data domain. For example, elements can describe "atomic units" across one or more domains. For instance, for a text input source, these elements could correspond to groups of one or more words or sub-word components, such as a set of one or more characters.

[0162] For example, elements 5-1, 5-2, ..., 5- M This can represent the tokens obtained using a tokenizer. For example, a tokenizer can process a given part of the input source and output a series of tokens (e.g., corresponding to input elements 5-1, 5-2, ..., 5-). M These tokens represent that portion of the input source. Various tokenization methods can be used. For example, a text input source can be tokenized using byte-pair encoding (BPE) techniques. See, for example, Kudo et al. SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processing [SentencePiece: [Simple and Language-Independent Subtotaling and Desegmentation for Neural Text Processing], Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing (System Demonstrations), pp. 66–71 (October 31–November 4, 2018), https: / / aclanthology.org / D18-2012.pdf. Tokenization of image-based input sources can be performed by extracting and serializing fragments from images.

[0163] Generally speaking, any data type can be serialized and processed into the input sequence 5. It should be understood that... Figure 10 The elements depicted in the text are 5-1, 5-2, ..., 5- M It can be a word element or its embedded representation.

[0164] Prediction layer 6 can predict one or more output elements 7-1, 7-2, ..., 7- based on the input elements. N Prediction layer 6 may include one or more machine learning-based model architectures, such as one or more layers of learned parameters that manipulate and transform the inputs to adapt the input elements 5-1, 5-2, ..., 5-M We can extract higher-order meanings and the relationships between them. In this way, for example, example prediction layer 6 can predict new output elements based on the context provided by input sequence 5.

[0165] Prediction layer 6 can evaluate the associations between portions of the input sequence 5 and specific output elements. These associations can inform predictions about the likelihood that a particular output follows the input context. For example, consider the text snippet “The carpenter's toolbox was small and heavy. It was full of ___.” Example prediction layer 6 can identify that “It” refers back to “toolbox” by determining the relationships between the corresponding embeddings. Example prediction layer 6 can also associate “it” with attributes of the toolbox, such as “small” and “heavy”. Based on these associations, for example, prediction layer 6 can assign a higher probability to the word “nails” than to the word “sawdust”.

[0166] The Transformer is an example architecture that can be used in prediction layer 4. For example, see Vaswani et al. Attention is all you need. [All you need is attention], arXiv:1706.03762v7 (August 2, 2023). The Transformer is an example of a machine learning-based model architecture that uses an attention mechanism to compute associations between items within a context window. The context window can include a sequence containing the input sequence 5 and possibly one or more output elements 7-1, 7-2, ..., 7- N A Transformer block can include one or more attention layers and one or more post-attention layers (e.g., feedforward layers, such as multilayer perceptrons).

[0167] In addition to or instead of Transformer-based architectures, prediction layer 6 can include other machine learning-based model architectures. For example, recurrent neural networks (RNNs) and long short-term memory (LSTM) models, as well as convolutional neural networks (CNNs) can be used. In general, prediction layer 6 can leverage various artificial neural networks that can understand or generate sequences of information.

[0168] The output sequence 7 may include or otherwise represent the same or different data type as the input sequence 5. For example, the input sequence 5 may represent text data, and the output sequence 7 may represent text data. The input sequence 5 may represent image, audio, or audiovisual data, and the output sequence 7 may represent text data (e.g., describing image, audio, or audiovisual data). It should be understood that the prediction layer 6 and any other intermediate model components of the sequence processing model 4 can be configured to receive multiple data types from the input sequence 5 and output multiple data types in the output sequence 7.

[0169] Output sequence 7 can have various relationships with input sequence 5. Output sequence 7 can be a continuation of input sequence 5. Output sequence 7 can be a supplement to input sequence 5. Output sequence 7 can translate, transform, expand, or otherwise modify input sequence 5. Output sequence 7 can answer, evaluate, acknowledge, or otherwise respond to input sequence 5. Output sequence 7 can implement instructions provided via input sequence 5 (or describe instructions for implementing those instructions).

[0170] Output sequence 7 can be generated autoregressively. For example, in some applications, the output of one or more prediction layers 6 can be passed through one or more output layers (e.g., softmax layers) to obtain a probability distribution over an output vocabulary (e.g., a text or symbol vocabulary) conditioned on the set of input elements in a context window. In this way, output sequence 7 can be generated autoregressively, for example, by sampling a likely next output element; adding that element to the context window and regenerating the probability distribution based on the updated context window; and sampling a likely next output element, etc.

[0171] Output sequence 7 can also be generated non-autoregressively. For example, multiple output elements of output sequence 7 can be predicted together without explicitly conditioned on each other in sequence. See, for example, Saharia et al., Non-Autoregressive Machine Translation with Latent Alignments, arXiv:2004.07437v3 (November 16, 2020).

[0172] Output sequence 7 may include one or more parts or elements. In the example content generation configuration, output sequence 7 may include multiple elements corresponding to multiple parts of the generated output sequence (e.g., text sentences, values ​​of discretized waveforms, computer code, etc.). In the example classification configuration, output sequence 7 may include a single element associated with the classification output. For example, the output "vocabulary" may include the set of classes to which the input sequence will be classified. For example, a visual Transformer block may pass latent state information to a multilayer perceptron, which outputs a likely class value associated with the input image.

[0173] Figure 11 This is a block diagram of an example technique for populating example input sequence 8. Input sequence 8 may include various functional elements forming part of the model infrastructure, such as element 8-0 obtained from task indicator 9, which signals to any model processing input sequence 8 that a specific task is being performed (e.g., helping to adapt the model's performance to that specific task). Input sequence 8 may include various data elements from different data modalities. For example, input modality 10-1 may include one data modality. Data-to-sequence model 11-1 may process the data from input modality 10-1 to project the data into a format compatible with input sequence 8 (e.g., determining one or more vectors of dimensions based on the dimensions of input sequence 8) to obtain elements 8-1, 8-2, 8-3. Another input modality 10-2 may include a different data modality. Data-to-sequence model 11-2 may project the 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 may include yet another different data modality. The data to sequence model 11-3 can project the data from the input mode 10-3 into a format compatible with the input sequence 8 to obtain elements 8-7, 8-8, and 8-9.

[0174] Input sequence 8 may be the same as or different from input sequence 5. Input sequence 8 may be a multimodal input sequence containing elements that use a common dimensional representation to represent data from different modalities. For example, the embedding space may have P The input sequence 8 can be configured to contain dimensions. P Multiple elements across multiple dimensions. In this way, for example, the example implementation can facilitate information extraction and reasoning across diverse data modalities by projecting data onto elements in the same embedding space to compare, combine, or otherwise compute between them.

[0175] For example, elements 8-0, ..., 8-9 can indicate specific locations within a multidimensional embedding space. Some elements can map to a discrete set of locations in the embedding space. For example, elements corresponding to discrete members in a predefined vocabulary of lexical terms can map to discrete locations in the embedding space associated with those terms. Other elements can be continuously distributed across the embedding space. For example, some data types can be decomposed into continuously defined parts (e.g., image patches), which can be described using continuously distributed locations within the embedding space.

[0176] In some implementations, the expressive power of the embedding space may not be limited to meanings associated with any particular set of lexical units or other building blocks. For example, a contiguous embedding space can encode a series of higher-order information. Individual fragments of information (e.g., lexical units) can be mapped to specific points in the space: for example, lexical units of the word "dog" can be projected to embedding values ​​that point to specific locations in the embedding space associated with dog-related information. Similarly, image patches of dogs on grass can be projected into the embedding space. In some implementations, the projection of the dog image can resemble the projection of the word "dog," and also resemble the projection of the word "grass," but potentially differ from both. In some implementations, the projection of the image patch may not be perfectly aligned with any single projection of a single word. In some implementations, the projection of the image patch can be aligned with a combination of the projections of the words "dog" and "grass." In this way, for example, a higher-order embedding space can encode information that is independent of the data modality expressing the information.

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

[0178] Input modes 10⁻¹, 10⁻², and 10⁻³ can be associated with a variety of different data types (e.g., as described above with respect to input 2 and output 3).

[0179] Data-to-sequence models 11-1, 11-2, and 11-3 can be the same as or different from each other. Data-to-sequence models 11-1, 11-2, and 11-3 can be adapted to each corresponding input modality 10-1, 10-2, and 10-3. For example, a text data-to-sequence model can subdivide a portion of the input text and project the subdivided portions onto elements in input sequence 8 (e.g., elements 8-1, 8-2, 8-3, etc.). An image data-to-sequence model can subdivide the input image and project the subdivided portions onto elements in input sequence 8 (e.g., elements 8-4, 8-5, 8-6, etc.). An arbitrary data type data-to-sequence model can subdivide the input of that arbitrary data type and project the subdivided portions onto elements in input sequence 8 (e.g., elements 8-7, 8-8, 8-9, etc.).

[0180] Data-to-sequence models 11-1, 11-2, and 11-3 can form part of the machine learning-based sequence processing model 4. Data-to-sequence models 11-1, 11-2, and 11-3 can be jointly trained with the machine learning-based sequence processing model 4 or trained independently of it. Data-to-sequence models 11-1, 11-2, and 11-3 can be trained end-to-end with the machine learning-based sequence processing model 4.

[0181] Example of a machine learning-based model development platform

[0182] Figure 12 This is a block diagram of the example model development platform 12, which facilitates the creation, adaptation, and improvement of example machine learning models (e.g., machine learning model 1, sequence processing model 4, etc.). The model development platform 12 can provide several different toolkits that developer systems can use to develop new or adapted machine learning models.

[0183] The 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 base models 13-1, which can provide a backbone of processing power across a variety of tasks. Model libraries 13 can include one or more pre-trained expert models 13-2, which can focus on performance in a specific domain of expertise. Model libraries 13 can include various model primitives 13-3, which can provide low-level architectures or components (optionally pre-trained) that can be assembled in various arrangements as needed.

[0184] The model development platform 12 can receive selections of various model components 14. The model development platform 12 can transfer the selected model components 14 to the workbench 15, which combines the selected model components 14 into a development model 16.

[0185] Workbench 15 can facilitate further improvement and adaptation of the development model 16 by utilizing multiple different toolkits integrated with the model development platform 12. For example, workbench 15 can facilitate the use of model alignment toolkit 17 to align the development model 16 with expected performance profiles for various tasks.

[0186] The model alignment toolkit 17 can provide a variety of tools for enabling the development model 16 to generate outputs aligned with desired behavioral characteristics. Alignment can include increasing the accuracy, precision, recall, etc., of the model output. Alignment can include enforcing output styles, patterns, or other preferred characteristics of the model output. Alignment can be general or domain-specific. For example, the pre-trained base model 13-1 can start from an initial performance level across multiple domains. Alignment of the pre-trained base model 13-1 can include improving performance in a specific information or task domain (e.g., even at the expense of performance in another information or task domain).

[0187] The model alignment toolkit 17 can integrate one or more datasets 17-1 used to align development models 16. The filtered and curated datasets 17-1 may include labeled or unlabeled training data. Datasets 17-1 can be obtained from public-domain datasets. Datasets 17-1 can also be obtained from private datasets associated with one or more developer systems for aligning machine learning models specifically tailored for private use cases.

[0188] The pre-training pipeline 17-2 may include a machine learning-based model training workflow configured to update the development model 16 on a large-scale, potentially noisy dataset. For example, pre-training may utilize unsupervised learning techniques (e.g., denoising, etc.) to process a large number of training instances to update model parameters from an initial state and achieve the desired baseline performance. The pre-training pipeline 17-2 may utilize the unlabeled dataset from dataset 17-1 to perform pre-training. Workbench 15 may implement the pre-training pipeline 17-2 to pre-train the development model 16.

[0189] Fine-tuning pipeline 17-3 may include a machine learning-based model training workflow configured to improve the model parameters of development model 16 using higher-quality data. Fine-tuning pipeline 17-3 can update development model 16 through supervised training using the labeled dataset in dataset 17-1. Fine-tuning pipeline 17-3 can also update development model 16 through reinforcement learning using reward signals from user feedback. Workbench 15 enables fine-tuning pipeline 17-3 to fine-tune development model 16.

[0190] Hint library 17-4 may include a set of inputs configured to induce behavior aligned with desired performance criteria. Hint library 17-4 may include few-shot hints (e.g., providing examples of the desired model output as input to a query to be performed at the desired runtime), thought chain hints (e.g., providing stepwise reasoning within an example to facilitate comprehensive reasoning by the model), and so on.

[0191] Sample hints can be obtained from the available repositories in Hint Library 17-4. Sample hints can be provided by one or more developer systems using Workbench 15.

[0192] In some implementations, pre-trained or fine-tuned models can achieve satisfactory performance even when there are no paradigms in the input. For example, zero-shot hints can include inputs lacking paradigms. Zero-shot hints can be within the domain of the training dataset or outside the training domain.

[0193] Hint library 17-4 may include one or more hint engineering tools. Hint engineering tools can provide a workflow for retrieving or learning optimized hint values. Hint engineering tools can facilitate the direct learning of hint values ​​(e.g., input element values) based on one or more training iterations. Workbench 15 can implement the hint engineering tools in development model 16.

[0194] Hint library 17-4 may include a pipeline for hint generation. For example, input can be generated using development model 16 itself or other machine learning-based models. In this way, for example, a first model can process information about the task and output input for a second model to process, performing a step of the task. The second model may be the same as or different from the first model. Workbench 15 can implement the hint generation pipeline within development model 16.

[0195] Hint library 17-4 may include a pipeline for context injection. For example, if additional context is provided for performing a specific task, the performance of development model 16 on that task can be improved. Hint library 17-4 may include software components configured to identify desired context, retrieve context from external sources (e.g., databases, sensors, etc.), and add the context to input hints. Workbench 15 can implement the context injection pipeline in development model 16.

[0196] Although the various training examples described herein regarding model development platform 12 involve "pre-training" and "fine-tuning," it should be understood that the model alignment toolkit 17 generally supports a wide variety of training techniques adaptable to train a wide variety of machine learning models. Example training techniques may correspond to the example training method 800 described above.

[0197] The model development platform 12 may include a model plug-in toolkit 18. The model plug-in toolkit 18 may include a variety of tools configured to enhance the functionality of the machine learning model by integrating it with other systems, devices, and software components. For example, the machine learning model can use tools to improve performance quality where appropriate. For instance, deterministic tasks can be offloaded to dedicated tools instead of performing tasks probabilistically when the risk of error increases. For example, the machine learning model can identify the tools to be invoked to obtain a solution and pass the system of equations to the appropriate tool instead of predicting the solution to the system of equations autoregressively. This tool may be a conventional equation solver that operates deterministically to solve the system of equations. The tool's output can be returned in response to the original query. In this way, tool use can allow some example models to focus on the strengths of the machine learning model—e.g., understanding the intent in unstructured requests for a task—while enhancing model performance by offloading certain tasks to more focused tools to mechanically apply deterministic algorithms to well-defined problems.

[0198] The model plugin toolkit 18 may include a validation tool 18-1. The validation tool 18-1 may include tools that can parse and validate the output of the machine learning model. The validation tool 18-1 may include engineered heuristics that establish certain thresholds applied to the model output. For example, the validation tool 18-1 may base the output of the machine learning model on a structured data source (e.g., to mitigate "illusion").

[0199] The model plugin toolkit 18 may include a toolkit 18-2 for implementing one or more tools, which may include scripts or other executable code that can be executed with the development model 16. The toolkit 18-2 may include one or more inputs configured to enable the machine learning-based model to implement the tools (e.g., few-shot hints that induce the model to output tool calls with correct syntax). For example, the toolkit 18-2 may include fine-tuned training data for training the model to use the tools.

[0200] The model plug-in toolkit 18 may include an interface for calling external application programming interfaces (APIs) 18-3. For example, as a supplement or alternative to directly implementing tool calls or tool code using development model 16, development model 16 may be aligned to output instructions for initiating API calls to send or retrieve data via external systems.

[0201] The model plugin toolkit 18 can be integrated with the hint library 17-4 to create a catalog of available tools for use with the development model 16. For example, the model can receive a catalog of available tools in its input, and the model can generate output that selects a tool from the available tools and initiates a tool call for using that tool.

[0202] Model development platform 12 may include a suite of computational optimization tools 19 for optimizing the computational performance of development model 16. For example, tools for model compression 19-1 can reduce the size of development model 16 while maintaining the desired performance level. For example, model compression 19-1 may include quantization workflows, weight pruning, and sparsification techniques. Tools for hardware acceleration 19-2 can facilitate the configuration of model storage and execution formats for optimal operation on different hardware resources. For example, hardware acceleration 19-2 may include tools for optimally sharding the model for distributed processing across multiple processing units to increase bandwidth, reduce uniform memory requirements, etc. Tools for distillation 19-3 can provide training of a lighter model based on knowledge encoded in development model 16. For example, development model 16 may be a large, high-performance machine learning model optimized using model development platform 12. To obtain a lightweight model for operation in resource-constrained environments, the smaller model may be a “student model” that learns from and imitates development model 16, which acts as the “teacher model.” In this way, for example, the inputs made to learn the parameters and configuration of model 16 can be efficiently transferred to a smaller model for more efficient inference.

[0203] Workbench 15 may implement one or more of the toolkits implemented in model development platform 12, or may not implement any of them. Workbench 15 may output output model 20 based on development model 16. Output model 20 may be a deployment version of development model 16. Output model 20 may be a development or training checkpoint of development model 16. Output model 20 may be a distilled version, compressed version, or otherwise optimized version of development model 16.

[0204] Figure 13 This is a block diagram of an example training process for training a machine learning development model 16. One or more parts of the example training process can be implemented by a computing system including one or more computing devices (e.g., the computing system described with reference to other figures). Each corresponding part of the example training process can be performed by any one (or any combination of) of the one or more computing devices. Furthermore, one or more parts of the example training process can be implemented on the hardware components of the apparatus described herein, for example, to train one or more systems or models. Figure 13 For illustrative and discussion purposes, elements executed in a specific order are depicted. Those skilled in the art will understand using the disclosure provided herein that elements of any method discussed herein can be adapted, rearranged, extended, omitted, combined, or modified in various ways without departing from the scope of this disclosure. Figure 13 The elements / terms described are for illustrative purposes only and with reference to elements and figures described with respect to other systems, and are not intended to be limiting. Alternatively or concurrently, one or more parts of the example training process may be performed by other systems.

[0205] Initially, development model 16 can remain in its initial state as an initialized model 21. Development model 16 can be initialized using weight values. The initial weight values ​​can be random or based on an initialization pattern. The initial weight values ​​can be based on previous pre-training for the same or different models.

[0206] The initialized model 21 can undergo pre-training in the pre-training phase 22. The pre-training phase 22 can be implemented using one or more pre-training pipelines 17-2 on data from dataset 17-1. For example, if the initialized model 21 has already been pre-trained (e.g., development model 16 contains, is, or is based on a pre-trained base model or an expert model), pre-training can be omitted.

[0207] The pre-trained model 23 can then be a new version of the development model 16, which can continue to serve as either the development model 16 or a new development model. If the development model 16 has already been pre-trained, the pre-trained model 23 can be in its initial state. The pre-trained model 23 can undergo fine-tuning in the fine-tuning phase 24. The fine-tuning phase 24 can be implemented using one or more fine-tuning pipelines 17-3 on data from dataset 17-1. For example, fine-tuning can be omitted if the pre-trained model has satisfactory performance, if the model has already been fine-tuned, or if other tuning methods are preferred.

[0208] The fine-tuned model 29 can then be a new version of the development model 16, which can remain as the development model 16 or a new development model. If the development model 16 has already been fine-tuned, the fine-tuned model 29 can be in its initial state. The fine-tuned model 29 can undergo improvements 26 based on user feedback. For example, improvements 26 based on user feedback can include reinforcement learning, which may optionally be based on human feedback from human users of the fine-tuned model 25. Since reinforcement learning can be a form of fine-tuning, it should be understood that the fine-tuning phase 24 can encompass the phase for improvements 26 based on user feedback. Improvements 26 based on user feedback can produce an improved model 27. The refined model 27 can be output to the downstream system 28 for deployment or further development.

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

[0210] Example of a machine learning-based model inference system

[0211] Figure 14This is a block diagram of an inference system used to run one or more machine learning-processed models 1 to perform inference (e.g., for training, for deployment, etc.). Model host 31 can receive machine learning-processed models 1. Model host 31 can host one or more model instances 31-1, which can be one or more instances of one or more models. Model host 31 can use available computing resources 31-2 associated with model host 31 to host model instances 31-1.

[0212] Model host 31 can perform inference on behalf of one or more clients 32. Client 32 can transmit input request 33 to model host 31. Using input request 33, model host 31 can obtain input 2 to feed into machine learning model 1. Machine learning model 1 can process input 2 to generate output 3. Using output 3, model host 31 can return output payload 34 in response to input request 33 from client 32. Output payload 34 can include or be based on output 3.

[0213] Model host 31 can utilize various other resources and tools to enhance the inference task. For example, model host 31 can communicate with tool interface 35 to facilitate the use of tools by model instance 31-1. Tool interface 35 may include local or remote APIs. Tool interface 35 may include integrated scripts or other software functionality. Model host 31 can utilize online learning interface 36 to facilitate continuous improvement of the machine learning-based model 1. For example, online learning interface 36 can be used in reinforcement learning loops to obtain user feedback on the inference provided by model host 31. Model host 31 can access runtime data source 37 to enhance input 2 using additional contextual information. For example, runtime data source 37 may include knowledge graph 37-1 that facilitates structured information retrieval (e.g., search engine service) for information associated with input request 33. Runtime data source 37 may include public or private, external or local database 37-2 that can store information associated with input request 33 for enhancing input 2. The runtime data source 37 may include account data 37-3, which can be retrieved in association with the user account corresponding to the client 32 to customize the behavior of the model host 31 accordingly.

[0214] The model host 31 may be implemented by one or more computing devices or systems. The client 2 may be implemented by one or more computing devices or systems, which may include computing devices or systems shared with the model host 31.

[0215] For example, model host 31 may run on a server system that provides machine learning services (e.g., via a local area network or wide area network) to client devices operating client 32. The client device may be an end-user device used by an individual. The client device may also be a server system that runs client 32 to provide various functionalities as services to downstream end-user devices.

[0216] In some implementations, model host 31 may run on the same device or system as client 32. Model host 31 may be a machine learning service that runs on the device to provide machine learning functionality to one or more applications running on the client device, which may include the application implementing client 32. Model host 31 and client 32 may be part of the same application. For example, model host 31 may be a subroutine or method implemented as part of the application, and client 32 may be another subroutine or method that uses model host 31 to perform inference functionality within the application. It should be understood that model host 31 and client 32 may have various different configurations.

[0217] Model instance 31-1 may include one or more machine learning models that can be used to perform inference. Model instance 31-1 may include weights or other model components stored in persistent storage, temporarily cached, or loaded into high-speed memory. Model instance 31-1 may include multiple instances of the same model (e.g., for parallel execution of more requests on the same model). Model instance 31-1 may include instances of different models. Model instance 31-1 may include cached intermediate states of active or inactive models, which are used to accelerate inference for those models. For example, an inference session using a particular model can generate a large number of computational results that can be reused for future inference runs (e.g., using a KV cache for a Transformer-based model). These computational results can be stored in association with the inference session, allowing the session to be executed more efficiently upon resumption.

[0218] Computing resource 31-2 may include one or more processors (central processing unit, graphics processing unit, tensor processing unit, machine learning accelerator, etc.) connected to one or more memory devices. Computing resource 31-2 may include a dynamic pool of available resources shared with other processes. Computing resource 31-2 may include a memory device large enough to hold the entire model instance in a single memory instance. Computing resource 31-2 may also shard the model instance across multiple memory devices (e.g., using data parallelization or tensor parallelization). Doing so can increase parallelization or execute large models using multiple memory devices that may not be able to hold the entire model in memory individually.

[0219] Input request 33 may include data for input 2. Model host 31 can process input request 33 to obtain input 2. Input 2 can be obtained directly from input request 33 or can be obtained using input request 33. Input request 33 can be submitted to model host 31 via API.

[0220] Model host 31 can perform inference in parallel on batches of input requests 33. For example, model instance 31-1 can be configured with an input structure having a batch dimension. Individual inputs 2 can be distributed across batch dimensions (e.g., rows of an array). Individual inputs 2 can include completely different contexts. Individual inputs 2 can be multiple inference steps for the same task. Individual inputs 2 can be interleaved in the input structure, such that any given inference loop can operate on different parts of the corresponding inputs 2. In this way, for example, model host 31 can perform inference on batches in parallel, such that output 3 can also contain a batch dimension and return the inference results of batched inputs 2 in parallel. In this way, for example, batches of input requests 33 can be processed in parallel to improve the throughput of output payload 34.

[0221] The output payload 34 may include or be based on the output 3 from the machine learning model 1. The model host 31 may process the output 3 to obtain the output payload 34. This may include chaining multiple rounds of inference (e.g., iteratively, recursively, across the same or different models) to obtain the final output of the task to be returned in the output payload 34. The output payload 34 may be transferred to the client 32 via an API.

[0222] Online learning interface 36 can facilitate reinforcement learning of machine learning-based Model 1. Online learning interface 36 can facilitate reinforcement learning with human feedback (RLHF). Online learning interface 36 can facilitate federated learning of machine learning-based Model 1.

[0223] Model host 31 can execute machine learning-enabled model 1 to perform inference for various tasks using various types of data. For example, various inputs 2 and outputs 3 can be used for various different tasks. In some implementations, input 2 may be or otherwise represent image data. Machine learning-enabled model 1 can process image data to generate outputs. As an example, machine learning-enabled model 1 can process image data to generate image recognition outputs (e.g., image data recognition, latent embedding of image data, encoded representation of image data, hashing of image data, etc.). As another example, machine learning-enabled model 1 can process image data to generate image segmentation outputs. As another example, machine learning-enabled model 1 can process image data to generate image classification outputs. As another example, machine learning-enabled model 1 can process image data to generate image data modification outputs (e.g., image data alterations, etc.). As another example, machine learning-enabled model 1 can process image data to generate encoded image data outputs (e.g., encoded and / or compressed representations of image data, etc.). As another example, machine learning-enabled model 1 can process image data to generate upsampled image data outputs. As another example, Model 1, which is processed by machine learning, can process image data to generate predictive output.

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

[0225] In some implementations, input 2 may be or otherwise represent natural language data. The machine learning-enabled model 1 can process the natural language data to generate output. As an example, the machine learning-enabled model 1 can process natural language data to generate a language-encoded output. As another example, the machine learning-enabled model 1 can process natural language data to generate a latent text embedding output. As another example, the machine learning-enabled model 1 can process natural language data to generate a translation output. As another example, the machine learning-enabled model 1 can process natural language data to generate a classification output. As another example, the machine learning-enabled model 1 can process natural language data to generate a text segmentation output. As another example, the machine learning-enabled model 1 can process natural language data to generate a semantic intent output. As another example, the machine learning-enabled model 1 can process natural language data to generate an upsampled text or natural language output (e.g., text or natural language data of higher quality than the input text or natural language). As another example, the machine learning-enabled model 1 can process natural language data to generate a predicted output (e.g., one or more predicted subsequent portions of natural language content).

[0226] In some implementations, input 2 can be or otherwise represent speech data (e.g., data describing spoken natural language, such as audio data, text data, etc.). The machine learning model 1 can process the speech data to generate output. As an example, the machine learning model 1 can process speech data to generate speech recognition output. As another example, the machine learning model 1 can process speech data to generate speech translation output. As another example, the machine learning model 1 can process speech data to generate latent embedding output. As another example, the machine learning model 1 can process speech data to generate encoded speech output (e.g., encoded and / or compressed representations of speech data, etc.). As another example, the machine learning model 1 can process speech data to generate upsampled speech output (e.g., speech data of higher quality than the input speech data, etc.). As another example, the machine learning model 1 can process speech data to generate text representation output (e.g., a text representation of the input speech data, etc.). As another example, the machine learning model 1 can process speech data to generate predicted output.

[0227] In some implementations, input 2 can be or otherwise represent latent encoded data (e.g., a latent space representation of the input). The machine learning-processed model 1 can process the latent encoded data to generate an output. As an example, the machine learning-processed model 1 can process the latent encoded data to generate a recognition output. As another example, the machine learning-processed model 1 can process the latent encoded data to generate a reconstruction output. As another example, the machine learning-processed model 1 can process the latent encoded data to generate a search output. As another example, the machine learning-processed model 1 can process the latent encoded data to generate a re-clustering output. As yet another example, the machine learning-processed model 1 can process the latent encoded data to generate a prediction output.

[0228] In some implementations, input 2 may be or otherwise represent statistical data. Statistical data may be, represent, or otherwise include data calculated and / or processed from another data source. The machine learning model 1 can process the statistical data to generate output. As an example, the machine learning model 1 can process the statistical data to generate a recognition output. As another example, the machine learning model 1 can process the statistical data to generate a prediction output. As another example, the machine learning model 1 can process the statistical data to generate a classification output. As another example, the machine learning model 1 can process the statistical data to generate a segmentation output. As another example, the machine learning model 1 can process the statistical data to generate a visualization output. As another example, the machine learning model 1 can process the statistical data to generate a diagnostic output.

[0229] In some implementations, input 2 can be or otherwise represent sensor data. The machine learning-based model 1 can process the sensor data to generate output. As an example, the machine learning-based model 1 can process sensor data to generate a recognition output. As another example, the machine learning-based model 1 can process sensor data to generate a prediction output. As another example, the machine learning-based model 1 can process sensor data to generate a classification output. As another example, the machine learning-based model 1 can process sensor data to generate a segmentation output. As another example, the machine learning-based model 1 can process sensor data to generate a visualization output. As another example, the machine learning-based model 1 can process sensor data to generate a diagnostic output. As another example, the machine learning-based model 1 can process sensor data to generate a detection output.

[0230] In some implementations, the machine learning-based Model 1 can be configured to perform a task that includes encoding input data to achieve reliable and / or efficient transmission or storage (and / or corresponding decoding). For example, the task could be an audio compression task. The input could include audio data, and the output could include compressed audio data. In another example, the input includes visual data (e.g., one or more images or videos), the output includes compressed visual data, and the task is a visual data compression task. In another example, the task could include generating embeddings for input data (e.g., input audio or visual data). In some cases, the input includes audio data representing spoken utterances, and the task is a speech recognition task. The output could include text output mapped to spoken utterances. In some cases, the task includes encrypting or decrypting the input data. In some cases, the task includes microprocessor performance tasks such as branch prediction or memory address translation.

[0231] In some implementations, the task is a generative task, and the machine learning-based model 1 can be configured to output content generated from input 2. For example, input 2 can be, or otherwise represent, data of one or more modalities that encode the context used to generate additional content.

[0232] In some implementations, the task can be a text completion task. A machine learning-based model 1 can be configured to process input 2, representing text data, and generate output 3, which represents additional text data that completes the text sequence of input 2. For example, the machine learning-based model 1 can be configured to generate output 3 to complete a sentence, paragraph, or portion of text that follows the text portion represented by input 2.

[0233] In some implementations, the task can be an instruction-following task. A machine learning model 1 can be configured to process input 2 representing instructions for performing a function and generate output 3 that advances towards a goal satisfying the function of the instructions (e.g., at least one step of a multi-step process for performing the function). Output 3 can represent data of the same or different modality as input 2. For example, input 2 can represent text data (e.g., natural language instructions for a task to be performed), and machine learning model 1 can process input 2 to generate output 3 representing text data in response to the instructions (e.g., a natural language response, a programming language response, a machine language response, etc.). Input 2 can represent image data (e.g., image-based instructions for a task to be performed, optionally accompanied by text instructions), and machine learning model 1 can process input 2 to generate output 3 representing text data in response to the instructions (e.g., a natural language response, a programming language response, a machine language response, etc.). One or more outputs 3 can be generated iteratively or recursively to sequentially process and complete steps tending towards completing the requested functionality. For example, the initial output can be executed by an external system or processed by a machine learning model 1 to complete the initial steps of the function. Multiple steps can be executed, in which the final output is obtained in response to the initial instructions.

[0234] In some implementations, the task can be a question-answering task. A machine learning model 1 can be configured to process input 2 representing a question to be answered and generate output 3 that advances towards the goal of returning an answer to the question (e.g., at least one step in a multi-step process for performing the function). Output 3 can represent data of the same or different modality as input 2. For example, input 2 can represent text data (e.g., natural language instructions for a task to be performed), and machine learning model 1 can process input 2 to generate output 3 representing text data in response to the question (e.g., a natural language response, a programming language response, a machine language response, etc.). Input 2 can represent image data (e.g., image-based instructions for a task to be performed, optionally accompanied by text instructions), and machine learning model 1 can process input 2 to generate output 3 representing text data in response to the question (e.g., a natural language response, a programming language response, a machine language response, etc.). One or more outputs 3 can be generated iteratively or recursively to process and complete the steps toward answering the question sequentially. For example, the initial output can be executed by an external system or processed by a machine learning model 1 to complete the initial steps to obtain an answer to the question (e.g., querying a database, performing calculations, executing scripts, etc.). Multiple steps can be performed, in which the final output in response to the question is obtained.

[0235] In some implementations, the task can be an image generation task. A machine learning model 1 can be configured to process input 2, which represents context regarding a desired portion of the image content. Context can include text data, image data, audio data, etc. The machine learning model 1 can be configured to generate output 3, which represents image data depicting the image in context. For example, the machine learning model 1 can be configured to generate pixel data of an image. The values ​​of the channels associated with pixels in the pixel data can be selected based on context (e.g., based on probabilities determined according to the context).

[0236] In some implementations, the task can be an audio generation task. A machine learning model 1 can be configured to process input 2, which represents context regarding a desired portion of the audio content. Context can include text data, image data, audio data, etc. The machine learning model 1 can be configured to generate output 3, which represents context-dependent audio data. For example, the machine learning model 1 can be configured to generate waveform data in the form of an image (e.g., a spectrogram). The values ​​of channels associated with pixels in the image can be selected based on the context. The machine learning model 1 can also be configured to generate waveform data in the form of a sequence of discrete samples of a continuous waveform. The values ​​of the sequence can be selected based on the context (e.g., based on probabilities determined according to the context).

[0237] In some implementations, the task can be a data generation task. The machine learning-based model 1 can be configured to process input 2, which represents context regarding a desired portion of the data (e.g., data from various data domains, such as sensor data, image data, multimodal data, statistical data, etc.). For example, the desired data can be synthetic data used to train other machine learning models. The context can include any data type. The machine learning-based model 1 can be configured to generate output 3, which represents data aligned with the desired data. For example, the machine learning-based model 1 can be configured to generate data values ​​to populate a dataset. The values ​​of data objects can be selected based on context (e.g., based on probabilities determined according to the context).

[0238] Example computing systems and devices

[0239] Figure 15This is a block diagram of an example networked computing system capable of implementing aspects of the exemplary implementations of this disclosure. The system may include multiple computing devices and systems communicatively coupled via network 49. Example computing device 50 is described as an example of a computing device capable of implementing any aspect of this disclosure (e.g., implementing model host 31, client 32, or both). Example server computing system 60 is described as an example of a server computing system capable of implementing any aspect of this disclosure (e.g., implementing model host 31, client 32, or both). Computing device 50 and server computing system 60 may interact collaboratively (e.g., via network 49) to implement any aspect of this disclosure (e.g., implementing model host 31, client 32, or both). Model development platform system 70 is an example system that can host or provide a model development platform 12 for developing machine learning models. Third-party system 80 is an example system that any of the computing device 50, server computing system 60, or model development platform system 70 can interact with when performing various aspects of this disclosure (e.g., using third-party tools, accessing third-party databases or other resources, etc.).

[0240] Network 49 can be any type of communication network, such as a local area network (e.g., intranet), a wide area network (e.g., the Internet), or some combination thereof, and can include any number of wired or wireless links. Generally, communication via network 49 can be conducted 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) via any type of wired or wireless connection. Network 49 can also be implemented via a system bus. For example, Figure 15 One or more devices or systems may be co-located with, contained in, or otherwise integrated into one or more other devices or systems.

[0241] Computing device 50 can be any type of computing device, such as a personal computing device (e.g., a laptop or desktop computer), a mobile computing device (e.g., a smartphone or tablet), a game console or controller, a wearable computing device, an embedded computing device, a server computing device, a virtual machine running 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 provider offering services to an end user (who may use another computing device to interact with computing device 50).

[0242] Computing device 50 may include one or more processors 51 and memory 52. ​​Processor 51 may be any suitable processing device (e.g., processor core, microprocessor, ASIC, FPGA, controller, microcontroller, etc.) and may be a single processor or multiple processors operatively connected. Memory 52 may include one or more non-transitory computer-readable storage media, such as HBM, RAM, ROM, EEPROM, EPROM, flash memory devices, disks, etc., and combinations thereof. Memory 52 may store data 53 and instructions 54, which may be executed by processor 51 to operate computing device 50. These operations may implement any one or more of the features described herein. These operations may implement the exemplary methods and techniques described herein.

[0243] The computing device 50 may also include one or more input components for receiving user input. For example, the user input component may be a touch-sensitive component (e.g., a touch-sensitive display or touchpad) that is sensitive to the touch of a user input object (e.g., a finger or stylus). The touch-sensitive component can be used to implement a virtual keyboard. Other example user input components include a microphone, camera, LiDAR, physical keyboard or other buttons, or other means by which the user can provide input.

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

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

[0246] In some implementations, the server computing system 60 includes one or more server computing devices or is otherwise implemented by one or more server computing devices. Where the server computing system 60 includes multiple server computing devices, such server computing devices may operate according to a sequential computing architecture, a parallel computing architecture, or some combination thereof.

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

[0248] In the example configuration, the machine learning model 65 may be included in or otherwise stored and implemented by the server computing system 60 to establish a client-server relationship with the computing device 50 for providing model inference services. For example, the server computing system 60 may implement the model host 31 on behalf of client 32 on the computing device 50. For example, the machine learning model 65 may be implemented by the server computing system 60 as part of a network service (e.g., a remote machine learning model hosting service, such as an online interface for performing machine learning model operations on the server computing system 60 over a network). For example, the server computing system 60 may communicate with the computing device 50 via a local intranet or internet connection. For example, the computing device 50 may be a workstation or endpoint communicating with the server computing system 60, where the implementation of the machine learning model 65 is managed by the server computing system 60 to remotely perform inference (e.g., for runtime or training operations), and where output is returned (e.g., delivered, streamed, etc.) to the computing device 50. The machine learning model 65 can work collaboratively or interoperably with the machine learning model 55 on the computing device 50 to perform various tasks.

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

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

[0251] Figure 15 An example arrangement of a computing system that can be used to implement the computing system disclosed herein is shown. Other computing system configurations may also be used. For example, in some implementations, one or both of computing system 50 or server computing system 60 may implement all or part of the operation of model development platform system 70. For example, computing system 50 or server computing system 60 may implement developer tool 75 (or extensions thereof) to develop, update / train, or improve machine learning models 1, 4, 16, 20, 55, 65, etc., using one or more techniques described herein with respect to model alignment toolkit 17. In this way, for example, computing system 50 or server computing system 60 may develop, update / train, or improve machine learning models based on local datasets (e.g., for model personalization / customization, as permitted by user data preference selection).

[0252] Figure 16 This is a block diagram of an example computing device 98 operating according to an example embodiment of the present disclosure. The computing device 98 may be a user computing device or a server computing device (e.g., computing device 50, server computing system 60, etc.). The computing device 98 may implement model host 31. For example, the computing device 98 may include multiple applications (e.g., applications 1 to N). Each application may contain its own machine learning library and machine learning-enabled models. For example, each application may include machine learning-enabled models. Example applications include text messaging applications, email applications, dictation applications, virtual keyboard applications, browser applications, etc. Figure 16As shown, each application can communicate with multiple 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 can communicate with each device component using an API (e.g., a public API). In some implementations, the API used by each application is application-specific.

[0253] Figure 17 This is a block diagram of an example computing device 99 operating according to an example embodiment of the present disclosure. Computing device 99 may be the same as or different from computing device 98. Computing device 99 may be a user computing device or a server computing device (e.g., computing device 50, server computing system 60, etc.). Computing device 98 may implement model host 31. For example, computing device 99 may include multiple applications (e.g., applications 1 to N). Each application may communicate with a central intelligence layer. Example applications include text messaging applications, email applications, dictation applications, virtual keyboard applications, browser applications, etc. In some implementations, each application may use an API (e.g., a common API across all applications) to communicate with the central intelligence layer (and the model stored therein).

[0254] The central intelligence layer can include multiple machine learning-engineered models. For example, such as... Figure 17 As shown, a corresponding machine learning model can be provided for each application, and this corresponding machine learning model is managed by a central intelligence layer. In other implementations, two or more applications can share a single machine learning model. For example, in some implementations, the central intelligence layer can provide a single model for all applications. In some implementations, the central intelligence layer is included within or otherwise implemented by the operating system of the computing device 99.

[0255] The central intelligence layer can communicate with the central device data layer. The central device data layer can be a centralized data repository for computing device 99. For example... Figure 17 As shown, the central device data layer can communicate with multiple other components of the computing device (e.g., one or more sensors, context managers, device state components, 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).

[0256] Additional Publication

[0257] This paper discusses technologies related to servers, databases, software applications, and other computer-based systems, as well as the actions taken by such systems and the information sent to and from them. The inherent flexibility of computer-based systems allows for a wide variety of possible configurations, combinations, and partitions of tasks and functionality between and within components. For example, the 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.

[0258] While the subject matter has been described in detail with respect to various specific example embodiments, each example is provided for the purpose of explaining this disclosure and is not intended to limit it. Those skilled in the art, upon gaining an understanding of the foregoing, will readily generate changes, variations, and equivalents to such embodiments. Therefore, this disclosure does not exclude the inclusion of such modifications, variations, or additions to the subject matter that will be obvious to those skilled in the art. For example, features shown or described as part of one embodiment may be used with another embodiment to produce yet another embodiment. Therefore, this disclosure is intended to cover such changes, variations, and equivalents.

[0259] Various aspects of this disclosure have been described with reference to their illustrative embodiments. Any and all features of the following claims may be combined or rearranged in any possible manner, including combinations of claims not expressly listed as combinations, as the exemplary claim dependencies listed herein should not be construed as limiting the possible combinations of features disclosed herein. Therefore, the description of the scope of this disclosure is exemplary and not restrictive, and this disclosure does not exclude the inclusion of such modifications, variations, or additions to the subject matter that would be obvious to those skilled in the art. Furthermore, terms are described herein using a list of example elements connected by conjunctions such as “and,” “or,” “however,” etc. It should be understood that such conjunctions are provided for illustrative purposes only. For example, a clause and other sequence of items connected by a specific conjunction such as “or” may refer to “and / or,” “at least one of,” “any combination,” etc., of the example elements listed therein. Terms such as “based on” should be understood as “at least partially based on.”

[0260] The term "may" should be understood as referring to the possibility of a feature in various implementations, rather than specifying a capability that must exist in every implementation. For example, the phrase "X may execute Y" should be understood as indicating that in various implementations, X may be configured to execute Y, rather than indicating that X must always be able to execute Y in every instance. It should be understood that in various implementations, X may not be able to execute Y and is still within the scope of this disclosure.

[0261] The term "may" should be understood as referring to the possibility of a feature in various implementations, rather than specifying a capability that must exist in every implementation. For example, the phrase "X may execute Y" should be understood as indicating that in various implementations, X may be configured to execute Y, rather than indicating that X must always be able to execute Y in every instance. It should be understood that in various implementations, X may not be able to execute Y and is still within the scope of this disclosure.

Claims

1. A computer-implemented method for performing self-training of a sequence processing model to utilize external knowledge sources, the method comprising: Multiple self-training iterations are performed by a computing system comprising one or more computing devices, each self-training iteration comprising: The computing system obtains a set of example tuples including example queries and example responses, wherein the example response includes an example analysis chain that yields an example answer to the example query, and wherein the example analysis chain depends on or references one or more example content items obtained from one or more external knowledge sources. The computing system generates training prompts, which include the example tuples, training queries, and one or more training content items obtained from the one or more external knowledge sources. The computing system processes the training prompts using a sequence processing model to generate candidate responses as the output of the sequence processing model, wherein the candidate responses include an analysis chain generated by the model that yields candidate answers to the training query; The computational system determines whether the candidate response corresponds to the truth answer of the training query; and In response to determining that the candidate response corresponds to the true answer, the sequence processing model is fine-tuned based on the candidate response.

2. The computer-implemented method of claim 1, wherein, The analysis chain generated by the model depends on or references one or more training content items.

3. The computer-implemented method of any preceding claim, wherein, The training prompts generated by the computing system include: The computing system processes at least the training query using the sequence processing model or different models to generate an information retrieval query; and The computing system retrieves one or more training content items from the data repository based on the information retrieval query.

4. The computer-implemented method of any preceding claim, wherein, The one or more external knowledge sources include search engines and the Internet, and the one or more training content items include web documents retrieved from the Internet using the search engine.

5. The computer-implemented method according to any of the preceding claims, wherein, The one or more external knowledge sources include databases of medical knowledge or medical records, and wherein the one or more training content items include medical articles or medical records retrieved from the databases of medical knowledge or medical records.

6. The computer-implemented method according to any of the preceding claims, wherein, The training query includes medical questions, and the truth answer includes the medical answer to the medical question.

7. The computer-implemented method according to any of the preceding claims, further comprising: In response to determining that the candidate response corresponds to the true answer, the training query and the candidate response are added to the example set from which the example tuple is obtained.

8. The computer-implemented method according to any of the preceding claims, further comprising: In response to determining that the candidate response does not correspond to the truth answer, the candidate response is discarded.

9. The computer-implemented method according to any of the preceding claims, wherein, The example response of the example tuple includes content that is manually generated or edited.

10. The computer-implemented method according to any of the preceding claims, wherein, Each self-training iteration further includes: The computing system obtains a second paradigm tuple comprising a second paradigm query and a second paradigm response, wherein the second paradigm response comprises a second paradigm analysis chain that derives a second paradigm answer to the paradigm query without referring to any content items obtained from one or more external knowledge sources; The computing system generates a second training hint that includes the second example tuple and the second training query; The computing system processes the second training prompt using a sequence processing model to generate a second candidate response as the output of the sequence processing model, wherein the candidate response includes a second analysis chain generated by the model, which derives a second candidate answer to the second training query without referring to any content items obtained from one or more external knowledge sources; The computing system determines whether the second candidate response corresponds to the second truth answer of the second training query; and In response to determining that the second candidate response corresponds to the second true answer, the sequence processing model is fine-tuned based on the second candidate response.

11. A computing system, comprising: One or more processors; as well as One or more non-transitory computer-readable media, the one or more non-transitory computer-readable media collectively storing instructions that, when executed by the one or more processors, cause the computing system to operate, the operations including: The computing system obtains a set of example tuples including example queries and example responses, wherein the example response includes an example analysis chain that yields an example answer to the example query, and wherein the example analysis chain depends on or references one or more example content items obtained from one or more external knowledge sources. The computing system generates training prompts, which include the example tuples, training queries, and one or more training content items obtained from the one or more external knowledge sources. The computing system processes the training prompts using a sequence processing model to generate candidate responses as the output of the sequence processing model, wherein the candidate responses include an analysis chain generated by the model that yields candidate answers to the training query; The computational system determines whether the candidate response corresponds to the truth answer of the training query; and In response to determining that the candidate response corresponds to the true answer, the sequence processing model is fine-tuned based on the candidate response.

12. The computing system according to claim 11, wherein, The analysis chain generated by the model depends on or references one or more training content items.

13. The computing system according to claim 11 or 12, wherein, The training prompts generated by the computing system include: The computing system processes at least the training query using the sequence processing model or different models to generate an information retrieval query; and The computing system retrieves one or more training content items from the data repository based on the information retrieval query.

14. The computing system according to claim 11, 12 or 13, wherein, The one or more external knowledge sources include search engines and the Internet, and the one or more training content items include web documents retrieved from the Internet using the search engine.

15. The computing system according to any one of claims 11 to 14, wherein, The one or more external knowledge sources include databases of medical knowledge or medical records, and wherein the one or more training content items include medical articles or medical records retrieved from the databases of medical knowledge or medical records.

16. The computing system according to any one of claims 11 to 15, wherein, The training query includes medical questions, and the truth answer includes the medical answer to the medical question.

17. The computing system according to any one of claims 11 to 16, further comprising: In response to determining that the candidate response corresponds to the true answer, the training query and the candidate response are added to the example set from which the example tuple is obtained.

18. The computing system according to any one of claims 11 to 17, further comprising: In response to determining that the candidate response does not correspond to the truth answer, the candidate response is discarded.

19. The computing system according to any one of claims 11 to 18, wherein, The example response of the example tuple includes content that is manually generated or edited.

20. One or more non-transitory computer-readable media, said one or more non-transitory computer-readable media collectively storing a sequence processing model trained by performing a plurality of self-training iterations, each self-training iteration comprising: A computing system obtains a set of example tuples including example queries and example responses, wherein the example response includes an example analysis chain that yields an example answer to the example query, and wherein the example analysis chain depends on or references one or more example content items obtained from one or more external knowledge sources. The computing system generates training prompts, which include the example tuples, training queries, and one or more training content items obtained from the one or more external knowledge sources. The computing system processes the training prompts using the sequence processing model to generate candidate responses as the output of the sequence processing model, wherein the candidate responses include an analysis chain generated by the model that yields candidate answers to the training query; The computational system determines whether the candidate response corresponds to the truth answer of the training query; and In response to determining that the candidate response corresponds to the true answer, the sequence processing model is fine-tuned based on the candidate response.

21. A computer-implemented method for performing uncertainty-guided external knowledge source usage for response generation, the method comprising: The input query is obtained by a computing system comprising one or more computing devices; The computing system processes the input query using a sequence processing model to generate multiple different responses to the input query, which serve as the corresponding outputs of the sequence processing model. The computing system determines whether the plurality of different responses satisfy a consensus metric. as well as In response to determining that the plurality of different responses do not satisfy the consensus metric: The computing system retrieves one or more additional content items from one or more external knowledge sources; as well as The computing system processes the input query and the one or more additional content items using the sequence processing model to generate at least one additional response to the input query as an additional output of the sequence processing model.

22. The computer-implemented method according to claim 21, wherein: The computational system uses the sequence processing model to process the input query and the one or more additional content items to generate the at least one additional response, which includes the computational system using the sequence processing model to process the input query and the one or more additional content items to generate multiple additional responses. and The method further includes: The computing system determines whether the plurality of additional responses satisfy the consensus metric; as well as In response to determining that the plurality of additional responses satisfy the consensus metric: provide at least a portion of at least one of the plurality of additional responses as output.

23. The computer-implemented method according to claim 22, wherein, Providing at least a portion of at least one of the plurality of additional responses as the output includes providing a consensus answer from the plurality of additional responses as the output.

24. The computer-implemented method according to any one of claims 21 to 23, wherein, In response to determining that the plurality of different responses do not satisfy the consensus metric, the computing system retrieves the one or more additional content items from the one or more external knowledge sources, including: The computing system identifies two or more conflicting responses among the plurality of different responses; The computing system generates an information retrieval query that returns content items related to the conflict; and The computing system uses the information retrieval query to query one or more external knowledge sources to obtain the content items.

25. The computer-implemented method according to any claim 24, wherein, The information retrieval query generated by the computing system that returns content items related to the conflict includes prompting the sequence processing model or different models by using two or more responses that exhibit the conflict among the plurality of different responses and the instructions for generating the information retrieval query.

26. The computer-implemented method according to any one of claims 21 to 25, wherein, The one or more external knowledge sources include search engines and the Internet, and the one or more content items include web documents retrieved from the Internet using the search engine.

27. The computer-implemented method according to any one of claims 21 to 26, wherein, The one or more external knowledge sources include databases of medical knowledge or medical records, and wherein the one or more content items include medical articles or medical records retrieved from the databases of medical knowledge or medical records.

28. The computer-implemented method according to any one of claims 21 to 27, wherein, The input query includes a medical question, and each of the plurality of different responses and the at least one additional response includes a corresponding medical answer to the medical question.

29. The computer-implemented method according to any one of claims 21 to 28, wherein, Each of the plurality of different responses and the at least one additional response includes a corresponding analytic chain leading from the input query to the corresponding answer.

30. The computer-implemented method according to any one of claims 21 to 29, wherein, Determining whether the plurality of different responses satisfy the consensus metric by the computing system includes: The computational system determines the entropy of the distribution of the corresponding answer among the multiple different responses; and The calculation system compares the entropy of the distribution with a threshold.

31. The computer-implemented method according to any one of claims 21 to 29, wherein, Determining whether the plurality of different responses satisfy the consensus metric by the computing system includes using the plurality of different responses and analyzing whether the plurality of different responses exhibit a consensus request to prompt the sequence processing model or different models.

32. A computer system for generating a response using an external knowledge source guided by uncertainty, the computer system comprising one or more processors and one or more non-transitory computer-readable media storing instructions executable by the processor to perform operations including: The input query is obtained by the computing system; The computing system processes the input query using a sequence processing model to generate multiple different responses to the input query, which serve as the corresponding outputs of the sequence processing model. The computing system determines whether the plurality of different responses satisfy a consensus metric. as well as In response to determining that the plurality of different responses do not satisfy the consensus metric: The computing system retrieves one or more additional content items from one or more external knowledge sources; as well as The computing system processes the input query and the one or more additional content items using the sequence processing model to generate at least one additional response to the input query as an additional output of the sequence processing model.

33. The computer system according to claim 32, wherein: The computational system uses the sequence processing model to process the input query and the one or more additional content items to generate the at least one additional response, which includes the computational system using the sequence processing model to process the input query and the one or more additional content items to generate multiple additional responses. and The operation further includes: The computing system determines whether the plurality of additional responses satisfy the consensus metric; as well as In response to determining that the plurality of additional responses satisfy the consensus metric: provide at least a portion of at least one of the plurality of additional responses as output.

34. The computer system according to claim 33, wherein, Providing at least a portion of at least one of the plurality of additional responses as the output includes providing a consensus answer from the plurality of additional responses as the output.

35. The computer system according to any one of claims 32 to 34, wherein, In response to determining that the plurality of different responses do not satisfy the consensus metric, the computing system retrieves the one or more additional content items from the one or more external knowledge sources, including: The computing system identifies two or more conflicting responses among the plurality of different responses; The computing system generates an information retrieval query that returns content items related to the conflict; and The computing system uses the information retrieval query to query one or more external knowledge sources to obtain the content items.

36. The computer system according to claim 35, wherein, The information retrieval query generated by the computing system that returns content items related to the conflict includes prompting the sequence processing model or different models by using two or more responses that exhibit the conflict among the plurality of different responses and the instructions for generating the information retrieval query.

37. The computer system according to any one of claims 32 to 36, wherein, The one or more external knowledge sources include search engines and the Internet, and the one or more content items include web documents retrieved from the Internet using the search engine.

38. The computer system according to any one of claims 32 to 37, wherein, Determining whether the plurality of different responses satisfy the consensus metric by the computing system includes: The computational system determines the entropy of the distribution of the corresponding answer among the multiple different responses; and The calculation system compares the entropy of the distribution with a threshold.

39. The computer system according to any one of claims 32 to 37, wherein, Determining whether the plurality of different responses satisfy the consensus metric by the computing system includes using the plurality of different responses and analyzing whether the plurality of different responses exhibit a consensus request to prompt the sequence processing model or different models.

40. One or more non-transitory computer-readable media, said one or more non-transitory computer-readable media collectively storing computer-executable instructions for performing operations, said operations including: Input queries are obtained from the computing system; The computing system processes the input query using a sequence processing model to generate multiple different responses to the input query, which serve as the corresponding outputs of the sequence processing model. The computing system determines whether the plurality of different responses satisfy a consensus metric. as well as In response to determining that the plurality of different responses do not satisfy the consensus metric: The computing system retrieves one or more additional content items from one or more external knowledge sources; as well as The computing system processes the input query and the one or more additional content items using the sequence processing model to generate at least one additional response to the input query as an additional output of the sequence processing model.

41. A computer-implemented method for facilitating the processing of large medical context inputs with improved accuracy, the method comprising: The input medical query and medical context data set are obtained by a computing system comprising one or more computing devices; The computing system executes a multi-stage prompting chain method to process the input medical query and the medical context data set using a sequence processing model, and generates an output response as the output of the sequence processing model. as well as The computing system provides the output response in response to the input medical query; The execution of the multi-stage cue chain method by the computing system includes iteratively cuing the sequence processing model using at least a partially predefined set of cues; and The series of prompts triggers the sequence processing model to perform an analysis chain on the input query and the medical context data set to generate the output response.

42. The computer-implemented method according to claim 41, wherein: The series of prompts includes: At least a first prompt, the first prompt instructing the sequence processing model to perform information retrieval from the medical context dataset to generate a smaller retrieval dataset; and At least a second prompt, which instructs the sequence processing model to perform medical analysis on the smaller retrieval dataset; and The second prompt is located after the first prompt in the series of prompts.

43. The computer-implemented method according to claim 42, wherein: The input medical query pertains to a specific disease, condition, or procedure; and The first prompt instructs the sequence processing model to retrieve all references to the specific disease, condition, or procedure within the medical context data set.

44. The computer-implemented method according to claim 43, wherein, The first prompt instructs the sequence processing model to provide direct citations from the medical context data set.

45. The computer-implemented method according to any one of claims 41 to 44, wherein, The medical context data set includes data associated with at least two different data modalities.

46. ​​The computer-implemented method according to any one of claims 41 to 45, wherein, The medical context data set includes both image data and text data.

47. The computer-implemented method according to any one of claims 41 to 46, wherein, The medical context data set includes multiple electronic health records.

48. The computer-implemented method according to any one of claims 41 to 47, wherein, The input medical query includes a diagnostic query, and the output response includes an output diagnosis.

49. A computing system for processing large medical context inputs with improved accuracy, the computer system comprising one or more processors and one or more non-transitory computer-readable media storing instructions that, when executed by the one or more processors, cause the computing system to operate, the operation including: The computing system obtains the input medical query and medical context data set; The computing system executes a multi-stage prompting chain method to process the input medical query and the medical context data set using a sequence processing model, and generates an output response as the output of the sequence processing model. as well as The computing system provides the output response in response to the input medical query; The execution of the multi-stage cue chain method by the computing system includes iteratively cuing the sequence processing model using at least a partially predefined set of cues; and The series of prompts triggers the sequence processing model to perform an analysis chain on the input query and the medical context data set to generate the output response.

50. The computing system according to claim 49, wherein: The series of prompts includes: At least a first prompt, the first prompt instructing the sequence processing model to perform information retrieval from the medical context dataset to generate a smaller retrieval dataset; and At least a second prompt, which instructs the sequence processing model to perform medical analysis on the smaller retrieval dataset; and The second prompt is located after the first prompt in the series of prompts.

51. The computing system according to claim 50, wherein: The input medical query pertains to a specific disease, condition, or procedure; and The first prompt instructs the sequence processing model to retrieve all references to the specific disease, condition, or procedure within the medical context data set.

52. The computing system according to claim 51, wherein, The first prompt instructs the sequence processing model to provide direct citations from the medical context data set.

53. The computing system according to any one of claims 49 to 52, wherein, The medical context data set includes data associated with at least two different data modalities.

54. The computing system according to any one of claims 49 to 53, wherein, The medical context data set includes both image data and text data.

55. The computing system according to any one of claims 49 to 54, wherein, The medical context data set includes multiple electronic health records.

56. The computing system according to any one of claims 49 to 55, wherein, The input medical query includes a diagnostic query, and the output response includes an output diagnosis.

57. One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors of a computing system, cause the computing system to operate, the operation including: The computing system obtains the input medical query and medical context data set; The computing system executes a multi-stage prompting chain method to process the input medical query and the medical context data set using a sequence processing model, and generates an output response as the output of the sequence processing model. as well as The computing system provides the output response in response to the input medical query; The execution of the multi-stage cue chain method by the computing system includes iteratively cuing the sequence processing model using at least a partially predefined set of cues; and The series of prompts triggers the sequence processing model to perform an analysis chain on the input query and the medical context data set to generate the output response.

58. One or more non-transitory computer-readable media according to claim 57, wherein: The series of prompts includes: At least a first prompt, the first prompt instructing the sequence processing model to perform information retrieval from the medical context dataset to generate a smaller retrieval dataset; and At least a second prompt, which instructs the sequence processing model to perform medical analysis on the smaller retrieval dataset; and The second prompt is located after the first prompt in the series of prompts.

59. One or more non-transitory computer-readable media according to claim 58, wherein: The input medical query pertains to a specific disease, condition, or procedure; and The first prompt instructs the sequence processing model to retrieve all references to the specific disease, condition, or procedure within the medical context data set.

60. One or more non-transitory computer-readable media according to claim 59, wherein, The first prompt instructs the sequence processing model to provide direct citations from the medical context data set.

61. A computer-implemented method for facilitating the processing of large medical context inputs with improved accuracy, the method comprising: An input medical query and a multimodal medical context data set are obtained by a computing system including one or more computing devices, wherein the multimodal medical context data set includes data associated with at least two different data modalities; The computing system uses a sequence processing model to process the input medical query and the multimodal medical context data set to generate one or more responses to the medical query as the output of the sequence processing model; The sequence processing model includes a decoder Transformer model, which includes multiple Transformer blocks. At least one of the multiple Transformer blocks includes a sparse feedforward network layer, which includes a hybrid expert network.

62. The computer-implemented method according to claim 61, wherein, The medical query input pertains to a specific disease, condition, or procedure.

63. The computer-implemented method according to any one of claims 61 to 62, wherein, The multimodal medical context data set includes both image data and text data.

64. The computer-implemented method according to any one of claims 61 to 63, wherein, The multimodal medical context data set includes radiological imaging data.

65. The computer-implemented method according to any one of claims 61 to 64, wherein, The multimodal medical context data set includes genomic data.

66. The computer-implemented method according to any one of claims 61 to 65, wherein, The multimodal medical context data set includes chemical or molecular data.

67. The computer-implemented method according to any one of claims 61 to 66, wherein, The multimodal medical context data set includes multiple electronic health records.

68. The computer-implemented method according to any one of claims 61 to 67, wherein, The input medical query includes a diagnostic query, and the output response includes an output diagnosis.

69. A computing system for processing large medical context inputs with improved accuracy, the computer system comprising one or more processors and one or more non-transitory computer-readable media storing instructions that, when executed by the one or more processors, cause the computing system to operate, the operation including: The computing system obtains an input medical query and a multimodal medical context data set, wherein the multimodal medical context data set includes data associated with at least two different data modalities; The computing system uses a sequence processing model to process the input medical query and the multimodal medical context data set to generate one or more responses to the medical query as the output of the sequence processing model; The sequence processing model includes a decoder Transformer model, which includes multiple Transformer blocks. At least one of the multiple Transformer blocks includes a sparse feedforward network layer, which includes a hybrid expert network.

70. The computing system according to claim 69, wherein, The medical query input pertains to a specific disease, condition, or procedure.

71. The computing system according to any one of claims 69 to 70, wherein, The multimodal medical context data set includes both image data and text data.

72. The computing system according to any one of claims 69 to 71, wherein, The multimodal medical context data set includes radiological imaging data.

73. The computing system according to any one of claims 69 to 72, wherein, The multimodal medical context data set includes genomic data.

74. The computing system according to any one of claims 69 to 73, wherein, The multimodal medical context data set includes chemical or molecular data.

75. The computing system according to any one of claims 69 to 74, wherein, The multimodal medical context data set includes multiple electronic health records.

76. The computing system according to any one of claims 69 to 75, wherein, The input medical query includes a diagnostic query, and the output response includes an output diagnosis.

77. One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors of a computing system, cause the computing system to operate, the operation including: The computing system obtains an input medical query and a multimodal medical context data set, wherein the multimodal medical context data set includes data associated with at least two different data modalities; The computing system uses a sequence processing model to process the input medical query and the multimodal medical context data set to generate one or more responses to the medical query as the output of the sequence processing model; The sequence processing model includes a decoder Transformer model, which includes multiple Transformer blocks. At least one of the multiple Transformer blocks includes a sparse feedforward network layer, which includes a hybrid expert network.

78. One or more non-transitory computer-readable media according to claim 77, wherein, The medical query input pertains to a specific disease, condition, or procedure.

79. One or more non-transitory computer-readable media according to claim 77 or 78, wherein, The multimodal medical context data set includes both image data and text data.

80. One or more non-transitory computer-readable media according to claim 77, 78 or 79, wherein, The multimodal medical context data set includes radiological imaging data.