Method for explaining the function of a machine learning algorithm

The method addresses the high resource consumption and low quality of existing explainable AI techniques by selecting and comparing similar data within machine learning algorithms, resulting in efficient and high-quality explanations.

DE102023211441A1Pending Publication Date: 2025-05-22ROBERT BOSCH GMBH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
DE102023211441
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2025-05-22

AI Technical Summary

Technical Problem

Existing methods for making machine learning algorithms explainable require high resource consumption and produce low-quality artificial counterfactual examples.

Method used

A method that selects data from one group and identifies similar data from another group using encoders, allowing for comparison and explanation of the machine learning algorithm's function without generating artificial counterfactual examples.

Benefits of technology

This method enables the production of high-quality explanations for machine learning algorithms with low resource consumption, improving understanding and optimization of the algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to a method for explaining the function of a machine learning algorithm, wherein the machine learning algorithm is designed to assign input data to one of at least two groups, and wherein the method (1) comprises the following steps: - Providing input data for the machine learning algorithm (2); - For all of the provided input data, assigning the corresponding input data to one of the at least two groups by the machine learning algorithm (3); - selecting data from a first group of the at least two groups (4); - identifying data from a second group of at least two groups which are most similar to the selected data of all data contained in the second group (5); - comparing the selected data with the determined data to make the machine learning algorithm explainable (6); and - Providing relevant comparison results (7).
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The invention relates to a method for explaining the function of a machine learning algorithm, with which the function of a machine learning algorithm can be explained or made understandable in a simple manner and with comparatively low resource consumption.

[0002] Machine learning algorithms are based on the use of statistical methods to train a computer to perform a specific task without having been explicitly programmed to do so. The goal of machine learning is to construct algorithms that can learn from data and make predictions. These algorithms create mathematical models that can be used, for example, to classify data.

[0003] Machine learning algorithms include, for example, classification methods. Classification methods are procedures that describe the assignment or grouping of observations into predefined categories.

[0004] Such classification methods are used, for example, in methods for detecting anomalies on the surface of a product produced through a manufacturing process. One example of such methods is automatic inspection, which is designed to detect defects in corresponding products using image processing methods.

[0005] It is often desired to make the function of a machine learning algorithm explainable or understandable, for example in order to increase confidence in the corresponding machine learning algorithm and / or to optimize it accordingly.

[0006] For example, it is known to generate artificial counterfactual examples based on which the function of a machine learning algorithm is to be explained. However, the generation of artificial counterfactual examples is associated with a comparatively high resource consumption, for example, a large consumption of memory and / or processor capacity. Furthermore, the quality of the generated artificial counterfactual examples is often limited.

[0007] From the document EP 3 796 228 A1 a method for generating counterfactual examples for neural networks is known.

[0008] The invention is therefore based on the object of providing an improved method for making a machine learning algorithm explainable.

[0009] The problem is solved by a method for making a machine learning algorithm explainable according to the features of patent claim 1.

[0010] The problem is also solved by a system for explaining a machine learning algorithm according to the features of patent claim 6. Disclosure of the invention

[0011] According to one embodiment of the invention, this object is achieved by a method for explaining the function of a machine learning algorithm, wherein the machine learning algorithm is designed to assign input data to one of at least two groups, and wherein the method comprises providing input data for the machine learning algorithm, for all of the provided input data, each assigning the corresponding input data to one of the at least two groups by the machine learning algorithm, selecting data from a first group of the at least two groups, determining data from a second group of the at least two groups which are most similar to the selected data from all data contained in the second group, comparing the selected data with the determined data in order to make the machine learning algorithm explainable,and providing appropriate comparison results.

[0012] Input data is understood to mean data which is assigned by the machine learning algorithm into corresponding output data or output values, i.e. in particular to one of at least two groups, in particular corresponding sensor data.

[0013] Thus, a method for explaining the function of a machine learning algorithm is provided, which is based on determining the data from different groups which are most similar to each other, whereby by comparing these data the differences between the assignment of data to the corresponding groups can be specified.

[0014] Consequently, a method for explaining the function of a machine learning algorithm is provided, with which high-quality counterfactual examples can be generated, but which does not require the generation of an artificial counterfactual example, i.e. a method with which the function of a machine learning algorithm can be explained in a simple way and with comparatively low resource consumption.

[0015] Overall, an improved method for making a machine learning algorithm explainable is provided.

[0016] In one embodiment, the step of determining data from the second group that is most similar to the selected data comprises applying at least one encoder.

[0017] Encoders or autoencoders are machine learning algorithms that are designed to extract certain features from data and make complex data understandable.

[0018] Thus, the identification of similar data can be done in a simple way based on known machine learning algorithms, without the need for complex and resource-intensive adjustments.

[0019] In addition, the method may further comprise retraining the machine learning algorithm based on the comparison results. In particular, the weaknesses of the corresponding machine learning algorithm can be easily identified and remedied with comparatively low resource consumption.

[0020] The input data may also include sensor data.

[0021] A sensor, which is also called a detector, (measured variable or measuring) sensor or (measured) probe, is a technical component that can detect certain physical or chemical properties and / or the material properties of its environment qualitatively or quantitatively as a measured variable.

[0022] Thus, circumstances outside the data processing system on which the method is executed can be taken into account and incorporated into the explanation of the function of the machine learning algorithm.

[0023] For example, the machine learning algorithm may be a machine learning algorithm for automatic optical inspection of products manufactured by a manufacturing process, where the input data is image data of products manufactured by the manufacturing process captured by a sensor.

[0024] A manufacturing process is generally understood to be a standardized workflow in which a product is manufactured using specified manufacturing processes, tools, and resources through mechanical and / or manual processing of raw materials or intermediate products. Depending on the comparison results, the aforementioned manufactured products can either be discarded and thus not further processed, or released for subsequent processing steps.

[0025] Especially with automatic optical inspection processes, it is important to understand how they work and thus make them explainable.

[0026] A further embodiment of the invention also provides a system for explaining the function of a machine learning algorithm, wherein the machine learning algorithm is designed to assign input data to one of at least two groups, and wherein the system comprises a first provision unit designed to provide input data for the machine learning algorithm, an allocation unit designed to assign the corresponding input data for all of the provided input data to one of the at least two groups by the machine learning algorithm, a selection unit designed to select data from a first group of the at least two groups, a determination unit designed to determine data from a second group of the at least two groups that are most similar to the selected data from all the data contained in the second group,to determine, a comparison unit which is designed to compare the selected data with the determined data in order to make the machine learning algorithm explainable, and a second provision unit which is designed to provide corresponding comparison results.,

[0027] Thus, an improved system for explaining a machine learning algorithm is provided. In particular, a system for explaining the function of a machine learning algorithm is provided, which can generate high-quality counterfactual examples without requiring the generation of an artificial counterfactual example. That is, a system with which the function of a machine learning algorithm can be explained in a simple manner and with comparatively low resource consumption.

[0028] In one embodiment, the determination unit is configured to use at least one encoder to determine the data. Thus, the determination of similar data can be carried out in a simple manner based on known machine learning algorithms, without the need for complex and resource-intensive adaptations.

[0029] In addition, the system can further comprise a retraining unit configured to retrain the machine learning algorithm based on the comparison results. In particular, the weaknesses of the corresponding machine learning algorithm can be easily identified and remedied with comparatively low resource consumption.

[0030] The input data may also include sensor data. This allows conditions outside the data processing system on which the method is executed to be taken into account and incorporated into explaining the function of the machine learning algorithm.

[0031] For example, the machine learning algorithm could be a machine learning algorithm for the automatic optical inspection of products manufactured by a manufacturing process, where the input data is image data of products manufactured by the manufacturing process captured by a sensor. Especially with automatic optical inspection methods, it is important to understand how they work and thus make them explainable.

[0032] A further embodiment of the invention also provides a computer program with program code for carrying out a method described above for making the function of a machine learning algorithm explainable when the computer program is executed on a computer.

[0033] A further embodiment of the invention also provides a computer-readable data carrier with program code of a computer program for carrying out a method described above for providing training data for explaining the function of a machine learning algorithm when the computer program is executed on a computer.

[0034] The computer program and the computer-readable data carrier each have the advantage that they are configured to execute an improved method for explaining a machine learning algorithm. In particular, they are configured to execute a method for explaining the function of a machine learning algorithm, which can generate high-quality counterfactual examples but does not require the generation of an artificial counterfactual example. This means that the function of a machine learning algorithm can be explained in a simple manner and with comparatively low resource consumption.

[0035] In summary, it can be stated that the present invention provides a method for explaining the function of a machine learning algorithm, with which the function of a machine learning algorithm can be explained in a simple manner and with comparatively low resource consumption.

[0036] The described designs and further training courses can be combined as desired.

[0037] Further possible embodiments, developments and implementations of the invention also include combinations of features of the invention described previously or below with regard to the exemplary embodiments that are not explicitly mentioned. Short description of the drawings

[0038] The accompanying drawings are intended to provide a further understanding of embodiments of the invention. They illustrate embodiments and, in conjunction with the description, serve to explain principles and concepts of the invention.

[0039] Other embodiments and many of the aforementioned advantages will become apparent upon review of the drawings. The elements illustrated in the drawings are not necessarily drawn to scale.

[0040] They show: Fig. 1. shows a flowchart of a method for explaining the function of a machine learning algorithm according to embodiments of the invention; Fig. 2. Shows a schematic block diagram of a system for explaining the function of a machine learning algorithm according to embodiments of the invention;

[0041] In the figures of the drawings, the same reference symbols designate the same or functionally identical elements, parts or components, unless otherwise stated.

[0042] Fig. 1 shows a flowchart of a method for determining at least one change point in a time series of sensor values ​​1 according to embodiments of the invention.

[0043] Machine learning algorithms include, for example, classification methods. Classification methods are procedures that describe the assignment or grouping of observations into predefined categories.

[0044] Such classification methods are used, for example, in methods for detecting anomalies on the surface of a product produced through a manufacturing process. One example of such methods is automatic inspection, which is designed to detect defects in corresponding products using image processing methods.

[0045] It is often desired to make the function of a machine learning algorithm explainable or understandable, for example in order to increase confidence in the corresponding machine learning algorithm and / or to optimize it accordingly.

[0046] For example, it is known to generate artificial counterfactual examples based on which the function of a machine learning algorithm is to be explained. However, the generation of artificial counterfactual examples is associated with a comparatively high resource consumption, for example, a large consumption of memory and / or processor capacity. Furthermore, the quality of the generated artificial counterfactual examples is often limited.

[0047] Fig. 1 shows a method for explaining the function of a machine learning algorithm 1, wherein the machine learning algorithm is designed to assign input data to one of at least two groups, and wherein the method 1 comprises a step 2 of providing input data for the machine learning algorithm, a step 3 of assigning, for all of the provided input data, the corresponding input data to one of the at least two groups by the machine learning algorithm, a step 4 of selecting data from a first group of the at least two groups, a step 5 of determining data from a second group of the at least two groups which are most similar to the selected data from all the data contained in the second group, a step 6 of comparing the selected data with the determined data,to make the machine learning algorithm explainable, and has a step 7 of providing corresponding comparison results.

[0048] Consequently, a method for explaining the function of a machine learning algorithm 1 is provided, with which high-quality counterfactual examples can be generated, but which does not require the generation of an artificial counterfactual example, that is, a method with which the function of a machine learning algorithm can be explained in a simple way and with comparatively low resource consumption.

[0049] Overall, an improved method for making a machine learning algorithm 1 explainable is provided.

[0050] In particular, Fig. 1 a method 1 in which a counterfactual example is created by determining from data from one class which selected data from another class are most similar.

[0051] The step 4 of selecting data from the first group of the at least two groups can comprise a random selection of data or a selection of data based on corresponding specifications, for example application-specific specifications.

[0052] According to the embodiments of the Fig. 1, the step of determining data from the second group which is most similar to the selected data comprises applying at least one encoder.

[0053] In particular, feature vectors can be formed based on the selected data and all elements of the second group, and based on these feature vectors, the data similar to the selected data can be determined.

[0054] How Fig. 1, the method 1 further comprises a step 8 of retraining the machine learning algorithm based on the comparison results.

[0055] In particular, method 1 is designed to evaluate the model quality and to optimize the machine learning algorithm accordingly.

[0056] The input data also includes sensor data.

[0057] According to the embodiments of the Fig. 1, the machine learning algorithm is, in particular, a machine learning algorithm for the automatic optical inspection of products manufactured by a manufacturing process, wherein the input data are image data of products manufactured by the manufacturing process, captured by a sensor.

[0058] The selected data may in particular be data that has been classified as non-OK, i.e. containing errors or having an anomaly, whereby the most similar data classified as OK to this data are determined.

[0059] Based on the corresponding classification results, products classified as non-OK by the machine learning algorithm can also be automatically discarded.

[0060] Fig. 2 shows a schematic block diagram of a system for determining at least one change point in a time series of sensor values ​​10 according to embodiments of the invention.

[0061] In particular, Fig. 2 a system for explaining the function of a machine learning algorithm 10, wherein the machine learning algorithm is designed to assign input data to one of at least two groups, and wherein the system 10 comprises a first provision unit 11, which is designed to provide input data for the machine learning algorithm, an assignment unit 12, which is designed to assign the corresponding input data to one of the at least two groups for all of the provided input data, a selection unit 13, which is designed to select data from a first group of the at least two groups, a determination unit 14, which is designed to determine data from a second group of the at least two groups that is most similar to the selected data of all data contained in the second group, a comparison unit 15,which is designed to compare the selected data with the determined data in order to make the machine learning algorithm explainable, and a second provision unit which is designed to provide corresponding comparison results.

[0062] The first provision unit can, in particular, be a receiver configured to receive corresponding data, in particular sensor data. The second provision unit can also be a transmitter configured to transmit corresponding information or data. The first provision unit and the second provision unit can also be integrated into a common transceiver.

[0063] The allocation unit, the selection unit, the determination unit and the comparison unit can further each be implemented, for example, based on code stored in a memory and executable by a processor.

[0064] According to the embodiments of the Fig. 2, the determination unit 14 is further designed to use at least one encoder to determine the data.

[0065] How Fig. 2 further shows, the system 10 further comprises a retraining unit 17 which is designed to retrain the machine learning algorithm based on the comparison results.

[0066] The retraining unit can, for example, be implemented based on a code stored in a memory and executable by a processor.

[0067] Furthermore, the input data again includes sensor data.

[0068] According to the embodiments of the Fig. 2, the machine learning algorithm is in particular a machine learning algorithm for the automatic optical inspection of products manufactured by a manufacturing process, wherein the input data are image data of products manufactured by the manufacturing process, captured by a sensor.

[0069] In addition, the illustrated system 10 is designed to carry out a method described above for making the function of a machine learning algorithm explainable. QUOTES CONTAINED IN THE DESCRIPTION

[0000] This list of documents submitted by the applicant was generated automatically and is included solely for the convenience of the reader. This list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions. Cited patent literature

[0000] EP 3 796 228 A1

[0007]

Claims

[1] A method for explaining the function of a machine learning algorithm, wherein the machine learning algorithm is designed to assign input data to one of at least two groups, and wherein the method (1) comprises the following steps: - Providing input data for the machine learning algorithm (2); - For all of the provided input data, assigning the corresponding input data to one of the at least two groups by the machine learning algorithm (3); - selecting data from a first group of the at least two groups (4); - identifying data from a second group of at least two groups which are most similar to the selected data of all data contained in the second group (5); - comparing the selected data with the determined data to make the machine learning algorithm explainable (6); and - Providing relevant comparison results (7). [2] The method (1) of claim 1, wherein the step of determining data from the second group that is most similar to the selected data (5) comprises applying at least one encoder. [3] Method (1) according to claim 1 or 2, wherein the method (1) further comprises the following step: - Retraining the machine learning algorithm based on the comparison results (8). [4] Method (1) according to one of claims 1 to 3, wherein the input data comprises sensor data. [5] The method (1) according to claim 4, wherein the machine learning algorithm is a machine learning algorithm for automatic optical inspection of products manufactured by a manufacturing process, and wherein the input data is image data of products manufactured by the manufacturing process acquired by a sensor. [6] System for explaining the function of a machine learning algorithm, wherein the machine learning algorithm is designed to assign input data to one of at least two groups, and wherein the system (10) comprises a first provision unit (11) designed to provide input data for the machine learning algorithm, an assignment unit (12) designed to assign the corresponding input data to one of the at least two groups for all of the provided input data by the machine learning algorithm, a selection unit (13) designed to select data from a first group of the at least two groups, a determination unit (14) designed to determine data from a second group of the at least two groups that are most similar to the selected data from all the data contained in the second group, a comparison unit (15),which is designed to compare the selected data with the determined data in order to make the machine learning algorithm explainable, and a second provision unit (16) which is designed to provide corresponding comparison results., [7] System (10) according to claim 6, wherein the determination unit (14) is configured to use at least one encoder to determine the data. [8] System (10) according to claim 6 or 7, wherein the system (10) further comprises a retraining unit (17) which is designed to retrain the machine learning algorithm based on the comparison results. [9] A computer program comprising program code for carrying out a method for explaining the function of a machine learning algorithm according to any one of claims 1 to 5 when the computer program is executed on a computer. [10] Computer-readable data carrier with program code of a computer program for carrying out a method for providing training data for explaining the function of a machine learning algorithm according to one of claims 1 to 5 when the computer program is executed on a computer.

Citation Information

Patent Citations

  • Device and method for generating a counterfactual data sample for a neural network

    EP3796228A1