Machine learning device, machine learning method, and machine learning program

By sharing duplicate filters between tasks based on weight similarity, the machine learning device addresses filter saturation, enhancing the model's ability to learn multiple tasks without saturation.

JP7600692B2Active Publication Date: 2024-12-17JVC KENWOOD CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2021003241
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-01-13
Publication Date
2024-12-17
Estimated Expiration
2041-01-13

AI Technical Summary

Technical Problem

Existing continuous learning methods like PackNet face filter saturation issues, limiting the number of tasks that can be learned due to the limited number of filters in the model.

Method used

A machine learning device and method that identifies and shares duplicate filters between tasks by comparing weight similarities, initializing and excluding filters with high similarity from the learning target of the current task, thereby increasing the number of tasks that can be learned.

Benefits of technology

This approach alleviates filter saturation, allowing the model to learn more tasks efficiently by reusing filters with similar weights, thus extending its learning capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007600692000002
    Figure 0007600692000002
  • Figure 0007600692000003
    Figure 0007600692000003
  • Figure 0007600692000004
    Figure 0007600692000004
Patent Text Reader

Abstract

To provide a machine learning technique capable of alleviating saturation of filters.SOLUTION: A weight storage unit 50 stores weights of a plurality of filters used for feature detection of a task. A continuous learning unit 20 continuously learns the weights of the plurality of filters to an input task. A filter control unit 40 compares the weight of the filter which finishes learning of the task with the weight of the filter which is during the learning of the task, after continuous learning of a predetermined number of epochs, extracts the filters, which overlap and have the weights whose similarities are a threshold level or more, as shared filters between the tasks, keeps one filter of the overlapping filters as the shared filter, and initializes the weights of the filters other than the shared filter.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to machine learning techniques. [Background technology]

[0002] Humans can learn new knowledge through long-term experience and can retain old knowledge without forgetting it. On the other hand, the knowledge of a Convolutional Neural Network (CNN) depends on the dataset used for training, and in order to adapt to changes in the data distribution, the parameters of the CNN must be retrained for the entire dataset. As CNN learns new tasks, its estimation accuracy for old tasks decreases. Thus, when CNN performs continuous training, it is inevitable that it will suffer from catastrophic forgetting, in which the learning results of old tasks are forgotten while learning a new task.

[0003] Incremental learning or continual learning has been proposed as a method to avoid fatal forgetting. PackNet is one of the continual learning methods.

[0004] Patent Document 1 discloses a learning device that allows two or more learning modules to share model parameters updated by a plurality of learning modules. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] JP 2010-20446 A Summary of the Invention [Problem to be solved by the invention]

[0006] PackNet, one of the continuous learning methods, can avoid the fatal forgetting problem. However, PackNet has a problem that the number of filters in the model is limited, and when learning a new task, the filters become saturated, limiting the number of tasks that can be learned.

[0007] The present invention has been made in view of the above circumstances, and has an object to provide a machine learning technique that can alleviate filter saturation. [Means for solving the problem]

[0008] In order to solve the above problem, a machine learning device of one embodiment of the present invention includes a weight memory unit that stores weights of multiple filters used to detect features of a task, a continuous learning unit that continuously learns the weights of the multiple filters for an input task, and a filter control unit that, after a predetermined number of epochs of the continuous learning, compares the weights of filters that have learned the task with the weights of filters that are currently learning the task, and extracts overlapping filters whose weight similarity is equal to or greater than a predetermined threshold as shared filters between tasks.

[0009] Another aspect of the present invention is a machine learning method, which includes a continuous learning step of continuously learning weights of a plurality of filters used for detecting features of an input task, and a step of comparing weights of the filters that have already learned the task with weights of the filters currently being learned after a predetermined number of epochs of the continuous learning, and extracting overlapping filters whose weight similarity is equal to or greater than a predetermined threshold as shared filters between the tasks.

[0010] Any combination of the above components, and any transformation of the present invention into a method, device, system, recording medium, computer program, etc., are also effective as aspects of the present invention. Effect of the Invention

[0011] According to the present invention, it is possible to provide a machine learning technique that can alleviate filter saturation. [Brief description of the drawings]

[0012] [Figure 1] 1(a) to 1(e) are diagrams for explaining continuous learning, which is a prerequisite technology. [Diagram 2] FIG. 1 is a configuration diagram of a machine learning device according to an embodiment. [Diagram 3] 3(a) to 3(e) are diagrams for explaining continuous learning by the machine learning device of FIG. [Figure 4] 3 is a diagram illustrating the operation of a filter control unit of the machine learning device in FIG. 2. [Diagram 5] 3 is a flowchart illustrating a continuous learning procedure by the machine learning device of FIG. 2. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] Figures 1(a) to 1(e) are diagrams explaining continuous learning using PackNet, the underlying technology. In PackNet, the weights of multiple filters in a model are learned for a given task. Here, multiple filters in each layer of a convolutional neural network are illustrated as being arranged in a lattice pattern.

[0014] The PackNet training process consists of the following steps (A) to (E).

[0015] (A) The model learns task 1. Figure 1(a) shows the initial state of the filters after training task 1. All filters have been trained on task 1 and are shown in black.

[0016] (B) The filters are arranged in descending order of weight value, and 60% of the filters are initialized, starting with the filters with the smallest weight value. Figure 1(b) shows the final state of the filters after learning for Task 1. Initialized filters are shown in white.

[0017] (C) Next, task 2 is learned. In this step, the weight values ​​of the black filters in Fig. 1(b) are locked, and only the white filters can change their weight values. Fig. 1(c) shows the initial state of the filters after learning task 2. All of the white filters in Fig. 1(b) have learned task 2, and are shown with diagonal lines in Fig. 1(c).

[0018] (D) As in step (B), the shaded filters that have been trained for Task 2 are sorted in descending order of weight value, and 60% of the filters are initialized, starting with the filters with the smallest weight value. Figure 1(d) shows the final state of the filters after training for Task 2. The initialized filters are shown in white.

[0019] (E) Further, task 3 is trained. In this step, the weight values ​​of the black and shaded filters in Fig. 1(d) are locked, and only the white filters can change their weight values. Fig. 1(e) shows the initial state of the filters after training task 3. All of the white filters in Fig. 1(d) have trained task 3, and are shown with horizontal stripes in Fig. 1(e).

[0020] Thus, according to the PackNet learning process, if we continue learning up to task N, the number of initialized white filters will become smaller and smaller until it saturates. When the filters saturate, they will no longer be able to learn new tasks.

[0021] It is impossible to avoid that the filters of PackNet will eventually become saturated. However, it is possible to slow down the speed at which the filters become saturated. Therefore, in this embodiment, in the process of learning the current task, overlapping filters with high weight similarity are extracted as shared filters between tasks, one filter among the overlapping filters is left as a shared filter, and the weights of the filters other than the shared filter are initialized to 0 and are excluded from the learning target of the current task. This makes it possible to increase the number of filters that can be learned in a new task, slow down the saturation speed of the filters, and increase the number of tasks that can be learned.

[0022] 2 is a configuration diagram of a machine learning device 100 according to an embodiment. The machine learning device 100 includes an input unit 10, a continuous learning unit 20, a filter processing unit 30, a filter control unit 40, a weight storage unit 50, an inference unit 60, and an output unit 70.

[0023] An input unit 10 supplies supervised tasks to a continuous learning unit 20 and unknown tasks to an inference unit 60. Here, as an example, the tasks are image recognition. For example, task 1 is recognizing a specific object in an image, such as recognizing a cat, and task 2 is recognizing a dog.

[0024] The weight storage unit 50 stores weights of a plurality of filters used for detecting the features of a task. By passing an image through a number of filters, the features of the image can be captured.

[0025] The continuous learning unit 20 continuously learns the weights of the multiple filters in the weight storage unit 50 for the input supervised task, and stores the updated filter weights in the weight storage unit 50.

[0026] After the continuous learning unit 20 has learned the current task for a predetermined number of epochs, the filter control unit 40 compares the weights of the multiple filters currently learning the current task with the weights of the multiple filters after learning past tasks, and extracts overlapping filters whose weight similarity is equal to or greater than a predetermined threshold as shared filters between tasks. Since the model is a multi-layer convolutional neural network, the similarity of the weights of the multiple filters is calculated in each layer. The filter control unit 40 leaves one filter out of the overlapping filters as a shared filter, initializes the weights of the filters other than the shared filter, and stores them in the weight storage unit 50. The overlapping filters whose weights have been initialized are excluded from the learning targets of the current task, and are used as learning targets for the next task.

[0027] Here, the predetermined number of epochs is, for example, 10. It is desirable for the filter control unit 40 to initialize similar filters after the learning has stabilized to a certain extent. The number of times and the time until the learning has stabilized differ depending on the task. For this reason, it is desirable to adjust the number of epochs based on the relationship between loss and accuracy. Here, loss is the error between the output value by the neural network and the correct answer given by the teacher data, and accuracy is the rate at which the output value by the neural network is correct.

[0028] For example, the stability of learning is determined using any of the following conditions, and the specified number of epochs is adjusted. (1) The loss is below a certain level (for example, below 0.75). (2) The accuracy is above a certain level (for example, 0.75 or higher). (3) Both conditions (1) and (2) above are met.

[0029] The filter processing unit 30 locks the weights of a predetermined percentage of the filters after learning one task so as not to use them in learning another task, and initializes the weights of the remaining filters to use them in learning another task. For example, the filters are arranged in descending order of weight, the weights of 40% of the filters from the largest weight are locked, and the weights of the remaining 60% of the filters are initialized to use them in learning another task.

[0030] The continuous learning unit 20 continuously learns the initialized weights of the filters for new tasks.

[0031] The inference unit 60 performs inference on the input unknown task using the filter weights stored in the weight storage unit 50. The output unit 70 outputs the inference result by the inference unit 60.

[0032] Figures 3(a) to 3(e) are diagrams explaining continuous learning by the machine learning device 100 of Figure 2. A plurality of filters in each layer of a convolutional neural network are illustrated arranged in a lattice pattern, and (i, j) indicates the filter in the i-th row and j-th column.

[0033] The learning process of the machine learning device 100 proceeds through the following steps (A) to (E).

[0034] (A) The model learns task 1. Figure 3(a) shows the initial state of the filters after learning task 1. All filters have been trained on task 1 and are shown in black.

[0035] (B) The filters are arranged in descending order of weight value, and 60% of the filters are initialized, starting with the smallest weight value. Figure 3(b) shows the final state of the filters after learning for Task 1. Initialized filters are shown in white.

[0036] (C) Next, task 2 is learned. In this step, the weight values ​​of the black filters in FIG. 3(b) are locked, and only the white filters can change the weight values. In the learning process of task 2, if the filter used in task 2 is similar to the filter (black) that has learned task 1, the filter control unit 40 initializes the filter and controls it to be excluded from the learning target of task 2. FIG. 3(c) shows the initial state of the filter after learning of task 2. Among the filters shown in white in FIG. 3(b), the filters that have learned task 2 are shown with diagonal lines in FIG. 3(c). Among the filters shown in white in FIG. 3(b), the filters that have been initialized in the learning process of task 2 and excluded from the learning target are shown in white in FIG. 3(c). Here, the (1,1) filter and the (1,5) filter are initialized in the learning process of task 2 and can be used in new tasks thereafter.

[0037] (D) As in step (B), the shaded filters that have been trained for Task 2 are sorted in descending order of weight value, and 60% of the filters are initialized, starting with the smallest weight value. Figure 3(d) shows the final state of the filters after training for Task 2. The initialized filters are shown in white.

[0038] (E) Furthermore, task 3 is learned. In this step, the weight values ​​of the black and diagonal line filters in FIG. 3(d) are locked, and only the white filters can change the weight values. In the learning process of task 3, if the filter used in task 3 is similar to the filter (black) that has learned task 1 or the filter (diagonal line) that has learned task 2, the filter control unit 40 initializes the filter and controls it to be excluded from the learning target of task 3. FIG. 3(e) shows the initial state of the filter after learning of task 3. Among the filters shown in white in FIG. 3(d), the filter that has learned task 3 is shown with horizontal stripes in FIG. 3(e). Among the filters shown in white in FIG. 3(d), the filter that has been initialized in the learning process of task 3 and excluded from the learning target is shown in white in FIG. 3(e). Here, the (1,1) filter, the (1,5) filter, and the (2,2) filter are initialized in the learning process of task 3 and are available for use in new tasks thereafter.

[0039] By performing a similar learning process up to task N, it is possible to eliminate filter overlap between tasks during the learning process, alleviate filter saturation, and increase the number of tasks that can be learned.

[0040] FIG. 4 is a diagram illustrating the operation of the filter control unit 40 of the machine learning device 100 of FIG.

[0041] When learning the filter weights in backpropagation, a supervised learning method for neural networks, the filter control unit 40 compares the filter weights of a task currently being learned and which has been learned for a predetermined number of epochs with the filter weights of learned tasks, and if they are similar, initializes the filter weights of the task currently being learned and excludes it from the learning targets of the current task.

[0042] Since the model has multiple layers, the comparison is performed within each layer. For example, there are 128 filters in one layer. Among them, 51 filters have been trained for task 1, 30 filters are being trained for task 2, and the remaining filters are initialized. Then, the similarity between the 51 filters for task 1 and the 30 filters for task 2 is calculated.

[0043] The similarity is calculated by comparing the absolute values ​​of the filter weights. For example, in the case of a 3x3 filter, the absolute values ​​of the nine weights are compared. A threshold is set here. If the similarity exceeds the threshold, the two filters are determined to be overlapping, and the filter weight for task 2 is initialized to 0 and excluded from subsequent learning targets for task 2.

[0044] Each element of filter A is a ij , each element of filter B is b ij In this case, the absolute difference between the values ​​at the same position between two filters A and B is expressed as d1(A,B), d2(A,B), and d ∞ (A,B), d m Calculate as (A,B).

number

[0045] In the above description, the similarity of filters is calculated by calculating the difference in absolute values ​​of values ​​at the same position between two filters, but the similarity may be calculated by other methods. For example, for each filter, the filter absolute difference sum SAD is calculated as the sum of the horizontal absolute difference sum SAD_H and the vertical absolute difference sum SAD_V, and SAD=SAD_H+SAD_V is calculated. If the difference between the filter absolute difference sum SAD_A of filter A and the filter absolute difference sum SAD_B of filter B is smaller than a threshold value, it may be determined that filter A and filter B overlap. Here, if the elements of the first row of a 3×3 filter are a1, a2, a3, the elements of the second row are a4, a5, a6, and the elements of the third row are a7, a8, a9, the horizontal absolute difference sum SAD_H and the vertical absolute difference sum SAD_V are given by the following equations. SAD_H=|a1-a2|+|a2-a3|+|a4-a5|+|a5-a6|+|a7-a8|+|a8-a9| SAD_V=|a1-a4|+|a2-a5|+|a3-a6|+|a4-a7|+|a5-a8|+|a6-a9| As another method for calculating the similarity, a comparison of Euclidean distance or cosine distance may be used.

[0046] If the similarity of the filter weights is high, it means that the filters have the same or no difference in features between tasks, and there is no need to retain duplicate filters. Therefore, one of the filters is initialized and used for learning another task. Note that here, we have explained that the weight is one element in the filter, or one cell in the matrix in the case of the 3x3 filter in Figure 4, but it is also possible to consider the weight on a filter-by-filter basis, that is, on a matrix-by-matrix basis.

[0047] More generally, to maximize the performance of task N, if there are overlapping filters between the trained task N and the training task N+1, we initialize the filter weights of the training task N+1 to 0. This allows us to maximize the use of the limited number of filters.

[0048] FIG. 5 is a flowchart illustrating a continuous learning procedure by the machine learning device 100 of FIG.

[0049] The input unit 10 inputs the current supervised task to the continuous learning unit 20 (S10).

[0050] The continuous learning unit 20 continuously learns the weights of a plurality of filters for the current task for a predetermined number of epochs (S20).

[0051] The filter control unit 40 compares the filter that is learning the current task with the filter that has already learned the past task, and calculates the similarity of the weights (S30).

[0052] The filter control unit 40 initializes a filter being learned for a current task that has a high similarity to a learned filter for a past task (S40).

[0053] When the learning of the current task is completed (Y of S50), the process proceeds to step S60, and if the learning of the current task is to be continued (N of S50), the process returns to step S20.

[0054] The filter processing unit 30 initializes a predetermined ratio of the filters that have learned the current task in ascending order of weighting (S60).

[0055] If there are still tasks, the process returns to step S10 and the next task is input (N in S70). If there is no next task, the continuous learning is ended (Y in S70).

[0056] The various processes of the machine learning device 100 described above can be realized not only as a device using hardware such as a CPU and a memory, but also as firmware stored in a ROM (read-only memory) or a flash memory, or as software for a computer, etc. The firmware program or software program can be provided by recording it on a recording medium readable by a computer, etc., or can be transmitted and received with a server via a wired or wireless network, or can be transmitted and received as a data broadcast of terrestrial or satellite digital broadcasting.

[0057] As described above, according to the machine learning device 100 of this embodiment, it is possible to alleviate the saturation speed of the filter of the continuous learning model and to efficiently use the filter to learn more tasks.

[0058] The present invention has been described above based on the embodiments. The embodiments are merely examples, and it will be understood by those skilled in the art that various modifications are possible in the combination of each component and each treatment process, and that such modifications are also within the scope of the present invention. [Explanation of symbols]

[0059] 10 input unit, 20 continuous learning unit, 30 filter processing unit, 40 filter control unit, 50 weight storage unit, 60 inference unit, 70 output unit, 100 machine learning device.

Claims

1. a weight storage unit that stores weights of a plurality of filters used for detecting features of a task; a continuous learning unit that continuously learns weights of the plurality of filters for an input task; After a certain number of epochs of continuous training, the task is assigned to the trained filter weights and the task. The weights of the filters being trained are compared, and duplicate filters whose weight similarity is equal to or greater than a given threshold are selected. a filter control unit for extracting a filter as a shared filter between tasks; The filter control unit determines one of the overlapping filters as the shared filter. and initializing weights of filters other than the shared filter. Learning device.

2. The continuous learning unit is configured to detect an initialization state of a filter other than the shared filter for another task. The machine learning device according to claim 1, further comprising: a weighting factor determining unit that determines whether the weighting factor is greater than the threshold value.

3. The predetermined number of epochs is the error between the output value of the learning model and the correct answer given by the training data. The condition also applies to the rate of change in loss or the rate of change in accuracy, which is the correct answer rate of the learning model's output value. The machine learning device according to claim 1 or 2, characterized in that the machine learning device is determined based on the following:

4. For an input task, the weights of multiple filters used to detect the task features are successively calculated. A continuation learning step for continuing learning; After a certain number of epochs of continuous training, the task is assigned to the trained filter weights and the task. The weights of the filters being trained are compared, and duplicate filters whose weight similarity is equal to or greater than a given threshold are selected. A filter control step of extracting a common filter between tasks, The filter control step is a step of controlling one of the overlapping filters to be the shared filter. and initialize weights of the filters other than the shared filter. Machine learning methods.

5. For an input task, the weights of multiple filters used to detect the task features are successively calculated. A continuation learning step for continuing learning; After a certain number of epochs of continuous training, the task is assigned to the trained filter weights and the task. The weights of the filters being trained are compared, and duplicate filters whose weight similarity is equal to or greater than a given threshold are selected. A filter control step of extracting a common filter between tasks, the filter control step being executed by a computer. height, The filter control step is a step of controlling one of the overlapping filters to be the shared filter. and initialize weights of the filters other than the shared filter. Machine learning programs.

Citation Information

Patent Citations

  • Learning device, learning method, and program

    JP2010020446A

  • Neural network learning device

    JP2017037392A

  • Information processing apparatus, information processing method and program

    JP2018055259A