Conformal training of machine learning models

End-to-end training of classification models with conformal predictors optimizes the predicted confidence set, addressing the lack of reliability in existing models by ensuring accurate and smaller confidence sets, enhancing safety in high-risk applications.

JP2024538690AActive Publication Date: 2024-10-23ジーディーエム·ホールディング·エルエルシー
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024520743
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-10-05
Filing Date
2022-10-05
Publication Date
2024-10-23
Estimated Expiration
2042-10-05

AI Technical Summary

Technical Problem

Existing machine learning models lack reliable uncertainty estimates and explicit guarantees for their predictions, particularly in high-risk applications like medical diagnostics and autonomous driving, leading to potential failures.

Method used

A method for end-to-end training of classification models using conformal predictors, which involves differentiable smooth calibration functions to optimize the predicted confidence set, ensuring that the confidence set includes the true classification with a specified probability while minimizing its size.

Benefits of technology

This approach provides reliable uncertainty estimates and reduces the size of the predicted confidence set, improving decision-making by ensuring that only relevant classifications are included, thus enhancing safety and reducing unnecessary anxiety or actions in critical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024538690000001_ABST
    Figure 2024538690000001_ABST
Patent Text Reader

Abstract

A method, computer system, and apparatus, including a computer program encoded on a computer storage medium, for training a classification machine learning model, the system obtains calibration training examples and prediction training examples, determines a threshold based on the calibration training examples, generates data characterizing a predicted confidence set based on the threshold and the prediction training examples, and updates model parameters based on at least the predicted confidence set.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to U.S. Provisional Patent Application No. 63 / 252,521, filed October 5, 2021, the disclosure of which is incorporated herein by reference in its entirety.

[0002] This specification relates generally to training machine learning models to generate predictions for inputs, and in particular to training machine learning models to generate conformal classifications that define a confidence set that contains true predictions at a confidence level specified by a user. [Background technology]

[0003] A machine learning model is configured to process input data according to the parameters of the machine learning model to generate an output that defines a prediction or decision. For example, a neural network is a machine learning model that uses 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 the next layer in the network, i.e., 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 a respective set of parameters.

[0004] The parameters of the machine learning model may be determined through a training process based on training data including one or more training examples. For example, a neural network may be trained by updating network parameters including, for example, weights and bias coefficients of the network layers of the neural network. [Prior art documents] [Non-patent literature]

[0005] [Non-Patent Document 1] Sadinle et al., “Least ambiguous set-valued classifiers with bounded error levels,” Journal of the American Statistical Association (JASA), 114(525):223–234. [Non-Patent Document 2] Blondel et al., "Fast differentiable sorting and ranking", Proc. of the International Conference on Machine Learning (ICML), 2020 [Non-Patent Document 3] Cuturi et al., “Differentiable ranking and sorting using optimal transport,” Advances in Neural Information Processing Systems (NeurIPS), 2019 [Non-Patent Document 4] Romano et al., “Classification with valid and adaptive coverage,” Advances in Neural Information Processing Systems (NeurIPS), 2020 Summary of the Invention [Means for solving the problem]

[0006] Conformal prediction provides an estimate of uncertainty and explicit guarantees regarding output predictions from an underlying machine learning model, such as a classification model. For example, a conformal predictor can predict a confidence set containing the true classification at a confidence level specified by a user for the output generated by a classification model. The predictive efficiency of a conformal predictor can be measured by the size of the confidence set, with a larger size of the confidence set indicating reduced predictive efficiency.

[0007] This specification describes methods, computer systems, and apparatus, including a computer program encoded on a computer storage medium, for training a classification machine learning model for use with a conformal predictor to predict a confidence set.

[0008] In general, a classification model is configured to process model inputs to generate, for each particular classification in a set of classifications, a classification output that indicates the predicted probability of the model input with respect to the particular classification.

[0009] A classification model can be a classifier neural network configured to perform any of a variety of classification tasks. As used herein, a classification task is any task that requires the model to generate an output that includes a respective score (e.g., a predicted probability) for each of a set of multiple categories. The respective scores can be used to select one or more of the categories as a "classification" of the model input using the respective scores.

[0010] An example of a classification task is image classification, where the input to the classification model is an image, e.g., intensity values ​​of pixels of the image, the categories are object categories, and the task is to classify the image as depicting an object from one or more of the object categories. That is, the classification output for a given input image indicates a prediction of one or more object categories depicted in the input image. As used herein, an image may refer to a still image or a moving image (e.g., a video). The input to the classification model (i.e., image data) may include pixels of an image or another representation of an image, such as may be generated by an encoder, e.g., an encoder neural network. The image may include color or monochrome pixel value data. Such an image may be captured from an image sensor, such as a camera or a LIDAR sensor.

[0011] Another example of a classification task is text classification, where the input to a classification model is text and the task is to classify the text as belonging to one of a number of categories. One example of such a task is a sentiment analysis task, where the categories each correspond to a different possible sentiment of the task. Another example of such a task is a reading comprehension task, where the input text includes a context passage and a question, and the categories each correspond to a different segment from the context passage that may be an answer to the question. Other examples of text processing tasks that may be grouped under classification tasks include entailment tasks, paraphrasing tasks, text similarity tasks, sentiment tasks, sentence completion tasks, grammaticality tasks, etc.

[0012] Other examples of classification tasks include audio classification tasks, such as voice processing tasks, where the input to the classification model is audio data representing speech. Examples of voice processing tasks include language identification (where the categories are different possible languages ​​of speech), hot word identification (where the categories indicate whether one or more particular "hot words" are said in the audio data), etc. The audio data may be obtained from a sensor, e.g., an audio transducer or microphone, and may include a representation of a digitized audio waveform, e.g., a speech waveform. Such a representation may include samples representing digitized amplitude values ​​of the waveform, or a time-frequency domain representation of the waveform, e.g., a STFT (Short-Time Fourier Transform) or MFCC (Mel-Frequency Cepstral Coefficients) representation. The output of the (audio) classification model may include predictions that audio signals indicative of different categories of audio signals (e.g., signals corresponding to an alarm sounding, a person speaking, a machine or vehicle being driven, etc.) are present in the input audio data, where the output may be respective category scores indicating the likelihood that the different audio signals are present in the audio data or a segment of the audio data. Classification tasks may include speech or sound recognition tasks (e.g., category scores may indicate the likelihood that different words are present in the audio data), telephone or speaker classification tasks (e.g., category scores may indicate the likelihood that different speakers were speaking in the audio data).

[0013] In general, input data to a classification model may include any signal, e.g., waveforms (e.g., time series) of signals (e.g., image data of an object) from a sensor, e.g., a sensor sensing a physical feature of a real-world object. In some implementations, the sensor data may include data characterizing the state of a robot or vehicle, e.g., pose data and / or position / velocity / acceleration data, or data characterizing the state of an industrial plant, factory, or data center, e.g., sensed electronic signals, such as sensed current signals and / or temperature signals. The classification task may include an event or state tagging task, in which case the output of the classification model may include respective category scores indicating whether different events or different states (e.g., of an environment or equipment within the environment) are represented in the input data or segments of the input data. In some examples, such events or states may include the operating state of a device or machine, and / or transitions between different states, e.g., transitions between an expected or functioning state and an unexpected or non-functioning state of a device or machine. The classification model output may include category scores for each of the different categories that indicate the physical features (e.g., size, position, speed) or state of the object or environment.

[0014] The conformal predictor may be used to assess the uncertainty of the classification prediction output by the classification machine learning model. For any suitable classification model applied to any classification task, the predictor is configured to process an input including a classification output from the classification model to generate data that identifies a confidence set including one or more output classifications selected from a set of classifications such that, for a model input to the classification model, the probability that the true classification of the model input is included in the confidence set is equal to or greater than a confidence level, e.g., a confidence level defined by a user. In other words, the classification accuracy of the confidence set output by the conformal predictor (in the sense that the confidence set includes the true classification) is guaranteed to comply with a confidence level that may be defined by a user depending on the particular application.

[0015] The above properties of conformal predictors are important for achieving reliability of conformal classification machine learning models, especially in applications with high risk of failure, such as medical diagnosis, autonomous vehicles, and robotics. For example, in computer-aided cancer detection, it may be more important and useful to capture a set of potential diagnoses with high confidence (e.g., 99% confidence level) than to provide a single most likely diagnosis without providing any assurance of reliability.

[0016] In one example, the classification model and conformal predictor are used for medical screening and diagnostic tasks, where the input to the model is medical data characterizing the health of a user, and the model output is a prediction across multiple categories, each representing a different diagnosis. The model input may include medical images, such as one or more medical scan images, X-rays, CT, MRI, or ultrasound images of the subject. Alternatively or additionally, the model input may include microscopic tissue images from biopsy tissue. Alternatively or additionally, the model input may include physiological parameters of the subject, such as the subject's BMI, blood pressure, heart rate, diabetic environment, serum levels of various hormones, and genetic markers, and symptom information of the subject, such as the location and severity of bodily discomfort. Alternatively or additionally, the model input may optionally include other information characterizing the subject. The classification model may be configured to process the model input to predict probability scores of multiple diagnostic categories. For example, when the medical diagnosis task is cancer, e.g., breast cancer, screen and detect, the diagnostic categories may include different diagnoses of breast cancer screening and detection, including, for example, “Normal”, “Adenosis”, “Fibroadenoma”, “Ductal Carcinoma”, “Tubular Carcinoma”, “Lobular Carcinoma”, etc. Since missing early diagnosis of breast malignancies such as invasive ductal carcinoma may cause significantly worse prognosis for patients, it may be important to include a set of possible diagnoses in the prediction with a guaranteed confidence level to guide follow-up examinations and interventions. For example, on the one hand, the classification output may indicate that the most likely diagnosis is the benign breast tumor “Fibroadenoma” (e.g., with a predicted probability of 0.6). On the other hand, the confidence set predicted by a conformal predictor with a 95% confidence level may include {“Fibroadenoma”, “Ductal Carcinoma”, “Tubular Carcinoma”}. Thus, the predicted confidence set provides more information than the classification output alone, since simply looking at the highest scoring category would not indicate any cause for concern, whereas malignancies included in the predicted confidence set should cause concern and follow-up.

[0017] In another example, the classification model and the conformal predictor are used on board an autonomous vehicle. In this example, the input to the model can be sensor data captured by the vehicle's sensors, such as image data, LIDAR data, radar data, or some combination, and the classification model output is a respective score for each of a number of object categories representing different types of objects, such as vehicles, pedestrians, traffic signs, cyclists, etc. Since missing detection of a pedestrian or cyclist in the scene can cause a fatal error in the vehicle's operation, it may be important to include a set of possible classifications of the object in the prediction with a guaranteed confidence level to guide the vehicle's operation. For example, on the one hand, the classification output may indicate that the most likely classification is a traffic sign. On the other hand, the confidence set predicted by the conformal predictor at a 95% confidence level may include a pedestrian and / or a cyclist. Thus, while simply looking at the highest scoring categories may not indicate any cause for concern, the predicted confidence set provides more information than the classification output alone, as pedestrians and / or cyclists included in the predicted confidence set should signal vigilance in maneuvering the vehicle.

[0018] In one innovative aspect, the present specification describes a method for training a conformal classification machine learning model, the method being performed by a system including one or more computers.

[0019] The system obtains a set of calibration training examples and uses the calibration training examples to determine a threshold. Each calibration training example includes a respective training model input and a respective classification label for the respective training model input. For each respective calibration training example in the set of calibration training examples, the system processes the respective training model input of the respective calibration training example using a classification model according to current values ​​of the model parameters to generate a respective classification output for the respective training model input. The system determines the threshold based on at least the classification output generated for the calibration training example, the classification label of the calibration training example, and a confidence level.

[0020] The system further obtains a set of predictive training examples. Each predictive training example includes a respective training model input and a respective classification label of the respective training model input. For each respective predictive training example in the set of predictive training examples, the system processes the respective model input of the respective predictive training example using a classification model according to the current values ​​of the model parameters to generate a respective classification output, and processes the input including the respective classification output and a threshold with a smooth prediction function to generate a respective predicted output. The smooth prediction function is differentiable with respect to the input to the smooth prediction function (e.g., one or more derivatives of the smooth prediction function with respect to the input may be a continuous function).

[0021] The system determines gradients of training loss with respect to the model parameters, the training loss including at least an inefficiency loss that measures, for each respective predicted training example, a value indicative of the size of each predicted confidence set characterized by each respective predicted output. The system uses the gradients to update the current values ​​of the model parameters.

[0022] In some implementations, each prediction output includes a confidence score for each classification in the set of classifications, each confidence score characterizing a respective probability that the respective classification is included in the predicted confidence set.

[0023] In some implementations, the classification models include neural networks having any suitable architecture, such as multi-layer perceptrons or ResNets.

[0024] In some implementations, the inefficiency loss measures a weighted size that is calculated based on the size of each predicted confidence set scaled by a weighting factor for a set of classifications.

[0025] In some implementations, the training loss further includes a classification loss that measures the classification error of the output classifications included in the predicted confidence set characterized by each predicted output.

[0026] The classification loss may include a first term that measures the error of not including the true classification in a predicted confidence set characterized by the predicted output for each respective predicted training example.

[0027] In an implementation, the model inputs may include sensor data (e.g., image, video, and / or audio data), with the classifications corresponding to object categories, and / or the model inputs may include medical data, such as physiological measurements of a patient, with the classifications each corresponding to a different diagnoses for the patient, and / or the model inputs may include observations of an environment, with the classifications each corresponding to a different condition of the environment.

[0028] The classification loss may also include a second term that measures the error of including a specified classification in the respective output confidence set that is not the true classification for each respective predicted training example. The specified classification may be determined as a classification at odds with the true classification based on a priori information (i.e., prior information, or information known "a priori," e.g., information separate from or in addition to information included in the model inputs for determining the classification output). For example, in the case of medical diagnosis classification, it may be desirable to not include high-risk diseases such as "ductal carcinoma" in the confidence set when the ground truth label is "normal." This is motivated by avoiding unnecessary anxiety or testing for the patient. Thus, the second term of the classification loss may be used to penalize certain high-risk classifications when the true label indicates a low-risk classification.

[0029] In some implementations, the prediction function includes a smoothed implementation of a threshold function applied to the difference between a first value calculated based on the classification output and a second value calculated based on a threshold. In one example, for each respective prediction training example in the set of prediction training examples, the first value may be calculated as a predicted probability indicated by a respective classification output for a particular classification. In another example, for each respective prediction training example in the set of prediction training examples, the first value may be calculated as a sum of a plurality of predicted probabilities indicated by a respective classification output for a plurality of classifications from the set of classifications. The smoothed threshold function may be a sigmoid function.

[0030] In some implementations, in determining the threshold, the system processes the classification output from the classification model, the classification labels of the calibration training examples, and a confidence value with a smooth calibration function that outputs the threshold. The smooth calibration function is differentiable with respect to the classification output. The calibration function may be configured to, for each respective calibration training example in the set of calibration training examples, calculate a respective conformity score based on the respective classification output and the respective classification label, and perform a smoothed implementation of a quantile operation on the conformance score and the confidence level.

[0031] In some implementations, the system further obtains a batch of training examples and randomly samples the batch of training examples to generate a set of calibration training examples and a set of prediction training examples. The system can also obtain multiple batches of training examples and repeatedly perform training of the classification machine learning model on each of the batches of training examples.

[0032] This specification also describes a method for performing conformal classification. The method is implemented by a system including one or more computers. The system obtains a model input, obtains a classification model trained using any of the above methods, and processes the model input with the classification model to generate a classification output indicating, for each particular classification in a set of classifications, a predicted probability of the model input for the particular classification. The system further obtains a threshold predicted by a non-smooth calibration function according to a confidence value based on a calibration dataset, and processes the model output and the threshold to generate a confidence set that may include one or more output classifications selected from the set of classifications. (If none of the classifications meets the condition of the confidence value, the output confidence set may be empty in some cases).

[0033] In an implementation, the method may further include (automatically) performing one or more of: controlling (i.e., giving commands to) a robot or vehicle (e.g., an autonomous or semi-autonomous land, air, or sea vehicle) based at least in part on the confidence set, where the model input includes sensor data (e.g., image, video, and / or audio data) acquired by one or more sensors (e.g., sensors of the robot or vehicle) and the classifications correspond to object categories (e.g., categories of objects with which the robot or vehicle may interact or manipulate or that are present in an environment surrounding the robot or vehicle); providing one or more medical diagnoses, where the model input includes medical data such as physiological measurements of a patient (e.g., medical images) and the classifications each correspond to a different diagnoses for the patient; and controlling the agent to perform a task in an environment, where the model input includes observations of the environment (e.g., sensor data acquired from sensors of the environment) and the classifications each correspond to a different state of the environment.

[0034] In some implementations, a robot (e.g., a stationary or moving machine) interacts with a real-world environment to accomplish a particular task, such as to locate an object of interest within the environment, or to move an object of interest to a specified location within the environment, or to navigate to a specified destination within the environment.

[0035] In some implementations, the agent may perform actions in a real-world (or simulated) environment based at least in part on the trust set. The environment may include equipment in a facility, such as, for example, a data center, a server farm, a power transmission or water distribution system, or a manufacturing plant or service facility. The observations may then relate to the operation of the plant or facility. For example, additionally or alternatively, the observations may include observations of power or water usage by the equipment, observations of power generation or distribution control, or observations of resource usage or waste. The agent may perform actions in the environment to increase efficiency, for example, by reducing resource usage and / or reducing the environmental impact of operations in the environment, for example, by reducing waste, and / or for safety reasons (e.g., to prevent harm to equipment and / or users). The actions may include actions that control or impose operating conditions on equipment of the plant / facility, and / or actions that result in changes to settings of the plant / facility's operation, for example, to adjust or turn on / off components of the plant / facility.

[0036] This specification also describes a system that includes one or more computers and one or more storage devices that store instructions that, when executed by the one or more computers, cause the one or more computers to perform the methods described above.

[0037] This specification also describes one or more computer storage media that store instructions that, when executed by one or more computers, cause the one or more computers to perform the methods described above.

[0038] In situations where the systems discussed herein may collect information about the user or utilize such information, the user may be given the opportunity to control whether the program or feature collects user information. Additionally, certain information may be processed in one or more ways before it is stored or used to remove any personally identifiable information therefrom. Thus, the user may be able to control how information is collected about the user and used by the systems described herein.

[0039] The subject matter described herein can be implemented in particular embodiments to realize one or more of the following advantages.

[0040] Recent deep learning based classifiers show very high accuracy on test data but do not provide any guarantee of safe deployment, especially in machine learning applications where the risk of failure is high, such as medical diagnosis and autonomous driving. For regular machine learning classification models, predictions are obtained without reliable uncertainty estimates and explicit guarantees. Conformal prediction addresses these issues by using the classifier's predictions, e.g., its probability estimates, to predict a confidence set that contains the true class with a probability specified by the user.

[0041] Typically, conformal prediction is used as a separate processing step after the machine model is trained. That is, the machine learning model is not trained with the objective of predicting the optimal confidence set. For example, a machine learning classification model is typically trained to minimize the cross-entropy loss without considering factors such as reducing the expected size of the confidence set output by the conformal prediction function. After the classification model is trained, the parameters of the classification model are fixed when the conformal predictor is used to calculate the confidence set, leaving the conformal predictor little or no room to control the predicted confidence set, such as the size (inefficiency) or composition (i.e., the classes included) of the confidence set.

[0042] To overcome the limitations of conventional conformal prediction methods, the present specification provides techniques for end-to-end training of classification models with conformal predictors. By developing a differentiable model for conformal prediction and training the classification model with an objective calculated based on the predicted confidence set, the described techniques allow optimization of a specific objective defined for the predicted confidence set without losing the guarantee. For example, the provided techniques can be used to generate conformal predictions that reduce inefficiencies, i.e., reduce the size of the predicted confidence set, and thus provide better guidance in decision-making based on the predicted classification. The reduction in inefficiencies of the output confidence set can benefit many practical applications. For example, in medical diagnosis, smaller confidence sets are important to avoid confusion and anxiety for doctors and patients, ultimately leading to better diagnosis and improved decision-making of medical interventions.

[0043] Furthermore, the described techniques allow shaping the confidence set according to the application scenario by designing the inefficiency loss and / or classification loss used for training. This allows the system to better exploit a priori information such as the importance of certain classifications and / or the relationship between different classifications. For example, in the context of medical diagnosis, the provided techniques may be used to reduce inefficiencies, i.e., uncertainty, especially regarding low-risk diseases. This may guide doctors to focus more on high-risk diseases. Alternatively or additionally, the described techniques may be used to enforce constraints on the composition of the confidence set such that it is less likely to include two diseases that are frequently confused by doctors, or to include both high-risk and low-risk diseases. These flexibilities in shaping the optimization objectives of the confidence set may be advantageous in certain scenarios to further improve diagnosis and decision-making. [Brief description of the drawings]

[0044] [Figure 1] FIG. 1 illustrates an example conformal training system for training a classification model. [Diagram 2] FIG. 1 illustrates an example of performing conformal training of a classification machine learning model. [Diagram 3] FIG. 1 illustrates an exemplary conformal classification system. [Figure 4] 1 is a flow diagram illustrating an example process for training a classification model. [Diagram 5] 1 is a flow diagram illustrating an example process for performing conformal classification. [Figure 6] FIG. 13 shows a performance comparison between a classification model trained using conformal training and a base classification model without conformal training in predicting the confidence set. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

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

[0046] 1 illustrates an example of a conformal training system 100 for training a machine learning model, e.g., a classification machine learning model 120. System 100 is an example of a system, implemented as a computer program on one or more computers at one or more locations, in which the systems, components, and techniques described below may be implemented.

[0047] Generally, the classification machine learning model 120 is configured to perform a classification task, i.e., to process input data and generate output data that manifests predicted classification information of the input data. The input data can manifest any type of data to be analyzed, e.g., images, text, audio signals, sensor measurements, event logs, etc. The output data can manifest classification information of the input data, e.g., one or more object categories of an object depicted by an input image, one or more text categories of an input text, one or more status categories of a system, one or more health condition categories of a person, etc.

[0048] The classification model 120 can be any suitable machine learning model for performing classification tasks. In some implementations, the classification model 120 can be a classifier neural network having any suitable architecture configured to perform any of a variety of classification tasks. For example, a classifier neural network can be used to process an input and generate an output that includes a respective score (e.g., predicted probability) for each of a set of multiple classifications. The respective predicted probabilities can be used to select one or more of the categories as a "classification" for the model input.

[0049] The goal of the conformal training system 100 is to optimize parameters (e.g., network weights and bias coefficients) of the classification model 120 with respect to one or more optimization measures of a predicted confidence set based on the confidence level 116. This process may be referred to as conformal training of the classification model 120. The predicted confidence set includes one or more output classifications selected from a set of classifications such that, for a model input of the classification model 120, the probability that the true classification of the model input is included in the confidence set is equal to or greater than the confidence level 116. That is, the predicted accuracy of the confidence set (in the sense that the confidence set includes the true classification) is guaranteed to meet a confidence level that may be defined by a user depending on the particular application. As will be discussed hereinafter, the optimization measure of the confidence set may be configured to aim to minimize inefficiency, i.e., the size of the confidence set, while ensuring the inclusion of the true classification at the confidence level 116.

[0050] The training process performed by the system 100 is different from training a classification model in a normal conformal classification process. In normal conformal classification, the classification model is pre-trained on training data without considering the properties of the predicted confidence set. For example, the classification model may be trained only with cross-entropy loss. After the classification model is trained, a conformal calibration process is applied to the classification model (with its model parameters fixed at trained values) on a calibration dataset to determine a threshold τ for the suitability score calculated based on the predicted classification probability. The suitability score may be understood as a measure that quantifies the suitability or insuitability (or "strangeness") of a data sample in a given dataset. The threshold τ may be determined by analyzing the data distribution of the classification model output on the calibration dataset with respect to a user-specified confidence level. The threshold τ may then be used to determine the confidence set in comparison with the suitability score calculated for the classification model output.

[0051] In contrast, in the conformal training process performed by the system 100, the classification model 120 is trained end-to-end with conformal calibration (to determine the threshold τ 135) and conformal prediction (to predict the confidence set). As a result, the training process directly optimizes the properties of the predicted confidence set. This process offers several advantages over regular conformal classification, as discussed below.

[0052] The system 100 obtains a number of training examples 110. Each training example represents a training model input, e.g., x i and x i The ground truth classification labels of each, say, y i In some implementations, the system 100 may perform conformal training of the classification model 120 using stochastic gradient descent on mini-batches of the set of training examples 110. For each batch of training examples, the system 100 may split the batch (e.g., by randomly sampling the batch) into a set of calibration training examples 112 and a set of prediction training examples 114. In general, the calibration training examples 112 and the set of prediction training examples 114 are disjoint sets. As described below, the system 100 may use the calibration training examples 112 in a calibration process to determine a fitness score threshold τ. The system 100 may use the prediction training examples 114 together with the threshold τ in a prediction process to predict data characterizing a predicted confidence set for each prediction training example 114. The predicted confidence set may be used to calculate a training loss to update the model parameters of the classification model 120.

[0053] In the calibration process, each calibration training example 112, e.g., (x i ,y i ), the system 100 performs a training on each training model input x i Each classification output π θ (x i) according to the current values ​​of the model parameters θ, to generate a classification model 120, e.g., π θ Using each training model input x i For example, if the set of multiple classifications contains K classifications [K], the classification output π θ (x i ) is the K predicted probabilities {π θ,k (x)}.

[0054] Each calibration training example (x i ,y i ), the system 100 calculates the ground truth label y i Based on the model output π θ (x i ) suitability score E θ (x i ,y i ) to calculate

[0055] In some implementations, according to a threshold conformal predictor (THR) formulation, the fitness score of a classification model output is E θ (x,k):=π θ,k (x) (1) It is defined as follows:

[0056] That is, the fitness score for a particular classification k is the classification model output π θ,k The predicted probability π for class k in (x) θ,k In typical conformal classification using the THR formulation, the confidence set is given by C θ (x; τ):={k:E θ (x,k):=π θ,k (x) ≥ τ} (2) It is determined as follows.

[0057] That is, if the predicted probability for a particular classification is equal to or greater than a threshold, then the particular classification is added to the confidence set C θ(x; τ). Details of the THR formulation can be found in Sadinle et al., "Least ambiguous set-valued classifiers with bounded error levels," Journal of the American Statistical Association (JASA), 114(525):223-234.

[0058] Also according to the THR formulation, the system 100 calculates for each calibration training example (x i ,y i ) with respect to the ground truth label y i Model output for π θ (x i ) suitability score E θ (x i ,y i ) as the predicted probability of the ground truth classification of the model input in the classification output, i.e.,

[0059]

number

[0060] It may be calculated as:

[0061] In practice, the fitness score may be defined as a logit (THRL) or log probability (THRLP) instead of a probability.

[0062] In conventional conformal prediction using the THR formulation, for a confidence level of 1-α (where α is the significance level that limits the error rate of the predicted confidence set), the threshold τ is

[0063]

number

[0064] It is calculated as follows:

[0065] In the formula, |I cal | is the size of the calibration training example set 112. The quantile operation in normal THR is to set the threshold τ to the classification output π θ (x i ) non-differentiable.

[0066] To enable end-to-end training of the classification model 120 and the conformal predictor, the system 100 uses a smooth calibration function 130 to perform a smoothed, i.e., differentiable, implementation of the quantile operation on the fitness scores, so that the calculated threshold τ is a function of the calibration examples.

[0067]

number

[0068] is differentiable with respect to the classification output of θ and is therefore differentiable with respect to the model parameters θ. This can be achieved using a suitable smooth sorting technique. One example of a sorting technique is described in Blondel et al., “Fast differentiable sorting and ranking,” Proc. of the International Conference on Machine Learning (ICML), 2020. Another example of a sorting technique is described in Cuturi et al., “Differentiable ranking and sorting using optimal transport,” Advances in Neural Information Processing Systems (NeurIPS), 2019. These smooth sorting implementations often include a “dispersion” hyperparameter ε such that the smooth sorting approximates a “hard” sorting for ε → 0.

[0069] In some implementations, following the adaptive prediction set (APS) formulation, the fitness score of a classification model output is

[0070]

number

[0071] It is defined as follows:

[0072] During the ceremony,

[0073]

number

[0074] where U is a uniform random variable in [0,1] for breaking ties. That is, the fitness score for a particular classification k is the sum of the predicted probabilities π, ranked (from largest to smallest) with the smallest predicted probability scaled by a uniform random variable. θ,k It is defined as the sum of (x).

[0075] In typical conformal classification using the APS formulation, the confidence set is C θ (x; τ):={k:E θ (x, k)≦τ} (6) It is determined as follows.

[0076] That is, after the predicted probabilities for a set of classifications are ranked from largest to smallest based on Equation 5 and Equation 6, a particular classification k is included in the confidence set C if it belongs to a subset of the top-ranked probabilities whose sum is less than or equal to a threshold τ. θ (x; τ). Details of the APS formulation can be found in Romano et al., “Classification with valid and adaptive coverage,” Advances in Neural Information Processing Systems (NeurIPS), 2020.

[0077] In typical conformal prediction using the APS formulation, for a confidence level of 1-α, the threshold τ is Suitability score E θ (x i ,y i ) of (1-α)(1+1 / |I cal |)Quantile (7) It is calculated as follows:

[0078] Similar to the smoothed implementation of the THR formulation for calculating the threshold τ, the system 100 uses a smooth calibration function 130 to perform a smoothed implementation of the quantile operation in the APS formulation for calculating the threshold τ, such that the calculated threshold τ is

[0079]

number

[0080] is differentiable with respect to the classification output of and thus the model parameters θ.

[0081] Although the THR and APS formulations are described above as examples, any other suitable formulation of conformal calibration may be used as long as the formulation can be adopted or converted into a differentiable form implemented by a smooth calibration function 130.

[0082] After the threshold (τ) 135 is determined by the smooth calibration function 130 based on the calibration training examples 112, the system 100 uses the smooth prediction function 140 to generate data characterizing the predicted confidence set. In particular, the system can use the smooth prediction function 140 to generate a confidence score 145 based on the predicted training examples 114 and the threshold 135. The confidence score 145 can be understood to characterize the probability that a respective classification will be included in the confidence set.

[0083] For each prediction training example 114, say (x i ,y i ), the system 100 performs a training on each training model input xi Each classification output π θ (x i ) according to the current values ​​of the model parameters θ, to generate a classification model 120, e.g., π θ Using each training model input x i The system 100 then calculates the respective fitness scores E for each classification using the formulation selected in a smooth calibration process. θ (x i , k) and generate a confidence score 145 using a smooth prediction function 140.

[0084] In typical conformal prediction, the confidence set is determined by performing a threshold operation on fitness scores that exceed a threshold 135. The threshold operation, and the typically discrete numbers that represent the classifications selected for the confidence set, are not differentiable.

[0085] To enable end-to-end training of the classification model 120 and conformal prediction, the system 100 performs a smooth, i.e., differentiable, implementation of the threshold operation. That is, the system 100 performs a smoothing of the conformance score E θ A smooth threshold function is applied to the difference between a first value calculated based on (x,k) and a second value calculated based on a threshold τ. Any suitable smooth threshold function may be used. In one particular example, C θ,k (x; τ):=σ((E θ (x,k)-τ) / T) (8) A sigmoid function σ may be applied to the difference to calculate a confidence score 145, such as:

[0086] where T is the temperature hyper-parameter.

[0087] Trust score C θ,kLet (x; τ) ∈ [0,1] denote the soft assignment of classification k to the confidence set, i.e., it can be interpreted as the probability that k is included in the confidence set. For T → 0, a “hard” confidence set is recovered, i.e., k ∈ C θ For (x; τ), C θ,k (x; τ) = 1, otherwise C θ,k (x; τ) = 0.

[0088] The confidence score C above is calculated using a smooth threshold function. θ,k (x; τ) is the fitness score E θ It is differentiable with respect to (x, k) and the threshold τ. Therefore, the confidence score C θ,k (x; τ) is a function of the fitness score E(x,k) relative to the classification output π θ (x i ) is differentiable with respect to the model parameter θ.

[0089] After the confidence score 145 is calculated based on the predicted training examples 114 and the threshold, the system uses a parameter update engine 150 to update the model parameters of the classification model 120. For example, the parameter update engine 150 updates the confidence score C θ,k The gradient of the training loss computed with respect to (x; τ) with respect to the model parameters can be determined and any suitable backpropagation technique using the gradient can be used to update the current values ​​of the model parameters.

[0090] As described with reference to FIG. 3, after the classification model 120 is trained conformally, i.e., trained with a training loss calculated based on the confidence scores, the trained classification model 120 may be used with regular conformal calibration and conformal prediction to predict a confidence set based on a user-defined confidence level. That is, a regular non-smooth conformal calibration process (of any suitable formulation) may be performed on the calibration dataset to determine a threshold τ based on a user-defined confidence level such that inclusion at the user-defined confidence level may be guaranteed. In some implementations, the threshold 135 may be calculated based on the same calibration dataset used to train the classification model 120. However, instead of using a "soft" sort of a smooth calibration function to train the classification model 120, the threshold 135 used to predict the confidence set is obtained using a "hard" sort to guarantee inclusion.

[0091] In general, the training loss is at least an inefficiency loss L that measures, for each respective predicted training example, a value indicative of the size of each predicted confidence set in each respective predicted output generated for each respective predicted training example. ineff That is, the inefficiency loss L ineff teeth, L ineff =Ω(C θ (x; τ)) (9) It can be defined as:

[0092] where Ω is a “smooth” size function of the expected inefficiency of the confidence set, e.g.

[0093]

number

[0094] The trust score C π,k (x; τ) is a confidence set C θThis can be understood as a soft allocation of class k to (x; τ), so that in some implementations, the inefficiency loss L ineff is based on the sum of the confidence scores of a set of classifications, e.g.

[0095]

number

[0096] It can be calculated as follows:

[0097] where by default, κ=1 to not penalize singletons. In general, κ∈{0,1} can be treated as a hyperparameter.

[0098] In some implementations, the training loss is a classification loss L that measures the classification error of the output classifications contained in the predicted confidence set characterized by each predicted output. class The total training loss is L=L class +λL ineff (11) It can be calculated as follows:

[0099] where λ is a hyperparameter.

[0100] In some implementations, the classification loss L class explicitly enforces inclusion, i.e., if the ground truth label Y is θ (X; τ), and optionally, C θ To penalize the other classes k from being included in the confidence set C θ For this purpose, in one implementation, the classification loss L class teeth,

[0101]

number

[0102] It can be defined as:

[0103] In the formula, L y,k [.] is the loss matrix.

[0104] As mentioned above, 1-C θ (x; τ) is k is C θ The confidence score C, which can be understood as the likelihood that x is not within (x; τ), θ,k (x; τ)∈[0,1]. class The first term of can be used to encourage inclusion, while the second term can be used to discourage predicting other classes. This is done by using the loss matrix L y,k [.] is governed by L=I K , i.e., for an identity matrix with K rows and columns, the loss matrix simply enforces inclusion. On the other hand, for any L y,k Setting L > 0 penalizes the model from including class k in the confidence set with ground truth y. Defining L in this way allows us to define complex objectives tailored to specific applications.

[0105] For example, in skin disease classification, predicting a set of classes, e.g., the top-k diseases, is already a common strategy for dealing with uncertainty. In these cases, in addition to inclusion guarantees, the features of the confidence set can also be important. Constraints in terms of the predicted confidence set cannot be easily handled by regular conformal classification. On the other hand, the conformal training performed by the system 100 makes it possible to define complex objectives for enforcing constraints on the predicted confidence set.

[0106] For example, the system can reduce the uncertainty for “low risk” diseases at the expense of higher inefficiency, i.e., uncertainty, for “high risk” diseases. This can be thought of as reallocating the time spent by the doctor to high risk cases. Using conformal training, the system reduces the weighted size loss L ineffWe can use = ω Ω(C(X;τ)) to manipulate the group- or class-conditional inefficiency, with ω := ω(Y) depending on the ground truth Y.

[0107] The system 100 can further take into account which classes are included in the confidence set. For example, the classification loss can be designed to penalize "mix-ups" between pairs of classes. For example, if two diseases are frequently mixed up by doctors, it makes sense to train a model that avoids confidence sets that include both diseases. Reducing the probability of including both the y classification and the k classification in the confidence set reduces the positive component L in Eq. (12). y,k This can be achieved by using >0.

[0108] Additionally, the conformal training process of system 100 allows for explicit penalization of "overlap" between groups of classes in the confidence set. For example, a medical professional may want to avoid including very high-risk diseases in the confidence set along with low-risk diseases to avoid unnecessary anxiety or testing for patients. To reduce the probability of including a class from a particular group of classes K1 in a confidence set that includes any of class K0, the system may use the L y,k >0 can be set.

[0109] 2 illustrates an example of performing a conformal training process 200 for a classification machine learning model. For convenience, the conformal training process 200 is described as being performed by one or more computer systems located at one or more locations. For example, a conformal training system suitably programmed in accordance with this specification, such as the conformal training system 100 of FIG. 1, may perform the process 200.

[0110] 2, the classification model 220 is configured to process training example model inputs 210a to generate classification outputs 225. The system can split the training example dataset into a calibration batch 212 and a prediction batch 214, for example, in a 50%-50% split.

[0111] The system applies a smooth calibration function 230 to the classification outputs generated from the calibration batch 212, the ground truth labels of the calibration batch 212, and a user-specified significance level α to generate a threshold τ, which is differentiable with respect to the model parameters of the classification model 220 through the classification outputs.

[0112] The system then applies a smooth prediction function 240 to the classification outputs generated from the prediction batch 214 and a threshold τ to obtain a confidence score C θ (x; τ) to generate a confidence score C θ (x; τ) is differentiable with respect to the model parameters of the classification model 220 through the classification output and the threshold τ.

[0113] The system then calculates a predicted confidence score C based on the prediction batch 214. θ Calculate a training loss based on (x; τ). The training loss may include a size loss (or inefficiency loss) Ω and a classification loss L. As shown in the example of 245, the classification loss L may be shaped to implement constraints on the confidence set, for example, by penalizing groups of classes (e.g., vehicles) in the confidence set. Thus, the classification loss L may assign a positive number to the class "truck" when that class is not a ground truth label.

[0114] After the training loss is computed for a batch of predictions, the system backpropagates the gradients of the training loss with respect to the model parameters to update the values ​​of the model parameters.

[0115] 3 illustrates an example conformal classification system 300 for predicting a confidence set 345 for input data 310. System 300 is an example of a system implemented as a computer program on one or more computers at one or more locations in which the systems, components, and techniques described below may be implemented.

[0116] In general, the system 300 generates a confidence set 345 that includes one or more output classifications selected from a set of classifications such that the probability that the true classification of the model input specified in the input data 310 is included in the confidence set is equal to or greater than a user-specified confidence level 316, e.g., 1-α. That is, the classification accuracy of the confidence set (in the sense that the confidence set contains the true classification) is guaranteed to meet a confidence level that may be defined by a user depending on the particular application.

[0117] The system 300 includes a classification model 320 that was conformally trained by a conformal training system, such as, for example, the system 100 of Fig. 1. That is, the classification model 320 was trained end-to-end with a smooth calibration function (which determines the threshold) and a smooth conformal prediction function. The parameters of the classification model 320 were optimized to minimize a training loss (e.g., including an inefficiency loss) calculated over a predicted confidence set based on a particular confidence level 1-α' selected for training.

[0118] The conformally trained classification model 320 receives the input data 310 as model input and processes the input data 310 to generate a classification output 325. The classification output 325 includes, for example, a predicted probability that the model input will be classified into each of a set of classifications. The system then generates a suitability score 326 based on the classification output 325. The suitability score 326 may be defined according to any suitable conformal prediction formulation, such as the THR or APS formulations discussed with reference to FIG.

[0119] In some implementations, the system 300 uses the same conformal prediction formulation (i.e., the same definition for the fitness score) that was used to conformally train the classification model 320. However, this is not a necessary requirement. After the classification model 320 is conformally trained, any suitable conformal prediction formulation may be used in the conformal classification system 300. For example, even if the THR formulation was used to conformally train the classification model 320, the system 300 can still use another conformal prediction formulation, e.g., the APS formulation, to define the fitness score 326 and predict the confidence set 345 based on the threshold 335.

[0120] The threshold 335 is determined by a calibration process that uses the calibration function 330 on the calibration training data set 312. The calibration process performed by the calibration function 330 is similar to the calibration process described with reference to the smooth calibration function 130 of FIG. 1. However, the calibration function 330 is generally not a smooth function with respect to the input. Rather, the calibration function 330 is generally a non-differentiable function with respect to the input to the function, i.e., the classification output with respect to the calibration set 312. For example, in a THR or APS formulation, the quantile operation would be a normal non-differentiable quantile operation instead of a smoothed quantile operation to calculate the threshold 335 based on the confidence level 316 using the calibration function 330.

[0121] In some implementations, the confidence level 316(1-α) for determining the calibrated threshold 335 coincides with the confidence level 1-α' used to conformally train the classification model 320. However, this is not strictly required. In some implementations, the confidence level 316(1-α) can be a different value than the confidence level 1-α' used to conformally train the classification model 320. Thus, once the classification model 320 is conformally trained, various conformal calibrations and predictions using different types of conformal prediction formulations and different confidence levels may be used with the trained classification model 320 to predict the confidence set 345.

[0122] After determining the threshold 335, the system can use the threshold to select classifications to be included in a predicted confidence set 345 based on the predicted probabilities of the classifications manifested by the classification output 325. For example, if the THR formulation is used, the system can determine the confidence set 345 using Equation 2. In another example, if the APS formulation is used, the system can determine the confidence set 345 using Equations 5 and 6.

[0123] 4 is a flow diagram illustrating an example process 400 for performing conformal training of a classification model. For convenience, the process 400 is described as being performed by one or more computer systems located at one or more locations. For example, a conformal training system suitably programmed in accordance with this specification, such as the conformal training system 100 described with reference to FIG. 1, may perform the process 400.

[0124] In step 410, the system obtains calibration training examples and prediction training examples.

[0125] In some implementations, the system takes a batch of training examples and splits the batch, e.g., by random sampling, into calibration training examples and prediction training examples, each of which includes a respective training model input and a respective classification label for each of the training model inputs.

[0126] In step 420, the system determines a threshold value based on the calibration training examples. In particular, for each calibration training example, the system processes each training model input of each calibration training example using the classification model according to the current values ​​of the model parameters to generate a respective classification output for each training model input. The system then determines a threshold value based on at least the classification output generated for the calibration training example, the classification label of the calibration training example, and a confidence level.

[0127] In particular, to determine the threshold, the system can process the classification output, the classification labels of the calibration training examples, and the confidence values ​​with a smooth calibration function that outputs the threshold. The smooth calibration function is differentiable with respect to the classification output, and therefore with respect to the model parameters of the classification model.

[0128] For example, for each calibration training example, the system can calculate a respective fitness score using an appropriate formulation (e.g., the THR or APS formulation) based on the respective classification output and the respective classification label, and the system then performs a smoothed implementation of a quantile operation on the fitness scores and confidence levels to determine the thresholds.

[0129] In step 430, the system generates data characterizing a predicted confidence set based on the threshold and the predicted training examples.

[0130] In some implementations, for each predicted training example, the system processes each model input of each predicted training example using the classification model according to current values ​​of the model parameters to generate a respective classification output. The system then processes the input including the respective classification output and a threshold with a smooth prediction function to generate a respective predicted output. In particular, each predicted output characterizes a predicted confidence set including one or more output classifications selected from a set of classifications such that the probability that the true classification of the respective model input is included in the predicted confidence set is equal to or greater than a confidence level.

[0131] The smooth prediction function is differentiable with respect to each of the inputs to the smooth prediction function, i.e., the classification output and the threshold. Since each of the classification output and the threshold are differentiable with respect to the model parameters of the classification model, the prediction output is also differentiable with respect to the model parameters of the classification model.

[0132] In one particular example, to generate the predicted outputs, the system calculates a respective fitness score for each classification output using a formulation selected in a smooth calibration process, and processes the fitness scores and thresholds using a smooth prediction function to generate a confidence score that characterizes the probability that each of a set of classifications is included in the confidence set.

[0133] In step 440, the system updates model parameters of the classification model based on at least the predicted confidence set.

[0134] In some implementations, the system calculates gradients with respect to the model parameters of a training loss calculated based on at least each predicted output. In particular, the training loss includes an inefficiency loss that measures a value that characterizes the size of a predicted confidence set characterized by the predicted output. For example, the value that characterizes the size of the predicted confidence set may be calculated based on a sum of confidence scores that characterize the probability that each classification is included in the confidence set.

[0135] In some implementations, the training loss further includes a classification loss that measures the classification error of the output classifications included in the predicted confidence set.

[0136] For example, the classification loss may include a first term that measures the error of not including, for each respective predicted training example, the true classification indicated by the respective classification label of the respective predicted training example in a predicted confidence set characterized by the predicted output.

[0137] The classification loss may further include a second term that measures the error of including a specified classification in the respective output confidence set that is not the true classification for each respective predicted training example. For example, the specified classification may be a classification opposite to the true classification, which is determined as a classification based on a priori information.

[0138] The system can shape the inefficiency loss and / or classification loss to adapt to different application scenarios. For example, the system can implement the inefficiency loss as a weighted size calculated based on the size of each predicted confidence set scaled by a weighting factor for a set of classifications. For example, the system can assign a large value of the weighting factor to a particular classification that is relatively less important to detect.

[0139] In another example, the system can include one or more additional terms in the classification loss to penalize two or more classifications being included together in the predicted confidence set. This can be useful in scenarios where certain classifications may be at odds with one another or can easily be confused.

[0140] After the gradients of the training loss with respect to the model parameters are determined, the system can use the gradients to update the current values ​​of the model parameters. The system can use any suitable backpropagation based machine learning technique to update the parameters of the classification model (e.g., a classification neural network), for example, using an Adam or AdaGrad optimizer. In some implementations, the system can apply stochastic gradient descent to multiple batches of training examples and repeat the above steps for each batch.

[0141] 5 is a flow diagram illustrating an exemplary process for performing conformal classification. For convenience, process 500 is described as being performed by one or more computer systems located at one or more locations. For example, a conformal classification system suitably programmed in accordance with this specification, such as the conformal classification system 300 described with reference to FIG. 3, may perform process 500.

[0142] In step 510, the system obtains model inputs. The model inputs may include any type of data to be analyzed, for example, images, text, audio signals, sensor measurements, event logs, etc.

[0143] In step 520, the system processes the model inputs using the conformally trained classification model to generate a classification output. The output data may reveal classification information of the model inputs, such as one or more object categories of an object depicted by an input image, one or more text categories of an input text, one or more status categories of a system, one or more health condition categories of a person, etc. In particular, the classification output indicates, for each particular classification in a set of classifications, a predicted probability of the model input with respect to a particular classification.

[0144] The classification model was conformally trained by a conformal training system, such as, for example, system 100 described in connection with FIG. 1. That is, the classification model was trained end-to-end with a smooth calibration function (which determines the threshold) and a smooth conformal prediction function. The parameters of the classification model were optimized to minimize a training loss (e.g., including an inefficiency loss) calculated over a predicted confidence set based on a particular confidence level 1-α′ selected for training.

[0145] In step 530, the system obtains a threshold value predicted by a non-smooth calibration function according to a confidence level. The threshold value was determined by a calibration process using the calibration function on a calibration training data set. A non-smooth calibration function is generally not differentiable with respect to the input to the function, i.e., the classification output with respect to the calibration set. For example, in a THR or APS formulation, the quantile operation becomes a normal quantile operation instead of a smoothed quantile operation in order to calculate a threshold value based on a confidence level using a non-smooth calibration function.

[0146] In step 540, the system generates a confidence set based on the model output and a threshold value. In particular, the system can compare the threshold value to the fitness scores calculated based on the model output and select classifications with corresponding fitness scores that satisfy a condition on the comparison result (e.g., according to Equation 2 or Equations 5 and 6) to be included in the output confidence set.

[0147] FIG. 6 shows a performance comparison between a classification model trained using conformal training (ConfTr) and a baseline classification model without conformal training (Basel.) in predicting the confidence set.

[0148] Conformal training is based on the THRLP formulation with a significance level of α = 0.01. After training, the trained classification model is used with a conformal prediction wrapper that uses either the THR or APS formulation to predict the confidence set.

[0149] Figure 6 summarizes a measure of the inefficiency, i.e., predicted confidence set size, of various methods based on five test datasets. As shown by the data in Figure 6, conformal training (ConfTr) significantly improves the predicted confidence set inefficiency compared to the baseline. Moreover, the classification loss (+L class ) has generally been shown to further improve inefficiencies.

[0150] Furthermore, Figure 6 shows that even if the conformal predictor formulation used in the conformal prediction wrapper does not match the conformal predictor formulation used in conformal training (e.g., THR or APS vs. THRL), conformal training still provides significant improvement in inefficiency. Thus, once a classification model is conformally trained, it can be used with different conformal prediction wrappers depending on the application to effectively predict confidence sets.

[0151] This specification uses the term "configured" in connection with systems and computer program components. A system of one or more computers configured to perform a particular operation or action means that the system has installed thereon software, firmware, hardware, or a combination thereof that causes the system to perform an operation or action during operation. A computer program or programs configured to perform a particular operation or action means that the program or programs contain instructions that, when executed by a data processing device, cause the device to perform an operation or action. The embodiments and functional operations of the subject matter described herein can be implemented in digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware, or a combination of one or more of them, including the structures disclosed herein and their structural equivalents. The embodiments of the subject matter described herein can be implemented as one or more computer programs, i.e., 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 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 additionally, the program instructions may be encoded onto an artificially generated propagated signal, such as a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to a suitable receiver device for execution by a data processing device.

[0152] 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 may also be or further include special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). Optionally, in addition to the hardware, the apparatus may include code that creates an execution environment for a computer program, such as code that constitutes a processor's firmware, a protocol stack, a database management system, an operating system, or one or more combinations thereof.

[0153] A computer program, which may also be referred to or described as a program, software, software application, app, module, software module, script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and 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 correspond to a file in a file system, but this is not necessarily the case. A program may be stored as part of a file that holds other programs or data, for example one or more scripts stored in a markup language document, a single file dedicated to the program in question, or in multiple organized files, for example files that store one or more modules, subprograms, or code portions. A computer program may be deployed to be executed on one computer or on multiple computers that are located at one location or distributed at multiple locations and connected together by a data communication network.

[0154] The term "database" is used broadly herein to refer to any collection of data, which 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 contain multiple collections of data, each of which may be organized and accessed in a different way.

[0155] Similarly, the term "engine" is used broadly herein to refer to a software-based system, subsystem, or process that is programmed to perform one or more specific functions. Generally, an engine is 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 are dedicated to a particular engine, and in other cases, multiple engines can be installed and running on the same computer or computers.

[0156] The processes and logic flows described herein may be performed by one or more programmable computers executing one or more computer programs to perform functions by performing operations on input data and generating output. The processes and logic flows may also be performed by special purpose logic circuitry, e.g., FPGAs or ASICs, or a combination of special purpose logic circuitry and one or more programmed computers.

[0157] A computer suitable for executing a computer program can be based on a general-purpose or special-purpose microprocessor or both, or any other type of central processing unit. In general, the central processing unit receives 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 executing or executing instructions, and one or more memory devices for storing instructions and data. The central processing unit and memory can be supplemented by or incorporated in special-purpose logic circuitry. In general, the computer also includes one or more mass storage devices, such as magnetic disks, magneto-optical disks, or optical disks, for storing data, or is operatively coupled to receive data from or transfer data to the mass storage devices, or both. However, the computer may not have such devices. Additionally, a computer may 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 just a few.

[0158] Computer-readable media suitable for storing computer program instructions and data include, by way of example, all forms of non-volatile memory, media, and memory devices including 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 disks and DVD-ROM disks.

[0159] To provide interaction with a user, embodiments of the subject matter described herein 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, as well as a keyboard and a pointing device, e.g., a mouse or trackball, by which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user, e.g., the feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback, and the input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, the computer can interact with the user by sending documents to and receiving documents from a device used by the user, e.g., by sending a web page to the web browser of the user's device in response to a request received from the web browser. The computer can also interact with the user by sending text messages or other forms of messages to a personal device, e.g., a smartphone, running a messaging application, and receiving a response message from the user in return.

[0160] A data processing apparatus for implementing machine learning models may also include dedicated hardware accelerator units, for example for handling the often computationally intensive parts of the machine learning training or generation, i.e., inference, workload.

[0161] The machine learning model can be implemented and deployed using a machine learning framework, for example, the TensorFlow framework, the Microsoft Cognitive Toolkit framework, the Apache Singa framework, or the Apache MXNet framework.

[0162] An embodiment of the subject matter described herein can be implemented in a computing system that includes a back-end component, e.g., as a data server, or includes a middleware component, e.g., an application server, or includes a front-end component, e.g., a client computer having a graphical user interface, web browser, or app through which a user can interact with an implementation of the subject matter described herein, or includes 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 local area networks (LANs) and wide area networks (WANs), e.g., the Internet.

[0163] A computing system may include clients and servers. Clients and servers 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 sends data, e.g., HTML pages, to a user device for the purpose of, e.g., displaying data to a user interacting with the device acting as a client and receiving user input from such a user. Data generated at the user device, e.g., results of user interaction, can be received from the device at the server.

[0164] Although this specification contains many specific implementation details, these should not be considered as limitations on the scope of any invention or what may be claimed, but rather as descriptions of features that may be specific to certain embodiments of a particular invention. Certain features described herein in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, although features may be described above as working in a particular combination, and may even be initially claimed as such, one or more features of the claimed combination may in some cases be deleted from the combination, and the claimed combination may be directed to a subcombination, or a variation of the subcombination.

[0165] Similarly, although operations are illustrated in the figures and claimed in a particular order, this should not be understood as requiring such operations to be performed in the particular order shown, or in sequential order, or that all of the operations shown be performed to achieve a desired result. In certain situations, multitasking and parallel processing may be advantageous. Furthermore, the division of various system modules and components in the above-described embodiments should not be understood as requiring such division in all embodiments, and it should be understood that the described program components and systems may generally be integrated together in a single software product or packaged in multiple software products.

[0166] 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 desirable results. As an 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. [Explanation of symbols]

[0167] 100 Conformal Training System 110 Training Examples 112 Calibration Training Examples, Calibration Training Example Sets 114 Prediction training example 116 Confidence Level 120 Classification Machine Learning Models 130 Smooth Calibration Functions 135 Threshold τ 140 Smooth Prediction Functions 145 Trust Score 150 Parameter Update Engine 200 Conformal Training Process 210a Model Input 212 Calibration Batches 214 prediction batches 220 Classification Model 225 Classification Output 230 Smooth Calibration Functions 240 Smooth Prediction Functions 300 Conformal Classification System 310 Input Data 312 Calibration Training Dataset 316 Confidence Level 320 Classification Model 325 Classification Output 326 Suitability Score 330 Calibration Functions 335 Threshold 345 Confidence Set

Claims

1. 1. A method for training a conformal classification machine learning model, comprising: The conformal classification machine learning model, a classification model having a plurality of classification model parameters, the classification model being configured to process the model inputs to generate, for each particular classification in a set of classifications, a classification output indicative of a predicted probability of the model input with respect to the particular classification; and a prediction function configured to process an input including the classification outputs to generate data identifying, for the model input, a confidence set including one or more output classifications selected from the set of classifications such that a probability that a true classification of the model input is included in the confidence set is equal to or greater than a confidence level. Including, The method further comprising: obtaining a set of calibration training examples, each calibration training example including a respective training model input and a respective classification label for each said respective training model input; for each respective calibration training example in the set of calibration training examples, processing the respective training model inputs of each of the calibration training examples using the classification model according to current values ​​of the classification model parameters to generate a respective classification output for the respective training model input; determining a threshold based on at least the classification output generated for the calibration training examples, the classification labels of the calibration training examples, and the confidence level; obtaining a set of predicted training examples, each predicted training example including a respective training model input and a respective classification label for the respective training model input; For each respective predicted training example in the set of predicted training examples, performing processing the respective model inputs of each of the predictive training examples using the classification model according to the current values ​​of the classification model parameters to generate a respective classification output; processing inputs including each of the classification outputs and the threshold with the prediction function to generate a respective predicted output, the prediction function being differentiable with respect to each of the classification outputs; determining, for each respective predicted training example, gradients with respect to the classification model parameters of training losses including an inefficiency loss that measures a value indicative of a size of a respective output confidence set in the respective predicted output generated for each of the predicted training examples; updating the current values ​​of the parameters of the classification model parameters using the gradients; A method comprising:

2. the respective prediction outputs including a confidence score for each classification in the set of classifications; The method of claim 1 , wherein each of the confidence scores characterizes a respective probability that each of the classifications is included in the predicted confidence set.

3. The method of claim 1 or 2, wherein the classification model comprises a neural network.

4. 4. The method of claim 1, wherein the training loss further comprises a classification loss measuring a classification error of the output classifications included in the predicted confidence set characterized by the respective predicted outputs.

5. 5. The method of claim 4, wherein the classification loss includes a first term that measures, for each respective predicted training example, the error of not including the true classification in the predicted confidence set characterized by the predicted output.

6. 6. The method of claim 4 or 5, wherein the classification loss includes a second term that measures, for each respective predicted training example, the error of including a specified classification other than the true classification in the respective output confidence set.

7. The method of claim 6 , wherein the assigned classification is determined as a classification opposite to the true classification based on a priori information.

8. 8. The method of claim 1, wherein the prediction function comprises a smoothed implementation of a threshold function applied to a difference between a first value calculated based on the classification output and a second value calculated based on the threshold.

9. 9. The method of claim 8, wherein for each respective predicted training example in the set of predicted training examples, the first value is calculated as the predicted probability indicated by the respective classification output for a particular classification.

10. 9. The method of claim 8, wherein for each respective predicted training example in the set of predicted training examples, the first value is calculated as a sum of a plurality of predicted probabilities indicated by the respective classification outputs for a plurality of classifications from the set of classifications.

11. 11. The method of claim 8, wherein the smoothed threshold function is a sigmoid function.

12. The step of determining the threshold value comprises:

12. The method of claim 1, comprising processing the classification output from the classification model, the classification labels of the calibration training examples, and confidence values ​​with a calibration function that outputs the threshold, the calibration function being differentiable with respect to the classification output.

13. The calibration function is For each respective calibration training example in the set of calibration training examples, calculating a respective fitness score based on the respective classification output and the respective classification label; performing a smoothed implementation of a quantile operation on the fitness scores and the confidence levels; The method of claim 12 , configured to:

14. obtaining a batch of training examples; randomly sampling the batch of training examples to generate the set of calibration training examples and the set of prediction training examples; 14. The method of any one of claims 1 to 13, further comprising:

15. the batch of training examples is a first batch of training examples; The method further comprising: obtaining additional batches of training examples; iteratively training the classification machine learning model on each of the additional batches of training examples; 15. The method of claim 14, further comprising:

16. 16. The method of claim 1, wherein the inefficiency loss is a weighted size measure calculated based on the size of each predicted confidence set scaled by a weighting factor for the set of classifications.

17. the model input comprises sensor data; the classification corresponds to an object category; the model inputs include medical data, such as physiological measurements of a patient; each of said classifications corresponds to a different diagnosis of said patient; and / or the model inputs include observations of an environment; 17. The method of claim 1, wherein each of the classifications corresponds to a different state of the environment.

18. 1. A computer-implemented method for performing conformal classification, comprising: Obtaining the classification model trained using a method according to any one of claims 1 to 17; obtaining model inputs; processing the model inputs with the classification model to generate, for each particular classification in a set of classifications, a classification output indicative of a predicted probability of the model input with respect to the particular classification; obtaining a threshold value predicted by a non-smooth calibration function according to a confidence value based on the calibration data set; processing the model outputs and the threshold to generate a confidence set including one or more output classifications selected from the set of classifications; A computer-implemented method comprising:

19. Based at least in part on the confidence set, Controlling a robot or vehicle, wherein the model input includes sensor data and the classification corresponds to an object category; providing one or more medical diagnoses, wherein the model input includes medical data such as physiological measurements of a patient, and wherein the classifications each correspond to a different diagnosis for the patient; controlling an agent to perform a task in an environment, wherein the model inputs include observations of the environment and the classifications each correspond to a different state of the environment; 20. The method of claim 18, further comprising performing one or more of:

20. One or more computers; one or more storage devices storing instructions that, when executed by said one or more computers, cause said one or more computers to perform each of the operations of the method according to any one of claims 1 to 19; Including, the system.

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 each of the operations of the method of any one of claims 1 to 19.

Citation Information

Patent Citations

  • Learning device, information integration system, learning method, and recording medium

    WO2021090518A1