Cognitive machine learning model
By introducing cognitive machine learning models in conventional machine learning models, distinguishing accidental and cognitive uncertainty, the problem of conventional models cannot distinguish the uncertain type, and achieves more efficient uncertainty reflection and computing efficiency.
Patent Information
- Application Number
- CN202380033641.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-04-13
- Filing Date
- 2023-04-13
- Publication Date
- 2025-01-28
AI Technical Summary
Conventional machine learning models are unable to effectively distinguish between accidental uncertainty and cognitive uncertainty, resulting in undeployment in real-world situations where reliable predictions are required.
By using cognitive machine learning models to enhance conventional machine learning models, the output generated by cognitive models is used to indicate that the given output is generated by cognitive uncertainty or accidental uncertainty.
A better reflection of uncertainty, at the same time, significantly improved the calculation efficiency, and can provide information about uncertainty in the prediction of basic model predictions with less computing resources.
Smart Images

Figure CN119384672A_ABST
Abstract
Description
Background Art
[0001] This specification involves processing input using a machine learning model.
[0002] As an example, a neural network is a machine learning model that employs 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 an input to another layer in the network, such as the next hidden layer or the output layer. Each layer of the network generates an output from the received input according to the current values of the corresponding set of weights. Summary of the invention
[0003] This specification describes a system implemented as a computer program on one or more computers that performs machine learning tasks by processing inputs using a cognitive machine learning model.
[0004] The subject matter described in this specification can be implemented in specific embodiments to realize one or more of the following advantages.
[0005] Conventional machine learning models, such as neural networks, generate marginal predictions that cannot be used to distinguish between aleatoric uncertainty and epistemic uncertainty. That is, an ambiguous output of a conventional machine learning model for a given input—i.e., assigning significant probability mass to more than one possible output—does not indicate whether the output is ambiguous due to aleatoric uncertainty or epistemic uncertainty.
[0006] Aleatoric uncertainty refers to uncertainty that cannot be resolved by training a machine learning model on more or different data, for example, because the input is ambiguous and cannot be accurately classified or accurately modeled.
[0007] Epistemic uncertainty refers to uncertainty that can be improved with additional data — for example, by training a machine learning model on more data or different data. That is, if the model had been trained differently for a given input, the model could generate more accurate predictions.
[0008] The lack of ability to distinguish between these two types of uncertainty can prevent conventional models from being deployed in many real-world situations where reliable predictions are needed.
[0009] For example, a robot or other agent can be controlled more effectively if the output of the agent’s policy model indicates that the model is unsure what action to take in a given state either because the state is ambiguous or because the model has not been trained on appropriate data.
[0010] As yet another example, image classification outputs can be more effectively incorporated into real-world systems that make decisions based on the outputs if information is available indicating whether the underlying image is ambiguous or whether the model needs to be trained on more data to make valid predictions.
[0011] This specification describes techniques for augmenting a conventional machine learning model (referred to as a "base machine learning model") with a cognitive machine learning model. Utilizing the cognitive model allows a final output generated based on the outputs of the conventional model and the cognitive model to provide an indication of whether a given output was generated due to epistemic uncertainty or aleatoric uncertainty.
[0012] Furthermore, typically, cognitive models consume significantly fewer resources than base models, which may be large language models, large computer vision models, or other models with millions and in some cases billions of parameters. Thus, augmenting the base model with output generated by a cognitive model can provide information about the uncertainty in the base model's predictions with relatively little additional computational overhead.
[0013] Specifically, the techniques for generating the final output reflect uncertainty better than prior art techniques while being significantly more computationally efficient than prior art techniques. This is because incorporating uncertainty information using the techniques requires only one or more forward passes through one or more models that consume relatively little computational resources, rather than requiring additional forward passes through computationally expensive base models.
[0014] For example, the technique can provide an improved uncertainty indication relative to an ensemble of multiple models. Specifically, the technique can outperform an ensemble of hundreds of models at a lower computational cost than an ensemble of two models.
[0015] 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. Other features, aspects, and advantages of the subject matter will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic diagram of an example machine learning system.
[0017] Figure 2 An example architecture for uncertainty indications provided by outputs of conventional and cognitive models is shown.
[0018] Figure 3 Examples of operations performed by a machine learning system are shown.
[0019] Figure 4 is a flow chart of an example process for processing model input.
[0020] Figure 5 Examples of results achieved by a machine learning system are shown.
[0021] Like reference numbers and names in the various drawings indicate like elements. DETAILED DESCRIPTION
[0022] This specification describes a system implemented as a computer program on one or more computers that performs machine learning tasks by processing inputs using a cognitive machine learning model.
[0023] The machine learning task performed by the system may be any suitable machine learning task.
[0024] For example, the machine learning task may be a computer vision task (also referred to as an "image processing task"). In other words, the cognitive machine learning model includes a convolutional neural network or a different type of neural network (e.g., a Transformer-based neural network) configured to receive at least one input image (such as an image captured by a camera, a still camera, or a video camera) and process the input image to generate a model output of the input image, i.e., perform some image processing task. In this specification, processing the input image refers to processing the intensity values of the image pixels using the machine learning model.
[0025] For example, the task may be image classification, and the output generated by the system for a given image may be a respective score for each object category in a set of object categories, each score representing an estimated likelihood that the image contains an object belonging to that category.
[0026] As another example, the task may be image embedding generation, and the output generated by the system may be a numerical embedding of the input image.
[0027] As yet another example, the task may be object detection, and the output generated by the system may identify locations in the input image where objects of a particular type are depicted, such as bounding boxes or other geometric regions within the image.
[0028] As yet another example, the task may be image segmentation, and the output generated by the system may define, for each pixel of the input image, to which class of a plurality of classes the pixel belongs.
[0029] More generally, however, the task may be any of a variety of tasks, including tasks that process inputs other than images.
[0030] As an example, if the input to the system is an Internet resource (such as a web page), a document or a portion of a document, or features extracted from an Internet resource, a document or a portion of a document, the task may be to classify the resource or document, that is, the output generated by the model for a given Internet resource, document or portion of a document may be a score for each topic in a set of topics, each score representing an estimated likelihood that the Internet resource, document or portion of a document is related to that topic.
[0031] As another example, if the input to the system is features of the impression context of a particular ad, the output generated by the model might be a score representing the estimated likelihood that the particular ad will be clicked.
[0032] As another example, if the input to the system is features of personalized recommendations for a user, such as one or more of the following: features characterizing the context of the recommendation, features characterizing a previous action taken by the user, or features characterizing the user, then the output generated by the model may be a score for each content item in a set of content items, each score representing an estimated likelihood that the user will respond positively to being recommended the content item. The content items may be, for example, videos, software applications, electronic documents such as electronic books, advertisements, etc.
[0033] As another example, if the input to the system is a sequence of text in one language, the output generated by the model may be a score for each text segment in a collection of text segments in another language, each score representing an estimated likelihood that the text segment in the other language is a correct translation of the input text into the other language.
[0034] As another example, the task may be an audio processing task. For example, if the input to the system is a sequence representing a spoken utterance (e.g., captured by a microphone), the output generated by the system may be a score for each text segment in a set of text segments, each score representing an estimated likelihood that the text segment is a correct transcription of the utterance. As another example, the task may be a keyword detection task, wherein, if the input to the system is a sequence representing a spoken utterance, the output generated by the system may indicate whether a particular word or phrase ("hot word") is spoken in the utterance. As another example, if the input to the system is a sequence representing a spoken utterance, the output generated by the system may identify the natural language in which the utterance is spoken.
[0035] As another example, the task may be a natural language processing or understanding task that operates on a text sequence of a natural language, such as an entailment task, a paraphrase task, a text similarity task, a sentiment task, a sentence completion task, a grammar task, etc.
[0036] As another example, the task may be a text-to-speech task, where the input is text in a natural language or features of text in a natural language, and the model output is a spectrogram or other data defining the audio of the text spoken in the natural language.
[0037] As another example, the task may be a health prediction task, where the input is the patient's electronic health record data and the output is a prediction related to the patient's future health, e.g., a predicted treatment that should be prescribed for the patient, the likelihood that the patient will experience an adverse health event, or a predicted diagnosis for the patient.
[0038] As another example, the task may be an agent control task, where the input is observations characterizing the state of the environment, and the output defines the actions to be performed by the agent in response to the observations.
[0039] For example, the output can be a corresponding score for each action in a set of actions that can be performed by the agent, can assign a corresponding Q value to each action in the set of actions, can specify a probability distribution over the set of actions, or can directly regress the actions to be performed by the agent.
[0040] The agent can be, for example, a mechanical agent, such as a robot or autonomous vehicle that interacts with a real-world environment (in which case observations may include the output of one or more sensors, such as a camera, that sense the real-world environment, and actions may be the mechanical agent moving within the environment and / or changing its configuration), a software agent, such as a computer simulation of a robot or autonomous vehicle that interacts in a computer simulation of a real-world environment, a control system for an industrial facility (e.g., controlling a heating and / or cooling system for an industrial facility, or controlling production equipment in the facility, and observations may include temperature and / or power consumption observations at one or more locations in the facility), a system for distributing resources (e.g., power or computing resources) among multiple systems configured to employ those resources, or a control system that controls different kinds of agents.
[0041] In some cases, the machine learning task is a combination of multiple separate machine learning tasks, i.e., the neural network is configured to perform multiple different separate machine learning tasks, e.g., two or more of the machine learning tasks mentioned above. For example, the neural network can be configured to perform multiple separate natural language understanding tasks. Optionally, the network input can include identifiers of separate natural language understanding tasks to be performed on the network input. As another example, the neural network can be configured to perform multiple separate image processing or computer vision tasks, i.e., to generate outputs of multiple different separate image processing tasks in parallel by processing a single input image.
[0042] Figure 1is a diagram of an example machine learning system 100. Machine learning system 100 is an example of a system implemented as a computer program on one or more computers in one or more locations in which the systems, components, and techniques described below may be implemented.
[0043] The system 100 receives a model input 102 for a machine learning task, e.g., input data for one of the tasks described above (e.g., image data if the task is an image processing task), and processes the model input to generate a final output 112 for the task.
[0044] Specifically, when the system 100 receives a new model input 102 , the system 100 processes the new model input 102 using the base machine learning model 110 to generate a base output 114 of the machine learning task for the new model input 102 .
[0045] For example, when the machine learning task is a classification task, the base output 114 may include a corresponding log-odds for each category in a set of categories for the classification task, such as a corresponding score, e.g., a log-odds indicating the likelihood that a new model input is in that category.
[0046] As another example, when the machine learning task is a regression task, the base output 114 may include one or more regression values.
[0047] The base machine learning model 110 can be any suitable model that is configured and trained to perform a machine learning task.
[0048] Examples of machine learning models include random forests, support vector machines, gradient boosted trees, decision forests, decision trees, logistic regression models, and neural networks.
[0049] While conventional systems would provide the base output 114 of the base model 110 as the final output 112 of the model input 102, the system 100 also utilizes a cognitive machine learning model 120 to improve the quality of the base output 114 to more effectively account for the uncertainty in the predictions generated by the base model 110.
[0050] Specifically, the system 100 samples a set of one or more indices 104 from a reference distribution of possible indices.
[0051] In some embodiments, each possible exponent is a scalar value, and the reference distribution is, for example, a uniform distribution over the discrete set of possible exponents or a Gaussian distribution over the space of possible exponents.
[0052] In some other embodiments, each possible index is a vector with a fixed dimension, and the reference distribution is, for example, a multidimensional Gaussian distribution over the multidimensional space of possible indexes or a uniform distribution over a discrete set of multidimensional vectors.
[0053] Typically, the exponent is sampled independently of new model inputs 102. That is, the system 100 samples each model input processed by the system 100 from the same fixed reference distribution.
[0054] In some cases, the system 100 samples a fixed number of exponents for each input. In some other cases, the system 100 may determine how many exponents to sample for a given input based on some criteria. For example, the system 100 may sample a maximum number of exponents that results in a computational cost that does not exceed the available computational amount for generating the final output 112 for the new model input 102.
[0055] For each sampled index of one or more sampled indices 104 in the set, the system 100 uses a cognitive machine learning model 120 to process a cognitive input comprising the sampled index 104 and (i) a new model input 102, (ii) data derived from the new model input 102, or (iii) both to generate a cognitive output 124 of a machine learning task for the new model input 102.
[0056] Each cognitive output 124 has the same format as the basic output, ie, has the number and type of values required by the machine learning task.
[0057] That is, each cognitive input includes new model input, data derived from the new model input, or both, as well as an additional input independent of the new model input—the sampled index.
[0058] In some cases, as will be described in more detail below, the data derived from the new model input may be an intermediate representation of the model input 102 generated by the base model 110 when processing the model input 102 .
[0059] The system 100 then generates a final output 112 of the machine learning task from at least a base output 114 of the machine learning task and a set of one or more sampled indexed cognitive outputs 124 .
[0060] Unlike cognitive inputs, the base model inputs processed by the base model 110 do not include any sampled indices. Therefore, since the base output 114 is independent of the sampled indices, when the system 100 samples multiple indices, the system 100 still only needs to perform a forward pass through the base model 110 once to generate the final output 112.
[0061] In some embodiments, the system 100 also uses an untrained prior cognitive machine learning model to process a prior input comprising a sampled index and (i) new model input, (ii) data derived from the new model input, or (iii) both to generate a prior output and generates a final output 112 using the base output, cognitive output, and prior output.
[0062] The cognitive model 120 will also be referred to in this specification as a learnable cognitive model to distinguish it from a priori cognitive machine learning model which is not learnable, ie, because it has not yet undergone any training.
[0063] As with the base model, cognitive model 120 and the a priori model (when used) may be any appropriate machine learning models, and may be the same type of model or a different type of model relative to base model 110 .
[0064] Typically, the cognitive model 120 and the a priori model (when used) consume significantly fewer resources than the base model 110 .
[0065] For example, the base model 110 may be a large language model, a large computer vision model, such as a convolutional neural network or a visual Transformer, or other model with millions and in some cases billions of parameters, while the cognitive model and the prior model are relatively small neural networks with significantly fewer parameters, such as thousands or hundreds of thousands of parameters. For example, the ratio of variable parameters defining the cognitive model 120 to the prior model (if any) may be at least 1000 times less than the variable parameters defining the base model 110, or at least 10,000 times less.
[0066] Thus, augmenting the base model 110 with output generated by the cognitive model 120 and, optionally, with a priori models can provide information about the uncertainty in the predictions of the base model 110 with relatively little additional computational overhead.
[0067] Specifically, the technique for generating the final output 112 reflects uncertainty better than prior art techniques while being significantly more computationally efficient than prior art techniques.
[0068] This is because incorporating uncertainty information requires only one or more additional forward passes through one or more models that consume relatively few computational resources—namely, through the cognitive model 120 and optionally through the a priori model—rather than requiring an additional forward pass through the computationally expensive base model 110.
[0069] When sampling a single index 104, the system 100 generates a combined output by combining the base output, the cognitive output, and optionally the a priori output. For example, the system can calculate the sum of the base output, the cognitive output, and optionally the a priori output. As another example, the system can assign weights to the base output, the cognitive output, and optionally the a priori output, and then calculate the weighted sum of the outputs.
[0070] The system then provides the combined output as the final output 112. As will be described below, even if only a single index 104 is sampled, using the sampled index and the epistemic model improves the degree to which the combined output reflects epistemic uncertainty, e.g., because the combined output more accurately models the joint probability distribution than the base output.
[0071] When multiple indices are sampled, the system 100 generates a corresponding combined output for each sampled index, as described above.
[0072] The system 100 can then use the corresponding combined outputs to generate a final output 112 of the machine learning task in any of a variety of ways.
[0073] For example, the system 100 may generate uncertainty estimates from the respective combined outputs and provide the uncertainty estimates as part of the final output 112 .
[0074] The uncertainty estimate may, for example, be based on a measure of the spread of the output distribution, such as the variance or standard deviation.
[0075] Alternatively, the uncertainty estimate can instead be based on separate uncertainty estimates for the log odds or individual regressors for each class, generated based on the variance of the corresponding log odds or regressors across the combined output. That is, the system can calculate separate, individual uncertainty estimates for each log odds or each regressor included in the combined output.
[0076] As another example, the system 100 may calculate a measure of central tendency of the combined outputs, such as a minimum, maximum, or average, and then provide the resulting measure as part of the final output 112 .
[0077] That is, the system 100 can provide the resulting metric as a final combined output, and optionally, can also provide an uncertainty metric ("uncertainty estimate") together with the final combined output as a final output 112, or can use the uncertainty metric to modify the final combined output and then provide the modified combined output as the final output 112 (with or without the uncertainty metric).
[0078] Utilizing the cognitive machine learning model 120 and optionally augmenting the machine learning model with a priori machine learning models can improve the operation of the system 100 in any of a variety of ways.
[0079] For example, in many applications, such as safety-critical applications, such as controlling a robot or an autonomous vehicle or classifying medical images or images captured by sensors of a robot, an autonomous vehicle, or other intelligent body, the system 100 may need to adopt a risk management scheme that penalizes uncertain outputs. In these applications, the system 100 may generate a corresponding modifier for each log probability or regression value from the combined output and the uncertainty estimate. The modifier reduces the log probability or regression value by assigning a penalty to the log probability or regression value that varies more across the sampled exponential, and then uses the modified output as the final output of the task. For example, the modifier of a given log probability or regression value may be the output of a function of a single uncertainty estimate applied to the log probability or regression value, for example, an increasing function that scales the log probability or regression value or normalizes the log probability or regression value. As another example, the modifier may be a fixed value that is assigned only to a subset of the log probability or regression values with the highest uncertainty estimate, or only to a subset of the log probability or regression values with an uncertainty estimate above a threshold.
[0080] As another example, in many cases, such as during training models for controlling intelligent agents or making content recommendations, it is important to explore the space of possible actions, the environment, or both.
[0081] In some of these embodiments, the system can generate a corresponding modifier for each log-odds or regression value from the combined output that provides a reward for values that vary more across the sampled exponentials, i.e., increases, and then use the modified output as the final output of the task. For example, the reward for a given log-odds or regression value can be the output of a function of the individual uncertainty estimates applied to the log-odds or regression values, e.g., an increasing function that scales the log-odds or regression values or normalizes the log-odds or regression values. As another example, the reward can be a fixed value that is assigned only to a subset of the log-odds or regression values with the highest uncertainty estimates, or only to a subset of the log-odds or regression values with uncertainty estimates above a threshold.
[0082] In other embodiments of these embodiments, when the output includes a corresponding score, such as a Q-value or log-odds of an action to be performed by the agent, the system may use an uncertainty measure for the action to select the action rather than using a central tendency measure of the combined output to select the action, e.g., such that an action with a higher uncertainty measure is more likely to be selected than an action with a lower uncertainty measure.
[0083] In other words, in any of the above embodiments where exploration is important, the system uses the final output to select actions that cause the agent to explore the environment.
[0084] As another example, the system can determine how to generate additional training data for the base model, the cognitive model, or both based on the uncertainty estimates calculated from the combined outputs. For example, when the combined output of a given new model input has high uncertainty, the system can query to generate more training examples similar to the new model input. As a specific example, when controlling an agent, the system can control the agent to reach environmental states that are characterized by observations similar to observations that led to high uncertainty estimates.
[0085] As another example, the system may be performing a process of generating a final output as part of training a base model, a cognitive model, or both, e.g., fine-tuning a pre-trained model during online learning. In this example, the system may determine a learning rate to use when training new model inputs based on an uncertainty measure of the combined output, e.g., to allow the system to adapt more quickly to new data about which the model is uncertain, thereby performing online learning with fewer training steps while consuming fewer computational resources, e.g., consuming fewer processor cycles and less memory. That is, the system may assign a higher learning rate to model inputs with an uncertainty measure that indicates higher uncertainty.
[0086] As another example, for safety-critical applications, the system can generate an alert to be provided to a user of the system based on an uncertainty metric calculated from the combined output. That is, when the uncertainty metric exceeds a threshold, the system can issue an alert to the user to indicate that the output is unlikely to be reliable.
[0087] Figure 2 An example of an example model is shown, which is input by a conventional neural network 210, such as the base model 110, and a model that has been enhanced with a cognitive model and optionally with a priori models to generate a cognitive neural network (ENN) 220.
[0088] exist Figure 2 In the example, the model input is an image and the task is image classification, specifically, the input image needs to be classified as an image of a rabbit (R) or a duck (D).
[0089] In example 200, only conventional neural network 210 is used, and conventional neural network 210 generates outputs including a score of .5 for R and a score of .5 for D.
[0090] In this example, it is not clear from the output whether the image is an ambiguous image, i.e., it is not easy to tell whether the image is a rabbit or a duck, or whether the conventional neural network 210 does not have enough data to accurately classify the image. That is, the image is ambiguous, or the image is not ambiguous but the conventional neural network 210 has not been trained on enough training data or the right type of training data to accurately classify the image.
[0091] Specifically, if Figure 2 As shown, given a single image, network 210 outputs an edge prediction that assigns probabilities to two classes. If the probabilities are each 0.5, as shown in example 200, it is unclear whether this is because the image is ambiguous and the users are evenly divided on the correct classification or if the neural network, if trained on more data, will determine that one class remains unclear.
[0092] To illustrate this, the two tables to the right of the neural network output represent possible joint distributions over the labels for two identical images. That is, one cell represents the joint probability of assigning R to both images, another cell represents the joint probability of assigning R to the first image and D to the second image, another cell represents the joint probability of assigning D to the first image and D to the second image, and another cell represents the joint probability of assigning D to both images.
[0093] Both tables are consistent with uniform marginal distributions. The first table indicates unavoidable ambiguities that will not be resolved by training on additional data, e.g., because conditioning on the first image label does not change the distribution of the second image label. The second table indicates that additional training should resolve the uncertainty, e.g., conditioning on the first label, the distribution of the second label assigns all probabilities to the same outcomes as the first label.
[0094] Figure 2 Also shown is the impact of augmenting a conventional neural network 210 with a cognitive machine learning model that receives exponents z sampled from a reference distribution to generate an ENN 220.
[0095] Example 230 shows that when the image is ambiguous, sampling different z does not change the probability of the image. That is, Figure 2 As shown, even with multiple samples z, the probability of R remains .5 and the probability of D remains .5. This indicates that the image is ambiguous and further training will not improve the performance of ENN 220 in accurately classifying the image, i.e., the underlying table of joint probabilities assigns an equal probability of .25 to each cell.
[0096] Example 250 shows that when the image is not ambiguous but the ENN 220 has been trained on insufficient data, the probability of R and the probability of D do depend on the sampled z. Figure 2 In the example of , when z is less than or equal to zero, ENN 220 assigns a probability of 1 to R, and when z is greater than zero, a probability of 1 to D. This dependence on z indicates that there is epistemic uncertainty in the data on which ENN 220 has been trained, rather than an unresolvable ambiguity inherent in the input. In other words, when z is less than or equal to zero, the underlying table of joint probabilities assigns a joint probability of 1 to both images being R, and when z is greater than zero, a joint probability of 1 to both images being D.
[0097] Thus, by using ENN 220 instead of conventional neural network 210, the system can generate final outputs that accurately characterize the uncertainty and reliability in the outputs generated by the system.
[0098] More generally, given input x1, ..., x T , the joint prediction is for each class combination y l , ..., y T Assignment probability While regular neural networks are not designed to provide joint predictions, they can be produced by multiplying the marginal predictions:
[0099]
[0100] where f θ (x t , z)y t is x t The combined output of y t score.
[0101] However, this representation models each outcome as independent and therefore cannot distinguish between ambiguity and insufficient data. ENNs address this issue by implementing a more expressive joint prediction using the cognitive index z-integral:
[0102] where the integral is over z, and is x t The combined output of y t score.
[0103] This integral introduces dependencies so that the joint prediction is not necessarily just the product of the edges.
[0104] Examples 230 and 250 provide simple examples of how two different ENNs can use cognitive indices to distinguish between the above uncertainty types.
[0105] In example 230, the marginal predictions made by the ENN do not vary with z, so the resulting joint prediction is just the independent product of the marginals. This corresponds to a "contingent" or "irreducible" form of uncertainty that cannot be resolved with the data.
[0106] On the other hand, example 250 shows an ENN that makes different predictions depending on the sign of the epistemic index. This corresponds to an "epistemic" or "reducible" uncertainty that can be resolved with the data. In this case, integrating the 2x2 matrix over z produces a diagonal matrix with each diagonal entry being 1 / 2.
[0107] Before using the base model 110 and the cognitive model 120 , the system 100 or another training system trains the base model 110 and the cognitive model 120 on training data.
[0108] In some embodiments, the base model 110 is pre-trained, for example, on a suitable objective function for a machine learning task. After the base model 110 is trained, the training system trains the cognitive model 120 while keeping the base model 110 fixed. Keeping the base model 110 fixed means that the parameter values of the base model 110 are kept fixed, i.e., fixed to the same value, throughout the training of the cognitive model 120. For example, the training system can train the cognitive model 120 on the same objective function of the machine learning task used to train the base model 110.
[0109] In some other embodiments, the training system jointly trains the base model 110 and the cognitive model 120 on the objective function of the machine learning task. That is, during training, updates to the variable parameters of the base model can be substantially simultaneous or interleaved with corresponding updates to the cognitive model. For example, during joint training, the base model and the cognitive model can be updated using the gradient of the objective function of the same training input.
[0110] Examples of objective functions may include cross entropy loss, squared error loss, negative log-likelihood loss, etc. In some cases, the task loss function may also include one or more additional terms that do not depend on the label of a given input, such as auxiliary loss terms, regularization terms, etc.
[0111] As a specific example, the objective function may be a marginal objective function that depends only on a single input. For example, if learning is performed based on minimizing the objective function, and the training of the base model is based on multiple input-output training examples ({x t ,y t}), then the objective function may be such that minimizing the objective function increases the likelihood that when the input to the cognitive machine learning model 120 is a training example t's (x t, z), and where z is a sample of one or more indices, the output of the cognitive machine learning model 120 is y t .
[0112] Even though the objective function is a marginal objective function, due to the inclusion of the cognitive machine learning model 120, the final output generated by the system 100 can accurately model the joint probability after training. Figure 5 An example of the performance of the system 100 for modeling joint probabilities after training the marginal objective function is shown.
[0113] In the case where the training system jointly trains the base model 110 and the cognitive model 120 and the cognitive model 120 receives as input the internal representation generated by the base model 110, in order to improve the stability of the training, the training system may apply a stop gradient function on the internal representation. "Stop gradient" indicates that the independent variable (argument) of the function is considered fixed when calculating the gradient.
[0114] Before training, the variation of the combined output as a function of z reflects the a priori uncertainty in the prediction. Since the base model 110 does not depend on z, this variation must be derived from the cognitive model 120. By incorporating the base model as described above, the training system can elicit this initial variation.
[0115] That is, the prior model represents the prior uncertainty and has no trainable parameters. Learnable cognitive models can be initialized to output values close to zero, for example using G1 oro t initialization or a different initialization scheme, but then trained so that the combined output produces statistically reasonable predictions for all possible values of z. The variation of the combined input x as a function of z indicates the predictive epistemic uncertainty, as shown in Example 250.
[0116] Figure 3 An example of the operation of the system 100 when the system 100 includes a base model 110 , a (learnable) cognitive model 120 , and a priori cognitive model 310 is shown.
[0117] Specifically, in Figure 3 In the example of , system 100 receives model input 102 and processes model input 102 using base model 110 to generate base output of model input 102 .
[0118] As part of processing model input 102 , base model 110 generates features of model input 102 . Features of model input 102 are internal representations of model input 102 generated by base model 110 .
[0119] For example, when the base model 110 is a neural network, the feature may be the output of one or more hidden layers of the neural network. As a specific example, the feature may be the output of the last hidden layer of the neural network, such as the last convolutional layer in the neural network, the last Transform layer in the neural network, or the output of the last hidden layer of the neural network. r Layers, etc.
[0120] The learnable cognitive model 120 processes the features generated by the base model 110 and the features from the reference distribution P The index z of the z samples to generate the cognitive output.
[0121] As described above, the cognitive model 120 is generally less computationally expensive than the base model 110. That is, the cognitive model 120 is more computationally efficient than the base model 110, for example, because the cognitive model 120 has fewer weights than the base model 110.
[0122] For example, cognitive model 120 may be a multi-layer perceptron (MLP) that processes the concatenation of features and index z. As another example, cognitive model 120 may be a convolutional neural network that processes a spatial grid of features concatenated with another spatial grid generated by broadcasting index z.
[0123] The a priori cognitive model 310 processes the features generated by the base model 110 and the index z to generate a priori output.
[0124] As described above, the a priori model 310 is not learnable and is incorporated into the system 100 to elicit variability with respect to the index z from the beginning of training of the cognitive model 120 .
[0125] That is, the a priori machine learning model 110 has weights that are fixed to randomly initialized values. In other words, the system 100 or other training system initializes the weights of the a priori model 310 at the beginning of training of the cognitive model 120, and then keeps the weights fixed throughout the training of the cognitive model 120 and after training.
[0126] The prior model 310 may have any of a variety of architectures.
[0127] As an example, the a priori model 310 can have the same architecture as the cognitive model 120, but the weights remain fixed during training rather than being adjusted. In some of these examples, at the beginning of training, the weights of the a priori model and the cognitive model are initialized to different values.
[0128] As another example, a priori model 310 may be composed of multiple separate models.
[0129] For example, prior model 310 may include an integration of a first prior machine learning model that receives cognitive inputs—i.e., the same inputs as cognitive model 120—and a second prior machine learning model that receives new model inputs and, optionally, one or more sampled indices.
[0130] In this example, the first a priori model may have the same architecture as cognitive model 120 .
[0131] The ensemble of second prior models can have any suitable architecture, such as a convolutional neural network, MLP, etc. Utilizing an ensemble of second prior models can improve the performance of the system, for example, where the model input is high-dimensional, such as a large image or other sensor data, and the internal representation received by the cognitive model is a low-dimensional representation of the input. That is, utilizing an ensemble of small models that are not trained but receive the full input can allow for more efficient training of a computationally more efficient cognitive model.
[0132] As another example, the prior model 310 can be an ensemble of multiple models, each of which receives cognitive input. In this example, the prior models 310 in the ensemble can all have the same architecture, but weights initialized differently.
[0133] For each z, the system 100 then combines the base output, the cognitive output, and the prior output to generate a combined output. For example, the system may sum the base output, the cognitive output, and the prior output to generate the combined output. When there are multiple samples of z, the system 100 may include an uncertainty measure in addition to the final combined output generated from all samples in the final output. As another example, the system 100 may use the uncertainty measure to modify the final combined output to generate the final output.
[0134] Figure 4 is a flow chart of an example process 400 for processing model inputs to generate final model outputs. For convenience, process 400 will be described as being performed by a system of one or more computers located in one or more locations. For example, a machine learning system appropriately programmed according to the present specification, such as Figure 1 The machine learning system 100 depicted in can perform process 400.
[0135] The system receives new model input (step 402).
[0136] The system processes the new model input using the base machine learning model to generate a base output of the machine learning task for the new model input (step 404).
[0137] The system samples a set of one or more indices from a reference distribution over the indices (step 406).
[0138] For each sampled index of one or more sampled indices in the group, the system uses a cognitive machine learning model to process a cognitive input comprising the sampled index and (i) a new model input, (ii) data derived from the new model input, or (iii) both to generate a cognitive output of the machine learning task for the new model input (step 406).
[0139] The system generates a final output of the machine learning task from at least the base output of the machine learning task and a set of one or more sampled indices' cognitive outputs (step 408).
[0140] Specifically, as described above, the system can also optionally use an untrained prior cognitive machine learning model to process prior inputs including sampled indices and (i) new model inputs, (ii) data derived from the new model inputs, or (iii) both to generate prior outputs and generate final outputs using basic outputs, cognitive outputs, and prior outputs.
[0141] Figure 5 An example 500 of results achieved by the machine learning system 100 relative to two conventional systems is shown.
[0142] Specifically, Figure 5 Results achieved by machine learning system 100 (“epinet”) on an image classification task are shown relative to a single base neural network (“ResNet”) and an ensemble of base neural networks (“ensemble”).
[0143] Figure 5 The performance of systems with different total numbers of parameters is shown with respect to three different performance metrics: classification accuracy, marginal log loss, and joint log loss. Marginal log loss measures the logarithm of the value of the marginal loss function on which the model was trained, such as cross entropy. Joint log loss measures the logarithm of the value of the joint loss function (and not the loss function on which the model was trained) that measures the joint probability assigned to the input sequence.
[0144] from Figure 5 As can be seen in , given the same number of parameters, EpiNet achieves similar classification accuracy and marginal logarithmic loss as the other two systems, but achieves significantly lower (better) joint logarithmic loss than the other two systems. Specifically, the system achieves significantly better joint logarithmic loss than the ensemble with significantly more parameters (and therefore significantly higher computational cost).
[0145] Since many real-world tasks require accurate joint predictions, e.g., to facilitate real-world decision making or exploration, Figure 5The results show that system 100 can be effectively used for real-world decision making at a fraction of the computational cost of an integration of a larger model.
[0146] Specifically, as described above, edge predictions do not distinguish between ambiguity in the underlying input and insufficient data. However, in order to generate accurate joint predictions, the predictions generated by the model need to effectively account for the ambiguity in the inputs. Therefore, models that make accurate joint predictions can be effectively incorporated into real-world tasks such as safety-critical tasks like robotics or autonomous driving, while models that can make accurate edge predictions but not accurate joint predictions cannot. Figure 5 As shown in the results in , due to the improvement in the joint prediction log loss (and comparable performance in classification accuracy and marginal log loss), system 100 can be effectively used for real-world decision making at a fraction of the computational cost of an ensemble of larger models relative to conventional systems.
[0147] This specification associates the term "configured" with system and computer program components. For a system of one or more computers to be configured to perform a particular operation or action, it is meant that the system has installed thereon software, firmware, hardware, or a combination thereof, which, in operation, causes the system to perform the operation or action. For one or more computer programs to be configured to perform a particular operation or action, it is meant that the one or more programs include instructions that, when executed by a data processing device, cause the device to perform the operation or action.
[0148] The embodiments and functional operations of the subject matter described in this specification can be implemented in digital electronic circuits, in tangibly embodied computer software or firmware, in computer hardware - including the structures disclosed in this specification and their structural equivalents - or a combination of one or more of them. The embodiments of the subject matter described in this specification can be implemented as one or more computer programs, for example, one or more modules of computer program instructions encoded on a tangible non-transitory storage medium, for execution by a data processing device or for controlling the operation of a data processing device. 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 propagation signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device for execution by a data processing device.
[0149] The term "data processing apparatus" refers to data processing hardware and covers all kinds of apparatus, devices and machines for processing data, including, for example, a programmable processor, a computer or a plurality of processors or computers. The apparatus may also be or further include special-purpose logic circuits, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). In addition to hardware, the apparatus may optionally include code that creates an execution environment for a computer program, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[0150] A computer program, which may also be referred to or described as a program, software, software application, app, module, software module, script or code, may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; and may 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 may be stored in a portion of a file containing other programs or data, such as 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, such as files storing one or more modules, subroutines or code portions. A computer program may be deployed for execution on one computer located at one site or on multiple computers distributed across multiple sites and interconnected by a data communications network.
[0151] In this specification, the term "database" is used broadly to refer to any collection of data: the data need not be structured in any particular way, or at all, and may be stored on storage devices in one or more locations. Thus, for example, an index database may include multiple data collections, each of which may be organized and accessed differently.
[0152] 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. Typically, 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 specific engine; in other cases, multiple engines can be installed and run on the same one or more computers.
[0153] 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 input data and generating output. The processes and logic flows can also be performed by a dedicated logic circuit such as an FPGA or ASIC, or by a combination of a dedicated logic circuit and one or more programmed computers.
[0154] Computers suitable for executing computer programs can be based on general or special microprocessors or both, or any other kind of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory can be supplemented or incorporated therein by a dedicated logic circuit. Typically, the computer will also include or be operably coupled to receive data from one or more large-capacity storage devices for storing data or to transmit data thereto or both, such as a disk, a magneto-optical disk or an optical disk. However, the computer does not need to have such a device. In addition, the computer can be embedded in another device, such as a mobile phone, 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, such as a universal serial bus (USB) flash drive, to name a few.
[0155] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CDROM and DVD-ROM disks.
[0156] To provide interaction with a user, embodiments of the subject matter described in this specification may be implemented on a computer having a display device, such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user, as well as a keyboard and pointing device, such as a mouse or trackball, through which the user can provide input to the computer. Other kinds of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user may be received in any form, including acoustic, voice, or tactile input. In addition, the computer may interact with the user by sending documents to and receiving documents from a device used by the user; for example, by sending a web page to a web browser on a user's device in response to a request received from the web browser. In addition, the computer may interact with the user by sending text messages or other forms of messages to a personal device, such as a smartphone running a messaging application, and receiving a response message from the user in return.
[0157] The data processing apparatus for implementing the machine learning model may also include, for example, dedicated hardware accelerator units for processing common and computationally intensive parts of machine learning training or production, such as inference, workloads.
[0158] Machine learning models can be implemented and deployed using machine learning frameworks, such as the TensorFlow framework or the Jax framework.
[0159] Embodiments of the subject matter described in this specification may be implemented in a computing system that includes a back-end component, such as a data server, or includes a middleware component, such as an application server, or includes a front-end component, such as a graphical user interface, a web browser, or an application 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 may be interconnected by digital data communication of any form or medium, such as a communication network. Examples of communication networks include local area networks (LANs) and wide area networks (WANs), such as the Internet.
[0160] The computing system may include a client and a server. The client and the server are usually remote from each other and typically interact through a communication network. The relationship between the client and the server is generated by computer programs running on respective computers and having a client-server relationship with each other. In some embodiments, the server transmits data such as HTML pages to a user device, for example, for displaying data to a user interacting with a device acting as a client and receiving user input from the user. Data generated at the user device, such as the result of a user interaction, can be received from the device at the server.
[0161] Although this specification contains many specific implementation details, these details should not be interpreted as limitations on the scope of any invention or the scope that may be claimed, but should be interpreted as descriptions of features specific to a particular embodiment of a particular invention. Some features described in this specification in the context of separate embodiments may also be implemented in combination in a single embodiment. On the contrary, the various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments. In addition, although features may be described above as working in certain combinations and even initially required to be so, in some cases, one or more features may be deleted from the required combination, and the required combination may be for a variant of a sub-combination or a sub-combination.
[0162] Similarly, although operations are depicted in a particular order in the figures and described in the claims, it should not be understood as requiring that such operations be performed in the particular order shown or in a sequential order, or that all of the operations shown be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments 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 into a single software product or packaged into multiple software products.
[0163] Specific 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 the desired results. As an example, the processes depicted in the accompanying drawings do not necessarily require the particular order shown or sequential order to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous.
Claims
1. A method executed by one or more computers, the method comprising: Receive new model input; Processing the new model input using a base machine learning model to generate a base output of the machine learning task for the new model input; sampling a set of one or more indices from a reference distribution over the indices; For each sampled index of the set of one or more sampled indices: Using a cognitive machine learning model to process a cognitive input comprising the sampled index and (i) the new model input, (ii) data derived from the new model input, or (iii) both, to generate a cognitive output of the machine learning task for the new model input; as well as A final output of the machine learning task is generated from at least the base output of the machine learning task and the cognitive output of the set of one or more sampled indices.
2. The method according to claim 1, wherein: The base model input does not include any of the sampled indices.
3. A method according to any preceding claim, wherein: The base machine learning model generates an internal representation of the new network input while generating the base model output, wherein the data derived from the model input is the internal representation, and wherein the cognitive input includes the sampled index and (i) the internal representation or (ii) both the internal representation and the new model input.
4. The method according to claim 3, wherein: The underlying machine learning model is a neural network, and wherein the internal representation is the output of one or more hidden layers of the neural network.
5. The method according to claim 4, wherein: The internal representation is the output of the last hidden layer of the neural network.
6. The method according to any preceding claim, further comprising: For each sampled index of the one or more sampled indices: processing a priori input comprising the sampled index and (i) the new model input, (ii) the data derived from the new model input, or (iii) both using a priori machine learning model to generate a priori output of the machine learning task for the new model input, wherein the priori machine learning model has weights fixed to randomly initialized values, and Wherein, generating the final output of the machine learning task includes: A final output of the machine learning task is generated from the basic output of the machine learning task, the cognitive output of the one or more sampled indices, and the prior output of the one or more sampled indices.
7. The method according to claim 6, wherein: The priori machine learning model includes: (i) receiving a first priori machine learning model of the cognitive input, and (ii) receiving an integration of the new model input and a second prior machine learning model of the one or more sampled indices.
8. A method according to any preceding claim, wherein: The cognitive machine learning model is computationally more efficient than the basic machine learning model.
9. A method according to any preceding claim, wherein: The set includes only one sampled index, and wherein generating the final output of the machine learning task includes: combining at least the base output of the machine learning task and the cognitive output of the sampled index to generate a combined output of the machine learning task; and Using the combined output as the final output of the machine learning task.
10. A method according to any preceding claim, wherein: The set includes a plurality of sampled indices, and wherein generating the final output of the machine learning task includes: for each index, combining at least the base output of the machine learning task and the cognitive output of the sampled index to generate a combined output of the machine learning task; and The final output of the machine learning task is generated from the combined outputs of the plurality of indices.
11. The method according to claim 10, wherein: Generating the final output includes calculating a measure of central tendency of the combined output.
12. The method according to claim 10 or claim 11, further comprising: An uncertainty measure for the final output is generated from the combined output of the plurality of indices.
13. The method according to any one of claims 9 to 12, wherein: The base output and the cognitive output each include a respective log-odds for each of a plurality of classes, and wherein combining at least the base output of the machine learning task and the cognitive output of the sampled exponential to generate the final output of the machine learning task includes: For each class, at least the log odds for that class from the base output and the log odds for that class from the cognitive output are added to generate a combined log odds for that class.
14. The method according to any one of claims 9 to 13, wherein: The base output and the cognitive output each include a corresponding regression value, and wherein combining at least the base output of the machine learning task and the cognitive output of the sampled index to generate the final output of the machine learning task includes: Respective values from at least the base output and the cognitive output are added to generate a combined regression value.
15. A method according to any preceding claim, wherein: The cognitive machine learning model has been trained to optimize the objective function of the machine learning task while keeping the underlying neural network fixed.
16. The method according to any one of claims 1 to 14, wherein: The cognitive machine learning model and the base neural network have been jointly trained to optimize the objective function of the machine learning task.
17. A method according to any preceding claim, wherein: The new model input is one or more images, and the machine learning task is a computer vision task.
18. The method according to claim 17, wherein: The computer vision task is image classification, and the final output includes a corresponding score for each of a plurality of object categories.
19. The method according to any one of claims 1 to 16, wherein: The new model inputs are observations that characterize the state of the environment, and the final outputs define actions to be performed by an agent interacting with the environment.
20. The method according to claim 19, wherein: The environment is a real-world environment, the agent is a mechanical agent, and the observations include data from one or more sensors configured to sense the environment.
21. The method of claim 19 or claim 20, further comprising: Actions are selected that cause the agent to explore the environment using the final output.
22. A system comprising: one or more computers; as well as One or more storage devices storing instructions which, when executed by the one or more computers, cause the one or more computers to perform corresponding operations of the method according to any one of claims 1 to 21.
23. One or more computer-readable storage media storing instructions which, when executed by one or more computers, cause the one or more computers to perform corresponding operations of the method according to any one of claims 1 to 21.