Imbalanced training data processing device, imbalanced training data processing program, and non-transitory recording medium with imbalanced training data processing program recorded thereon
The iterative imbalance reduction processing unit addresses the issue of imbalanced data sets by adjusting the frequency distribution of data items, enhancing the learning model's ability to detect rare events by balancing the consideration of all data values.
Patent Information
- Application Number
- PCT/JP2024/021809
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2025-12-26
AI Technical Summary
Existing learning models trained on imbalanced data sets tend to overlook minority values, leading to poor performance in detecting rare events, as they primarily focus on majority values, resulting in high accuracy for common outcomes but low accuracy for rare outcomes.
An imbalance reduction processing unit that performs oversampling and undersampling on training data sets to adjust the frequency distribution of data items, iteratively addressing imbalances by adding new minority data and deleting majority data, ensuring balanced consideration of all data values.
The iterative approach effectively reduces imbalances across multiple data items, enabling the learning model to accurately predict rare values by considering minority data, thereby improving detection of rare events.
Smart Images

Figure JP2024021809_26122025_PF_FP_ABST
Abstract
Description
Imbalanced learning data processing device, imbalanced learning data processing program, and non-transitory recording medium having imbalanced learning data processing program recorded thereon
[0001] This specification discloses an imbalance learning data processing device, an imbalance learning data processing program, and a non-transitory recording medium on which the imbalance learning data processing program is recorded.
[0002] A learning model is trained using a training data group consisting of multiple training data. Such a training data group may have an imbalance. An imbalance in a training data group means that the training data group (when the training data has multiple data items, the value of at least one data item in each training data) is extremely biased. For example, in a training data group in which each training data can take two values, "normal" and "abnormal," if there are 10,000 pieces of training data with a value of "normal" and only 10 pieces of training data with a value of "abnormal," the training data group can be said to be imbalanced. In this specification, a value that is more numerous in a training data group is referred to as a majority value, and a value that is less numerous in a training data group is referred to as a minority value.
[0003] A learning model trained using an imbalanced training data set tends to output values based mainly on training data with majority values, without much consideration of training data with minority values in the training data set (in extreme cases, ignoring training data with minority values). For example, when training is performed using an imbalanced training data set with 10,000 pieces of training data with "normal" values for the objective variable and 10 pieces of training data with "abnormal" values for the objective variable, the learning model is trained to output "normal" as output data (objective variable) for almost all input data (explanatory variables).
[0004] In an environment where the value of the objective variable is "abnormal" only with a small probability, if a learning model trained in this way is used, the learning model will output "normal" as output data (objective variable) for almost all input data (explanatory variables), resulting in a high accuracy rate. For example, in an environment where the value of the objective variable is "abnormal" with only a 0.1% probability, a learning model that outputs "normal" as output data for almost all input data will achieve a high accuracy rate of 99.9%.
[0005] However, there may be cases where a learning model is used to detect values that occur rarely (rare values). For example, when predicting whether a patient has a rare disease (objective function) based on various patient measurements (explanatory variables), the trained learning model must be able to accurately predict rare values.
[0006] One method for forming a learning model that can appropriately predict rare values is to train the learning model using a group of training data with little bias (in other words, a balanced group of training data). If only an imbalanced group of training data is available, the training data can be preprocessed to reduce the imbalance in the training data group, and then the preprocessed training data can be used to train the training data.
[0007] Conventionally, techniques for reducing imbalance in training data groups have been proposed. For example, Non-Patent Document 1 discloses, as techniques for reducing imbalance in training data groups, oversampling, which increases the number of minority values in the training data group to the same as the number of majority values, and undersampling, which reduces the number of majority values in the training data group to the same as the number of minority values. Patent Document 1 also discloses a process in which a group of defect images as a training data group is plotted in a two-dimensional feature space according to their features, multiple defect images having similar features are grouped together to form clusters, and when an imbalance occurs in the number of defect images included in each cluster, defect images are supplemented (oversampling) to clusters formed from a small number of defect images. Patent Document 2 also discloses a process in which multiple clusters are formed in a training data group, the rarity of each cluster is calculated, and oversampling is performed on clusters whose rarity exceeds the average value.
[0008] JP 2014-178229 A JP 2023-035089 A
[0009] Masahiko Isshiki, Digital Advantage, "What is Imbalanced Data?", @IT, https: / / atmarkit.itmedia.co.jp / ait / articles / 2208 / 31 / news039.html
[0010] Incidentally, training data may contain multiple data items. In some cases, an imbalance may occur in the values of at least some of the multiple data items. In such cases, increasing the amount of training data having a minority value as the value of the imbalanced data item (oversampling) or decreasing the amount of training data having a majority value as the value of the imbalanced data item (undersampling) may result in an imbalance in the values of other data items, or the imbalance may be exacerbated.
[0011] This will be described in detail with reference to FIGS. 9 and 10 . For simplicity, FIG. 9 shows only the values of data items X1 and X2 of a learning data group LDG consisting of eight learning data LDs. Note that data items X1 and X2 may be explanatory variables or target variables. Here, data item X1 is a data item whose value can be either near 300 or near 10, and data item X2 is a data item whose value can be either near 500 or near 200. Looking at data item X1, there are six pieces of learning data LD whose value is near 300 and two pieces of learning data LD (learning data LDa and LDb) whose value is near 10, which means that there is an imbalance in the values of data item X1. On the other hand, looking at data item X2, there are four pieces of learning data LD whose value is near 500 and four pieces of learning data LD whose value is near 200, which means that there is no imbalance in the values of data item X2.
[0012] Consider a case where the number of pieces of learning data LDa and LDb having decimal values as the value of data item X1 is increased (oversampling) in order to eliminate the imbalance in the value of data item X1. For example, consider a case where the number of pieces of learning data LDa and learning data LDb is increased by two. Then, as shown in FIG. 10 , in the learning data group LDG′ after oversampling, when looking at data item X1, there are six pieces of learning data LD with values around 300 and six pieces of learning data LD with values around 10, and it can be said that the imbalance in the value of data item X1 has been reduced (eliminated). However, when looking at data item X2 in the learning data group LDG′ after oversampling, there are four pieces of learning data LD with values around 500 and eight pieces of learning data LD with values around 200. As a result, the values of data item X2 are more imbalanced than in the learning data group LDG before oversampling.
[0013] The example in Figure 10 is an example of a case where oversampling is performed to address the imbalance in the values of data item X1. However, even if undersampling is performed to address the imbalance in the values of data item X1, the values of data item X2 may similarly become more imbalanced than the learning data group LDG before undersampling.
[0014] The purpose of the imbalanced training data processing device disclosed in this specification is to reduce imbalances in the values of each data item of each training data when each training data included in a training data group has multiple data items.
[0015] The imbalance training data processing device disclosed in this specification is an imbalance training data processing device that performs processing to reduce imbalance in a training data group having a plurality of data items, and includes an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is a data item of interest, and new training data having a minority value that is a value with a relatively low frequency in a frequency distribution of values of the data item of interest is added to the training data group, or an undersampling process in which deletion-target training data having a majority value that is a value with a relatively high frequency in a frequency distribution of values of the data item of interest is deleted from the training data group, and the imbalance reduction processing unit repeatedly performs the imbalance reduction processing while changing the data item of interest for the plurality of data items.
[0016] The imbalance reduction processing unit may add more new training data to the training data set in the oversampling process as the degree of imbalance in the values of the data item of interest in the training data set increases.
[0017] The imbalance reduction processing unit may be configured to delete more of the deletion-target training data from the training data set in the undersampling process as the degree of imbalance in the values of the data item of interest in the training data set increases.
[0018] The imbalance reduction processing unit may perform the oversampling process by newly generating the new training data having a minority value as the value of the data item of interest, without duplicating the training data included in the training data group.
[0019] In the undersampling process, the imbalance reduction processing unit may preferentially delete the new learning data added by the oversampling process executed prior to the undersampling process, over the learning data included in the learning data group before the imbalance reduction process is executed.
[0020] The imbalance reduction processing unit may divide the learning data group into training data for learning a learning model and test data for evaluating the learned learning model, and perform the imbalance reduction processing separately for each of the training data and the test data.
[0021] The imbalance reduction processing unit may divide the learning data group into training data for learning a learning model and test data for evaluating the learned learning model, and may not perform the imbalance reduction processing on the test data.
[0022] The imbalance reduction processing unit may divide the learning data group into the training data and the test data such that the test data includes learning data having the minority value.
[0023] The device may further include a learning processing unit that executes a learning process to train a learning model, and that, when instructed by a user to perform the learning process using the learning data group on which the imbalance reduction process has been performed, performs the learning process using the learning data group on which the imbalance reduction process has been performed, and, when instructed by a user to perform the learning process using the learning data group on which the imbalance reduction process has not been performed, performs the learning process using the learning data group on which the imbalance reduction process has not been performed.
[0024] Furthermore, an imbalance training data processing program disclosed in this specification is an imbalance training data processing program for performing processing to reduce imbalance in a training data group having a plurality of data items, and causes a computer to function as an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is a data item of interest, and new training data having a minority value that is a value with a relatively low frequency in a frequency distribution of values of the data item of interest is added to the training data group, or an undersampling process in which deletion-target training data having a majority value that is a value with a relatively high frequency in a frequency distribution of values of the data item of interest is deleted from the training data group, and the imbalance reduction processing unit repeatedly performs the imbalance reduction processing while changing the data item of interest for the plurality of data items.
[0025] Furthermore, a recording medium disclosed in this specification is a non-transitory computer-readable recording medium on which an imbalance training data processing program for performing processing to reduce imbalance in a training data group having a plurality of data items is recorded, and causes a computer to function as an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is a data item of interest, and new training data having a minority value that is a value with a relatively low frequency in a frequency distribution of values of the data item of interest is added to the training data group, or an undersampling process in which deletion-target training data having a majority value that is a value with a relatively high frequency in a frequency distribution of values of the data item of interest is deleted from the training data group, and the imbalance reduction processing unit repeatedly performs the imbalance reduction processing while changing the data item of interest for the plurality of data items.
[0026] According to the imbalanced training data processing device disclosed in this specification, when each training data included in a training data group has multiple data items, it is possible to reduce imbalance in the values of the multiple data items that each training data has.
[0027] FIG. 1 is a schematic diagram of the configuration of an imbalance training data processing device according to the present embodiment. FIG. 2 is a conceptual diagram showing an example of a training data group. FIG. 3 is an example of a histogram of values of data items that are the targets of imbalance degree calculation. FIG. 4 is a conceptual diagram showing an example of a training data group after a first round of imbalance reduction processing. FIG. 5 is a conceptual diagram showing an example of a training data group after a second round of imbalance reduction processing. FIG. 6 is a flowchart showing the flow of processing of an imbalance training data processing device according to the present embodiment. FIG. 7 is a diagram showing prediction results of a Gaussian regression model trained using an imbalanced training data group. FIG. 8 is a diagram showing prediction results of a Gaussian regression model trained using a training data group on which the iterative imbalance reduction processing according to the present embodiment has been performed. FIG. 9 is a conceptual diagram showing an example of a training data group. FIG. 10 is a conceptual diagram showing an example of a training data group after conventional oversampling processing.
[0028] FIG. 1 is a schematic diagram of an imbalance training data processing device 10 according to this embodiment. The imbalance training data processing device 10 according to this embodiment is configured by a server computer. However, the imbalance training data processing device 10 may be any device as long as it can perform the functions described below. For example, the imbalance training data processing device 10 may be a personal computer or a mobile terminal such as a smartphone. Furthermore, the functions described below may be performed by multiple devices working together. In this case, the multiple devices correspond to the imbalance training data processing device 10.
[0029] The communication interface 12 is configured, for example, by a network adapter. The communication interface 12 enables the imbalance training data processing device 10 to communicate with other devices (e.g., a user terminal used by a user) and to receive various information from other devices and transmit various information to other devices. Note that the communication interface 12 is not a required component of the imbalance training data processing device 10.
[0030] The memory 14 includes, for example, a hard disk drive (HDD), a solid state drive (SSD), a read-only memory (ROM), or a random access memory (RAM). The memory 14 may be provided separately from the processor 22 (described later), or at least a portion of the memory 14 may be provided within the processor 22. The memory 14 stores an imbalance training data processing program for operating each unit of the imbalance training data processing device 10. The imbalance training data processing program can also be stored in a computer-readable non-transitory storage medium such as a universal serial bus (USB) memory or an SD card. The imbalance training data processing device 10 can read and execute the imbalance training data processing program from such a storage medium.
[0031] As shown in FIG. 1, the memory 14 stores a learning model 16 and a learning data group 20 consisting of a plurality of learning data 18 .
[0032] The learning model 16 is a model that predicts and outputs output data according to input data. The learning model 16 can also be considered as a function that represents the relationship between input data and the output data corresponding to the input data. Examples of the learning model 16 include, but are not limited to, a neural network, a Bayesian analysis model, a Gaussian regression model, or a random forest model.
[0033] The learning model 16 is trained using the training data group 20, thereby being able to predict and output output data corresponding to input data with high accuracy. Specifically, input data (explanatory variables) from the training data 18 constituting the training data group 20 are input to the learning model 16. The learning model 16 predicts and outputs output data (objective variables) corresponding to the input data. Then, parameters of the learning model 16 (e.g., if the learning model 16 is a neural network, the weights and biases of each neuron) are adjusted so that the difference between the teacher data (objective variables) from the training data 18 and the output data of the learning model 16 is reduced. By repeating this process, the learning model 16 is trained, and the trained learning model 16 becomes able to output output data corresponding to input data with high accuracy.
[0034] FIG. 2 is a conceptual diagram showing an example of a training data group 20. Each training data 18 included in the training data group 20 according to this embodiment has multiple data items. In the example of FIG. 2, each training data 18 has data item X1, data item X2, data item X3, and so on. The multiple data items included in each training data 18 include explanatory variables (input data input to the training model 16) and objective variables (teacher data corresponding to the output data of the training model 16). Note that the objective variable is not required, and each training data 18 does not necessarily need to include an objective variable.
[0035] In this embodiment, an imbalance occurs in the training data group 20. Specifically, an imbalance occurs in the values of at least some of the data items included in each training data 18.
[0036] Returning to FIG. 1 , the processor 22 is configured to include at least one of a general-purpose processing device (e.g., a CPU (Central Processing Unit)) and a dedicated processing device (e.g., an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a programmable logic device). The processor 22 may not be configured by a single processing device, but may be configured by the cooperation of multiple processing devices located in physically separate locations. As shown in FIG. 1 , the processor 22 performs the functions of an imbalance reduction processing unit 24, a learning processing unit 26, and a data processing unit 28 according to an imbalance learning data processing program stored in the memory 14.
[0037] The imbalance reduction processing unit 24 performs processing to reduce imbalance in the imbalanced training data group 20. In particular, in this embodiment, the imbalance reduction processing unit 24 reduces imbalance in the values of multiple data items held by each training data 18. Below, details of the processing performed by the imbalance reduction processing unit 24 will be described with reference to FIGS. 3 to 5, using as an example a case where the training data group 20 has the content shown in FIG. 2.
[0038] First, the imbalance reduction processing unit 24 selects, as a data item of interest, one of the multiple data items included in each of the learning data 18. In this embodiment, the imbalance reduction processing unit 24 calculates an imbalance degree, which is an index indicating the degree of imbalance in the values of the data items included in each of the learning data 18, and selects a data item of interest based on the imbalance degree.
[0039] An example of a method for calculating the degree of imbalance of the values of each data item is as follows. Figure 3 shows an example of a histogram of the values of the data item that is the subject of the imbalance calculation. The imbalance reduction processing unit 24 divides a domain D, which is the range that the values of the data item can take, into a plurality of data ranges R. The data width of each data range R is the same. In the example of Figure 3, the domain D is divided into five data ranges Ra to Re, but the number of data ranges R into which the domain D is divided may be determined as appropriate.
[0040] The imbalance reduction processing unit 24 calculates the frequency included in each data range R, and calculates the degree of imbalance in the values of that data item using the ratio (Nmax / Nmin) of the maximum frequency Nmax to the minimum frequency Nmin among the frequencies in each data range R. The greater the degree of imbalance, the greater the imbalance in the values of that data range. For example, in the example of FIG. 3 , the frequency of data range Rc is Nmax and the frequency of data range Re is Nmin, so the degree of imbalance in that data item is calculated as (frequency of data range Rc / frequency of data range Re).
[0041] The imbalance reduction processing unit 24 may calculate the degree of imbalance between the values of the data items using a method other than the above.
[0042] The imbalance reduction processing unit 24 selects as a data item of interest a data item whose calculated imbalance is equal to or greater than a predetermined first imbalance threshold. That is, the imbalance reduction processing unit 24 selects as a data item of interest a data item whose value is causing an imbalance. If there are multiple data items whose calculated imbalance is equal to or greater than the first imbalance threshold, the imbalance reduction processing unit 24 selects as a data item of interest the data item with the largest imbalance. The data item of interest may be an explanatory variable or a target variable.
[0043] Next, the imbalance reduction processing unit 24 executes an imbalance reduction process to reduce the imbalance in the values of the selected data item of interest. The imbalance reduction process may be at least one of an oversampling process and an undersampling process. The oversampling process is a process of adding new training data having minority values, which are values with a relatively low frequency in the frequency distribution of the values of the data item of interest, to the training data group 20. The undersampling process is a process of deleting, from the training data group 20, training data to be deleted, which have majority values, which are values with a relatively high frequency in the frequency distribution of the values of the data item of interest.
[0044] As will be described in detail later, the imbalance reduction process is repeatedly performed. In this specification, the original training data group 20 before the imbalance reduction process is performed is referred to as training data group 20o. The training data group 20 after the first imbalance reduction process is performed is referred to as training data group 20-1, and the training data group 20 after the second imbalance reduction process is performed is referred to as training data group 20-2. When no particular distinction is made between the training data groups 20o, 20-1, and 20-2, they are simply referred to as training data group 20. Furthermore, in this specification, the training data 18 originally included in the training data group 20o is referred to as original training data 18A, and the training data 18 added by the imbalance reduction process (oversampling process) is referred to as new training data 18B.
[0045] 2, and data item X2 is selected as the data item of interest. Furthermore, the value "45" of data item X2 in the original training data 18Aa is assumed to be a minority value in the frequency distribution of the values of data item X2. In this situation, a case where oversampling is performed as the first imbalance reduction process will be described.
[0046] As will be described below, the imbalance reduction processing unit 24 performs the imbalance reduction processing on the training data group 20o, but it is preferable that the imbalance reduction processing unit 24 leave the original training data group 20o before performing the imbalance reduction processing in the memory 14.
[0047] Fig. 4 is a diagram showing the training data set 20-1 after a first imbalance reduction process (oversampling process in this example) has been performed on the training data set 20o shown in Fig. 2. As can be seen from a comparison of Fig. 2 and Fig. 4, the imbalance reduction processor 24 performs the oversampling process, which is the first imbalance reduction process, and adds new training data 18B having a minority value in data item X2 to the training data set 20.
[0048] For example, the imbalance reduction processing unit 24 performs oversampling processing to add new training data 18Ba obtained by replicating the original training data 18Aa to the training data set 20o. That is, the new training data 18Ba has the same values for all data items as the original training data 18Aa.
[0049] Alternatively, the imbalance reduction processor 24 may perform oversampling processing by generating new training data 18B (e.g., new training data 18Bb and 18Bc in FIG. 4 ) having a decimal value as the value of the data item of interest, without duplicating the original training data 18Aa, and adding the generated new training data to the training data group 20o. For example, the new training data 18Bb has the same value as the original training data 18Aa for the data item X2, which is the data item of interest, but the values of the other data items (data item X3 in the example of FIG. 4 ) are different from those of the original training data 18Aa. Furthermore, the new training data 18Bc has different values for the data items of interest from those of the original training data 18Aa. In this way, the values of the data items of interest in the new training data 18B do not necessarily have to be identical to those of the original training data 18Aa.
[0050] However, if the value of a certain data item in the new training data 18B is significantly different from the value of that data item in the original training data 18Aa, the new training data 18B may not be appropriate training data 18. Therefore, it is preferable that the value of a certain data item in the new training data 18B be close to the value of that data item in the original training data 18Aa. For example, it is preferable that the value of a certain data item in the new training data 18Bc be a value included in the same data range R (see FIG. 3 ) as the value of that data item in the original training data 18Aa.
[0051] The new learning data 18Bb and 18Bc can be generated, for example, by inputting the original learning data 18Aa having a decimal value as the value of the data item of interest and information indicating the data item of interest into a learning model other than the learning model 16, such as a generation AI (Artificial Intelligence).
[0052] 4 shows the training data group 20-1 after oversampling has been performed as the first imbalance reduction process, but undersampling may also be performed as the first imbalance reduction process. For example, in the training data group 20o shown in FIG. 2, the value "88" of data item X2, which is a data item of interest in the original training data 18Ab, is assumed to be the majority value in the frequency distribution of the values of data item X2. In this case, the imbalance reduction processing unit 24 may delete the original training data 18Ab, which is the training data to be deleted, from the training data group 20o as the first imbalance reduction process.
[0053] As described above, the imbalance reduction processor 24 may add a plurality of new training data 18B in the oversampling process. In this case, the greater the degree of imbalance in the values of the data item of interest in the training data set 20o, the more new training data 18B the imbalance reduction processor 24 should add to the training data set 20o in the oversampling process.
[0054] Similarly, the imbalance reduction processor 24 may delete multiple pieces of deletion-target learning data in the undersampling process. In this case, the greater the degree of imbalance in the values of the data item of interest in the learning data set 20o, the more deletion-target learning data the imbalance reduction processor 24 may delete from the learning data set 20o in the undersampling process.
[0055] After the first imbalance reduction process, the imbalance reduction processing unit 24 changes the data item of interest among the multiple data items included in each of the training data 18. In other words, the imbalance reduction processing unit 24 selects a data item other than the data item of interest related to the previous imbalance reduction process (data item X2 in the above example) as a new data item of interest.
[0056] The method for selecting a new data item of interest may be the same as the method for selecting a data item of interest the first time. That is, the imbalance reduction processing unit 24 calculates the imbalance degree for each value of a plurality of data items (excluding the previous data item of interest) included in each piece of training data 18, and selects a new data item of interest based on the imbalance degree.
[0057] After selecting a new data item of interest, the imbalance reduction processing unit 24 executes a second imbalance reduction process to reduce the imbalance in the value of the new data item of interest. Here, it is assumed that data item X1 is selected as the new data item of interest in the training data group 20-1 shown in FIG. 4 . It is also assumed that the value "437" of data item X1 in the original training data 18Aa, the value "469" of data item X1 in the original training data 18Ac, the value "437" of data item X1 in the new training data 18Ba, the value "437" of data item X1 in the new training data 18Bb, and the value "435" of data item X1 in the new training data 18Bc are the majority values in the frequency distribution of the values of data item X1. A case will be described in which an undersampling process is executed as the second imbalance reduction process in this situation.
[0058] Fig. 5 is a diagram showing the training data set 20-2 after a second imbalance reduction process (undersampling process in this example) has been performed on the training data set 20-1 shown in Fig. 4. As can be seen from a comparison of Fig. 4 and Fig. 5, the imbalance reduction processor 24 performs the undersampling process, which is the second imbalance reduction process, to delete the new training data 18Bb and the new training data 18Bc that have the majority value in the data item X1 from the training data set 20-1.
[0059] In the undersampling process as the imbalance reduction process, the imbalance reduction processor 24 may preferentially delete new training data 18B added by an oversampling process (as the earlier imbalance reduction process) executed prior to the undersampling process, rather than the original training data 18A. For example, in the examples of Figures 4 and 5, the candidates for training data to be deleted in the undersampling process include original training data 18Aa, original training data 18Ac, new training data 18Ba, new training data 18Bb, and new training data 18Bc. Among these, the imbalance reduction processor 24 preferentially deletes new training data 18Ba, new training data 18Bb, and new training data 18Bc over the original training data 18Aa and original training data 18Ac in the undersampling process. This is because, while the original training data 18A is raw data representing the content to be learned by the learning model 16, the new training data 18B may not necessarily be so. From this perspective, the imbalance reduction processing unit 24 may preferentially delete new learning data 18B that is newly generated without duplicating the original learning data 18Aa over new learning data 18B obtained by duplicating the original learning data 18Aa in the undersampling process.
[0060] After the second imbalance reduction process, the imbalance reduction processing unit 24 further changes the data item of interest among the multiple data items contained in each of the learning data 18. Here, too, the imbalance reduction processing unit 24 selects a data item other than the data item of interest related to the previous imbalance reduction process (data item X1 in the above example) as a new data item of interest. Then, the imbalance reduction processing unit 24 executes the imbalance reduction process to reduce the imbalance in the value of the newly selected data item of interest.
[0061] In this way, the imbalance reduction processing unit 24 repeatedly executes the imbalance reduction process while changing the data item of interest among the multiple data items of each of the training data 18 included in the training data group 20. In this specification, multiple executions of the imbalance reduction process are collectively referred to as the repeated imbalance reduction process. In the repeated imbalance reduction process, the same data item may be selected as the data item of interest multiple times.
[0062] As described above, a single imbalance reduction process may cause imbalances in the values of data items other than the data item of interest, or may even increase the imbalances. However, according to the repeated imbalance reduction process of this embodiment, the imbalance reduction process is executed for multiple data items, and therefore the imbalances in the values of data items other than the data item of interest that may occur in each imbalance reduction process are gradually evened out, and it is expected that the imbalances in the values of each of the multiple data items in each of the learning data 18 will eventually be reduced.
[0063] In the oversampling process as the imbalance reduction process from the second time onwards, a number of new training data 18B different from that in the oversampling process as the imbalance reduction process up to the previous time may be added to the training data group 20. For example, as the number of times the imbalance reduction process is performed increases, a smaller number of new training data 18B may be added to the training data group 20.
[0064] Similarly, in the undersampling process as the imbalance reduction process from the second time onwards, a different number of deletion-target learning data items may be deleted from the training data group 20 than in the undersampling process as the imbalance reduction process up to the previous time. For example, the more times the imbalance reduction process is performed, the fewer deletion-target learning data items may be deleted from the training data group 20.
[0065] The imbalance reduction processing unit 24 stops the iterative imbalance reduction process when a predetermined iteration stop condition is satisfied. The iteration stop condition may be, for example, a condition that the imbalance degrees of all data items are less than a predetermined second imbalance threshold. The second imbalance threshold may be the same as or different from the first imbalance threshold referenced when selecting the data item of interest. By using the iteration stop condition, it is possible to obtain, through the iterative imbalance reduction process, a training data group 20 in which the imbalance degrees of all data items are less than the second imbalance threshold.
[0066] The repetition stopping condition may also be, for example, that the number of times the imbalance reduction process has been executed reaches a predetermined number, that the processing time of the repetitive imbalance reduction process reaches a predetermined time, or that the number of training data 18 included in the training data group 20 reaches a predetermined number.
[0067] The imbalance reduction processing unit 24 preferably divides the learning data group 20 into training data for training the learning model 16 and test data for evaluating the learned learning model 16, and then performs imbalance reduction processing separately for the training data and the test data. This is to prevent new learning data 18B, which is a copy of the training data, from being mixed into the test data, thereby unfairly improving the evaluation result of the learning model 16.
[0068] The imbalance reduction processing unit 24 may not perform the imbalance reduction process on the test data in order to prevent the evaluation result of the learning model 16 from being unduly improved due to the test data including new learning data 18B obtained by duplicating the original learning data 18A.
[0069] When dividing the learning data group 20 into training data and test data, the imbalance reduction processor 24 may ensure that learning data having minority values is included in the test data. For example, the imbalance reduction processor 24 clusters the training data using the K-means method or the like and extracts test data from each cluster. If, for example, learning data having 10,000 normal values and 10 abnormal values is divided into training data and test data, and the test data does not include any abnormal values that are minority values (in other words, the test data contains only normal values), the trained learning model 16 may end up outputting only normal values.
[0070] Returning to FIG. 1 , the learning processing unit 26 trains the learning model 16 using the learning data group 20 in which imbalance has been reduced by the repeated imbalance reduction process performed by the imbalance reduction processing unit 24. Specifically, the learning processing unit 26 inputs input data (explanatory variables) from the learning data 18 constituting the learning data group 20 in which imbalance has been reduced to the learning model 16. The learning model 16 predicts and outputs output data (objective variables) corresponding to the input data. The learning processing unit 26 then adjusts the parameters of the learning model 16 (e.g., if the learning model 16 is a neural network, the weights and biases of each neuron) so as to reduce the difference between the teacher data (objective variables) from the learning data 18 and the output data of the learning model 16. The learning processing unit 26 trains the learning model 16 by repeating the above-described learning process.
[0071] As described above, the learning model 16 trained using an imbalanced training data set 20 (e.g., the original training data set 20o) outputs output data without much consideration of minority values, and therefore cannot detect rare values. On the other hand, the learning model 16 trained using a training data set 20 in which imbalance in the values of each data item has been reduced by repeatedly performing the imbalance reduction process outputs output data with sufficient consideration of minority values, and therefore can preferably detect rare values.
[0072] The learning processing unit 26 may determine, in response to an instruction from a user, whether to train the learning model 16 using the learning data group 20 in which imbalance has been reduced by the iterative imbalance reduction processing performed by the imbalance reduction processing unit 24, or to train the learning model 16 using the original learning data group 20o on which the iterative imbalance reduction processing has not been performed. That is, when the user instructs the learning processing to be performed using the learning data group 20 on which the iterative imbalance reduction processing has been performed, the learning processing unit 26 may train the learning model 16 using the learning data group 20 on which the iterative imbalance reduction processing has been performed, and when the user instructs the learning processing to be performed using the original learning data group 20o on which the iterative imbalance reduction processing has not been performed, the learning processing unit 26 may train the learning model 16 using the original learning data group 20o on which the iterative imbalance reduction processing has not been performed.
[0073] When rare values are important and the learning model 16 is to be detected, it is preferable to train the learning model 16 using a learning data group 20 on which the repetitive imbalance reduction process has been performed. On the other hand, there are cases where rare values are truly noise data and it is preferable to train the learning model 16 so that the rare values are ignored and output. In such cases, it is preferable to train the learning model 16 using an original learning data group 20o on which the repetitive imbalance reduction process has not been performed. By being able to select the learning data 18 for training the learning model 16 from the learning data group 20 on which the imbalance has been reduced and the original learning data group 20o, the user can train the learning model 16 appropriately depending on the purpose of the learning model 16 or the environment in which the learning model 16 will be used.
[0074] The data processing unit 28 inputs the input data to be processed into the learning model 16 that has been trained by the learning processing unit 26. The trained learning model 16 predicts and outputs output data corresponding to the input data. Based on the output data of the learning model 16, the data processing unit 28 obtains output data corresponding to the input data.
[0075] The above is an overview of the imbalance training data processing device 10 according to this embodiment. The flow of processing by the imbalance training data processing device 10 according to this embodiment will be described below with reference to the flowchart shown in FIG.
[0076] In step S10, the imbalance reduction processing unit 24 selects one of the multiple data items included in each of the training data 18 included in the training data group 20 as a data item of interest.
[0077] In step S12, the imbalance reduction processing unit 24 executes an imbalance reduction process (oversampling process or undersampling process) to reduce the imbalance in the values of the data item of interest selected in step S10. Note that the imbalance reduction processing unit 24 leaves the original training data set 20o in the memory 14 before the imbalance reduction process is executed.
[0078] In step S14, the imbalance reduction processing unit 24 determines whether a predetermined repetition stop condition has been met. If the repetition stop condition has not been met, the process returns to step S10. In step S10 again, the imbalance reduction processing unit 24 changes the data item of interest. That is, the imbalance reduction processing unit 24 selects a data item other than the data item of interest related to the previous imbalance reduction processing as the data item of interest. Thereafter, the processes of steps S12 and S14 are repeated. By repeating the processes of steps S10 to S14, the repetitive imbalance reduction processing is executed.
[0079] In step S14, if the repetition stop condition is satisfied, the process proceeds to step S16.
[0080] In step S16, the imbalance reduction processing unit 24 stops the iterative imbalance reduction process. This results in a training data set 20 in which the imbalance in the values of each of the multiple data items in each training data set 18 has been reduced. Meanwhile, the memory 14 also stores the original training data set 20o.
[0081] In step S18, the learning processing unit 26 determines a user instruction indicating whether to use the learning data set 20 with reduced imbalance (i.e., the learning data set 20 on which the repeated imbalance reduction process in steps S10 to S14 has been performed) or the original learning data set 20o to train the learning model 16.
[0082] If the user instructs that the training data group 20 with reduced imbalance be used, the process proceeds to step S20, where the training processing unit 26 trains the training model 16 using the training data group 20 with reduced imbalance.
[0083] If the user instructs that the original training data group 20o be used, the process proceeds to step S22, where the training processing unit 26 trains the training model 16 using the original training data group 20o.
[0084] 6, the determination of the user instruction as to whether to use the training data group 20 with reduced imbalance or the original training data group 20o (step S18) is performed after the imbalance reduction process (step S12), but the determination of the user instruction may be performed before the imbalance reduction process. For example, the determination of the user instruction may be performed first, and if the user instructs to use the training data group with reduced imbalance, the processes of steps S10 to S16 and step S20 may be executed.
[0085] Hereinafter, with reference to FIGS. 7 and 8, the effect of training the training model 16 using the training data set 20 on which the imbalance reduction process has been repeatedly performed will be described.
[0086] FIG. 7 is a diagram showing prediction results of a Gaussian regression model as a learning model 16 trained using an imbalanced learning data group 20 (e.g., an original learning data group 20o). FIG. 8 is a diagram showing prediction results of a Gaussian regression model trained using a learning data group 20 on which an imbalance reduction process has been repeatedly performed. In FIGS. 7 and 8, circles represent learning data LD (whose values are simply represented by their positions on a two-dimensional plane), and solid lines represent prediction results of the Gaussian regression model. In FIGS. 7 and 8, multiple learning data LD are distributed to show a certain trend, but one of the learning data LDr deviates from the trend of the other learning data LD. In other words, it is shown that the learning data LDr has a minority value.
[0087] A Gaussian regression model trained using an imbalanced training data set 20 outputs output data without much consideration of minority values. Therefore, as shown in Figure 7, the Gaussian regression model almost completely ignores training data LDr having minority values and outputs output data that conforms to the other training data LD. In other words, the Gaussian regression model cannot detect rare values.
[0088] On the other hand, a Gaussian regression model trained using the training data set 20 on which the imbalance reduction process has been repeatedly performed outputs output data with sufficient consideration given to minority values. Therefore, as shown in Figure 8, the Gaussian regression model outputs output data that conforms to the training data LDr containing minority values. In other words, the Gaussian regression model can detect rare values.
[0089] The above describes an embodiment of the imbalance learning data processing device according to the present disclosure. However, the imbalance learning data processing device according to the present disclosure is not limited to the above embodiment, and various modifications are possible as long as they do not deviate from the spirit of the present disclosure.
[0090] REFERENCE SIGNS LIST 10 Imbalance training data processing device, 12 Communication interface, 14 Memory, 16 Training model, 18 Training data, 20 Training data group, 22 Processor, 24 Imbalance reduction processing unit, 26 Training processing unit, 28 Data processing unit.
Claims
1. An imbalanced training data processing device that performs processing to reduce imbalance in a training data set having a plurality of data items, comprising: an imbalance reduction processing unit that performs at least one of an oversampling process in which one of the plurality of data items is designated as a data item of interest, and new training data having a minority value that is a value with a relatively low frequency in the frequency distribution of the values of the data item of interest is added to the training data set, or an undersampling process in which training data to be deleted having a majority value that is a value with a relatively high frequency in the frequency distribution of the values of the data item of interest is deleted from the training data set, wherein the imbalance reduction processing unit repeatedly performs the imbalance reduction processing while changing the data item of interest for the plurality of data items.
2. The imbalance training data processing device according to claim 1, characterized in that the greater the imbalance in the values of the data item of interest in the training data set, the more new training data is added to the training data set in the oversampling process.
3. The imbalanced training data processing device according to claim 1, characterized in that the greater the imbalance in the values of the data item of interest in the training data group, the more of the training data to be deleted that the imbalance reduction processing unit deletes from the training data group in the undersampling process.
4. The imbalance training data processing device according to claim 1, characterized in that the imbalance reduction processing unit, as the oversampling process, does not duplicate the training data included in the training data group, but newly generates the new training data having a minority value as the value of the data item of interest.
5. The imbalance training data processing device according to claim 1, characterized in that, in the undersampling process, the imbalance reduction processing unit preferentially deletes the new training data added by the oversampling process executed prior to the undersampling process, over the training data included in the training data group before the imbalance reduction process is executed.
6. The imbalance training data processing device according to claim 1, characterized in that the imbalance reduction processing unit divides the group of training data into training data for training a training model and test data for evaluating the trained learning model, and performs the imbalance reduction processing separately for each of the training data and the test data.
7. The imbalance learning data processing device according to claim 1, characterized in that the imbalance reduction processing unit divides the learning data group into training data for learning a learning model and test data for evaluating the learned learning model, and does not perform the imbalance reduction processing on the test data.
8. The imbalance learning data processing device according to claim 6 or 7, characterized in that the imbalance reduction processing unit divides the learning data group into the training data and the test data so that the test data includes learning data having the minority value.
9. The imbalance training data processing device according to claim 1, further comprising: a training processing unit that executes a training process to train a training model, wherein, when instructed by a user to perform the training process using the training data group on which the imbalance reduction process has been performed, the training processing unit performs the training process using the training data group on which the imbalance reduction process has been performed, and, when instructed by a user to perform the training process using the training data group on which the imbalance reduction process has not been performed, the training processing unit performs the training process using the training data group on which the imbalance reduction process has not been performed.
10. An imbalanced training data processing program for performing processing to reduce imbalance in a training data set having a plurality of data items, the program causing a computer to function as an imbalance reduction processing unit that performs at least one of an oversampling process that sets one of the plurality of data items as a data item of interest, and adds new training data to the training data set that has a minority value that is a value with a relatively low frequency in the frequency distribution of the values of the data item of interest, or an undersampling process that deletes from the training data set training data to be deleted that has a majority value that is a value with a relatively high frequency in the frequency distribution of the values of the data item of interest, wherein the imbalance reduction processing unit repeatedly performs the imbalance reduction processing while changing the data item of interest for the plurality of data items.
11. A non-transitory computer-readable recording medium having recorded thereon an imbalance training data processing program for performing processing to reduce imbalance in a training data group having a plurality of data items, the non-transitory computer-readable recording medium causing a computer to function as an imbalance reduction processing unit that performs at least one of an oversampling process that sets one of the plurality of data items as a data item of interest and adds new training data to the training data group that has a minority value that is a value with a relatively low frequency in the frequency distribution of the values of the data item of interest, or an undersampling process that deletes from the training data group training data that has a majority value that is a value with a relatively high frequency in the frequency distribution of the values of the data item of interest, and the imbalance reduction processing unit repeatedly performs the imbalance reduction processing while changing the data item of interest for the plurality of data items.
Citation Information
Patent Citations
Teacher data creation method, image classification method and image classification device
JP2014178229A
Method for manufacturing toner for electrostatic charge image development
JP2018022132A
Resampling apparatus, information processing system, resampling method, and resampling program
JP2023035089A