Applying classifiers to messages between users and machine learning models

The system addresses the challenge of enhancing user interactions with machine learning models by applying classifiers to messages, ensuring safe and appropriate content, and enabling diverse multimodal tasks, thereby improving interaction quality and reliability.

WO2024194418A1PCT designated stage expired Publication Date: 2024-09-26GDM HOLDING LLC
View PDF 0 Cites 10 Cited by

Patent Information

Application Number
PCT/EP2024/057626
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-21
Filing Date
2024-03-21
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

Current systems lack effective methods to enhance the quality and reliability of user interactions with machine learning models by accurately classifying and processing messages between users and machine learning agents, particularly in multimodal environments where safety, privacy, and appropriateness are concerns.

Method used

A system that applies a set of classifiers to messages received from users or generated by machine learning agents, determining actions based on classification outputs to modify or filter responses, ensuring safe and appropriate content presentation, while maintaining session context and using multimodal machine learning models for diverse tasks.

Benefits of technology

Improves the quality and reliability of user interactions by effectively filtering out unsafe or inappropriate content, maintaining session context, and enabling diverse multimodal tasks, thereby enhancing user experience and model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2024057626_26092024_PF_FP
    Figure EP2024057626_26092024_PF_FP
Patent Text Reader

Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for applying classifiers to messages between a user and a machine learning model.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] APPLYING CLASSIFIERS TO MESSAGES BETWEEN USERS AND MACHINE

[0002] LEARNING MODELS

[0003] CROSS-REFERENCE TO RELATED APPLICATIONS

[0004] This application claims priority to U.S. Provisional Application No. 63 / 453,734, filed on March 21, 2023. The disclosure of the prior application is considered part of and is incorporated by reference in the disclosure of this application.

[0005] BACKGROUND

[0006] This specification relates to processing inputs using neural networks.

[0007] Neural networks are machine learning models that employ one or more layers of nonlinear units to predict an output for a received input. Some neural networks include one or more hidden layers in addition to an output layer. The output of each hidden layer is used as input to the next layer in the network, i.e., another hidden layer or the output layer. Each layer of the network generates an output from a received input in accordance with current values of a respective set of parameters.

[0008] SUMMARY

[0009] This specification describes a system implemented as computer programs on one or more computers in one or more locations that interfaces between a user and a machine learning model. That is, the system provides user inputs for processing by the machine learning model and provides outputs generated by the machine learning model for presentation to the user.

[0010] As part of interfacing between the user and the machine learning model, the system uses a set of one or more classifiers to improve the quality and reliability of the user experience.

[0011] In one aspect, a system receives a message. The message can be a user input to a machine learning model or a response from a machine learning agent that has been generated by the agent using the machine learning model.

[0012] The system applies a set of one or more classifiers to the message and obtains, from one or more of the classifiers in the set, a respective classification output for the message.

[0013] The system determines, using the respective classification output(s), an action to take on the message. The system then processes the message in accordance with the determined action. Optionally, if the message is a response from the machine learning agent and the action indicates that the message should be provided for presentation to a user, the system can also provide information derived from the classification output(s) for presentation along with the response.

[0014] In some examples, the machine learning model may comprise a multimodal machine learning model, for example a visual language model (VLM). In general a multimodal machine learning model can be trained to perform any sort of machine learning task or tasks. After the multimodal machine learning model has been trained it can be deployed for use in performing the machine learning task(s). For instance, the machine learning model can be deployed in an environment that enables users to provide requests (e.g. user input) for the machine learning model to process specified multimodal inputs to generate corresponding model outputs (e.g. a response from the machine learning agent). Users can provide the requests, e.g., by way of a user interface or through an application programming interface (API). The requests can be transmitted from a user device (e.g., over a data communication network, e.g., the internet) to one or more computers implementing the machine learning model, e.g., in a data center. The machine learning model can process multimodal inputs specified by user requests to generate corresponding model outputs, and then transmit the model outputs to user devices (e.g., over a data communication network).

[0015] In general a multimodal machine learning model has a multimodal input configured to receive a first multimodal input of a first modality and a second multimodal input of a second, different modality. As used herein a “modality” refers to a type of data, and thus a multimodal machine learning model is one that can process multiple different types of data. The first multimodal input may comprise, e.g. a text input to receive a sequence of text or audio data representing values of an audio waveform, e.g. instantaneous amplitude data or time-frequency domain data; or non-image sensor data representing an environment with which an agent controlled by the multimodal machine learning model interacts. The second multimodal input may receive an image or video. The multimodal machine learning model may be configured to jointly process encoded versions of the first and second multimodal inputs.

[0016] In some implementations, after training, a particular task that is to be performed by the multimodal machine learning model can be described by part or all of the sequence of text in the multimodal input to the model. For example in a multimodal input that includes an image, video, or audio item such a prompt might specify “Generate a caption”, “Generate a description”, “Answer the following question: [about the image, video, or audio item]”, or “Detect a person”. An audio item may also be referred to as audio data or an audio data item. Where the model is used for an agent control task a prompt may define “Take the knife out of the drawer”, or “Q: What action should the robot take to take the knife out of the drawer?”. Also or instead such a prompt may give one or more examples of a task to be performed. A multimodal machine learning model can be trained on multiple natural and / or computer languages and the prompt may then specify a language to use.

[0017] A few examples of some machine learning tasks that can be performed by a model trained as described herein follow.

[0018] For some tasks the second modality input represents an image or video as previously described, e.g. from a camera or other imaging device that captures the image or video from a real-world environment, and / or audio, e.g. audio data such as speech or other sounds captured from a real-world environment. In general the tasks described below may be tasks that require spatial awareness or other context from the image, video, or audio item. For example, a prompt may ask “What is the object in the top left corner?”, or “What was the answer to the spoken question?”.

[0019] As one example the task may comprise an object or action detection task. A taskspecific training data item may comprise an image, video, or audio item containing one or more objects or actions, and a sequence of text. The sequence of text may describe or otherwise label the object(s) or action(s) and (for an image or video) may include text giving bounding box coordinates for the object(s) or action(s). After training, when the model is used in inference, the model output 122 may comprise or represent text that describes or otherwise labels detected object(s) or action(s) in the second modality input, and may (for an image or video) include bounding-box coordinates for the detected object(s) or action(s), e.g. "10 20 90 100 cat 20 30 100 100 dog”.

[0020] As another example the task may comprise a classification task, e.g. an object or action classification task. A task-specific training data item may comprise an image, video, or audio item containing one or more objects or actions and a sequence of text. The sequence of text may describe or otherwise classify the object(s) or action(s). After training, when the model is used in inference, the model output may comprise data, e.g. text, that classifies the object(s) or action(s) in the second modality input into one of a plurality of classes.

[0021] As another example the task may comprise an image, video, or audio item describing task, e.g. a captioning task (which, as used here, includes an audio description task to explain what is happening in a video). A task-specific training data item may comprise an image, video, or audio item and a sequence of text describing the image, video, or audio item. After training, when the model is used in inference, the model output may comprise data, e.g. text, describing an image, video, or audio item in the second modality input. For example the model output may provide a caption or description for a second modality input item, or it may count objects in the second modality input item, or it may provide some other form of description of the second modality input item.

[0022] As another example the task may comprise an image, video, or audio questionanswering task. A task-specific training data item may comprise an image, video, or audio item and a sequence of text that describes the image, video, or audio item. After training, when the model is used in inference, the model output may comprise data, e.g. text, that answers a question about the second modality input specified in a prompt sequence of text, e.g. as described above. This may be used, e.g., to answer questions about visual plots and charts or about sounds.

[0023] As another example the task may comprise a character or word recognition task, e.g. an OCR (optical character recognition) task. A task-specific training data item may comprise an image, video, or audio item and a sequence of text that includes text that is depicted in the image or video, or that is represented as speech in the audio item. After training, when the model is used in inference, the model output may comprise text that represents characters or words in the second modality input, e.g. in a natural language.

[0024] As another example the task may comprise a still or moving image or audio generation task. A task-specific training data item may comprise an image, video, or audio item and a sequence of text that describes the image, video, or audio item. After training, when the model is used in inference, the model output may comprise data for an image, video, or audio item, e.g. image data defining values for pixels of a still or moving image or audio data representing values of an audio waveform, and the sequence of text in the multimodal input to the model may describe or characterize the image, video, or audio item to be generated.

[0025] As another example the task may comprise a computer language text generation task. A task-specific training data item may comprise an image, video, or audio item and a sequence of text in a computer language for generating the image, video, or audio item. After training, when the model is used in inference, the model output may comprise text in the or another computer language for generating or rendering an image, video, or audio item in the second modality input, e.g. a web page, plot, or chart. In another example of a computer language text generation task a task-specific training data item may comprise an image, video, or audio item and a sequence of text in a computer language for performing a task in relation to the image, video, or audio item, e.g. a data processing task that involves analyzing the content of the image, video, or audio item to provide a result of the analysis or, e.g., a search to search for information relating to the content of the image, video, or audio item. The computer language in the model output may comprise computer language for invoking a function or calling one or more external APIs. Merely as one example, such an output may be formatted as a JSON object. As previously, the sequence of text in the multimodal input may define the task to be performed and the second modality input may comprise, e.g. an image, video, or audio item in relation to which the task is to be performed, e.g. a task that involves manipulation of particular types of data that may benefit from access to an API such as mathematical data, date / time related data, scientific data, recent data that may post-date training of the model (that may be accessed by a search function or API), and so forth. After training, when the model is used in inference, the model output may comprise text in the or another computer language for performing a task, e.g. as described above, in relation to an image, video, or audio item in the second modality input. The method may then include using the text in the computer language to perform the task.

[0026] In general where the model output comprises text this may be provided as speech representing the text, for example as an audio utterance.

[0027] Where any of the data items comprise images, the images may contain representations of one or more objects. The set of one or more classifiers may correspond to classes of objects. As such, in the methods described herein, when the message comprises an image (i.e. an image of one or more objects), the respective classification output for the message may comprise a class associated with one or more of the one or more objects represented in the image.

[0028] Correspondingly, if the message comprises a video, the video may contain representations of one or more objects. The respective classification output for the message may comprise a class associated with one or more of the one or more objects represented in the video.

[0029] Correspondingly, if the message comprises audio data, the audio data may contain representations of one or more objects (for example, a sound associated with an alarm, a dog barking, a car engine etc.). The respective classification output for the message may comprise a class associated with one or more of the one or more objects represented in the audio data. The model may be trained using training data comprising one or more of: video data, frames of which contain representation of one or more objects; image data containing representations of one or more real -world objects; and audio data may contain representations of one or more objects. The training data may comprise data from a sensor that captures the image or video, and / or audio, e.g. audio data such as speech or other sounds.

[0030] An object may be a real -world object. That is, the object may be an object in real- world and the representation may be obtained by a sensor (such as an imaging sensor, a microphone, etc.) sensing the object in the real -world.

[0031] The details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the description below.

[0032] Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims.

[0033] BRIEF DESCRIPTION OF THE DRAWINGS

[0034] FIG. 1 is a diagram of an example model serving system.

[0035] FIG. 2 is a flow diagram of an example process for applying a set of classifiers to a message.

[0036] FIG. 3 shows an example user interface.

[0037] Like reference numbers and designations in the various drawings indicate like elements.

[0038] DETAILED DESCRIPTION

[0039] FIG. 1 shows an example model serving system 100. The model serving system 100 is an example of a system implemented as computer programs on one or more computers in one or more locations, in which the systems, components, and techniques described below can be implemented.

[0040] The model serving system 100 is a system that interfaces between a user 102 and a machine learning agent 110.

[0041] Generally, the model serving system 100 receives user inputs 104 from the user 102 and provides each user input 104 to the agent 110. For example, the user 102 can submit the user inputs 104 through a user interface of a user device 106 that is in communication with the system 100 over a data communication network, e.g., the Internet. The agent 110 uses a machine learning model 112 to generate a response 114 to each user input 104 and provides the response 114 for presentation the user 102, e.g., for presentation in the user interface of the user device 106.

[0042] As a particular example, the model serving system 100 can maintain a session between the user 102 and the machine learning agent 110. During the session, the responses generated by the machine learning agent 110 can incorporate context from previous user inputs 104, previous responses 114, or both. Once a session has been terminated, e.g., in response to a user action, through inactivity, or by virtue of a new version of the machine learning agent 110 being deployed, the context is reset, i.e., so that only context from the current session is incorporated when generating any given response.

[0043] The machine learning model 112 can be any of a variety of machine learning models that generate responses to user inputs.

[0044] For example, the machine learning model 112 can be a large language model (LLM) neural network that auto-regressively generates output sequences by processing a context sequence. The output sequences can be, e.g., sequences of text tokens, e.g., words, word pieces, bytes, characters, numbers, punctuation, or other text symbols.

[0045] In these examples, upon receiving a user input 104, the agent 110 can generate a context sequence for the LLM neural network that includes the user input 104 and context from previous user inputs 104, previous responses 114, or both received during the current session.

[0046] The agent 110 can then use the LLM neural network to sample one or more output sequences and then generate the response 114 from the one or more output sequences, e.g., by selecting one of the one or more sequences and then generating the response 114 from the selected sequence by parsing the output sequence according to a predetermined syntax.

[0047] Optionally, the agent 110 also includes, in the context sequence, context information received from one or more external sources 116. For example, the agent 110 can generate a query to an Internet search engine based on the user input 104 and then use the results of the query to generate the context sequence. As another example, the agent 110 can query a translation engine to obtain a translation of all or part of the user input 104 into one or more other languages and then use the translation(s) to generate the context sequence. As yet another example, the agent 110 can query a mapping engine using all or part of the user input 104 to obtain map information relating to a location identified in the user input 104 and use the map information to generate the context sequence. As yet another example, the agent 110 can query one or more content item search engines that search a repository of content items, e.g., music, speech, video, image, and so on, and use one or more of the content items provided by the search engine(s) to generate the context sequence. As yet another example, the agent 110 can query one or more additional models using the user input 104, e.g., one or more generative neural networks, one or more other language models, and so on, and use the output(s) of the additional model(s) to generate the context sequence.

[0048] Some example techniques that may be employed by the agent 110 to generate context sequences for a LLM and to obtain responses from the LLM are described in Glaese, et al, “Improving alignment of dialogue agents via targeted human judgements,” arXiv:2209.14375.

[0049] As another example, the machine learning model 112 can be a visual language model (VLM) neural network that can process inputs that are both images and text, can generate outputs that are both images and text, can generate image outputs form text inputs, can generate text outputs from image inputs, or some combination of the above. One example of a VLM neural network is described in Alayrac, et al, Flamingo: a Visual Language Model for Few-Shot Learning, arXiv:2204.14198.

[0050] In some implementations, the agent 110 can select between multiple different machine learning models 112 for a given session, the system 100 can select between different agents 110 for a given session, or both.

[0051] For example, the user can submit an input selecting a machine learning model from a set of machine learning models 112 when beginning a session or an input switching from a current machine learning model to a different model in the set during the session.

[0052] As another example, the agent 110 can automatically select a machine learning model from the set of machine learning models to start a session or automatically switch to a different machine learning model during the session, e.g., by analyzing one or more inputs that have been submitted by the user during the session or an initial input submitted by the user prior to the session. For example, the system can make use of a machine learning model that has been trained to select the most appropriate model given one or more user inputs.

[0053] As another example, the user can submit an input selecting an agent 110 from a set of agents 110 when beginning a session or an input switching from a current agent to a different agent in the set during the session.

[0054] As another example, the system 100 can automatically select an agent 110 from the set of agents to start a session or automatically switch to a different agent during the session, e.g., by analyzing one or more inputs that have been submitted by the user during the session or an initial input submitted by the user prior to the session. For example, the system can make use of a machine learning model that has been trained to select the most appropriate agent given one or more user inputs.

[0055] In order to improve the quality and reliability of the session between the user 102 and the agent 110, the system 100 includes an intermediary system 120.

[0056] The intermediary system 120 maintains a set of classifiers 130.

[0057] Each classifier 130 is configured to receive an input message and to generate a classification output that classifies a corresponding set of one or more properties of the message. Generally, each input message includes a user input 104 or a response 114. For example, some classifiers 130 in the set can be configured to operate on both user inputs and responses 114. As another example, some classifiers 130 in the set can be configured to operate on user inputs, responses, but not both.

[0058] Each classifier generally outputs a score that indicates the likelihood that the input message has the corresponding one or more properties. For example, the scores can be binary scores, with one value, e.g., zero, indicating that the message does not have the property and the other value indicating that the message does have the property. As another example, the scores can be values between a minimum and a maximum score, with higher scores indicating higher likelihoods that the message has the property.

[0059] In some example implementations, the set of classifiers 130 include a set of classifiers each associated with (e.g. representing) a set of one or more real-world objects. In an example where the message includes data representing a real -world object (e.g. an image of a real -world object, audio data representing a sound made by a real -world object, sensor data etc.) the classification output for the message may be a classification associated with the real- world object represented in the message.

[0060] The intermediary system 120 can take certain actions on user inputs 104 or responses 114 based on the outputs of the classifiers 130.

[0061] For example, the intermediary system 120 can prevent a response 114 to a given user input 104 from being provided to the user, e.g., by replacing the response 114 by a default response before the response 114 is transmitted for presentation to the user.

[0062] As another example, the intermediary system 120 can modify a given response 114 after the response has been provided to the user. For example, the intermediary system 120 can cause a response 114 that is being presented in the user interface of the user device to be modified, e.g. to change certain text in the given response 114 to different text, to blur out certain text in the given response 114, and so on. When the response contains content that is not text, e.g., image data or audio data, the system 120 can similarly modify the other types of content so that the semantics of the content are not discernible, e.g., by blurring a portion of an image or by adding noise to audio data. The modified portion of the given response may correspond to a portion representing an object having a particular classification.

[0063] Alternatively, the modified portion of the given response may correspond to a portion representing an object not belonging to a particular classification. For example, where the message comprises an image containing a representation of at least one object the image may also comprise, for example, representations of other objects and / or a background. The modification may comprise blurring the portion of the image which corresponds to an object belonging to the particular classification (e.g. the classification output). Alternatively, the modification may comprise blurring one or more portions of the image, or all of the image, which does not correspond to an object belonging to the particular classification (e.g. the classification output).

[0064] In some implementations, the blurring can be performed to blur a portion of an image if the portion matches (e.g. is within a threshold difference using known measures of similarity) a portion of an image in training data upon which the model was trained.

[0065] In another implementation, the blurring can be performed to blur a portion of an image if an object is classified as unsafe or prejudicial to privacy. Blurring can be performed to blur a portion of an image which is classified as private, for example if the portion is classified as matching an image of a real-world person (e.g. a portion of the image is within a threshold difference using known measures of similarity compared to a portion of a person captured by a camera). While blurring is discussed by way of example, it will be appreciated that an image may be otherwise modified.

[0066] The above examples can be applied similarly to adding noise to (or otherwise modifying) audio data so as to remove or obscure unsafe or private audio data. For example, an audio data item may be classified as containing an audio attack, for example a voice command which could be interpreted by a smart home assistant (or other smart agent) so as to initiate an undesirable action by the smart home assistant (or other smart agent). In an example, an audio file could contain an audio instruction to unlock a door using a smart home assistant. By classifying the audio data item as containing audio data classified as attack audio data, the relevant portion of the audio data can be obscured or removed so as to avoid the attack.

[0067] In another example, the message could include computer code containing a computer attack, for example code which, when run on a computer, could initiate an undesirable (e.g. unsafe or in violation of privacy) action to be performed by the computer. For example, the code could initiate the download of a computer virus or the publication of personal information contained on the computer. By classifying the message as containing computer code containing a computer attack, the relevant portion of the computer code can be obscured, modified or removed so as to avoid the attack.

[0068] In some implementations, the system 100 can display outputs generated from the outputs of the classifiers 130 in the user interface along with the responses 114.

[0069] Actions that can be taken by the intermediary system 120 will be described in more detail below.

[0070] Some example types of classifiers that can be used by the system 120 will now be described.

[0071] For example, the set of classifiers 130 can include a training data classifier.

[0072] The training data classifier operates on responses 114 generated by the agent 110 and classifies responses 114 based on whether the response 114 contains content that is copied from training data from the model that is employed by the agent 110.

[0073] As another example, the set of classifiers 130 can include one or more personally identifiable information (PII) classifiers that each operate on responses 114 generated by the agent 110 and classifies responses 114 to determine whether the responses 114 contain one or more types of PII.

[0074] In some cases, the set of classifiers 130 includes a single classifier that can classify responses 114 for multiple different types of PII. In some other cases, the set of classifiers 130 includes multiple different classifiers that each classify responses 114 for a single type of PII.

[0075] In some of these examples, some or all of the PII classifiers, in addition to classifying a message as having or not having a particular type of PII, also identify which tokens in the message are likely to contain the particular type of PII.

[0076] As yet another example, the set of classifiers 130 can include one or more appropriateness classifiers that operates on inputs that can be user inputs, responses, or both, and determines whether each input meets certain criteria for appropriateness. That is, each appropriateness classifier determines whether a given message, i.e., a given user input or a given response, is appropriate for being communicated during the current session.

[0077] For example, the appropriateness classifiers can include a regular expression classifier that maintains data specifying a set of expressions that have been classified as inappropriate. In this example, upon receiving a message, the appropriateness classifier can generate a regular expression from the message and verify whether the regular expression matches any of the expressions in the set. If so, the appropriateness classifier can return a violation.

[0078] As another example, the appropriateness classifier can include a machine learning classifier that classifies messages as appropriate or inappropriate.

[0079] As one particular example, the appropriateness classifier can be a large language model that receives an input sequence that includes a few-shot prompt that, in turn, includes (i) example inputs and (ii) an example classification for each of the example inputs. The input sequence can also include the given message and one or more tokens that prompt the language model to generate an output that indicates whether the given message is appropriate. The system can then generate a classification score for the given message based on the logit or other score assigned to each of a predetermined set of tokens by the large language model, e.g., the score assigned to the token “yes” and the score assigned to the token “no.”

[0080] The large language model can be, e.g., a pre-trained model that has been pre-trained on a language modeling objective on a large corpus of documents or a model that has been pre-trained and then fine-tuned on the specific task of determining appropriateness.

[0081] The system 120 uses the classifiers 130 to improve the quality of a given session between a user and the agent 110 while minimizing any additional latency that is introduced by applying the set of classifiers 130.

[0082] This is described in more detail below with reference to FIGS. 2 and 3.

[0083] FIG. 2 is a flow diagram of an example process 200 for processing a message using a set of classifiers. For convenience, the process 200 will be described as being performed by a system of one or more computers located in one or more locations. For example, a model serving system, e.g., the model serving system 100 depicted in FIG. 1, appropriately programmed in accordance with this specification, can perform the process 200.

[0084] The system receives a message (step 202). For example, the message can be a user input being submitted to a machine learning agent or a response to a user input generated by the machine learning agent.

[0085] The system processes the message using each of at least a subset of the set of classifiers (step 204). Processing a message using each of at least a subset of the set of classifiers may be referred to as running a classifier on the message.

[0086] As described above, in some implementations, the system runs each classifier on each message while, in some other implementations, the system runs some classifiers only on user inputs, runs some classifiers only on agent responses, or both. When the message is a user input, in some implementations, the system runs the classifiers on the user input in parallel with providing the user input to the machine learning agent for use in generating a model response. That is, the system can run the classifiers in parallel with the agent processing the user input in order to reduce latency, even if the system determines to block or otherwise prevent the agent from responding to the user input. The system of one of more computers on which the process 200 is performed may include multiple processors (e.g. may include at least a first set of one or more processors and a second set of one or more processors). The system can run the classifiers on the user input using the first processor(s). The agent can process the user input using the second processor(s). In this way, the steps of applying a set of one or more classifiers to the message and obtaining, from one or more of the classifiers in the set, a respective classification output for the message and processing the message by the agent can be performed in parallel.

[0087] The system receives a respective classification output from each of the classifiers that processes the message (step 206).

[0088] The system determines an action to take on the message based on the respective classification outputs (step 208).

[0089] As one example, the system can receive, from each of the classifiers, a respective score that indicates the likelihood that the message has the one or more corresponding properties.

[0090] The system can maintain, for each classifier, data mapping the classification score generated by the classifier to a message rating and can use the mapping data to determine a respective message rating for each of the classifiers.

[0091] The system can then map the respective message ratings for the classifiers to an overall message rating for the message and determine the action to be taken on the message based on the message ratings.

[0092] For example, the system can maintain data mapping each possible message rating to a corresponding action.

[0093] Some examples of corresponding actions now follow.

[0094] When the message is a user input, one or more of the possible message ratings can map to an action that blocks the user input from being responded to by the agent.

[0095] When the message is a user input, one or more of the possible message ratings can map to an action that allows the user input to be provided to the machine learning agent for generating a response. When the message is a user input, one or more of the possible message ratings can map to an action that allows the user input to be provided to the machine learning agent for generating a response, but that flags the user input as potentially resulting in a low quality or inappropriate model response.

[0096] When the message is an agent response, one or more of the possible message ratings can map to an action that blocks the agent response from being presented to the user.

[0097] When the message is an agent response, one or more of the possible message ratings can map to an action that allows the agent response to be provided to the user.

[0098] When the message is an agent response, one or more of the possible message ratings can map to an action that allows the agent response to be provided to the user for presentation, but that flags the response as potentially being a low quality or inappropriate model response.

[0099] Providing a response to the user may comprise, for example, providing the response for presentation by a user interface. The user interface may, for example, be a display screen. The response may be presented as an image and / or text on a display screen. Alternatively, any other means of communicating information to a user may be used, for example the response may comprise audio data (e.g. an audio utterance). Such audio data may be provided to the user using a speaker or other audio means, for example a speaker of a smart home assistant, smart watch, mobile device etc.

[0100] Alternatively or in addition to the above actions that are based on possible message ratings, the system can, in some implementations, take an action that modifies the message when certain criteria are satisfied.

[0101] For example, when the message is an agent response, one or more of the classifiers can, in addition to or instead of generating a classification score, generate an output that identifies the tokens in the response that contain the corresponding property. For example, as described above, the PII classifiers can identify which tokens in the response contain PII. In this example, the system can modify the agent response to remove the tokens that have the corresponding property, to replace the tokens that contain the corresponding property with placeholder tokens, or to cause the agent response to be displayed with the corresponding tokens blurred out or otherwise obscured.

[0102] As another example, when the message is a user input, one or more of the classifiers can, in addition to or instead of generating a classification score, generate an output that indicates suggested alternative text for some or all of the user input. For example, the appropriateness classifier described above can generate an alternative user input that has the same semantic meaning as the original user input but that is less likely to result in an inappropriate agent response.

[0103] In these cases, instead or in addition to blocking the model from responding to the original input, the system can provide the suggested modified input for presentation to the user or automatically modify the user input to be the same as the suggested modified input.

[0104] In some implementations where certain classifier outputs can result in the message being modified, the system can process those certain classifiers first and determine, based on the outputs of the certain classifiers, whether to modify the message, and, in response to determining to modify the message, provide the modified message for processing by the remaining classifiers.

[0105] Additionally, in some implementations where certain classifier outputs can result in the message being modified, when generating a given input sequence to the machine learning model, the agent can determine whether any previous user inputs or responses have been modified by any of the classifiers and, if so, use the modified user input or modified response in the context information instead of the original user input or original response.

[0106] The system then processes the message by taking the determined action (step 210).

[0107] That is, when the action indicates to allow the message to proceed and the message is a user input, the system can use the agent to generate a response to the agent. As described above, the system can have provided the user input to the agent for processing by the agent in parallel with evaluating the message. Thus, the system can immediately proceed to evaluating the response using the set of classifiers, i.e., performing another iteration of the process 200 for the agent response.

[0108] When the action indicates that the user input should be flagged to indicate that the corresponding response may be inappropriate or low quality, when presenting the corresponding to the user, the system can display information that warns the user that the corresponding response may not be appropriate.

[0109] When the message is a user input and the action that blocks the user input from being responded to by the agent, the system can display an alternative response to the user input that indicates to the user that the model was blocked from responding to the user input.

[0110] When the action indicates to allow the message to proceed and the message is an agent response, the system can provide the response for presentation to the user.

[0111] When the message is an agent response and the action blocks the agent response from being presented to the user, the system can display an alternative response to the user input that indicates to the user that the model was blocked from responding to the user input. When the action indicates that a given response should be flagged to indicate that the response may be inappropriate or low quality, when presenting the response to the user, the system can display information that warns the user that the response may not be appropriate. Alternatively, the system can blur out or otherwise obscure the response in the user interface until a user makes a selection that indicates the user agrees to view potentially inappropriate content. In addition or in the alternative, the system can use the flag to influence the ranking of the response among multiple responses that have been generated using the machine learning model.

[0112] In some cases, the process 200 operates synchronously with the presentation of the agent response to the user. That is, before a given agent response can be provided for presentation to the user, the process 200 must be completed for both the user input to which the agent is responding and the agent response and the action for both of these messages must indicate that the message is allowed to proceed.

[0113] In some other cases, the process 200 operates asynchronously with the presentation of the agent response to the user. For example, if a given agent response is available before the process 200 has been completed for the given agent response, the system proceeds to provide the response for presentation to the user.

[0114] In these cases, once the process 200 has completed for the given response and the action is to block the agent response, the system can remove the given response from the user interface, can blur out or otherwise obscure the response so that it can no longer be read by the user in the user, or can otherwise provide an indication to the user that the already- presented response may be of low quality or inappropriate. That is, blocking the agent response can comprise any of: not allowing the response to be provided to the user, blurring or otherwise obscuring the response, remove the response after it has been provided to the user, providing an indication to the user that the already-presented response may be of low quality or inappropriate. Blurring or otherwise obscuring the response, removing the response after it has been provided to the user and providing an indication to the user that the already- presented response may be of low quality or inappropriate may be considered a modification to the response. The system can modify a response before and / or after the response has been presented to the user.

[0115] In yet other cases, the system can perform the process 200 synchronously for a subset of the classifiers that have been designated as high priority while performing a separate process asynchronously for the remaining classifiers that have not been designated as high priority. That is, for those classifiers that have been designated as high priority, the system requires that, before a given agent response can be provided for presentation to the user, the process 200 must be completed for both the user input to which the agent is responding and the given agent response and the action for both of these message must indicate that the message is allowed to proceed. If the outputs of the classifiers that have not been designated as high priority are not available within a threshold amount of time of the outputs of the high priority classifiers, the system determines the action based on only the available classifier outputs.

[0116] For those classifiers that have not been designated as high priority and whose outputs were not available at the time the action was determined, the system performs a separate iteration of the process 200 asynchronously, and then, if the given response is allowed to proceed using the high priority classifiers, uses the result of the process 200 to modify the already-displayed given response as described above.

[0117] FIG. 3 shows an example of a user interface 300 that is provided for presentation on a user device by the system 100.

[0118] In particular, the system 100 provides the user interface 300 for presentation during a session between the user and a machine learning agent.

[0119] The system can present, in the user interface 300, responses generated by the machine learning agent and allow the user to submit user inputs that will be provided to the machine learning agent.

[0120] As shown in the example 300, the user has submitted a user input “What is AlphaFold?” and the machine learning agent has generated a response that describes what AlphaFold is and includes additional information from an external source.

[0121] In addition to the response, the system has also presented, in the user interface, analysis data that reflects outputs of at least a subset of the classifiers 130 for the response generated by the agent 110.

[0122] In the example of FIG. 3, the system has generated respective analysis data from the outputs of five classifiers: one that detects whether a message has adult content, one that detects whether a message is a spoof, one that detects whether the message includes medical data or is a request for medical data, one that detects whether the message relates to violence, and one that detects whether the message includes racy content. Other such analyses and corresponding displays are also within the scope of this disclosure.

[0123] Each of these classifiers can generate, as output, a classification score that indicates a likelihood that the message has the corresponding property. The system can map the classification score to a respective natural language description of the corresponding likelihood and then present the natural language description in the user interface 300.

[0124] In the example of FIG. 3, the system has mapped the outputs of the classifiers as “very_unlikely,” “unlikely,” “very_unlikely,” “very_unlikely,” and “very_unlikely,” respectively, and has displayed the corresponding descriptions in the user interface 300.

[0125] While the example of FIG. 3 shows natural language descriptions of likelihoods, the system can, more generally, use any type of descriptions that distinguish between different likelihoods. For example, the system can use color coding, so that different colors describe different likelihoods. As another example, the system can directly display the classification score or the range of classification scores that the classification score falls into.

[0126] This specification uses the term “configured” in connection with systems and computer program components. For a system of one or more computers to be configured to perform particular operations or actions means that the system has installed on it software, firmware, hardware, or a combination of them that in operation cause the system to perform the operations or actions. For one or more computer programs to be configured to perform particular operations or actions means that the one or more programs include instructions that, when executed by data processing apparatus, cause the apparatus to perform the operations or actions.

[0127] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, e.g., one or more modules of computer program instructions encoded on a tangible non transitory storage medium for execution by, or to control the operation of, data processing apparatus. The computer storage medium can be a machine- readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. Alternatively or in addition, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. The term “data processing apparatus” refers to data processing hardware and encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can also be, or further include, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). The apparatus can optionally include, in addition to hardware, code that creates an execution environment for computer programs, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

[0128] A computer program, which may also be referred to or described as a program, software, a software application, an app, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; and it can be deployed in any form, including as a stand alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, sub programs, or portions of code. A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a data communication network.

[0129] In this specification, the term “database” is used broadly to refer to any collection of data: the data does not need to be structured in any particular way, or structured at all, and it can be stored on storage devices in one or more locations. Thus, for example, the index database can include multiple collections of data, each of which may be organized and accessed differently.

[0130] Similarly, in this specification the term “engine” is used broadly to refer to a software-based system, subsystem, or process that is programmed to perform one or more specific functions. Generally, an engine will be implemented as one or more software modules or components, installed on one or more computers in one or more locations. In some cases, one or more computers will be dedicated to a particular engine; in other cases, multiple engines can be installed and running on the same computer or computers.

[0131] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA or an ASIC, or by a combination of special purpose logic circuitry and one or more programmed computers.

[0132] Computers suitable for the execution of a computer program can be based on general or special purpose microprocessors or both, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read only memory or a random access memory or both. The essential elements of a computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory can be supplemented by, or incorporated in, special purpose logic circuitry. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device, e.g., a universal serial bus (USB) flash drive, to name just a few.

[0133] Computer readable media suitable for storing computer program instructions and data include all forms of non volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks.

[0134] To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to and receiving documents from a device that is used by the user; for example, by sending web pages to a web browser on a user’s device in response to requests received from the web browser. Also, a computer can interact with a user by sending text messages or other forms of message to a personal device, e.g., a smartphone that is running a messaging application, and receiving responsive messages from the user in return.

[0135] Data processing apparatus for implementing machine learning models can also include, for example, special-purpose hardware accelerator units for processing common and compute-intensive parts of machine learning training or production, e.g., inference, workloads.

[0136] Machine learning models can be implemented and deployed using a machine learning framework, .e.g., a TensorFlow framework or a Jax framework.

[0137] Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a client computer having a graphical user interface, a web browser, or an app through which a user can interact with an implementation of the subject matter described in this specification, or any combination of one or more such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN) and a wide area network (WAN), e.g., the Internet.

[0138] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. In some embodiments, a server transmits data, e.g., an HTML page, to a user device, e.g., for purposes of displaying data to and receiving user input from a user interacting with the device, which acts as a client. Data generated at the user device, e.g., a result of the user interaction, can be received at the server from the device.

[0139] While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or on the scope of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially be claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

[0140] Similarly, while operations are depicted in the drawings and recited in the claims in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0141] Particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous.

Claims

CLAIMS1. A method performed by one or more computers, method comprising: receiving a message, wherein the message is a user input to a machine learning model or a response from a machine learning agent that has been generated by the machine learning agent using the machine learning model; applying a set of one or more classifiers to the message and obtaining, from one or more of the classifiers in the set, a respective classification output for the message; determining, using the respective classification outputs obtained from the one or more classifiers, an action to take on the message; and processing the message in accordance with the determined action.

2. The method of claim 1, wherein, when the message is a user input to the machine learning model, applying a set of one or more classifiers to the message comprises applying the set of one or more classifiers to the message in parallel with providing the user input to the machine learning agent for processing by the machine learning agent.

3. The method of any preceding claim, wherein: the message is a response from the machine learning agent; determining, using the respective classification outputs obtained from the one or more classifiers, the action to take on the message is performed after the response is provided for presentation to the user; the determined action is to block the response; and processing the message in accordance with the determined action comprises modifying the response after the response has been presented to the user.

4. The method of claim 3, wherein modifying the response comprises one or more of: removing the response from a user interface in which the response is being presented; obscuring the response while the response is presented in the user interface; or providing an indication to the user that the presented response may be low quality or inappropriate.

5. The method of any preceding claim, wherein the set of one or more classifiers comprises:one or more classifiers that are applied only to responses from the machine learning agent.

6. The method of claim 5, wherein the one or more classifiers that are applied only to responses comprise a training data classifier that classifies responses based on whether the response contains content that is copied from training data for the machine learning model.

7. The method of claim 5 or claim 6, wherein the one or more classifiers that are applied only to responses comprise one or more personally identifiable information (PII) classifiers that each classify responses to determine whether the responses contain one or more types of PII.

8. The method of claim 7, wherein one or more of the PII classifiers also identify which tokens in the response are likely to contain a particular type of PII.

9. The method of claim 8, wherein the determined action is to modify the tokens in the response that are likely to contain the particular type of PII.

10. The method of any preceding claim, wherein the set of one or more classifiers comprises an appropriateness classifier that classifies the message based on whether the message meets one or more criteria for appropriateness.

11. The method of claim 10, wherein the appropriateness classifier is a large language model that receives an input sequence that includes a) a few-shot prompt that includes (i) example inputs and (ii) an example classification for each of the example inputs, b) the message, and c) one or more tokens that prompt the large language model to generate an output that indicates whether the message is appropriate.

12. The method of any preceding claim, wherein: the determined action indicates to provide the message for presentation to a user; and processing the message in accordance with the determined action comprises providing the response for presentation to the user.

13. The method of claim 12, wherein processing the message in accordance with the determined action comprises providing the response for presentation to the user along with information derived from the respective classification outputs obtained from the one or more users.

14. The method of any of claims 1 to 13, wherein the message comprises one or more images representing an object and wherein each classifier in the set of classifiers corresponds to a classification associated with an object.

15. The method of any preceding claim when dependent on claim 6, wherein the message comprises an image, the training data comprises a set of training images, and wherein classifying responses based on whether the response contains content that is copied from training data for the machine learning model comprises determining that a portion of the image matches a portion of a training image of the set of training images.

16. The method of any preceding claim when dependent on claim 4, wherein the response comprises an image, wherein modifying the response comprises obscuring the response, and wherein obscuring the response comprises blurring or otherwise obscuring a portion of the image.

17. The method of claim 16, wherein blurring a portion of the image is done responsive to the portion being classified as containing an image of an object captured by a sensor, or responsive to the portion being classified as not containing an image of an object captured by a sensor.

18. The method of any preceding claim when dependent on claim 4, wherein the response comprises audio data, wherein modifying the response comprises obscuring the response, and wherein obscuring the response comprises adding noise to the audio data.

19. The method of claim 18, wherein adding noise to the audio data is performed to obscure a portion of the audio data which is classified as containing an audio attack.

20. A system comprising: one or more computers; and one or more storage devices storing instructions that, when executed by the one ormore computers, cause the one or more computers to perform the respective operations of the method of any one of claims 1-19.

21. One or more computer-readable storage media storing instructions that when executed by one or more computers cause the one or more computers to perform the respective operations of the method of any one of claims 1-19.

Citation Information

Cited By

  • Systems and methods for generating data structures using language models based on distributed network communications

    US12632913B2

  • Systems and methods for generating instructions for future network optimization using language models

    US12657643B2

  • Systems and methods for routing machine-learning prompts in a distributed networking environment

    US12731201B2

  • Systems and methods for restricting network interactions according to language model output

    US12731202B2

  • Systems and methods for distributing network application data according to machine-learning output

    US12743735B2