Machine learning device and machine learning program
The machine learning device and program dynamically adjust parameters to switch classifiers based on task-specific factors, addressing inefficiencies in multi-task learning by ensuring balanced progression across tasks, thereby enhancing feature extraction and model accuracy.
Patent Information
- Application Number
- JP2022017653
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-02-08
- Publication Date
- 2025-11-06
- Estimated Expiration
- 2042-02-08
Smart Images

Figure 0007764776000001 
Figure 0007764776000002 
Figure 0007764776000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a machine learning device and a machine learning program. [Background technology]
[0002] A known technique involves generating a trained model by having a learning model composed of a neural network learn the features of an image to be processed, and then using this trained model to process tasks such as identification and classification. Multitask learning has also been proposed, in which a single learning model is trained to solve multiple tasks simultaneously. Multitask learning is useful because it allows the features of the image to be processed to be captured efficiently.
[0003] In this regard, Patent Document 1 below discloses a technique for calculating the batch size of each of multiple tasks for each task, updating the weights of the classifier for each task, and alternately learning the tasks. Patent Document 2 below also discloses a network structure that adjusts the weighting between tasks by monitoring the trajectory of the loss function during training, taking into account that the order in which tasks are learned by a neural network can affect the performance of the neural network. Patent Document 3 below also discloses a technique for dynamically setting parameters such as task weights by evaluating performance during learning when training two or more recognition tasks. Patent Document 4 below also discloses a technique for setting a main task and subtasks, learning to minimize the loss function of each task, and then updating the parameters to minimize the loss function of the main task. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] International Publication No. 2018 / 047225 [Patent Document 2] Special Publication No. 2021-503122 [Patent Document 3] Japanese Patent Application Publication No. 2019-192009 [Patent Document 4] International Publication No. 2019 / 235283 Summary of the Invention [Problem to be solved by the invention]
[0005] However, when such techniques train all tasks simultaneously, i.e., when the loss for each task is uniformly backpropagated, learning of features common to each task may not proceed efficiently. For example, learning may stagnate due to the influence of tasks that perform complex processing, or after features for tasks that perform simple processing have been learned first, it may become difficult to learn features for tasks that perform complex processing. This is thought to be because the learning tendency of a specific task may be pulled, hindering the progress of overall learning.
[0006] The present invention has been made to solve such problems, and aims to provide a machine learning device and a machine learning program that can prevent or suppress the overall progress of learning from being hindered by the learning trends of a specific task. [Means for solving the problem]
[0007] The above-mentioned problems of the present invention are solved by the following means.
[0008] (1) A learning model including a data acquisition unit that acquires learning data, a feature extraction unit that extracts features from the learning data, and a plurality of classifiers that perform processing of a plurality of tasks based on the features, the learning model being machine-learned by updating parameters of the classifiers; and an adjustment unit that switches which of the plurality of classifiers is to be learned by the learning unit. The adjustment unit changes the parameters to be updated by the learning unit based on the structure of the feature extraction unit and the structures of the plurality of classifiers, thereby switching the classifier to be learned. ,machine learning device.
[0009] (2) The adjustment unit adjusts the learning unit The parameter is dynamically changed according to the number of feature quantities for each task extracted by the feature extraction unit during the process. The machine learning device according to (1) above.
[0010] (3) a learning unit that uses a learning model including a data acquisition unit that acquires learning data, a feature extraction unit that extracts features from the learning data, and a plurality of classifiers that perform processing of a plurality of tasks based on the features to machine-learn the learning model by updating parameters of the classifiers; and an adjustment unit that switches one of the plurality of classifiers to be learned by the learning unit, wherein the adjustment unit switches the classifier to be learned by changing the parameters to be updated by the learning unit based on intermediate information at the time of feature learning during learning by the learning unit. ,machine learning device.
[0011] (4) The adjustment unit The parameters are dynamically adjusted according to the magnitude of the loss during the learning by the learning unit. Change the above ( 3 ) The machine learning device described in
[0012] (5) The adjustment unit The parameters are dynamically adjusted according to a trend of loss reduction during learning by the learning unit. Change the above ( 3 ) The machine learning device described in
[0013] (6) The adjustment unit The parameters are dynamically adjusted according to the reliability of the processing results of each of the tasks during the learning by the learning unit. Change the above ( 3 ) The machine learning device described in
[0014] (7) The adjustment unit The parameters are dynamically changed according to the accuracy rate of the processing results of each of the tasks in the learning by the learning unit. The above ( 3 ) The machine learning device described in
[0015] (8) The adjustment unit adjusts the adjustment amount during the learning by the learning unit. The degree of separation between the classes of the multiple tasks in the feature space The above parameters are dynamically changed according to the above. 3 ) The machine learning device described in
[0016] (9) The adjustment unit adjusts the speed of the learning unit during the learning. The parameters are dynamically changed according to the activation level of the feature related to the task. ,the above( 3 ) The machine learning device described in
[0017] (10) the adjustment unit any one of (1) to (9) above, further comprising: a display unit that displays candidates for methods of changing the parameters; and an operation unit that accepts a user's selection from the candidates displayed on the display unit and inputs information about the selected method to the adjustment unit. The machine learning device according to claim 1.
[0018] (11) a learning unit that uses a learning model including a data acquisition unit that acquires learning data, a feature extraction unit that extracts features from the learning data, and a plurality of classifiers that perform processing of a plurality of tasks based on the features to update parameters of the classifiers, thereby performing machine learning on the learning model; an adjustment unit that switches one of the plurality of classifiers to be trained by the learning unit; a display unit that displays candidate methods for changing parameters by the adjustment unit; and an operation unit that receives a user's selection from the candidates displayed on the display unit and inputs information about the selected method to the adjustment unit. Machine learning device.
[0019] (12) The adjustment unit A method to be used from among a plurality of methods for changing the parameters of the classifier is determined based on information about the selected method, and the learning unit changes the parameters to be updated, thereby switching the classifier to be learned. ,the above( 11 ) The machine learning device described in
[0020] (13) The adjustment unit The parameters are set according to the type of task each classifier processes. Change the above ( 12 ) The machine learning device described in
[0021] (14) The adjustment unit The parameters are set according to the number of classes classified by each classifier. Change the above ( 12 ) The machine learning device described in
[0022] (15) The adjustment unit The parameters are set according to the number of data related to the task that each classifier processes. Change the above ( 12 ) The machine learning device described in
[0023] (16) the adjustment unit changes the parameters according to the degree of balance between the numbers of data among the classes classified by each of the classifiers. the above (12) The machine learning device according to claim 1.
[0026] ( 17 (a) acquiring training data; (b) using a learning model including a feature extraction unit that extracts features from the training data and a plurality of classifiers that perform processing of a plurality of tasks based on the features, by updating parameters of the classifiers, machine learning the learning model; and (c) switching a classifier to be used as a learning target from among the plurality of classifiers. and in the step (c), the parameter to be updated is changed based on the structure of the feature extraction unit and the structures of the plurality of classifiers, thereby switching the classifier to be learned. A machine learning program that allows a computer to perform processing.
[0027] ( 18 (a) acquiring training data; (b) using a learning model including a feature extraction unit that extracts features from the training data and a plurality of classifiers that perform processing of a plurality of tasks based on the features, by updating parameters of the classifiers, machine learning the learning model; and (c) switching a classifier to be used as a learning target from among the plurality of classifiers. and in the step (c), the parameter to be updated is changed based on intermediate information at the time of feature learning during the learning in the step (b), thereby switching the classifier to be learned. A machine learning program that allows a computer to perform processing. [Effects of the Invention]
[0028] According to the present invention, the learning unit switches among a plurality of classifiers which classifier to be learned, thereby preventing or suppressing the overall progress of learning from being hindered by the learning tendency of a specific task. [Brief explanation of the drawings]
[0029] [Figure 1] FIG. 1 is a schematic block diagram illustrating a hardware configuration of a machine learning device according to an embodiment. [Figure 2] 2 is a functional block diagram illustrating the main functions of a control unit shown in FIG. 1. FIG. [Figure 3] FIG. 10 is a functional block diagram illustrating the functions of a control unit when a classifier to be learned is changed based on the type of task. [Figure 4] FIG. 10 is a functional block diagram illustrating the function of a control unit when a classifier to be learned is changed based on the number of classes to be classified. [Figure 5] FIG. 10 is a functional block diagram illustrating the functions of a control unit when a classifier to be learned is changed based on the number of data items related to task processing. [Figure 6] FIG. 10 is a functional block diagram illustrating the function of a control unit when a classifier to be learned is changed based on the degree of balance in the number of data items between classes. [Figure 7] FIG. 7(a) is a schematic diagram illustrating the proportion of the number of data per class for dog images in the training data, and FIG. 7(b) is a schematic diagram illustrating the proportion of the number of data per class for cat images in the training data. [Figure 8] FIG. 10 is a functional block diagram illustrating the function of a control unit when a classifier to be learned is changed based on a feature amount during learning. [Figure 9] FIG. 10 is a functional block diagram illustrating the function of a control unit when a classifier to be learned is changed based on the magnitude of the loss of a task. [Figure 10] FIG. 1 is a schematic diagram showing the relationship between the number of learning iterations and task loss. [Figure 11] FIG. 11A is a schematic diagram illustrating the degree of separation between classes in the feature space in task 1, and FIG. 11B is a schematic diagram illustrating the degree of separation in task 2. [Figure 12]FIG. 10 is a block diagram illustrating a configuration in which a user selects a method for changing parameters of a classifier to be updated by a learning unit. [Figure 13] 1 is a flowchart illustrating an overview of a processing procedure of a machine learning method of a machine learning device according to an embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0030] Hereinafter, a machine learning device and a machine learning program according to an embodiment of the present invention will be described with reference to the drawings. In the drawings, identical elements are designated by the same reference numerals, and duplicated descriptions will be omitted.
[0031] (Configuration of machine learning device) Fig. 1 is a schematic block diagram illustrating the hardware configuration of a machine learning device according to an embodiment, and Fig. 2 is a functional block diagram illustrating the main functions of the control unit shown in Fig. 1. The machine learning device 100 of this embodiment is a device that performs efficient multi-task learning by appropriately switching the tasks to be learned, rather than learning all tasks simultaneously.
[0032] The machine learning device 100 performs machine learning (hereinafter simply referred to as "learning") on a learning model configured by a neural network using training data (teacher data) including input data and correct labels, and generates a trained model. For example, in this embodiment, deep learning is used, in which a learning model configured by a multilayer neural network is trained using training data. The input data may be, for example, an image of a subject such as a person or an animal, or an image of an inspection object. The inspection object is not particularly limited, but may be, for example, a part used in an industrial product.
[0033] Although not shown, the inspection object is illuminated with light from a lighting device and photographed by an imaging device such as a camera. The imaging device transmits image data of the photographed inspection object to the machine learning device 100. The machine learning device 100 acquires the image data as training data. Alternatively, images of the inspection object photographed in advance by the imaging device are stored in a storage device external to the machine learning device 100. It is desirable that the storage device stores training data consisting of a plurality of images (e.g., tens to tens of thousands) and correct labels.
[0034] For example, when the inspection object is a part of an industrial product, the imaging device is installed in the inspection process, captures an image of the imaging range that includes the inspection object, and outputs image data that includes the inspection object. The imaging device outputs black-and-white or color image data of the inspection object of a predetermined number of pixels (e.g., 128 pixels x 128 pixels).
[0035] In this embodiment, various known methods can be applied as machine learning, such as neural networks, random forests, decision trees, support vector machines (SVMs), logistic regression, and k-nearest neighbor methods.
[0036] 1, the machine learning device 100 includes a control unit 110, a communication unit 120, and an operation display unit 130. These components are connected to one another via a bus 101.
[0037] <Control unit 110> The control unit 110 includes a CPU 111, a random access memory (RAM) 112, a read only memory (ROM) 113, and an auxiliary storage unit 114.
[0038] The CPU 111 executes programs such as an OS (Operating System) and a machine learning program loaded in the RAM 112, and controls the operation of the machine learning device 100. The machine learning program is stored in advance in the ROM 113 or the auxiliary storage unit 114. The RAM 112 also stores data temporarily generated by the processing of the CPU 111. The ROM 113 also stores programs executed by the CPU 111, as well as data and parameters used in executing the programs. The auxiliary storage unit 114 includes, for example, a hard disk drive (HDD) or a solid state drive (SSD).
[0039] Furthermore, the machine learning device 100 may be, for example, a standalone high-performance computer using a processor such as a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit), or a cloud computer.
[0040] <Communication Unit 120> The communication unit 120 is an interface circuit (for example, a LAN card) for communicating with an external device via a network.
[0041] <Operation display section 130> The operation display unit 130 has an input unit and an output unit. The input unit includes, for example, a keyboard, a mouse, etc. (operation unit) and is used by the user to input characters using the keyboard, mouse, etc., and to input various instructions (inputs) such as various settings. The output unit includes a display (display unit) and displays an image of the inspection target, etc.
[0042] 2, the control unit 110 functions as a data acquisition unit 210, a feature extraction unit 220, a classification unit 230, a learning unit 240, and an adjustment unit 250. These functions are realized by the CPU 111 executing a machine learning program.
[0043] <Data Acquisition Unit 210> The data acquisition unit 210 acquires training data by working in cooperation with the communication unit 120. The data acquisition unit 210 acquires training data including input data and correct labels, for example, from an imaging device or a storage device external to the machine learning device 100. The input data is, for example, an image of an inspection target, and each image is assigned a correct label for each of tasks 1 to N. Hereinafter, the image acquired by the data acquisition unit 210 is referred to as an input image. The input image is input to the feature extraction unit 220, and the correct label is input to the learning unit 240.
[0044] <Feature Extraction Unit 220> The feature extraction unit 220 extracts general-purpose feature amounts (feature vectors) that are common to each task, and inputs the extracted feature amounts to a plurality of classifiers in the classification unit 230, respectively.
[0045] <Identification unit 230> The classification unit 230 has a plurality of classifiers for processing tasks 1 to N. Of these, for example, classifier 231 is a classifier for processing task 1, and classifier 232 is a classifier for processing task 2. For example, the classifiers use the feature amounts extracted by the feature extraction unit 220 to classify (classify) an input image as to which of two preset attributes the image belongs to. The processing results of tasks 1 to N are input to the learning unit 240.
[0046] <Learning Section 240> The learning unit 240 performs machine learning of tasks 1 to N using the learning data and the learning model (the feature extraction unit 220 and the classification unit 230). More specifically, the learning unit 240 updates the parameters of the feature extraction unit 220 and at least one classifier, thereby learning the task of the classifier to be updated. The classifier parameters may be numerical values, conditional expressions, weights, etc., that represent features for classification. For each classifier, some or all of the set parameters can be updated simultaneously.
[0047] The classifier 230 can learn a learning model (multitask learning) to simultaneously solve tasks 1 to N by updating the parameters of N classifiers. Also, by updating the parameters of any of the classifiers in the classifier 230, any of tasks 1 to N can be learned.
[0048] For each task, the learning unit 240 compares the processing results of each classifier in the classification unit 230 with the correct label corresponding to the input image, and updates (adjusts) each parameter of the multilayer neural network in the feature extraction unit 220 based on the comparison results. The learning unit 240 updates each parameter of the feature extraction unit 220 and the classifier so as to reduce the difference in the comparison results, for example, by repeatedly executing processing based on the backpropagation method the number of times equal to the number of input images included in the training data.
[0049] <Adjustment section 250> The adjustment unit 250 changes the parameters of the classifier to be updated by the learning unit 240, thereby switching the classifier to be learned from among the multiple classifiers by the learning unit 240. The adjustment unit 250 changes the parameters of the classifier to be updated by the learning unit 240 based on, for example, any of information related to the task, information related to the learning model, and information related to the learning result / process.
[0050] Task-related information may include, for example, the type of task, the number of classes to be classified, and information about the training data dataset. Dataset-related information may include, for example, the number of image data pieces of input images that are related to task processing for each classifier, and the degree of balance in the number of pieces of data between classes. The degree of balance in the number of pieces of data is the balance in the number of pieces of data between classes, i.e., the degree to which the number of pieces of data is uniform. Model information may include, for example, information about the number of features. Learning result / process information may include, for example, information about loss (e.g., loss) and feature space.
[0051] A specific example of a method in which the adjustment unit 250 changes the parameters to be updated based on any one of information related to the task, information related to the learning model, and information related to the learning result / process will be described below.
[0052] Task Type FIG. 3 is a functional block diagram illustrating the functions of the control unit 110 when a classifier to be learned is changed based on the type of task.
[0053] The adjustment unit 250 switches the classifier to be learned by changing the parameters of the classifier to be updated by the learning unit 240 based on prior information about tasks 1 to N before learning by the learning unit 240. More specifically, the adjustment unit 250 changes the parameters of the classifier to be updated by the learning unit 240 according to the type of task processed by each classifier. For example, when learning object detection, prior information that task 1 is a task for detecting the position of an object and task 2 is a task for classifying objects is stored in the RAM 112.
[0054] In the example shown in the figure, it is assumed that task 1, which is position detection, is easier to learn than task 2, which is classification. The fact that task 1, which is position detection, is easier to learn than task 2, which is classification, is also stored as prior information in RAM 112.
[0055] For example, object detection learning may proceed more efficiently if classification is performed after position detection learning has progressed to a certain extent. In such a case, in this embodiment, the adjustment unit 250 may be configured to change the parameters of the classifier to be updated by the learning unit 240 so that the learning unit 240 learns position detection task 1 before classification task 2. Learning task 1, which is easier to learn, before task 2 makes it easier to progress in learning.
[0056] [Number of classes] FIG. 4 is a functional block diagram illustrating the functions of the control unit 110 when the classifier to be trained is changed based on the number of classes to be classified.
[0057] The adjustment unit 250 changes the parameters of the classifiers to be updated by the learning unit 240, depending on the number of classes classified by each classifier in the classification unit 230. In the example shown in the figure, it is assumed that task 1 classifies data into two classes, and task 2 classifies data into six classes. Task 2, which classifies data into six classes, is more complicated than task 1, which classifies data into two classes.
[0058] In this embodiment, the system may be configured to train Task 2 before Task 1. By training the task with a larger number of classes, i.e., the more complex task, first, the feature extraction unit 220 can more easily learn general-purpose features. As a result, the estimation accuracy of the trained model improves.
[0059] Conversely, Task 1, which classifies tasks into two classes, may be configured to be learned before Task 2, which classifies tasks into six classes. By learning the task with fewer classes, i.e., the task that performs simple processing, first, it is possible to prevent the feature extraction unit 220 from slowing down its progress in learning the features.
[0060] [Number of data] FIG. 5 is a functional block diagram illustrating the functions of the control unit 110 when changing the classifier to be learned based on the number of data items related to task processing.
[0061] The adjustment unit 250 changes the parameters of the classifiers to be updated by the learning unit 240 depending on the amount of data related to the processing of the task of each classifier. In the example shown in the figure, task 1 is a task of classifying dog types, and task 2 is a task of classifying cat types. Assume that there are 1,000 dog images and 100 cat images in the training data.
[0062] In this embodiment, task 1, which involves dog images with a large amount of data, can be configured to be learned before task 2, which involves cat images with a small amount of data. Learning task 1, which has sufficient data, can be learned first, which makes it easier to progress in learning. Furthermore, if there is not enough data related to task 2, task 2 can be learned later as soon as the data is available.
[0063] [Data balance] Fig. 6 is a functional block diagram illustrating the functions of the control unit 110 when changing the classifier to be trained based on the degree of balance between the number of data points among classes. Fig. 7(a) is a schematic diagram illustrating the proportion of the number of data points per class for dog images in the training data. Fig. 7(b) is a schematic diagram illustrating the proportion of the number of data points per class for cat images in the training data.
[0064] The adjustment unit 250 changes the parameters to be updated by the learning unit 240 according to the degree of balance (balance in the number of data) between the classes classified by each classifier in the classification unit 230. In the example shown in the figure, it is assumed that the number of data between classes for dog images is more uniform and balanced than that for cat images, i.e., the degree of balance is higher.
[0065] In this embodiment, task 1, which involves dog images with a high degree of balance, may be configured to be learned before task 2, which involves cat images with a low degree of balance. Learning task 1 first makes it easier to progress in learning. Furthermore, if the degree of balance in the number of data between classes in task 2 is low (bad balance), task 2 may be configured to be learned later as soon as the balance in the number of data becomes better.
[0066] [Feature extraction and classifier structure] FIG. 8 is a functional block diagram illustrating the functions of the control unit 110 when a classifier to be learned is changed based on a feature amount during learning.
[0067] The adjustment unit 250 switches the classifier to be learned by changing the parameters of the classifier to be updated by the learning unit 240 based on the structure of the feature extraction unit 220 and the structures of the multiple classifiers during multi-task learning. More specifically, during learning by the learning unit 240, the adjustment unit 250 changes the parameters of the classifier to be updated by the learning unit 240 in accordance with the number of features extracted for each task by the feature extraction unit 220. The extracted features reflect the learning performed by the feature extraction unit 220 and each classifier for each task. The number of features may change during the learning process. The adjustment unit 250 can dynamically change the parameters in accordance with changes in the number of features.
[0068] In the example shown in the figure, it is assumed that in the process of multi-task learning, the number of feature quantities in task 2, which classifies defect details, is greater than the number of feature quantities in task 1, which classifies defects / false defects. In other words, task 2, which classifies defect details, requires more features to be considered, and therefore performs more complex processing than task 1, which classifies defects / false defects. Examples of detailed defect classifications include convex defects, pit defects, flat defects, circular defects, line defects, uneven defects, large defects, medium defects, small defects, etc.
[0069] In this embodiment, the learning unit 240 can be configured to first learn task 2, which performs more complex processing than task 1. By first learning task 2, which performs more complex processing, the feature extraction unit 220 can more easily learn general-purpose features. As a result, the estimation accuracy of the trained model improves.
[0070] Conversely, the learning unit 240 may be configured to first learn task 1, which involves simpler processing than task 2. By first learning task 1, which involves simpler processing, it is possible to extract general features at an early stage of learning, making it easier to progress in learning.
[0071] [Task loss magnitude] FIG. 9 is a functional block diagram illustrating the functions of the control unit 110 when changing the classifier to be learned based on the magnitude of the loss in the task.
[0072] In multi-task learning, the adjustment unit 250 switches the classifier to be learned based on intermediate information during feature learning. More specifically, the adjustment unit 250 changes the parameters of the classifier to be updated by the learning unit 240, depending on the magnitude of the loss during learning by the learning unit 240. The magnitude of the loss can change during the learning process. The adjustment unit 250 can dynamically change the parameters depending on the change in the magnitude of the loss.
[0073] In the example shown in the figure, it is assumed that during multi-task learning, the loss for task 1 is 0.5 and the loss for task 2 is 0.7. Task 2, which has a large loss, is thought to have not yet progressed sufficiently in learning, or to involve more complex processing than task 1.
[0074] In this embodiment, if the loss in task 2 becomes larger than the loss in task 1 during multitask learning, the learning unit 240 can be configured to learn task 2 first. By learning task 2, which has a larger loss, first, the feature extraction unit 220 can more easily learn general-purpose features. As a result, the estimation accuracy of the trained model improves.
[0075] Conversely, the learning unit 240 may be configured to learn task 1, which has a smaller loss, first than task 2. Learning task 1, which has a smaller loss, first allows learning to proceed more quickly.
[0076] [Decreasing trend in task losses] FIG. 10 is a schematic diagram showing the relationship between the number of learning iterations and task loss. The adjustment unit 250 changes the parameters to be updated by the learning unit 240 according to the trend in the reduction of task loss during learning. The trend in the reduction of loss may change during the learning process. The adjustment unit 250 can dynamically change the parameters according to changes in the trend in the reduction of loss.
[0077] In the example shown in the figure, it is assumed that the trend of decrease in loss for Task 2 stagnates midway through multi-task learning. Task 2, for which the trend of decrease in loss stagnates midway, is thought to perform more complex processing than Task 1.
[0078] In this embodiment, if the trend of loss reduction for task 2 stagnates during multitask learning, the learning unit 240 can be configured to learn task 2 first. By learning task 2, where the trend of loss reduction has stagnated, first, the feature extraction unit 220 can more easily learn general-purpose features. As a result, the estimation accuracy of the trained model improves.
[0079] Conversely, the learning unit 240 may be configured to first learn task 1, which has a smaller loss than the previous task 1. By first learning task 1, which has a smaller loss, learning progresses quickly.
[0080] [Reliability of task processing results (likelihood)] Furthermore, during multitask learning, the adjustment unit 250 can change the parameters to be updated by the learning unit 240 according to the reliability (likelihood) of the processing results (inference results) of each task. The reliability of the processing results can change during the learning process. The adjustment unit 250 can dynamically change the parameters according to changes in the reliability of the processing results.
[0081] For example, let's assume that the processing results for Task 1 have 1,000 pieces of data with a correct answer reliability of 90% or more, and the processing results for Task 2 have 500 pieces of data with a correct answer reliability of 90% or more. The more data there are with a correct answer reliability of 90% or more, the more reliable the processing results are.
[0082] In this embodiment, the learning unit 240 can be configured to first learn task 1, which has a highly reliable processing result. Learning can be facilitated by starting with task 1, which has a highly reliable processing result. Furthermore, the estimation accuracy of a trained model is affected by the quality of the data. By using high-quality data for learning, the accuracy of feature extraction improves, and the reliability of the processing results also increases.
[0083] On the other hand, it is considered that task 2, whose processing results are low in reliability, has not yet undergone sufficient learning or performs complex processing. The learning unit 240 may be configured to learn task 2, whose processing results are low in reliability, first. By learning task 2, whose processing results are low in reliability, first, it is possible to prevent or suppress learning from falling into a local solution. As a result, the estimation accuracy of the trained model is improved.
[0084] [Correct answer rate for task processing results] Furthermore, during multitask learning, the adjustment unit 250 can dynamically change the parameters to be updated by the learning unit 240 according to the accuracy rate of the processing results of each task. The accuracy rate of the processing results can change during the learning process. The adjustment unit 250 can dynamically change the parameters according to changes in the accuracy rate of the processing results.
[0085] For example, suppose the accuracy rate for the processing results of Task 1 is 80% and the accuracy rate for the processing results of Task 2 is 60%. Task 2, which has a lower accuracy rate, is likely to be one in which learning has not yet progressed sufficiently, or the processing is more complex than Task 1.
[0086] In this embodiment, the learning unit 240 can be configured to learn Task 2, which has not yet progressed sufficiently or which involves complex processing, before Task 1. By learning Task 2, which has a low accuracy rate, before Task 1, the feature extraction unit 220 can more easily learn general-purpose features. As a result, the estimation accuracy of the trained model improves.
[0087] Conversely, the learning unit 240 may be configured to learn task 1, which has a high rate of correct answers, first. By learning task 1, which has a high rate of correct answers, first, learning progresses quickly.
[0088] [Feature separation degree] FIG. 11(A) is a schematic diagram illustrating the degree of separation between classes in feature space in Task 1, and FIG. 11(B) is a schematic diagram illustrating the degree of separation in Task 2. The degree of separation represents the degree to which the features of each class are separated from each other in feature space. For example, as shown in FIG. 11(A), in Task 1, Class 1 and Class 2 are separable by a straight line, and the degree of separation is high. On the other hand, as shown in FIG. 11(B), in Task 2, Class 1 and Class 2 are not separable by a straight line, and the degree of separation is low.
[0089] During multi-task learning, the adjustment unit 250 changes the parameters to be updated by the learning unit 240 according to the degree of separation in the feature space between the classes of each task. The degree of separation can change during the learning process. The adjustment unit 250 can dynamically change the parameters according to changes in the degree of separation. For task 2, which has a low degree of separation, learning is not yet sufficiently advanced, or it is considered to involve more complex processing than task 1.
[0090] In this embodiment, the learning unit 240 can be configured to learn task 2, which has a low degree of separation, before task 1. By learning task 2, which has a low degree of separation, first, the feature extraction unit 220 can easily learn general-purpose features. As a result, the estimation accuracy of the trained model improves.
[0091] Conversely, the learning unit 240 may be configured to learn task 1, which has a high degree of separation, first. By learning task 1, which has a high degree of separation, first, learning progresses quickly.
[0092] In addition, in Figures 11(A) and (B), for simplicity of explanation, the number of features is two and a two-dimensional feature space is used as an example, but the number of dimensions of the feature space can change depending on the number of features.
[0093] [Feature activation level] Furthermore, the adjustment unit 250 changes the parameters to be updated by the learning unit 240 according to the activation level of a feature related to a task during learning by the learning unit 240. The activation level is the degree to which a feature is utilized (activated). Information regarding whether a feature is activated or not can be appropriately extracted from the feature extraction unit 220. The activation level can change during the learning process. The adjustment unit 250 can dynamically change the parameters according to changes in the activation level.
[0094] For example, suppose that 100 features are set for each of Task 1 and Task 2, 50 of which are actually utilized (activated) in Task 1, and 60 of which are activated in Task 2. In this case, the activation level for Task 1 is 50%, and the activation level for Task 2 is 60%. Tasks with low activation levels are considered to have biased learning.
[0095] In this embodiment, since the learning of task 1 is biased compared to the learning of task 2, the learning unit 240 can be configured to learn task 1 before task 2. By learning a task with a low activation level and biased learning first, the activation of inactivated features progresses, and the estimation accuracy of the trained model improves.
[0096] Conversely, the learning unit 240 may be configured to learn task 2, which has a higher activity level, first. By learning task 2, which has a higher activity level, first, learning progresses more quickly.
[0097] (Selection of a method for changing the parameters of the classifier to be updated by the learning unit 240) The user can set which of the above-mentioned parameter changing methods the adjustment section 250 will use before learning by the learning section 240 or during learning.
[0098] FIG. 12 is a block diagram illustrating a configuration in which the user selects a method for changing the parameters of the classifier to be updated by the learning unit 240.
[0099] The adjustment unit 250 displays at least one candidate method for changing parameters on the display (display unit) of the operation and display unit 130. An operation unit such as a keyboard or a mouse accepts a user's selection from the candidates displayed on the display, and inputs (transmits) information about the selected method to the adjustment unit 250. The adjustment unit 250 determines the method to be used based on the information about the selected method, and changes the parameters of the classifier to be updated by the learning unit 240.
[0100] This allows the user to change the setting for the method of changing parameters depending on the progress of the learning, so that the learning unit 240 can carry out learning effectively.
[0101] (machine learning methods) FIG. 13 is a flowchart illustrating an example of an outline of the processing steps of a machine learning method performed by the machine learning device 100 shown in FIG. 1. The processing of the flowchart shown in the figure is realized by the CPU 111 executing a machine learning program. Machine learning is performed, for example, according to the following procedure. First, the data acquisition unit 210 acquires learning data (step S101). The learning data includes, for example, an input image and a correct answer label for each of tasks 1 to N.
[0102] Next, the learning unit 240 performs machine learning on the learning model (step S202). The learning unit 240 updates the parameters of the feature extraction unit 220 and at least one classifier to learn tasks 1 to N. More specifically, by updating the parameters of the N classifiers in the classification unit 230, the learning model can be multitask trained to simultaneously solve tasks 1 to N. Alternatively, by updating the parameters of any of the classifiers in the classification unit 230, any of tasks 1 to N can be learned.
[0103] Next, the adjustment unit 250 switches the classifier to be learned (step S203). The adjustment unit 250 changes the parameters of the classifier to be updated by the learning unit 240, thereby switching the classifier to be learned by the learning unit 240 from among the multiple classifiers of the classification unit 230. For example, the adjustment unit 250 switches the classifier to be learned by changing the parameters of the classifier to be updated by the learning unit 240 based on prior information about each task before learning by the learning unit 240. Furthermore, the adjustment unit 250 switches the classifier to be learned by changing the parameters of the classifier to be updated by the learning unit 240 based on the structure of the feature extraction unit 220 and the structures of the multiple classifiers. Furthermore, the adjustment unit 250 switches the classifier to be learned by changing the parameters of the classifier to be updated by the learning unit 240 based on intermediate information during feature learning during multi-task learning by the learning unit 240.
[0104] As described above, in the processing of the flowchart shown in FIG. 13, learning data is acquired, a learning model is machine-learned using the learning data, and the parameters of the classifier to be updated by the learning unit 240 are changed, thereby switching the classifier to be learned by the learning unit 240 from among the multiple classifiers.
[0105] The machine learning device 100 and machine learning program of the present embodiment described above provide the following advantages.
[0106] By changing the parameters of the classifier to be updated by the learning unit 240, the learning unit 240 switches the classifier to be learned from among the multiple classifiers, thereby preventing or suppressing the overall progress of learning from being hindered by the learning tendency of a specific task.
[0107] The machine learning device, the machine learning method, and the machine learning program described above are merely examples of the main configurations described in the description of the features of the above-described embodiments, but are not limited to the above configurations and may be modified in various ways within the scope of the claims. Furthermore, configurations that are included in general machine learning devices, etc., are not excluded.
[0108] For example, some steps in the above-described flowcharts may be omitted, other steps may be added, some of the steps may be executed simultaneously, or one step may be divided into multiple steps and executed.
[0109] In the above embodiment, the input data is an image, but data other than an image may be input as input data to process multiple tasks. Examples of input data include text, video, audio, graphics, and colors.
[0110] In the above embodiment, the case where the classifier to be learned is switched between two tasks (task 1 and task 2) has been exemplified, but the same applies to switching between three or more tasks. For example, among three tasks (tasks 1 to 3), the task that performs the most complex processing can be configured to be learned first, followed by the task that performs the second most complex processing.
[0111] Furthermore, the means and methods for performing various processes in the above-described machine learning device can be realized by either a dedicated hardware circuit or a programmed computer. The above program may be provided, for example, by a computer-readable recording medium such as a USB memory or a DVD (Digital Versatile Disc)-ROM, or may be provided online via a network such as the Internet. In this case, the program recorded on the computer-readable recording medium is typically transferred and stored in a storage unit such as a hard disk. The above program may also be provided as standalone application software, or may be incorporated as a function into the software of the machine learning device or other device. [Explanation of symbols]
[0112] 100 Machine Learning Devices, 111 CPUs, 112 RAM, 113 ROMs, 114 Auxiliary storage, 120 Communications Department, 130 Operation display section, 210 Data Acquisition Unit, 220 feature extraction unit, 230 Identification section, 231,232 classifier, 240 Learning Department, 250 Adjustment section.
Claims
1. a data acquisition unit that acquires learning data; a learning unit that uses a learning model including a feature extraction unit that extracts features from the learning data and a plurality of classifiers that perform processing of a plurality of tasks based on the features, and updates parameters of the classifiers to machine-learn the learning model; an adjustment unit that switches a classifier to be learned by the learning unit from among the plurality of classifiers, The adjustment unit switches the classifier to be learned by changing the parameters to be updated by the learning unit based on the structure of the feature extraction unit and the structures of the plurality of classifiers.
2. The machine learning device according to claim 1 , wherein the adjustment unit dynamically changes the parameters in accordance with the number of feature quantities for each task extracted by the feature extraction unit during learning by the learning unit.
3. a data acquisition unit that acquires learning data; a learning unit that uses a learning model including a feature extraction unit that extracts features from the learning data and a plurality of classifiers that perform processing of a plurality of tasks based on the features, and updates parameters of the classifiers to machine-learn the learning model; an adjustment unit that switches a classifier to be learned by the learning unit from among the plurality of classifiers, The adjustment unit switches the classifier to be learned by changing the parameters to be updated by the learning unit based on intermediate information at the time of feature learning during learning by the learning unit.
4. The machine learning device according to claim 3 , wherein the adjustment unit dynamically changes the parameters depending on the magnitude of a loss during learning by the learning unit.
5. The machine learning device according to claim 3 , wherein the adjustment unit dynamically changes the parameters in accordance with a trend of a decrease in loss during learning by the learning unit.
6. The machine learning device according to claim 3 , wherein the adjustment unit dynamically changes the parameters depending on the reliability of a processing result of each of the tasks during learning by the learning unit.
7. The machine learning device according to claim 3 , wherein the adjustment unit dynamically changes the parameters in accordance with a correct answer rate of a processing result of each of the tasks in learning by the learning unit.
8. The machine learning device according to claim 3 , wherein the adjustment unit dynamically changes the parameters according to a degree of separation in a feature space between the classes of the plurality of tasks during learning by the learning unit.
9. The machine learning device according to claim 3 , wherein the adjustment unit dynamically changes the parameters according to a degree of activity of a feature related to the task during learning by the learning unit.
10. a display unit that displays candidate methods for changing the parameters by the adjustment unit; 10. The machine learning device according to claim 1, further comprising: an operation unit that accepts a user's selection from the candidates displayed on the display unit and inputs information about the selected method to the adjustment unit.
11. a data acquisition unit that acquires learning data; a learning unit that uses a learning model including a feature extraction unit that extracts features from the learning data and a plurality of classifiers that perform processing of a plurality of tasks based on the features, and updates parameters of the classifiers to machine-learn the learning model; an adjustment unit that switches a classifier to be learned by the learning unit from among the plurality of classifiers; a display unit that displays candidate methods for changing the parameters by the adjustment unit; an operation unit that accepts a user's selection from the candidates displayed on the display unit and inputs information about the selected method to the adjustment unit.
12. The machine learning device described in Claim 11, wherein the adjustment unit determines which of multiple methods for changing the parameters of the classifier to use based on information about the selected method, and switches the classifier to be learned by changing the parameters to be updated by the learning unit.
13. The machine learning device according to claim 12 , wherein the adjustment unit changes the parameters depending on the type of task processed by each of the classifiers.
14. The machine learning device according to claim 12 , wherein the adjustment unit changes the parameters depending on the number of classes classified by each of the classifiers.
15. The machine learning device according to claim 12 , wherein the adjustment unit changes the parameters according to the number of pieces of data related to a task processed by each of the classifiers.
16. The machine learning device according to claim 12 , wherein the adjustment unit changes the parameter according to a degree of balance between the numbers of data sets classified by each of the classifiers.
17. (a) acquiring training data; a step (b) of performing machine learning on the learning model by updating parameters of the classifiers using a learning model including a feature extraction unit that extracts features from the learning data and a plurality of classifiers that perform processing of a plurality of tasks, respectively, based on the features; and (c) switching a classifier to be trained from among the plurality of classifiers; In the step (c), the machine learning program causes a computer to execute a process of switching the classifier to be learned by changing the parameters to be updated based on the structure of the feature extraction unit and the structures of the plurality of classifiers.
18. (a) acquiring training data; a step (b) of performing machine learning on the learning model by updating parameters of the classifiers using a learning model including a feature extraction unit that extracts features from the learning data and a plurality of classifiers that perform processing of a plurality of tasks, respectively, based on the features; and (c) switching a classifier to be trained from among the plurality of classifiers; In the step (c), the parameter to be updated is changed based on intermediate information at the time of feature learning during the learning in the step (b), thereby switching the classifier to be learned.
Citation Information
Patent Citations
Estimation device, estimation method, and estimation program
JP2017146279A
Information processing apparatus, information processing method, and program
JP2019192009A
Meta-learning for multitask learning of neural networks
JP2021503122A
Estimation device, estimation method, and non-transitory computer readable storage medium
US20170241786A1
Learning device, signal processing device, and learning method
WO2018047225A1