Learning device, and classifying device

The learning device optimizes AUC by minimizing the base threshold's absolute value using correction terms, reducing computational load and preventing score bias in PU classification.

JP2024119663AInactive Publication Date: 2024-09-03KYOCERA CORP +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023026727
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2024-09-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

AUC optimization learning using PU classification leads to increased computational load.

Method used

A learning device that generates a trained classification model by maximizing AUC while minimizing the absolute value of the base threshold for sorting into positive and negative examples, using a specific AUC loss formula with correction terms to balance classification ratios and prevent score bias.

Benefits of technology

Reduces calculation load and prevents score bias by maintaining a small absolute value for the base threshold, thereby optimizing AUC without excessive computational cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024119663000001
    Figure 2024119663000001
Patent Text Reader

Abstract

To reduce a calculation load for searching for a threshold.SOLUTION: A learning device (10) comprises a first learning unit (11) that generates a learned classification model (102) that has been trained to classify data for learning (50) including positive data (51) and unknown data (52) into positive examples and negative examples and maximize an AUC, with the data for learning (50) as input. The first learning unit (11) is trained to reduce an absolute value of a base threshold for classifying the data for learning into the positive examples and negative examples.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a learning device or the like that trains a classification model for classifying data. [Background technology]

[0002] In recent years, data is often classified using a trained model trained by machine learning. Various learning methods have also been proposed for machine learning. For example, Patent Document 1 describes a machine learning device that performs machine learning to optimize AUC (Area Under the Curve) in PU (Positive-Unlabeled) classification. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2015-1968 A Summary of the Invention [Problem to be solved by the invention]

[0004] AUC optimization learning using PU classification had the problem of increasing the computational load. [Means for solving the problem]

[0005] In order to solve the above problems, a learning device according to one embodiment of the present disclosure is a learning device that generates a trained classification model that classifies data to be classified into positive examples or negative examples, and includes a first learning unit that receives training data including a plurality of positive data indicating the positive examples and a plurality of unknown data whose whether they are the positive examples or the negative examples is unknown, classifies the training data into the positive examples and the negative examples, and generates the trained classification model trained to maximize AUC, and the first learning unit trains the training data so that the absolute value of a base threshold for allocating data to the positive examples and negative examples becomes small. Effect of the Invention

[0006] According to one aspect of the present disclosure, the calculation load can be reduced. [Brief description of the drawings]

[0007] [Figure 1] 1 is a functional block diagram showing a configuration of a main part of a learning device according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a diagram showing an example of learning data used by the learning device for learning. [Diagram 3] 4 is a flowchart showing a flow of a learning theory in the learning device. [Figure 4] FIG. 2 is a functional block diagram showing a configuration of a main part of the classification device. [Diagram 5] FIG. 1 is a diagram showing a configuration of a classification system. [Figure 6] FIG. 13 is a functional block diagram showing a modified example of the learning device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0008] First, a learning device 10 according to this embodiment will be described with reference to Fig. 1. Fig. 1 is a functional block diagram showing a configuration of a main part of the learning device 10. The learning device 10 trains a classification model 100 for performing binary classification that divides data into positive and negative. Specifically, the learning device 10 trains the classification model 100 by a learning method called PU learning (Positive-Unlabeled Learning).

[0009] PU learning is a method of learning using as input learning data including a plurality of positive data indicating positive examples and a plurality of unknown data, the unknown being whether they are positive examples or negative examples.

[0010] In addition to PU learning, there is PN learning, which uses data containing multiple positive data indicating positive examples and multiple negative data indicating negative examples as learning data. However, in PN learning, data that is not labeled cannot be used as learning data. PU learning is a learning method that can handle data that cannot be handled by PN learning.

[0011] In addition, data that is difficult to label as negative data, such as the following data, will be trained using PU learning. (1) Data with high annotation costs Only a portion of the positive examples are labeled as positive data, and the rest are not labeled. (2) Access data to web pages on which click ads exist If it is clicked, it is labeled as being of interest and becomes positive data, but if it is not clicked, it is unclear whether the person did not notice it or was not interested, so a label cannot be assigned. (3) New drug data If it is reported in a paper, a label is assigned and it becomes correct data, but if it is not reported, it is unclear whether development has not progressed or whether research has not been conducted, so a label cannot be assigned. (4) Detection data for detecting abnormalities Normal data is assigned a label and becomes genuine data, but if an abnormality occurs but is deemed minor and the system is not shut down, etc., and it is not possible to determine whether it is an abnormality or not, a label cannot be assigned.

[0012] 1, the learning device 10 includes a first learning unit 11. The first learning unit 11 uses learning data 50 to learn a pre-learning classification model 101.

[0013] The pre-learned classification model 101 is the classification model 100 before learning or during learning. The classification model 100 assigns a score (output value) to input data and outputs the data. The first learning unit 11 trains the pre-learned classification model 101 with a classification boundary between positive examples and negative examples, and can generate a trained classification model 102 that can classify, for example, data with a score greater than an input threshold input by a user into a positive example and data with a score smaller than the input threshold into a negative example. In the following, the trained classification model 100 is also referred to as a trained classification model 102. When there is no restriction as to whether it is pre-learned or trained, it is simply referred to as the classification model 100.

[0014] The learning data 50 includes a plurality of positive data 51 indicating positive examples, and a plurality of unknown data 52 for which it is unknown whether the data is a positive example or a negative example. An example of the learning data 50 is shown in Fig. 2. Fig. 2 shows data indicating a transition of a sensor value for a predetermined period of time. Shown here are positive data 51 in which the sensor value data is normal and to which a label indicating that the data is normal is attached, and unknown data 52 in which the sensor value data includes normal parts and abnormal parts and to which no label is attached.

[0015] The first learning unit 11 trains the pre-learning classification model 101 so as to maximize an AUC (Area Under Curve) based on a classification result obtained by inputting the learning data 50 to the pre-learning classification model 101, and generates a trained classification model 102. More specifically, the first learning unit 11 trains the pre-learning classification model 101 so as to maximize an AUC based on a difference between an output score for a positive example and an output score for a negative example obtained by inputting the learning data 50 to the pre-learning classification model 101. At this time, the first learning unit 11 trains the pre-learning classification model 101 by executing a calculation process that reduces the absolute value of a base threshold value for allocating positive examples and negative examples. In other words, the first learning unit 11 has a calculation unit (calculation formula) capable of training the pre-learning classification model 101 so as to reduce the base threshold value for allocating positive examples and negative examples. The base threshold refers to the threshold that produces the highest F-measure for the classification results of positive and negative examples when the learning data used during learning is input to the trained classification model 102 using this base threshold as the input threshold.

[0016] More specifically, the pre-learning classification model 101 is trained based on the AUC loss formula shown in the following formula (1) as a calculation formula.

[0017]

number

[0018] where x P is positive data, x U is the unknown data, n P is the number of positive data, n U is the number of unknown data, g is the classification model, π P is the positive class prior probability in the unknown data (the proportion of positive data in the unknown data), π N is the negative class prior probability in the unknown data (the proportion of negative data in the unknown data), and l is the loss function.

[0019] The positive class prior probability and the negative class prior probability in the unknown data may be determined in advance by a person, or may be estimated by an estimator (not shown).

[0020] Correction terms for equation (1) include equations (2), (3), and (4).

[0021]

number

[0022] Here, γ is a parameter that determines the strength of the correction, f is a function that converts the model output value to ±1 using tanh (or sigmoid), and n + is the number of positive data points for the model output, and n - is the number of data whose model output value is negative.

[0023] It can be said that the correction term shown in equation (2) is expressed as the sum of a first term that increases as the difference between the proportion of input training data 50 classified as positive examples by pre-learning classification model 101 and the positive class prior probability in unknown data 52 increases, and a second term that increases as the difference between the proportion of input training data 50 classified as negative examples by pre-learning classification model 101 and the negative class prior probability in unknown data 52 increases. This correction term makes the classification proportion equal to the prior probability, and the base threshold for allocating positive and negative examples can be maintained at 0.

[0024]

number

[0025] It can be said that the correction term shown in formula (3) is expressed by the difference between the ratio of the positive class prior probability in unknown data 52 to the negative class prior probability in unknown data 52 for input learning data 50, and the ratio of the proportion of cases classified as positive examples to the proportion of cases classified as negative examples by pre-learning classification model 101. This correction term makes it possible to prevent rounding errors caused by the value of the correction term becoming too small.

[0026]

number

[0027] It can be said that the correction term shown in formula (4) is expressed by the difference between the product of the positive class prior probability in unknown data 52 and the proportion of data classified as negative examples by pre-learning classification model 101 for input learning data 50, and the product of the negative class prior probability in unknown data 52 and the proportion of data classified as positive examples by pre-learning classification model 101. This correction term allows the correction term to be calculated appropriately even when the proportions of positive examples and negative examples differ greatly.

[0028] The above formula (1) will now be described.

[0029] First, AUC is one of the model evaluation indices, and represents the area under the ROC curve. Also, the ROC curve is a plot of the relationship between recall and false positive rate when the base threshold for dividing positive and negative examples is changed, with recall on the vertical axis and false positive rate on the horizontal axis. Recall is the proportion of all positive examples that were correctly classified as positive examples. False positive rate is the proportion of all negative examples that were incorrectly classified as positive examples.

[0030] First, the expected loss that maximizes the AUC in PN learning is expressed by the following equation (5).

[0031]

number

[0032] Here, E P is the expectation for the positive data probability distribution, E N is the expected value for the negative data probability distribution. Equation (5) can be expressed as an empirical loss equation as follows:

[0033]

number

[0034] In the case of PU learning, there is no negative data, but there is unknown data. Since the unknown data is a set of positive and negative data, the expected loss for the unknown data can be expressed as the sum of the expected loss for the positive data and the expected loss for the negative data. The specific loss formula is shown in the following formula (7).

[0035]

number

[0036] From equations (5) and (7),

[0037]

number

[0038] Since equation (8) is an equation expressed by positive data and unknown data, it can be said to be a loss equation that maximizes the AUC in PU learning. Therefore, if equation (8) is used as the loss equation for the empirical loss, it becomes equation (9).

[0039]

number

[0040] Where:

[0041]

number

[0042] x P This is the number of positive data points that is different from the number of positive data points in the above equation. Since this is difficult to measure, the following equation (11) is used instead of equation (9).

[0043]

number

[0044] It can be said that formula (11) calculates the loss for a combination of positive data and unknown data by subtracting the loss for positive data from the loss calculated for the combination of positive data and negative data. Formula (11) can be said to be a loss formula for maximizing the AUC in PU learning. Therefore, while formula (11) is used to maximize the AUC, if this formula is used as is, there is a possibility that the base threshold will shift. The reason is explained below.

[0045] Here, for simplicity, we will explain using equation (12), which is the loss equation for maximizing AUC in PN learning, as an example.

[0046]

number

[0047] AUC maximization is the output g(x P ) and the output g(x N ) and the difference between them. There is no restriction on the base threshold for dividing the positive and negative examples. Therefore, the output g(x P ) and output g(x N ) becomes large, it is possible that the base threshold will be far from 0.

[0048] Therefore, in this embodiment, as shown in the above-mentioned formula (1), the absolute value of the base threshold is reduced by adding a correction term to formula (11), which is a loss formula that maximizes the AUC. In the present disclosure, for example, the base threshold is kept at a small absolute value such as 0 (zero).

[0049] By keeping the base threshold at 0, it is possible to suppress the cost of searching for the base threshold and reduce the calculation load. In addition, since the scores of positive and negative examples are distributed around 0, it is possible to prevent the absolute value of the score from becoming too large due to being biased toward either positive or negative values. This makes it possible to suppress the calculation load.

[0050] [Learning process flow in the learning device 10] Next, the flow of the learning process in the learning device 10 will be described with reference to Fig. 3. Fig. 3 is a flowchart showing the flow of the learning process.

[0051] As shown in Fig. 3, the first learning unit 11 of the learning device 10 first extracts one set of learning data 50 (positive data 51 and unknown data 52) (S101). Next, the extracted learning data 50 and formula (1) are used to calculate a loss (S102). The first learning unit 11 then updates the parameters of the pre-learning classification model 101 based on the calculated loss (S103). If a predetermined learning accuracy has been achieved (YES in S104), the learning process ends, and if the predetermined learning accuracy has not been achieved (NO in S104), the process returns to step S101 and continues learning.

[0052] [Classification device] Next, the classification device 20 will be described with reference to Fig. 4. Fig. 4 is a functional block diagram showing a configuration of a main part of the classification device 20. The classification device 20 classifies data to be classified 60 using a trained classification model 102, which is a classification model 100 trained by the learning device 10, and outputs the result.

[0053] The classification device 20 may perform any type of classification as long as it uses the classification model 100 learned by PU learning to perform binary classification of data, for example, classifying whether image data is of a specific animal (e.g., a cat), whether an email is a phishing email, whether detected data is normal, etc.

[0054] [Classification System] Next, the classification system 1 will be described with reference to Fig. 5. Fig. 5 is a diagram showing the configuration of the classification system 1. The classification system 1 includes the learning device 10 shown in Fig. 1 and the classification device 20 shown in Fig. 4, and further includes an evaluation device 30 that evaluates the classification result by the classification device 20 and feeds back the evaluation result to the classification device 20.

[0055] As described above, the learning device 10 trains the classification model 100 using the training data 50 including the correct data 51 and the unknown data 52. The classification device 20 classifies the data to be classified 60 using the classification model 100 trained by the learning device 10. The classification result is output to the evaluation device 30.

[0056] The evaluation device 30 presents the classification results to the evaluator. Then, based on the evaluation results by the evaluator, the evaluation device 30 adjusts the hyperparameters used in the classification model 100. The adjustment of the hyperparameters may itself be performed by the evaluator. The hyperparameters are parameters that set the behavior of the machine learning algorithm.

[0057] [Modifications] Next, a learning device 10A that is a modified example of the learning device 10 will be described with reference to Fig. 6. Fig. 6 is a functional block diagram showing the modified example of the learning device 10.

[0058] The learning device 10A according to this modification includes a second learning unit 12 and a switching unit 13 in addition to the first learning unit 11 described above.

[0059] The second learning unit 12 takes learning data as input, classifies the learning data into positive examples and negative examples, and has the pre-learning classification model 101 learn a base threshold for dividing the learning data into positive examples and negative examples so as to minimize errors based on the classification results.

[0060] The switching unit 13 switches between the first learning unit 11 and the second learning unit 12 to learn the pre-learning classification model 101, depending on the learning data.

[0061] The switching unit 13 switches between the first learning unit 11 and the second learning unit 12 based on an evaluation index calculated using accuracy verification data 70 including multiple positive data 71 indicating positive examples and multiple negative data 72 indicating negative examples, and the pre-learning classification model 101.

[0062] [Software implementation example] The functions of the learning device 10, 10A, and the classification device 20 can be realized by a program for causing a computer to function as the device, and a program for causing a computer to function as the control block (first learning unit 11, second learning unit 12, switching unit 13) of the device.

[0063] In this case, the device includes a computer having at least one control device (e.g., a processor) and at least one storage device (e.g., a memory) as hardware for executing the program. The control device and storage device execute the program to realize each function described in each of the above embodiments.

[0064] The program may be non-transitory and may be recorded in one or more computer-readable recording media. The recording media may or may not be included in the device. In the latter case, the program may be provided to the device via any wired or wireless transmission medium.

[0065] In addition, some or all of the functions of each of the control blocks can be realized by a logic circuit. For example, an integrated circuit in which a logic circuit that functions as each of the control blocks is formed is also included in the scope of the present disclosure. In addition, the functions of each of the control blocks can be realized by, for example, a quantum computer.

[0066] Furthermore, each process described in the above embodiment may be executed by AI (Artificial Intelligence). In this case, the AI ​​may be operated by the control device or another device (for example, an edge computer or a cloud server).

[0067] 〔summary〕 A learning device according to a first aspect of the present disclosure is a learning device that generates a trained classification model that classifies data to be classified into positive examples or negative examples, and includes a first learning unit that receives training data including a plurality of positive data indicating the positive examples and a plurality of unknown data, each of which is unknown as to whether it is the positive example or the negative example, as input, and classifies the training data into the positive examples and the negative examples and generates the trained classification model that is trained to maximize AUC, and the first learning unit trains the training data so that the absolute value of a base threshold for allocating data to the positive examples and negative examples becomes small.

[0068] The inventors of the present application have discovered that one of the causes of the increase in the computational load in learning to maximize the AUC is the increase in the absolute value of the base threshold. According to the above configuration, the absolute value of the base threshold for allocating positive and negative examples in learning to maximize the AUC is small. Therefore, it is possible to suppress the cost of searching for the base threshold and reduce the computational load. In addition, since the scores of the positive and negative examples are distributed on either side of the base threshold with a small absolute value, it is possible to prevent the absolute value of the score from becoming too large due to bias toward either positive or negative values. This makes it possible to suppress the computational load.

[0069] The learning device according to aspect 2 of the present disclosure is in accordance with aspect 1, wherein the first learning unit trains the pre-learned classification model based on an AUC loss formula having a correction term that reduces the absolute value of the base threshold.

[0070] According to the above configuration, in learning based on the AUC loss formula having a correction term, the absolute value of the base threshold becomes small.

[0071] In a learning device according to aspect 3 of the present disclosure, in aspect 1, the correction term is expressed as the sum of a first term that increases as the difference between the proportion of the input learning data that the pre-learning classification model classifies as positive examples and the positive class prior probability in the unknown data increases, and a second term that increases as the difference between the proportion of the input learning data that the pre-learning classification model classifies as negative examples and the negative class prior probability in the unknown data increases.

[0072] According to the above configuration, the classification ratio and the prior probability become equal, and the threshold for classifying positive examples and negative examples can be kept at 0.

[0073] In the learning device according to aspect 4 of the present disclosure, in aspect 1, the correction term is expressed as the difference between the ratio of the positive class prior probability in the unknown data to the negative class prior probability in the unknown data for the input learning data, and the ratio of the proportion of data classified as positive examples by the pre-learning classification model to the proportion of data classified as negative examples.

[0074] According to the above-mentioned configuration, it is possible to prevent rounding errors caused by the correction term value becoming too small.

[0075] In a learning device according to aspect 5 of the present disclosure, in aspect 1, the correction term is expressed as the difference between the product of the positive class prior probability in the unknown data and the proportion of the data that the pre-learning classification model classifies as negative examples, and the product of the negative class prior probability in the unknown data and the proportion of the data that the pre-learning classification model classifies as positive examples, for the input learning data.

[0076] According to the above configuration, even if the ratio of positive examples to negative examples differs greatly, the correction term can be calculated appropriately.

[0077] The learning device according to aspect 6 of the present disclosure, in any of aspects 1 to 5, includes a second learning unit that receives the learning data as input, classifies the learning data into the positive examples and the negative examples, and generates the trained classification model trained to minimize an error based on the classification result, and a switching unit that switches between the first learning unit and the second learning unit depending on the learning data.

[0078] According to the above configuration, learning can be performed by switching between learning using a loss formula for AUC optimization and learning using a loss formula for error minimization.

[0079] In the learning device of aspect 7 of the present disclosure, in aspect 6, the switching unit performs the switching based on an evaluation index calculated using accuracy verification data including a plurality of positive data indicating positive examples and a plurality of negative data indicating negative examples, and the trained classification model.

[0080] According to the above configuration, it is possible to automatically execute learning that is deemed appropriate from learning using a loss formula for AUC optimization and learning using a loss formula for error minimization. Here, examples of the evaluation index include the accuracy rate, recall rate, precision rate, and F-measure. The F-measure is a value calculated by the harmonic mean of the precision rate and the recall rate.

[0081] The classification device according to an eighth aspect of the present disclosure classifies the classification target data using a trained classification model trained by the learning device according to any one of the first to seventh aspects.

[0082] The present disclosure is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present disclosure. [Explanation of symbols]

[0083] 1 Classification System 10 Learning Device 11 First Study Section 12 Second Learning Section 13 Switching section 20 Classifier 50 Training Data 51 Positive Data 52 Unknown Data 60 Classification Data 70 Accuracy verification data 71 Positive Data 72 negative data 100 Classification Models 101 Pre-training classification model 102 Trained Classification Models

Claims

1. A learning device that generates a trained classification model that classifies data to be classified into positive examples or negative examples, a first learning unit that receives learning data including a plurality of positive data indicating the positive examples and a plurality of unknown data, each of which is unknown as to whether it is the positive example or the negative example, and classifies the learning data into the positive examples and the negative examples and generates the trained classification model that is trained to maximize AUC; The first learning unit performs learning so that an absolute value of a base threshold for allocating to the positive examples and the negative examples becomes small.

2. The learning device according to claim 1 , wherein the first learning unit trains a pre-learning classification model based on an AUC loss formula having a correction term that reduces an absolute value of the base threshold.

3. The correction term is a first term that increases as the difference between the proportion of positive examples classified by the pre-learning classification model and the positive class prior probability in the unknown data increases for the input learning data; 3. The learning device according to claim 2, wherein the learning data is expressed as a sum of a first term, a second term, and a third term, which increases as the difference between the proportion of the input learning data that is classified as negative examples by the pre-learning classification model and the negative class prior probability in the unknown data increases.

4. The correction term is, for the input learning data, a ratio of a positive class prior probability in the unknown data to a negative class prior probability in the unknown data; The learning device according to claim 2 , wherein the difference is expressed as a difference between a ratio of a classification rate of positive examples to a ratio of a classification rate of negative examples by the pre-learning classification model.

5. The correction term is, for the input learning data, The product of the positive class prior probability in the unknown data and the proportion of the pre-training classification model classifying the data into negative examples; The learning device according to claim 2 , wherein the prior probability is expressed as a difference between a product of a negative class prior probability in the unknown data and a proportion of cases classified as positive by the pre-learning classification model.

6. a second learning unit that receives the learning data as an input, classifies the learning data into the positive examples and the negative examples, and generates the trained classification model that is trained to minimize an error based on a classification result; The learning device according to claim 1 , further comprising: a switching unit that switches between the first learning unit and the second learning unit in accordance with the learning data.

7. 7. The learning device according to claim 6, wherein the switching unit performs the switching based on an evaluation index calculated using accuracy verification data including a plurality of positive data indicating positive examples and a plurality of negative data indicating negative examples, and the trained classification model.

8. A classification device that classifies data to be classified using a trained classification model trained by the learning device according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Machine learning device, machine learning method and program

    JP2015001968A