Method and system for diagnosing machine learning model underperformance or failure
The method improves the diagnosis of machine learning model underperformance by embedding validation data and generating semantic descriptions of failure scenarios, addressing inefficiencies in existing methods and enhancing model development accuracy and efficiency.
Patent Information
- Application Number
- GB2023016353
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2025-04-30
AI Technical Summary
Existing methods for diagnosing machine learning model underperformance are inefficient, especially for large and diverse datasets, and fail to consider real-world scenarios, spatio-temporal relationships, and multiple input modalities, leading to inaccurate and unintuitive analysis.
A computer-implemented method that embeds validation data samples and text string candidates in a joint embedding space, generates spatio-temporal relationships, and determines data slices where the model underperforms, providing semantic descriptions for improved interpretability and accuracy.
Enhances the iterative model development process by accurately identifying data slices where the model fails, improving interpretability and efficiency, and allowing for model refinement.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to machine learning models. Specifically, the present disclosure relates to methods and systems for diagnosing machine learning model underperformance or failures. BACKGROUND
[0002] Machine learning models may be trained on labelled or unlabelled datasets. For example, machine learning models, including deep learning models, may be trained using labelled datasets during supervised learning. Data in labelled datasets may be labelled according to the type of machine learning task that the machine learning model is to be trained to carry out.
[0003] During the iterative model development process, numerical metrics generated based on validation sets and example visualisations of the prediction results are typically used to determine the performance of each trained model. The numerical metrics or results of the prediction metric would be sorted manually, with the results from poorly performing samples manually visualised for analysis of patterns where the trained model failed.
[0004] The above-described analysis method is inefficient, especially for very large datasets with diverse examples as is commonly the case. In particular, given the large size and diversity of most datasets, such analysis generally requires long man hours with a high likelihood of missing certain failure scenarios. In addition, analysing results purely based on numerical metrics is unintuitive, while plotting the results requires reliance on the labels themselves to determine the presence of failure scenarios which may lead to inaccurate results in situations where the labels are wrongly labelled or missing. Failure scenarios may also be scenarios that are previously unknown or not annotated in any metadata, such that practitioners would require adequate domain knowledge to analyse the machine learning performance and diagnose any performance issues or failures. Furthermore, if the validation dataset is changed, the tedious analysis process would need to be repeated all over again.
[0005] An existing automatic slice discovery method for determining model performance in an interpretable matter discovers slices of data within the image validation dataset where the model underperforms using an error-aware mixture model (MM) in a joint image-text embedding space as per Contrastive Language-Image Pre-Training (CLIP). The slices are then described using the closest matching text string in the image-text embedding space to the mean of the image embeddings existing in the slice. Another method uses support vector machine (SVM) instead of MM, which avoids taking the mean of examples in the discovered slice to represent the slice image embedding during captioning.
[0006] Yet another method removes the reliance on subsets of data that cause poor model performance existing in the image dataset, since there could be other scenarios not in the image dataset where the model fails by accounting for data distribution shifts between the dataset and real-world scenario. Unlike the previously discussed methods, this method does not assume that unknown scenarios are present in the image dataset, but rather addresses the issue by using natural language input to incorporate unknown scenarios where the visual image data is lacking, since generating textual descriptions of unique scenarios are more straightforward than visual images.
[0007] One problem with existing automatic slice discovery methods is that such methods fail to consider the real-world scenario in which multiple sensors (or cameras) are used to capture videos in 3D space and how such a spatio-temporal relationship between input data and / or image frames could affect the discovery of data slices. Furthermore, the existing methods do not consider different modalities other than the primary modality being examined, such as visual or language. In addition, known methods that operate with the visual modality only consider the image classification task and do not consider other challenging computer vision tasks such as Object Detection (OD), Semantic Segmentation (SemSeg) or Instance Segmentation (InstSeg), which are fundamental perception tasks commonly used in applications such as automated / autonomous driving systems. These methods also do not consider video as input for tasks such as OD tracking and InstSeg tracking across frames. Finally, the existing methods only consider the application on single task and not multitask machine learning models, where such multitask machine learning models with multiple learning objectives are often used in applications such as automated / autonomous driving systems. SUMMARY
[0008] It is the object of the disclosure to have an improved method and system for diagnosing machine learning model underperformance or failures so as to improve the iterative model development process.
[0009] The object is achieved by the subject matter of the independent claims. Preferred embodiments are subject-matter of the dependent claims.
[0010] It shall be noted that all embodiments of the present disclosure concerning a method or a series of performed steps might be carried out with the order of the steps as described, nevertheless this has not to be the only and essential order of the steps of the method. The herein presented methods or series of performed steps can be carried out with another order of the disclosed steps without departing from the respective method embodiment, unless explicitly mentioned to the contrary hereinafter.
[0011] To solve the above technical problems, the present disclosure provides a computer-implemented method for diagnosing machine learning model underperformance or failures, the method comprising: embedding validation data samples of a validation dataset and text string phrase candidates in a joint embedding space between a modality of the validation data and a modality of text strings to generate data embeddings and text embeddings; receiving a trained machine learning model capable of performing one or more tasks, the trained machine learning model trained on a training dataset, wherein the validation dataset and the training dataset are subsets of a dataset comprising a plurality of data samples; conducting inference with the validation dataset using the trained machine learning model to obtain numerical metrics per validation data sample for each of the one or more tasks, wherein the numerical metric is indicative of a performance of the trained machine learning model on each of the one or more tasks; generating a spatio-temporal relationship representation for the validation data samples of the validation dataset; determining a plurality of data slices based on one or more selected metrics, the data embeddings and the spatio-temporal relationship representation, wherein a data slice represents a scenario where the trained machine learning model underperforms or fails and comprises a cluster of data samples with a common semantic meaning within each data slice; and generating a semantic description for each data slice based on the text embeddings.
[0012] The method of the present disclosure is advantageous over known methods as the method may be used to diagnose model underperformance and failures in both single and multi-task machine learning models trained on very large datasets with diverse examples that receive inputs of various modalities. The method of the present disclosure is also advantageous over known methods as it accounts for the real-world spatio-temporal relationship between input data samples, thereby potentially improving the iterative model development process by potentially improving the accuracy or relevance in the identification of data slices where the trained machine learning model underperforms or fails. The resulting semantic description generated from the potentially more accurate or relevant data slices may better reflect or describe scenarios in which the trained machine learning model under performs or fails, thereby potentially improving the iterative model development process by increasing the interpretability, intuitiveness, and efficiency of diagnosing machine learning model underperformance or failure. The semantic description may be machine-interpretable (e.g., semantic description in embedding form) and / or human interpretable (e.g., semantic description in textual form).
[0013] A preferred method of the present disclosure is a method as described above, wherein the one or more tasks is selected from a group comprising object recognition, object identification, object detection, pose estimation, and semantic segmentation.
[0014] The above-described aspect of the present disclosure has the advantage that the listed tasks are the most commonly used in automated / autonomous driving systems and / or robotic systems.
[0015] A preferred method of the present disclosure is a method as described above or as described above as preferred, wherein the spatio-temporal relationship representation is a graph.
[0016] The above-described aspect of the present disclosure has the advantage that representing the spatio-temporal relationship as a graph allows the modelling of complex interconnected relationships in the spatial and temporal domains while remaining more interpretable than other methods. This could potentially improve the iterative model development process by increasing the interpretability of the relationships while preserving the complex interconnected relationships of the data samples of the validation datasets, thereby potentially improving the accuracy or relevance in the identification of data slices where the trained machine learning model underperforms or fails.
[0017] A preferred method of the present disclosure is a method as described above or as described above as preferred, wherein the graph comprises nodes and edges, wherein each node represents a validation data sample, and graph edge weights are based on a relative relationship between data samples.
[0018] The above-described aspect of the present disclosure has the advantage that the graph edge weights based on relative relationship between data samples preserves complex interconnected relationships and correlations between validation data samples, thereby potentially allowing more accurate weighting of metrics for subsequent determination of data slices, which may potentially improve the iterative model development process by potentially improving the accuracy or relevance in the identification of data slices where the trained machine learning model underperforms or fails.
[0019] A preferred method of the present disclosure is a method as described above or as described above as preferred, wherein each of the one or more selected metrics are weighted per data sample based on the spatio-temporal relationship representation.
[0020] The above-described aspect of the present disclosure has the advantage that edges between nodes of data samples with a relatively stronger relationship in the spatio-temporal domain may be weighted heavier compared to other edges, thereby potentially improving the iterative model development process by identifying potentially better data slices guided by the spatio-temporal relationships and generating semantic descriptions that better describe scenarios where the trained machine learning model underperforms or fails. An example would be weighting the edge between nodes that face the same spatial orientation on the car stronger compared to other edges.
[0021] A preferred method of the present disclosure is a method as described above or as described above as preferred, wherein if there is more than one selected metric, the selected metrics are combined by overlapping.
[0022] The above-described aspect of the present disclosure has the advantage that overlapping the one or more selected metric accounts for the spatio-temporal relationship of a current data sample (or node) with all connected data samples (or nodes) in the spatiotemporal relationship representation in a single metric that can be used in subsequent steps, thereby potentially improving the iterative model development process by identifying potentially better data slices and generating semantic descriptions that better describe scenarios where the trained machine learning model underperforms or fails.
[0023] A preferred method of the present disclosure is a method as described above or as described above as preferred, wherein determining a plurality of data slices where the trained machine learning model underperforms or fails comprises using an error-aware mixture model.
[0024] The above-described aspect of the present disclosure has the advantage that an error-aware mixture model uses a soft margin approach in assigning clusters as compared to direct / hard assignment techniques, the soft margin approach allowing for finetuning of the determined plurality of data slices (or clusters) by varying the assignment threshold to obtain better data slices (or clusters), thereby potentially improving the iterative model development process by identifying better data slices and generating semantic descriptions that better describe scenarios where the trained machine learning model underperforms or fails.
[0025] A preferred method of the present disclosure is a method as described above or as described above as preferred, wherein generating a semantic description for each data slice comprises comparing the data embeddings of all data samples in each slice against a closest matching text embedding in the joint embedding space.
[0026] The above-described aspect of the present disclosure has the advantage that the closest matching text embedding and its corresponding text phrase may potentially wholly describe the slice in a format as specified in the phrase candidates, thereby potentially improving the iterative model development process by generating semantic descriptions that better describe scenarios where the trained machine learning model underperforms or fails.
[0027] A preferred method of the present disclosure is a method as described above or as described above as preferred, further comprising: collecting additional data samples based on the semantic descriptions generated; and refining the trained machine learning model by further training the trained machine learning model on the collected additional data samples.
[0028] The above-described aspect of the present disclosure has the advantage that the performance of the trained machine learning model may be improved and / or refined by further training the machine learning model on data samples of scenarios where the current iteration of the trained machine learning model underperforms or fails. By directly addressing the shortcomings of the trained machine learning model, a potentially more refined or improved machine learning model may be generated that performs better or is able to handle the scenarios where the current iteration of the trained machine learning model underperforms or fails.
[0029] The above-described advantageous aspects of a computer-implemented method of the present disclosure also hold for all aspects of a below-described computing system of the present disclosure. All below-described advantageous aspects of a computing system of the present disclosure also hold for all aspects of an above-described computer-implemented method of the present disclosure.
[0030] The present disclosure also relates to a computing system for diagnosing machine learning model underperformance or failures, the computing system comprising one or more processors and memory storing one or more programs for execution by the one or more processors, the one or more programs including instructions for carrying out a computer-implemented method according to the present disclosure.
[0031] The above-described advantageous aspects of a computer-implemented method or computing system of the present disclosure also hold for all aspects of a below-described computer program, a machine-readable storage medium, or a data carrier signal of the present disclosure. All below-described advantageous aspects of a computer program, a machine-readable storage medium, or a data carrier signal of the present disclosure also hold for all aspects of an above-described computer-implemented method or computing system of the present disclosure.
[0032] The present disclosure also relates to a computer program, a machine-readable storage medium, or a data carrier signal that comprises instructions, that upon execution on a processor, cause the processor to perform the steps of a computer-implemented method according to the present disclosure.
[0033] The above-described advantageous aspects of a computer-implemented method, computing system, computer program, a machine-readable storage medium, or a data carrier signal of the present disclosure also hold for all aspects of a below-described use of the present disclosure. All below-described advantageous aspects of use of the present disclosure also hold for all aspects of an above-described computer-implemented method, computing system, computer program, a machine-readable storage medium, or a data carrier signal of the present disclosure.
[0034] The present disclosure also relates use of a computer-implemented method according to the present disclosure.
[0035] In some embodiments, the methods disclosed in the present disclosure may be applied to any machine learning model (including deep learning models) with performance metrics, as well as any deep learning task such as classification, semantic segmentation, depth estimation, surface normal estimation, in the computer vision domain, or tasks from any other domains such as audio / video processing as long as a joint embedding space exists between the target domain and text. The methods disclosed in the present disclosure may also be applied to any machine learning model trained on any dataset, including both labelled and unlabelled datasets.
[0036] In some embodiments, the methods disclosed in the present disclosure may be used to discover and / or identify a plurality of data slices, wherein each data slice may comprise a cluster of data samples and may have a common semantic meaning within each slice. Each data slice may represent a scenario where the machine learning model under performs or fails.
[0037] In some embodiments, the methods disclosed in the present disclosure may be contained in a computer program or software module used during any machine learning model development process for increased interpretability and intuitiveness as compared to the typical development process without this designed software module. In some embodiments, the methods disclosed in the present disclosure may be used during the deep learning model development process for embedded machine learning products in automated / autonomous agents or for driving-assist perception systems for braking / parking. Both single task and multitask models are usually developed for such applications with a model eventually selected after weighing performance against model complexity together with their embedded hardware constraints. The method may be used to diagnose the trained machine learning models by identifying data slices where the machine learning model fails or underperforms. The method may also allow developers to better understand the performance and drawbacks of the machine learning models based on the data slices where the machine learning model fails or underperforms. The method may also allow the improvement of trained machine learning models by further training a trained machine learning model on the representative scenario of the data slices identified where the machine learning model fails or underperforms. The methods disclosed in the present disclosure may potentially lead to a reduction of development costs by reducing man hours required for manual analysis during the iterative model development process, and by discovering failure modes before real world testing or customer feedback, thereby potentially increasing road safety in situations where the trained machine learning model is deployed in automated / autonomous driving situations. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] These and other features, aspects, and advantages will become better understood with regard to the following description, appended claims, and accompanying drawings where:
[0039] Fig. 1 is a schematic illustration of a computer-implemented method for diagnosing machine learning model underperformance or failures, in accordance with embodiments of the present disclosure;
[0040] Fig. 2 is a schematic illustration of an example of a spatio-temporal relationship graph in an automotive application, in accordance with embodiments of a present disclosure; and
[0041] Fig. 3 is a schematic illustration of a computing system for implementing some embodiments of the present disclosure, in accordance with embodiments of the present disclosure.
[0042] In the drawings, like parts are denoted by like reference numerals.
[0043] It should be appreciated by those skilled in the art that any block diagrams herein represent conceptual views of illustrative systems embodying the principles of the present subject matter. Similarly, it will be appreciated that any flow charts, flow diagrams, state transition diagrams, pseudo code, and the like represent various processes which may be substantially represented in computer readable medium and executed by a computer or processor, whether or not such computer or processor is explicitly shown. DETAILED DESCRIPTION
[0044] In the summary above, in this description, in the claims below, and in the accompanying drawings, reference is made to particular features (including method steps) of the disclosure. It is to be understood that the disclosure in this specification includes all possible combinations of such particular features. For example, where a particular feature is disclosed in the context of a particular aspect or embodiment of the disclosure, or a particular claim, that feature can also be used, to the extent possible, in combination with and / or in the context of other particular aspects and embodiments of the disclosure, and in the disclosure generally.
[0045] In the present document, the word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” Any embodiment or implementation of the present subject matter described herein as “exemplary” is not necessarily be construed as preferred or advantageous over other embodiments.
[0046] While the disclosure is susceptible to various modifications and alternative forms, specific embodiment thereof has been shown by way of example in the drawings and will be described in detail below. It should be understood, however that it is not intended to limit the disclosure to the forms disclosed, but on the contrary, the disclosure is to cover all modifications, equivalents, and alternative falling within the scope of the disclosure.
[0047] Fig. 1 is a schematic illustration of a computer-implemented method 100 for diagnosing machine learning model underperformance or failures, in accordance with embodiments of the present disclosure. According to some embodiments, method 100 may comprise step S2 wherein validation data samples 104 of a validation dataset 108 and text string phrase candidates 112 are embedded in a joint embedding space between a modality of the validation data and a modality of text strings to generate data embeddings 116 and text embeddings 120. In some embodiments, the validation data samples 104 of a validation dataset 108 may be of any modality. Examples of validation data modalities include but are not limited to images, videos, audio, or any other modalities. The validation dataset 108 may comprise labelled and / or unlabelled validation data samples 104.
[0048] In some embodiments, step S2 of data embedding may be carried out using encoders from multimodal models. An example of an encoder for image-text embedding is from the multimodal model CLIP disclosed in “Learning Transferable Visual Models From Natural Language Supervision” by Radford et., al (arXiv:2103.00020vl).
[0049] In some embodiments, the text phrase candidates 112 may be generated using a phrase candidate generator 124 from various domain specific or general-purpose corpuses. In some embodiments, the phrase candidate generator 124 may obtain the text phrase candidates 112 from the validation dataset 108 and / or metadata attached to the validation dataset 108. For example, the text string phrase candidates 112 may be generated using tokenized Wikipedia list of words as tokens for Masked-Language Modelling using a pretrained BERT disclosed in “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding” by Devlin et., al. (arXiv:1810.04805v2), based on a set of predefined phrase templates as per Domino disclosed in “Domino: Discovering Systematic Errors with Cross-Modal Embeddings” by Eyuboglu et., al. (arXiv:2203.14960v3). In another example, the text phrase candidates 112 may be obtained using a set of domain specific data attributes to manually permutate all possible caption combinations based on a fixed phrase template.
[0050] According to some embodiments, method 100 may comprise step S4 wherein a trained machine learning model capable of performing one or more tasks is received. The trained machine learning model may be a single task model or a multitask model. In some embodiments, the one or more tasks may be selected from a group comprising object recognition, object identification, object detection, pose estimation, and semantic segmentation. For example, a single task model for object detection may be FasterR-CNN disclosed in “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks” by Ren et. al. (arXiv:l 506.01497v3). For example, a multitask model for semantic segmentation, depth estimation and surface normal prediction may be Multi-Task Attention Network (MTAN) disclosed in “End-to-End Multi-Task Learning with Attention” by Liu et., al. (arXiv: 1803.10704v2). For example, the multitask model may have any of the architecture disclosed in “An Overview of Multi-Task Learning in Deep Neural Networks” by Sebastian Ruder (arXiv: 1706.05098vl), such as Figure 1 or Figure 2.
[0051] According to some embodiments, the trained machine learning model may be trained on a training dataset, wherein the training dataset and validation dataset 108 are subsets of a dataset comprising a plurality of data samples. The dataset comprising a plurality of data samples may be labelled or unlabelled (i.e., without any annotations). In case of a labelled dataset, the labels may be based on one or more tasks that the machine learning model is trained to carry out. In the case of driving scenes, the data in the datasets may come in the form of driving scene images that are labelled according to the type of machine learning task, such as one class label per image for classification tasks, multiple bounding boxes coordinates per image with a class label per bounding box for each object for object detection tasks, and labelling per pixel for the class in which the individual pixel belongs to for semantic segmentation tasks. An example of labelled data that may be used is images with their respective labels, whereby each data sample is an image and each image may have one or more labels associated. Examples of labelled datasets that may be used include but are not limited to any of the BDDlOOk Datasets available at https: / / bdd-data.berkeley.edu / or https: / / doc.bddl00k.com / download.html, which comprises labelled datasets for various tasks, including semantic segmentation, instance segmentation, and pose estimation.
[0052] According to some embodiments, method 100 may comprise step S6 wherein inference is conducted with the validation dataset using the trained machine learning model received in step S4 to obtain numerical metrics 128 per validation data sample for each of the one or more tasks. The numerical metrics 128 are task-dependent and may be output from the trained machine learning model. The numerical metrics 128 are indicative of a performance of the trained machine learning model on each of the one or more tasks. Examples of commonly known numerical metrics include but are not limited to per sample Mean Average Precision (MAP) for an object detection task, and classification score for a classification task.
[0053] According to some embodiments, method 100 may comprise step S8 wherein a spatio-temporal relationship representation 132 is generated for the validation data samples 104 of the validation dataset 108. The spatio-temporal relationship representation 132 may be any representation that illustrates or captures the spatio-temporal relationship of the validation data samples 104 of the validation dataset 108. In some embodiments, the spatiotemporal relationship may be represented or expressed as embeddings in some continuous vector space, or as some graph-like structures such as trees or lists. Preferably, the spatiotemporal relationship representation 132 is a graph, in particular an undirected graph abstract data type using computing data structures such as an adjacency list or adjacency matrix. Where the spatio-temporal relationship representation 132 is a graph, the graph edge weights may be based on a relative relationship between validation data samples 104, wherein the relative relationship between validation data samples 104 refers to the degree of correlation between adjacent nodes in the graph. For example, in an automotive perception setting, data samples collected from multiple front-facing cameras would be highly correlated and may have larger edge weights as compared to samples collected from cameras facing opposing directions (e.g., front-facing camera vs rear-facing camera).
[0054] Fig. 2 is a schematic illustration of an example of a spatio-temporal relationship graph in an automotive application, in accordance with embodiments of a present disclosure. The data samples of the example illustrated in Fig. 2 are image frames in a video sequence generated with 6 cameras as follows: Camera # Camera direction / position Cl Front-facing 1 C2 Front-facing 2 C3 Left C4 Right C5 Top C6 Rear
[0055] Each data sample or image frame at each time point is illustrated as a node 204, and undirected edges 208 connect each node with their immediate next nodes. The immediate next nodes may include nodes that represent every other data sample or image frame captured at the same time point (t). and nodes that represent data samples or image frames captured by the same camera in a preceding and subsequent time point ( / -I and / +1 respectively). For example, for node 204a which represents a data sample or image frame captured by camera Cl at time point t, the immediate next nodes are nodes 204b-204f representing data samples or image frames captured by cameras C2-C6 at time point t, node 204g representing a data sample or image frame captured by camera C1 at time point / -1, and node 204h representing a data sample or image frame captured by camera Cl at time point / +1. As cameras Cl and C2 face the same direction (i.e., both are front-facing cameras) the data samples or image frames captured by camera Cl would be highly correlated to the data samples or image frames captured by camera C2 as compared to data samples or images captured by cameras C3-C6. Therefore, edge 208a between node 204a representing a data sample or image frame captured by camera Cl at time point t and node 204b representing a data sample or image frame captured by camera C2 at time point t is prioritized, as illustrated with a bold line. The edges between data samples or time frames captured by camera Cl and C2 at each time point are also prioritized, as illustrated with bold lines at time point / -1 and time point / +1.
[0056] Referring to Fig. 1, according to some embodiments, method 100 may comprise step S10 wherein a plurality of data slices 136i 136n are determined based on one or more selected metrics 140, the data embeddings 116, and the spatio-temporal relationship representation 132. Each data slice 136 represents a scenario where the trained machine learning model underperforms or fails and comprises a cluster of data samples with a common semantic meaning within each data slice.
[0057] In some embodiments, the plurality of data slices 136i^l36n may be determined using a single selected metric 140 corresponding to a numerical metric 128 directly output from a single prediction task. In some embodiments, the single selected metric 140 may correspond to a weighted numerical metric 128 output from a single prediction task. The numerical metric 128 may be weighted per sample data based on the spatio-temporal relationship representation 132 to generate the one selected metric 140 by considering the relationship between validation data samples. For example, where the spatio-temporal relationship representation 132 is a graph, the numerical metric 128 may be weighted by considering the edge weights between nodes for a current data sample and other connected data samples (nodes) in the graph. The edge weights may then be used in a mathematical operation such as a weighted average of the current sample’s numerical metric value and other connected sample’s (node’s) numerical metric value to obtain a weighted metric as the single selected metric 140.
[0058] In some embodiments, the plurality of data slices 1361—136n may be determined using a combination of selected metrics 140. In some embodiments, the selected metrics 140 may be combined by overlapping the selected metrics using a mathematical operation such as the mean of the selected metrics. In some embodiments, the selected metrics 140 may correspond to numerical metrics 128 directly output from more than one prediction task. In some embodiments, the selected metrics 140 may correspond to weighted numerical metrics 128. In some embodiments, the numerical metrics 128 may be weighted per sample data based on the spatio-temporal relationship representation 132. For example, where the spatiotemporal relationship representation 132 is a graph, each numerical metric 128 may be weighted by considering the edge weights between nodes for a current data sample and other connected nodes in the graph. The edge weights can then be used in a mathematical operation such as a weighted average of the current sample’s numerical metric value and other connected sample’s (node’s) numerical metric value to obtain a weighted metric as the selected metric 140 for each prediction task. In some embodiments, the numerical metrics 128 may be aggregated using another weighted average across the metrics. For example, in a multitask model like MTAN for Semantic Segmentation, Depth Estimation and Surface Normal Prediction, the per image numerical metric 128 for each of the three tasks may be averaged across all 3, or in a manner that prioritises the user's most important task out of all tasks.
[0059] An example of using Faster R-CNN for object detection is as follows: • Given a pre-trained FasterRCNN model for Object Detection, the numerical metric of per-image mAP (mean Average Precision) is obtained during inference for the validation dataset. • From the dataset, the spatio-temporal relationship is modelled as a graph (spatiotemporal relationship representation) based on available metadata of the image camera position (e.g., front, back of the car), and timestamp across the video frames. • From the per-image mAP scores and the spatio-temporal relationship, the new score (or weighted numerical metric) for each image is obtained by computing the weighted average of the current image's mAP and the mAP for the images connected in the immediate next node of the spatio-temporal graph. The weights may be assigned in a manner that prioritises the relationship between cameras facing the same direction as a possible example.
[0060] In some embodiments, the plurality of data slices 136i 136n may be determined using each validation data sample’s embedding 116 in the joint embedding space with the corresponding selected metric(s) 140 using any known clustering algorithms, such as K-means. In some embodiments, class label(s) associated with each validation data sample 104 may be used to determine the plurality of data slices 136i 136n. Preferably, the plurality of data slices 1361-136n are determined using an error-aware mixture model, with the slices from the validation dataset 108 with poor model performance discovered by maximisation using algorithms such as the known Expectation-Maximisation (EM) algorithm. In some embodiments, the error-aware mixture model used may be a modified Gaussian Mixture Model (GMM) suggested in Domino disclosed in “Domino: Discovering Systematic Errors with Cross-Modal Embeddings” by Eyuboglu et., al. (arXiv:2203.14960v3), wherein the input validation data sample embeddings 116 are modelled as a Gaussian while the prediction (metric) and class labels are modelled as categoricals. The GMM may then be fitted with expectation maximisation through the E and M steps as per the standard GMM disclosed in Domino. The output of the fitted mixture model may be the clusters of validation data samples where the trained machine learning model underperforms or fails, which are terms as “data slices”.
[0061] According to some embodiments, method 100 may comprise step S12 wherein a semantic description 1441-144^ is generated for each data slice 136i-136n based on the text embeddings 120. The semantic description may be machine-interpretable (e.g., semantic description in embedding form) and / or human interpretable (e.g., semantic description in textual form). In some embodiments, step S12 of generating a semantic description for each data slice may comprise comparing the data embeddings 116 of all data samples in each slice against a closest matching text embedding 120 in the joint embedding space.
[0062] In some embodiments, the closest matching text embedding 120 for a data slice 136 may be determined using distance metrics such as cosine similarity or L2 norm to compare a weighted average of data embeddings 116 of the validation data samples in such data slice 136 against the text embeddings 120, with the closest matching text embedding 120 and / or their matching text string 112 used as the semantic description for such data slice 136.
[0063] In some embodiments, the closest matching text embedding 120 for a data slice 136 may be determined using a dot product of distilled slice prototypes and the text embeddings 120. The distilled slice prototypes may be obtained by subtracting a prototype embedding of a mean of the data embeddings 116 of the validation data samples of the most common class in such data slice 136 from a weighted average of data embeddings 116 of the validation data samples in such data slice 136. The text embedding 120 and / or their matching text string 112 with the highest dot product may then be used as the semantic description for such data slice 136.
[0064] In some embodiments, distance metrics such as cosine similarity or 12 norm, or the dot product of distilled slice prototypes may both be used depending on the dataset and application scenario. The data embeddings 116 and text embeddings 120 will vary with different datasets and phrases, and hence determining the closest matching text embedding 120 with different methods may yield different performances given different datasets.
[0065] According to some embodiments, method 100 may comprise step S14 wherein additional data samples are collected based on the semantic descriptions generated, and step S16 wherein the trained machine learning model is refined by further training the trained machine learning model on the collected additional data samples.
[0066] Fig. 3 is a schematic illustration of a computing system for implementing some embodiments of the present disclosure, in accordance with embodiments of the present disclosure. Computing system 300 can be used, for example, for one or more steps of method 100. System 300 can be a computer connected to a network. System 300 can be a client or a server. As shown in Fig. 3, system 300 can be any suitable type of processor-based system, such as a personal computer, workstation, server, handheld computing device (portable electronic device) such as a phone or tablet, or an embedded system or other dedicated device. The system 300 can include, for example, one or more processors 310, one or more memory 314, one or more of input device 320, one or more of output device 330, a graphical user interface (GUI) 334, storage 340, and communication device 360. Input device 320 and / or output device 330 can generally either be connectable or integrated with the computing system 300.
[0067] Input device 320 can be any suitable device that provides input, such as a touch screen, keyboard or keypad, mouse, gesture recognition component of a virtual / augmented reality system, or voice-recognition device. Output device 330 can be or include any suitable device that provides output, such as a display, touch screen, haptics device, virtual / augmented reality display, or speaker.
[0068] Storage 340 can be any suitable device that provides storage, such as an electrical, magnetic, or optical memory including a RAM, cache, hard drive, removable storage disk, or other non-transitory computer readable medium. Communication device 360 can include any suitable device capable of transmitting and receiving signals over a network, such as a network interface chip or device. The components of the computing system 300 can be connected in any suitable manner, such as via a physical bus or wirelessly.
[0069] Processor(s) 310 can be any suitable processor or combination of processors, including any of, or any combination of, a central processing unit (CPU), graphics processing unit (GPU), field programmable gate array (FPGA), and application-specific integrated circuit (ASIC). Software 350, which can be stored in storage 340 and executed by one or more processors 310, can include, for example, the programming that embodies the functionality or portions of the functionality of the present disclosure (e.g., as embodied in the devices or methods as described above). For example, software 350 can include one or more programs for execution by one or more processor(s) 310 for performing one or more of the steps of method 100.
[0070] Software 350 can also be stored and / or transported within any non-transitory computer-readable storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as those described above, that can fetch instructions associated with the software from the instruction execution system, apparatus, or device and execute the instructions. In the context of this disclosure, a computer-readable storage medium can be any medium, such as storage 340, that can contain or store programming for use by or in connection with an instruction execution system, apparatus, or device.
[0071] Software 350 can also be propagated within any transport medium for use by or in connection with an instruction execution system, apparatus, or device, such as those described above, that can fetch instructions associated with the software from the instruction execution system, apparatus, or device and execute the instructions. In the context of this disclosure, a transport medium can be any medium that can communicate, propagate or transport programming for use by or in connection with an instruction execution system, apparatus, or device. The transport computer readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, or infrared wired or wireless propagation medium.
[0072] System 300 may be connected to a network, which can be any suitable type of interconnected communication system. The network can implement any suitable communications protocol and can be secured by any suitable security protocol. The network can comprise network links of any suitable arrangement that can implement the transmission and reception of network signals, such as wireless network connections, T1 or T3 lines, cable networks, DSL, or telephone lines.
[0073] System 300 can implement any operating system suitable for operating on the network. Software 350 can be written in any suitable programming language, such as C, C++, Java, or Python. In various embodiments, application software embodying the functionality of the present disclosure can be deployed in different configurations, such as in a client / server arrangement or through a Web browser as a Web-based application or Web service, for example.
[0074] Finally, the language used in the specification has been principally selected for readability and instructional purposes, and it may not have been selected to delineate or circumscribe the inventive subject matter. It is therefore intended that the scope of the invention be limited not by this detailed description, but rather by any claims that issue on an application based here on. Accordingly, the embodiments of the present disclosure are intended to be illustrative, but not limiting, of the scope of the invention, which is set forth in the following claims.
Claims
1. A computer-implemented method (100) for diagnosing machine learning model underperformance or failures, the method comprising:embedding (S2) validation data samples of a validation dataset and text string phrase candidates in a joint embedding space between a modality of the validation data and a modality of text strings to generate data embeddings and text embeddings;receiving (S4) a trained machine learning model capable of performing one or more tasks, the trained machine learning model trained on a training dataset, wherein the validation dataset and the training dataset are subsets of a dataset comprising a plurality of data samples;conducting (S6) inference with the validation dataset using the trained machine learning model to obtain numerical metrics per validation data sample for each of the one or more tasks, wherein the numerical metric is indicative of a performance of the trained machine learning model on each of the one or more tasks;generating (S8) a spatio-temporal relationship representation for the validation data samples of the validation dataset;determining (S10) a plurality of data slices based on one or more selected metrics, the data embeddings and the spatio-temporal relationship representation, wherein a data slice represents a scenario where the trained machine learning model underperforms or fails and comprises a cluster of data samples with a common semantic meaning within each data slice; andgenerating (SI2) a semantic description for each data slice based on the text embeddings.
2. The computer-implemented method of any of the preceding claims, wherein the one or more tasks is selected from a group comprising object recognition, object identification, object detection, pose estimation, and semantic segmentation.
3. The computer-implemented method of any of the preceding claims, wherein the spatio-temporal relationship representation is a graph.
4. The computer-implemented method of claim 3, wherein the graph comprises nodes and edges, wherein each node represents a validation data sample, and graph edge weights are based on a relative relationship between data samples.
5. The computer-implemented method of any of the preceding claims, wherein each of the one or more selected metrics are weighted per data sample based on the spatio-temporal relationship representation.
6. The computer-implemented method of any of the preceding claims, wherein if there is more than one selected metric, the selected metrics are combined by overlapping.
7. The computer-implemented method of any of the preceding claims, wherein determining a plurality of slices where the trained machine learning model underperforms or fails comprises using an error-aware mixture model.
8. The computer-implemented method of any of the preceding claims, wherein generating a semantic description for each data slice comprises comparing the data embeddings of all data samples in each slice against a closest matching text embedding in the joint embedding space.
9. The computer-implemented method of any of the preceding claims, further comprising:collecting (S14) additional data samples based on the semantic descriptions generated; andrefining (SI6) the trained machine learning model by further training the trained machine learning model on the collected additional data samples.
10. A computing system (300) for diagnosing machine learning model underperformance or failures, the computing system comprising one or more processors and memory storing one or more programs for execution by the one or more processors, the one or more programs including instructions for carrying out a computer-implemented method according to any of the preceding claims.
11. A computer program, a machine-readable storage medium, or a data carrier signal that comprises instructions, that upon execution on a processor, cause the processor to perform the steps of a computer-implemented method according to any one of claims 1 to 9.
12. Use of a computer-implemented method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Characterizing failures of a machine learning model based on instance features
US20230162096A1
Performance of a neural network using automatically uncovered failure cases
US20230237826A1