Learning apparatus, learning method, and program

By correcting the error function of machine learning models using prior probabilities and entropy regularization, the method enhances model accuracy, addressing class imbalances and improving overall performance.

JP2025118580APending Publication Date: 2025-08-13HONDA MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025014943
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-31
Filing Date
2025-01-31
Publication Date
2025-08-13

AI Technical Summary

Technical Problem

Existing methods for correcting the logit in machine learning models do not achieve high accuracy, leading to low accuracy in the generated models, particularly when dealing with class imbalances in training data.

Method used

A learning device and method that corrects the error function of a machine learning model by calculating a correction term based on the output of the model, using formulas that account for prior probabilities and entropy regularization, and optionally re-trains the model with the corrected error function to improve accuracy.

Benefits of technology

The proposed method significantly improves the accuracy of the machine learning model by accurately correcting the logits, mitigating the impact of class imbalances in the training data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025118580000001_ABST
    Figure 2025118580000001_ABST
Patent Text Reader

Abstract

To improve the accuracy of a generated machine learning model by correcting a logit output by the machine learning model with high accuracy.SOLUTION: A learning apparatus includes: a training unit which trains a first machine learning model which has been trained to output a logit where at least a portion of input data corresponds to a class that represents a certain type; and a correction unit which corrects an error function used in the training of the first machine learning model, using an output of the first machine learning model. The training unit is configured to generate a second machine learning model by re-training the first machine learning model using the corrected error function.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a learning device, a learning method, and a program. [Background technology]

[0002] Conventionally, in the training of a machine learning model that uses an image as input and classifies the types of objects contained in the image, there is known a technique for preventing a decrease in the estimation accuracy of the model due to an imbalance between classes in the number of training data (samples).For example, Non-Patent Document 1 describes a technique for correcting the weight of the error function used in training (the weight of the error function corresponding to each class) and the logit (the output value of the machine learning model) according to the number of samples corresponding to each class. [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] Menon et al., “Long-tail learning via logit adjustment” Summary of the Invention [Problem to be solved by the invention]

[0004] The technology described in Non-Patent Document 1 corrects the logit using the number of samples in the entire training data and the number of samples in each class. However, with such a simple method, the logit is not corrected with high accuracy, and as a result, the accuracy of the generated machine learning model may be low.

[0005] The present invention has been made in consideration of these circumstances, and one of its objectives is to provide a learning device, a learning method, and a program that can improve the accuracy of the machine learning model generated by highly accurately correcting the error function used in learning the machine learning model. [Means for solving the problem]

[0006] The learning device, learning method, and program according to the present invention employ the following configuration. (1): A learning device according to one embodiment of the present invention includes a learning unit that uses data as input and trains a first machine learning model that is trained to output logits corresponding to a class where at least a portion of the data corresponds to a certain type, and a correction unit that uses the output of the first machine learning model to correct an error function used to train the first machine learning model, and the learning unit generates a second machine learning model by re-training the first machine learning model using the corrected error function.

[0007] (2): In the above aspect (1), the correction unit corrects the error function L according to the following formula (1):

number

[0008] (3): In the above aspect (2), the correction unit corrects the error function L by further adding an entropy regularization term to equation (1).

[0009] (4): In the above aspect (1), the correction unit corrects the error function L according to the following formula (2):

number

[0010] (5): Another aspect of the present invention relates to a learning method in which a computer takes data as input, trains a first machine learning model that is trained to output logits corresponding to a class where at least a portion of the data corresponds to a certain type, corrects the error function used to train the first machine learning model using the output of the first machine learning model, and re-trains the first machine learning model using the corrected error function, thereby generating a second machine learning model.

[0011] (6): Another aspect of the present invention provides a program that causes a computer to train a first machine learning model that receives data as input and is trained to output logits corresponding to a class where at least a portion of the data corresponds to a certain type, corrects an error function used to train the first machine learning model using the output of the first machine learning model, and re-trains the first machine learning model using the corrected error function, thereby generating a second machine learning model. [Effects of the Invention]

[0012] According to aspects (1) to (6), the accuracy of the generated machine learning model can be improved by highly accurately correcting the logits output by the machine learning model. [Brief explanation of the drawings]

[0013] [Figure 1] 1 is a diagram illustrating a configuration of an estimation device 100 according to a first embodiment. [Figure 2] FIG. 2 is a diagram showing an example of the configuration of learning data 130A. [Figure 3]FIG. 1 is a diagram for explaining an overview of machine learning for generating a machine learning model 130B based on training data 130A. [Figure 4] 3 is a flowchart showing an example of the flow of processing executed by the estimation device 100 according to the first embodiment. [Figure 5] FIG. 10 is a diagram illustrating a configuration of an estimation device 200 according to a second embodiment. [Figure 6] 10 is a flowchart showing an example of the flow of processing executed by the estimation device 200 according to the second embodiment. [Figure 7] 1 is a diagram showing a configuration of a host vehicle equipped with a vehicle control device 300 including an estimation device. DETAILED DESCRIPTION OF THE INVENTION

[0014] [First embodiment] Hereinafter, embodiments of a learning device, a learning method, and a program according to the present invention will be described with reference to the drawings.

[0015] [composition] FIG. 1 is a diagram illustrating a configuration of an estimation device 100 according to a first embodiment. The estimation device 100 is an information processing device that receives an image containing a plurality of pixels as input and estimates the type of one or more pixel groups in the image using a machine learning model trained to output logits corresponding to classes representing object types for the one or more pixel groups. The estimation device 100 includes, for example, a correction unit 110, an estimation unit 120, and a storage unit 130. The correction unit 110 and the estimation unit 120 are each implemented by a hardware processor, such as a central processing unit (CPU), executing a program (software). Some or all of these components may be implemented by hardware (including circuitry), such as a large-scale integration (LSI), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a graphics processing unit (GPU), or a system-on-chip (SOC), or may be implemented by a combination of software and hardware. The program may be stored in advance in a storage device (a storage device having a non-transitory storage medium) such as a HDD or flash memory of the estimation device 100, or may be stored in a removable storage medium such as a DVD or CD-ROM, and installed in the HDD or flash memory of the estimation device 100 by inserting the storage medium (non-transitory storage medium) into a drive device. The storage unit 130 stores, for example, training data 130A and a machine learning model 130B. The storage unit 130 is realized by, for example, a RAM, a flash memory, an SD card, or the like.

[0016] FIG. 2 is a diagram showing an example of the configuration of the training data 130A. The training data 130A is, for example, a set of pixels in one or more images IM, each associated with a class representing the type of object represented by the pixel group as a correct answer class. Here, the "type of object" refers to the type of object related to the vehicle's surrounding environment, and includes, for example, at least two of four-wheeled vehicles, two-wheeled vehicles, pedestrians, fallen objects, traffic lights, road signs, guardrails, medians, and curbs. The "type of object" may also be limited to moving objects, and at least two of four-wheeled vehicles, two-wheeled vehicles, and pedestrians may be defined as object types.

[0017] For example, in the case of Figure 2, image IM includes pixel group P1 representing a four-wheeled vehicle and pixel group P2 representing a motorcycle. In this case, pixel group P1 is associated with a vector in which only the component of the class representing the four-wheeled vehicle is set to 1 and the components of other classes are set to 0, thereby obtaining training data 130A (hereinafter sometimes referred to as a sample) in which the four-wheeled vehicle class is the correct class. Also, for example, pixel group P2 is associated with a vector in which only the component of the class representing a motorcycle is set to 1 and the components of the other classes are set to 0, thereby obtaining training data 130A in which the motorcycle class is the correct class. The storage unit 130 stores the correspondence between these pixel groups and the correct classes as training data 130A.

[0018] The training data 130A is generated, for example, by an administrator or operator of the estimation device 100 specifying each pixel of the image IM and a correct class in advance on his or her own terminal, and is stored in the storage unit 130. Alternatively, the estimation device 100 may download the training data 130A stored in an external server to the storage unit 130 via a network when learning is performed.

[0019] The machine learning model 130B is a machine learning model that takes an image containing multiple pixels as input and outputs a logit (likelihood) that one or more pixel groups in the image correspond to a class representing a type of object. Here, a logit is a value that correlates with the probability that a pixel group in the image IM corresponds to a class representing a type of object. The machine learning model 130B is, for example, a convolutional neural network (CNN), which extracts feature amounts of the input pixels and outputs a logit that corresponds to each class.

[0020] [Machine Learning Overview] 3 is a diagram illustrating an outline of machine learning for generating a machine learning model 130B based on training data 130A. In FIG. 3, C represents the total number of classes to be classified, and Z0 to Z C-1 represents the logits output by the machine learning model 130B. As shown in FIG. 3, by substituting each output logit into a softmax function, probability values P0 to P C-1 The error between the converted probability value and the correct vector is calculated using an error function L such as a cross-entropy error, and the machine learning model 130B is trained using a technique such as backpropagation so as to minimize the calculated error.

[0021] In this embodiment, as an example, multi-value class classification of pixels included in an image is described, and therefore a softmax function is applied in Fig. 3. However, the present invention is not limited to such a configuration, and when performing binary classification of pixels included in an image, a sigmoid function may be applied instead of the softmax function in Fig. 3. Furthermore, in this case, the cross-entropy error L may be calculated as a binary cross-entropy error L instead of a softmax cross-entropy error.

[0022] The machine learning model 130B trained as described above does not take into account the imbalance between classes in terms of the number of samples in the training data 130A prepared for each class. As a result, the machine learning model 130B is trained in the learning process so that the class with the larger number of samples tends to output a higher logit, i.e., a higher probability value, which may result in a decrease in the estimation accuracy of the model.

[0023] [Correction by correction unit 110] In light of this situation, the correction unit 110 calculates the logits Z0 to Z1 output by the machine learning model 130B that has completed learning. C-1 , respectively, the correction terms Δ0 to Δ C-1 Adding the corrected logit Z'0~Z' C-1 In the estimation stage, the estimation unit 120 calculates the logits Z0 to Z C-1 Instead, corrected logit Z'0~Z' C-1 By substituting into the softmax function, the corrected probability values P'0 to P' C-1 The estimation unit 120 calculates the calculated probability values P'0 to P' C-1 The class corresponding to the highest probability value is estimated as the object contained in the input image.

[0024] More specifically, the correction unit 110 calculates the corrected logit Z' i (i is an arbitrary integer between 0 and C-1) is calculated according to the following formula (1).

[0025] Z' i =Z i -αlogP(y i ) ···(1)

[0026] In equation (1), α represents a hyperparameter that is set in advance, and P(y i ) represents the prior probability that a sample of class i occurs among all samples in the training data 130A. The hyperparameter α is the corrected logit Z' iWhen calculating P(x, y), tuning is performed using verification data different from the training data 130A. If P(x, y) is a joint probability, P(y) is calculated according to the following equation (2).

[0027]

number

[0028] In equation (2), P(y|x) represents the conditional probability that class y is predicted given the occurrence of sample x of a certain class in the training data 130A, and is the output of the trained machine learning model 130B (more specifically, the probability values P0 to P1 output via the trained machine learning model 130B). C-1 For example, P(y|x) can be obtained as the predicted probability of class y obtained by inputting sample x into the trained machine learning model 130B. As described above, the machine learning model 130B is trained based on the training data 130A in which there is an imbalance between classes in terms of the number of samples. Therefore, the probability of class y in which there are a large number of samples is large. i The larger the probability value P(y i ) is expected to be output. Therefore, the class y with a large number of samples i Logit Z i Correction term -αlogP(y i ) is set to a large negative value (i.e., subtracted), thereby eliminating imbalances between classes in terms of the number of samples.

[0029] Next, the flow of processing executed by the estimation device 100 according to the first embodiment will be described with reference to Fig. 4. Fig. 4 is a flowchart showing an example of the flow of processing executed by the estimation device 100 according to the first embodiment.

[0030] First, the correction unit 110 inputs the image to be estimated into the trained machine learning model 130B to obtain logits Z0 to Z C-1Next, the correction unit 110 acquires the acquired logits Z0 to Z C-1 , a correction term Δ that reflects the output of machine learning model 130B i =-αlogP(y i ) to obtain the corrected logit Z'0~Z' C-1 Next, the estimation unit 120 calculates the corrected logits Z'0 to Z' C-1 is substituted into the softmax function to obtain the corrected probability values P'0~P' C-1 is acquired and output (step S104), and the process of this flowchart ends.

[0031] According to the first embodiment described above, unlike the technique described in Non-Patent Document 1, which simply calculates the correction term by adding, subtracting, multiplying, or dividing the number of samples in the entire training data and the number of samples in each class, the correction term Δ i =-αlogP(y i ) prior probability P(y i ) is calculated using the output of the trained machine learning model 130B. That is, according to the first embodiment, the logit is corrected with higher accuracy, and the accuracy of the generated machine learning model can be improved.

[0032] [Second embodiment] In the first embodiment, a correction term calculated using the output of the machine learning model 130B is added to the logits output by the trained machine learning model 130B, thereby preventing a decrease in the estimation accuracy of the model due to an imbalance between classes in terms of the number of samples. In a second embodiment, during the training process of the machine learning model 130B, the machine learning model 130B may be retrained using an error function L corrected based on the output of the trained machine learning model 130B, thereby preventing a decrease in the estimation accuracy of the model.

[0033] FIG. 5 is a diagram showing the configuration of an estimation device 200 according to the second embodiment. As in the first embodiment, the estimation device 200 is an information processing device that receives an image including a plurality of pixels as input and estimates the type of one or more pixel groups in the image using a machine learning model trained to output logits corresponding to classes representing object types for the one or more pixel groups. The estimation device 200 includes, for example, a learning unit 202, a correction unit 210, an estimation unit 220, and a storage unit 230. The learning unit 202, the correction unit 210, and the estimation unit 220 are each realized by, for example, a hardware processor such as a CPU (Central Processing Unit) executing a program (software). Furthermore, some or all of these components may be realized by hardware (including circuitry) such as a large-scale integration (LSI), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a graphics processing unit (GPU), or a system-on-chip (SOC), or may be realized by a combination of software and hardware. The program may be stored in advance in a storage device (a storage device having a non-transitory storage medium) such as a hard disk drive (HDD) or flash memory of the estimation device 100, or may be stored in a removable storage medium such as a DVD or CD-ROM, and installed in the HDD or flash memory of the estimation device 200 by inserting the storage medium (non-transitory storage medium) into a drive device. The storage unit 230 stores, for example, training data 230A, a first machine learning model 230B, and a second machine learning model 230C. The storage unit 230 may be realized, for example, by a RAM, a flash memory, an SD card, or the like. The configurations of the correction unit 210 and the estimation unit 220 according to the second embodiment are similar to the configurations of the correction unit 110 and the estimation unit 120 according to the first embodiment, respectively, and therefore will not be described. The learning unit 202 is an example of a "learning device" in the claims.An image including a plurality of pixels is an example of "data" in the claims, and one or more groups of pixels in the image are an example of "at least a portion of the data" in the claims.

[0034] Similar to the machine learning described with reference to FIG. 3, the learning unit 202 first generates a first machine learning model 230B by training a machine learning model such as a convolutional neural network based on training data 130A. The generated first machine learning model 230B is the same as the trained machine learning model 130B in the first embodiment. Next, similar to the first embodiment, the learning unit 202 calculates the output of the trained first machine learning model 230B (more specifically, the probability values P0 to P1 output via the trained first machine learning model 230B). C-1 Using the marginal distribution defined by the following equation, the prior probability P(y i ) is calculated.

[0035] Next, the correction unit 210 calculates the calculated prior probability P(y i ) to correct the error function representing a general cross-entropy error according to the following formula (3), thereby redefining and calculating the error function L. In formula (3), k represents all integers between 0 and C-1.

[0036]

number

[0037] Alternatively, the correction unit 210 may redefine and calculate the error function L according to the following equation (4), which adds an entropy regularization term to equation (3) to increase the entropy of the first machine learning model 230B. By adding the entropy regularization term to the error function L, the re-training of the first machine learning model 230B is performed while maintaining high entropy, and it is possible to prevent the generation of a model that is biased toward estimating a specific class (i.e., a class with a large amount of training data 130A).

[0038]

number

[0039] In equation (4), λ is a hyperparameter that is set in advance, and b i is the initial value logP(y i ) and the bias term b i The purpose of adding the entropy regularization term is to prevent the mismatch between the empirical distribution defined by the training data 130A and the prior distribution estimated by the model from widening due to retraining of the first machine learning model 230B. The entropy regularization term ε(z) is calculated, for example, according to the following equation (5):

[0040]

number

[0041] After the correction unit 210 corrects the error function L, the training unit 202 generates the second machine learning model 130C by re-training the first machine learning model 230B using the redefined error function L. This re-training may be training of the entire first machine learning model 230B or training of a portion of the first machine learning model 230B. Here, training of a portion refers to fine-tuning of the classification layer of the first machine learning model 230B, and the classification layer refers to the last multiple layers (e.g., layer 2 or layer 3) of the first machine learning model 230B counting from the output side.

[0042] In the estimation stage, the estimation unit 220 inputs the image to be estimated into the second machine learning model 130C to obtain the logits Z''0 to Z'' C-1 Obtain the logit Z''0~Z'' C-1Substituting into the softmax function, the probability value P''0~P'' C-1 At this time, the correction unit 210 acquires and outputs the acquired logit Z''. i and the second machine learning model 130C, the correction term Δ i Calculate the logit Z'' i Correction term Δ i Logit Z'' by adding i In this way, according to the present invention, the estimation accuracy of the model can be further improved by combining the correction using the correction term described in the first embodiment with the re-learning described in the second embodiment.

[0043] Next, the flow of processing executed by the estimation device 200 according to the second embodiment will be described with reference to Fig. 6. Fig. 6 is a flowchart showing an example of the flow of processing executed by the estimation device 200 according to the second embodiment.

[0044] First, learning unit 202 learns first machine learning model 230B based on learning data 230A (step S200). Next, correction unit 210 corrects the error function using a correction term that reflects the output of first machine learning model 230B (step S202). Next, learning unit 202 re-learns first machine learning model 230B using the corrected error function to generate second machine learning model 130C (step S204).

[0045] Next, the estimation unit 220 inputs the image to be estimated into the second machine learning model 230C to obtain the logit Z''0 to Z'' C-1 Next, the correction unit 110 obtains the obtained logits Z''0 to Z'' C-1 , a correction term Δ i Adding the corrected logit Z'''0~Z''' C-1 Next, the estimation unit 120 calculates the corrected logits Z'''0 to Z''' (step S208). C-1is substituted into the softmax function to obtain the corrected probability value P''0~P'' C-1 is acquired and output (step S210), and the process of this flowchart ends.

[0046] According to the second embodiment described above, the error function L, which represents the cross-entropy error shown by equation (3), is calculated using the output of the trained first machine learning model 230B. That is, according to the second embodiment, the error function L used in training the machine learning model is corrected with high precision, thereby improving the accuracy of the generated machine learning model.

[0047] In the above embodiment, a machine learning model is configured and trained to receive an image as an input and output a logit of the type of object indicated by a group of pixels in the image. However, the present invention is not limited to such a configuration, and can also be applied to a machine learning model configured and trained to receive other types of data (e.g., audio) and output a logit of the type of data. For example, a machine learning model may be configured and trained to receive audio as an input and output a logit of the type indicated by a section of the audio. Even if the data being handled is of a type other than an image, the logit correction process by the correction unit 110 (210) described above can be similarly applied as long as the machine learning model is configured to output a logit. Audio is another example of "data" in the claims, and audio sections are another example of "at least a portion of data" in the claims.

[0048] [vehicle] The above-described estimation device 100 (200) may be mounted on a vehicle control device and used to control the host vehicle M. Fig. 7 is a diagram showing the configuration of the host vehicle M equipped with a vehicle control device 300 including the estimation device.

[0049] The host vehicle M is equipped with, for example, a camera 10, an object recognition device 12, a vehicle sensor 14, a driving operator 20, a steering wheel 22, a driving force output device 30, a braking device 32, a steering device 34, and a vehicle control device 300.

[0050] The camera 10 is a digital camera that uses a solid-state imaging element such as a CCD (Charge Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor). The camera 10 is attached to any location on the host vehicle M. When capturing an image of the front, the camera 10 is attached to the top of the front windshield, the back of the rearview mirror, or the like. The camera 10, for example, periodically captures images of the surroundings of the host vehicle M. The camera 10 may be a stereo camera. The camera 10 transmits the captured images to the object recognition device 12.

[0051] The object recognition device 12 performs image processing on the image received from the camera 10 to detect pedestrians, other vehicles, road structures (road dividing lines, walls, etc.) and the like that appear in the image, and transmits the detection results to the vehicle control device 300. In this case, the detection results are the recognized objects identified as pixel groups, as described with reference to FIG.

[0052] The vehicle sensor 14 includes a vehicle speed sensor that detects the speed of the host vehicle M, an acceleration sensor that detects acceleration, a yaw rate sensor that detects angular velocity around a vertical axis, a direction sensor that detects the direction of the host vehicle M, and the like.

[0053] The driving operators 20 include, for example, a steering wheel 22 as well as an accelerator pedal, a brake pedal, a shift lever, and other operators. The driving operators 20 are fitted with sensors that detect the amount of operation or the presence or absence of operation, and the detection results are output to the vehicle control device 300 or some or all of the driving force output device 30, the brake device 32, and the steering device 34. The operators do not necessarily have to be annular, and may be in the form of an irregular steering wheel, a joystick, a button, or the like.

[0054] The driving force output device 30 outputs a driving force (torque) to the driving wheels for driving the host vehicle M. The driving force output device 30 includes, for example, a combination of an internal combustion engine, an electric motor, a transmission, etc., and an ECU (Electronic Control Unit) that controls these. The ECU controls the above components according to information input from the vehicle control device 300 or information input from the driving operator 20.

[0055] The brake device 32 includes, for example, a brake caliper, a cylinder that transmits hydraulic pressure to the brake caliper, an electric motor that generates hydraulic pressure in the cylinder, and a brake ECU. The brake ECU controls the electric motor according to information input from the vehicle control device 300 or information input from the driving operation device 20, so that a brake torque corresponding to the braking operation is output to each wheel. The brake device 32 may include a backup mechanism that transmits hydraulic pressure generated by operation of a brake pedal included in the driving operation device 20 to the cylinder via a master cylinder. Note that the brake device 32 is not limited to the configuration described above, and may also be an electronically controlled hydraulic brake device that controls an actuator according to information input from the vehicle control device 300 to transmit hydraulic pressure from the master cylinder to the cylinder.

[0056] The steering device 34 includes, for example, a steering ECU and an electric motor. The electric motor changes the direction of the steered wheels by applying a force to, for example, a rack and pinion mechanism. The steering ECU drives the electric motor to change the direction of the steered wheels in accordance with information input from the vehicle control device 300 or information input from the driving operator 20.

[0057] The vehicle control device 300 includes, for example, the estimation device 100 (200) and a vehicle control unit 310. The vehicle control unit 310 is realized by, for example, a hardware processor such as a CPU (Central Processing Unit) executing a program (software). Some or all of these components may be realized by hardware (including circuitry) such as an LSI (Large Scale Integration), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a GPU (Graphics Processing Unit), or may be realized by a combination of software and hardware. The program may be stored in advance in a storage device (storage device having a non-transitory storage medium) such as an HDD or flash memory of the vehicle control device 300, or may be stored in a removable storage medium such as a DVD or CD-ROM, and installed in the HDD or flash memory of the vehicle control device 300 by inserting the storage medium (non-transitory storage medium) into a drive device. The storage unit 320 is realized by, for example, a ROM (Read Only Memory), a flash memory, an SD card, a RAM (Random Access Memory), a register, etc. The storage unit 320 stores an image including the object recognition result received from the object recognition device 12 as image data 320A.

[0058] The estimation device 100 (200) uses the estimation unit 120 (220) to estimate the type of object corresponding to a group of pixels included in the image data 320 A. More specifically, the estimation device 100 (200) estimates the type with the maximum value among the probability values output for the group of pixels included in the image data 320 A as the type of object corresponding to the group of pixels.

[0059] The vehicle control unit 310 controls the traveling of the host vehicle M by controlling at least one of the traveling drive force output device 30, the braking device 32, and the steering device 34 based on the estimation result by the estimation device 100 (200). More specifically, for example, when the type of object estimated by the estimation device 100 (200) corresponds to any one of a four-wheeled vehicle, a two-wheeled vehicle, a pedestrian, and a fallen object, the vehicle control unit 310 controls the traveling of the host vehicle M so as to avoid the object. Furthermore, for example, when the type of object estimated by the estimation device 100 (200) corresponds to a traffic light or a road sign, the vehicle control unit 310 controls the traveling of the host vehicle M in accordance with the instruction information indicated by the traffic light or road sign (for example, when the instruction information indicated by the traffic light is recognized as a stop (red) light, the vehicle control unit 310 slows down or stops the host vehicle M). Also, for example, if the type of object estimated by the estimation device 100 (200) corresponds to a guardrail, a median strip, or a curb, the vehicle control unit 310 controls the vehicle M to travel along the object.

[0060] In another aspect, the vehicle control unit 310 may display the type of object estimated by the estimation device 100 (200) on a display mounted on the vehicle M, without actually controlling the vehicle M. In other words, the vehicle control unit 310 may function as a driving assistance unit.

[0061] [Variations] As described above, according to the above embodiment, even if there is an imbalance between classes in terms of the number of samples in the training data, the deterioration in accuracy of the machine learning model due to the imbalance between classes can be mitigated by correcting the logit or error function using the output of the trained machine learning model. Generally, the training process of a machine learning model is performed in the following order: learning of network weights using training data, adjustment of hyperparameters using validation data, and verification of model accuracy using test data. However, the test data generally has a balanced number of samples between classes compared to the training data.

[0062] In this regard, research by the inventors of the present invention has observed that a conditional distribution P(y|x) modeled based on training data with an imbalance between classes in terms of the number of samples still has a bias to output higher logits for classes with a larger number of samples when verified with test data in which the classes are balanced in terms of the number of samples.

[0063] In this modified example, the marginal distribution P t (y) is optimized for the adjusted distribution P a (y|x). More specifically, the adjusted distribution P a If (y|x) satisfies the following equation (6), it can be said to be optimized to the marginal distribution of the test data.

[0064]

number

[0065] The conditional distribution P(y|x) modeled based on training data with imbalance between classes in terms of the number of samples is P m (y|x), the following Theorem 1 shown by Equation (7) holds. Theorem 1 below states that P m Using (y|x), the adjusted distribution P a This means that the residual bias can be reduced by calculating (y|x).

[0066]

number

[0067] where P m (y|x) is expressed by the following equation (8).

number

[0068] Theorem 1 shown by equation (7) is proved by the derivation process shown by the following equation (9).

[0069]

number

[0070] In addition, P in the above equations 1 and 2 a Regarding the expansion of (y|x), equation (12) can be derived from Bayes' theorem shown in the following equations (10) and (11). In general, the only difference between the training data and the test data is the number of samples per class, so P(x|y)=P t This takes advantage of the fact that (x|y) is predictable.

[0071]

number

[0072]

number

[0073]

number

[0074] One way to reduce the bias in a model is to correct the probability values during training to obtain an unbiased estimator. Transforming equation (12) yields the following equation (13):

[0075]

number

[0076] We use Equation (13) to perform two-stage decoupled training. More specifically, the first stage is training using a simple softmax cross-entropy error, and the second stage is training using Equation (3). In this framework, P t (y|x) is modeled by a DNN (machine learning model), and the predicted probability is P t (y|x) is adjusted to match P(y|x). During inference, the output of the DNN is directly adjusted to P t It is used as a model of (y|x). Since the model probabilities have been adjusted during training, the logit adjustment is removed during inference.

[0077] Ideally, the output of a DNN trained as described above should not contain bias, but even in this case, the distribution of the training data contains bias. In the following, we will refer to the distribution in which the logit is adjusted during training as P m (y|x), and the distribution with the logit adjustment removed during inference is P m- If we express it as (y|x), then P m- Adjustment distribution P for adjusting (y|x) a (y|x) is given by the following equation (14) (Theorem 2).

[0078]

number

[0079] In equation (14), P m (y|x) and P m- (y|x) is expressed by the following equations (15) and (16).

[0080]

number

[0081]

number

[0082] To prove Theorem 2, first, we use equations (8) and (15) to find P m (y|x) is expanded by equation (17).

[0083]

number

[0084] In equation (7) of Theorem 1, P m (y|x) and P m Substituting (y), we obtain the following equation (18).

[0085]

number

[0086] The result of equation (18) is P a By substituting (y|x), we obtain the following equation (19). This completes the proof of Theorem 2.

[0087]

number

[0088] Note that the above Theorem 1 and Theorem 2 are m (y) and P m- It is assumed that (y) is calculated, but P m (y) is the training data, P m- (y) is P t From the sample of (x), it can be estimated by the following equations (20) and (21).

[0089]

number

[0090]

number

[0091] According to the above-described modified example, by using Theorem 1, the conditional distribution P(y|x) modeled based on the training data with imbalance between classes in terms of the number of samples can be converted into the marginal distribution P(y|x) of the test data with no imbalance between classes in terms of the number of samples. t (y). Furthermore, by using Theorem 2, we can obtain the conditional distribution P m- (y|x) is the marginal distribution P t (y) can be adjusted to match.

[0092] The above-described embodiment can be expressed as follows. a storage medium for storing computer-readable instructions; a processor connected to the storage medium; The processor executes the computer-readable instructions to: a machine learning model that has been trained to receive an image containing a plurality of pixels as an input and output a logit in which one or more pixel groups in the image correspond to a class representing a type of object, thereby acquiring the logit; and calculating a correction value for correcting the logit using the output of the machine learning model. correcting the logit based on the calculated correction value, and estimating a class to which the one or more pixel groups in the target image belong based on the corrected logit; The estimation device is configured as follows.

[0093] The above describes the form for carrying out the present invention using an embodiment, but the present invention is not limited to such an embodiment, and various modifications and substitutions can be made within the scope that does not deviate from the gist of the present invention. [Explanation of symbols]

[0094] 100, 200 estimation device 110, 210 Correction unit 120, 220 Estimation part 130, 230 storage section 130A, 230A training data 130B Machine Learning Model 230B First Machine Learning Model 230C Second Machine Learning Model

Claims

1. a learning unit that learns a first machine learning model that receives data as input and is trained to output logits corresponding to a class in which at least a portion of the data corresponds to a certain type; a correction unit that corrects an error function used in training the first machine learning model using an output of the first machine learning model, the learning unit generates a second machine learning model by re-learning the first machine learning model using the corrected error function. Learning device.

2. The correction unit corrects the error function L according to the following equation (1): [Equation 1] ・・・(1) In formula (1), C represents the total number of classes to be classified, k represents all integers from 0 to C-1, i represents any integer from 0 to C-1, and Z i represents the logit output by the first machine learning model for class i, and P(y i ) represents the prior probability that a sample of class i occurs in the training data used to train the first machine learning model, The learning device according to claim 1 .

3. The correction unit corrects the error function L by further adding an entropy regularization term to Equation (1). The learning device according to claim 2 .

4. The correction unit corrects the error function L according to the following equation (2): [Equation 2] ・・・(2) In formula (2), C represents the total number of classes to be classified, k represents all integers from 0 to C-1, i represents any integer from 0 to C-1, and b i represents a bias term, λ represents a hyperparameter, and ε(z) represents an entropy regularization term. The learning device according to claim 1 .

5. The computer training a first machine learning model that receives data as input and is trained to output logits corresponding to a class representing a certain type of at least a portion of the data; correcting an error function used to train the first machine learning model using an output of the first machine learning model; generating a second machine learning model by retraining the first machine learning model using the corrected error function; How to learn.

6. On the computer, training a first machine learning model that receives data as input and is trained to output logits corresponding to a class representing a certain type of at least a portion of the data; correcting an error function used in training the first machine learning model using an output of the first machine learning model; generating a second machine learning model by retraining the first machine learning model using the corrected error function; program.