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

By extracting filters with high weight similarity from the convolutional neural network as shared filters and initializing their weights, the filter saturation problem is solved, the number of learnable tasks is increased, and the learning efficiency is improved.

CN116806341BActive Publication Date: 2026-05-01JVC KENWOOD CORP
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JVC KENWOOD CORP
Filing Date
2021-12-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In convolutional neural networks, the saturation problem caused by the limited number of filters restricts the number of learnable tasks and makes it impossible to effectively learn new tasks.

Method used

By extracting repeated filters with high weight similarity as shared filters among tasks and initializing their weights to 0, the filter saturation rate is slowed down, and the number of learnable tasks is increased.

Benefits of technology

It effectively slowed down the filter saturation rate, increased the number of learnable tasks, and improved the model's learning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116806341B_ABST
    Figure CN116806341B_ABST
Patent Text Reader

Abstract

The weight storage section (50) stores weights of a plurality of filters used for feature detection of a task. The continual learning section (20) continually learns the weights of the plurality of filters with respect to an input task. The filter control section (40) compares the weights of the filters of a learned task with the weights of the filters of a task being learned after a predetermined number of rounds of continual learning, and extracts a repeated filter having a weight similarity of a predetermined threshold or more as a shared filter between tasks, retains one of the repeated filters as the shared filter, and initializes the weights of the filters other than the shared filter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to machine learning technology. Background Technology

[0002] Humans can learn new knowledge through long-term experience and retain old knowledge. On the other hand, the knowledge of a Convolutional Neural Network (CNN) depends on the dataset used for learning. To adapt to changes in data distribution, the CNN parameters need to be relearned on the entire dataset. In CNNs, as new tasks are learned, the estimation accuracy for past tasks decreases. Thus, in CNNs, catastrophic forgetting is unavoidable during continuous learning; that is, the learning results of old tasks are forgotten while learning new tasks.

[0003] As a method to avoid catastrophic forgetting, continuous learning (incremental learning or continuous learning) has been proposed. PackNet is one such method.

[0004] Patent document 1 discloses a learning device that enables two or more learning modules to share model parameters updated by multiple learning modules.

[0005] Existing technical documents

[0006] Patent documents

[0007] Patent document 1: Japanese Patent Application Publication No. 2010-20446. Summary of the Invention

[0008] PackNet, as a method of continuous learning, can avoid the catastrophic forgetting problem. However, PackNet has the following problem: the number of filters in the model is limited, and when learning new tasks, the number of tasks that can be learned is limited due to filter saturation.

[0009] This invention was made in view of the following circumstances, and its object is to provide a machine learning technique that can mitigate filter saturation.

[0010] To address the aforementioned issues, one embodiment of the machine learning apparatus includes: a weight storage unit for storing weights of a plurality of filters used for feature detection of a task; a continuous learning unit for continuously learning the weights of the plurality of filters for an input task; and a filter control unit that, after a predetermined number of rounds of continuous learning, compares the weights of the filters for the learned task with the weights of the filters for the currently learned task, and extracts repeated filters with a weight similarity of more than a predetermined threshold as shared filters between tasks.

[0011] Another approach to this embodiment is a machine learning method. This method includes: a continuous learning step, for an input task, continuously learning the weights of multiple filters used for feature detection in the task; and after a predetermined number of rounds of continuous learning, comparing the weights of the learned task's filters with the weights of the currently being learned task's filters, and extracting repeated filters with a weight similarity greater than a predetermined threshold as shared filters between tasks.

[0012] Furthermore, any combination of the above-mentioned constituent elements, and any conversion of the description of the present invention between methods, apparatus, systems, recording media, computer programs, etc., are also valid as embodiments of the present invention.

[0013] According to this embodiment, a machine learning technique that can mitigate filter saturation can be provided. Attached Figure Description

[0014] Figure 1 (a) to Figure 1 (e) is a diagram illustrating continuous learning as a prerequisite technology.

[0015] Figure 2 This is a configuration diagram of the machine learning device involved in the implementation method.

[0016] Figure 3 (a) to Figure 3 (e) is an explanation of the meaning of the sentence. Figure 2 A graph showing the continuous learning performed by the machine learning device.

[0017] Figure 4 This is an explanation Figure 2 A diagram showing the operation of the filter control unit of the machine learning device.

[0018] Figure 5 This is an explanation of the reason. Figure 2 A flowchart of the continuous learning process performed by the machine learning device. Detailed Implementation

[0019] Figure 1 (a) to Figure 1(e) is a diagram illustrating continuous learning based on PackNet as a prerequisite technology. In PackNet, the weights of multiple filters in the model are learned for a given task. Here, the multiple filters of each layer of the convolutional neural network are illustrated in a grid arrangement.

[0020] The PackNet learning process proceeds through the following steps (A) to (E).

[0021] (A) Model learning task 1. Figure 1 (a) shows the initial state of the filters after learning Task 1. All filters have completed learning Task 1, and their color is shown in black.

[0022] (B) Arrange the filters in descending order of their weight values, and initialize the values ​​of 60% of the filters in sequence, starting with the filter with the smallest weight value. Figure 1 (b) shows the final state of the filter after learning task 1. The initialized filter is shown in white.

[0023] (C) Next, learn Task 2. In this step, Figure 1 In (b), the weight value of the black filter is locked, and only the weight value of the white filter can be changed. Figure 1 (c) shows the initial state of the filter after learning task 2. Figure 1 All filters shown in white in (b) complete the learning of Task 2, and Figure 1 (c) is indicated by a slash.

[0024] (D) Similar to step (B), arrange the filters in descending order of their weight values ​​according to the slashes after learning Task 2, and initialize the values ​​of 60% of the filters in order, starting with the filters with the smallest weight values. Figure 1 (d) shows the final state of the filter after learning task 2. The initialized filter is shown in white.

[0025] (E) Further learning task 3. In this step, Figure 1 In (d), the weight values ​​of the black filter and the diagonal filter are locked, and only the weight value of the white filter can be changed. Figure 1 (e) shows the initial state of the filter after learning task 3. Figure 1 All filters shown in white in (d) have completed the learning of Task 3 and... Figure 1 (e) is shown as horizontal stripes.

[0026] Thus, according to PackNet's learning process, if task N is learned directly, the number of initial white filters will gradually decrease and eventually saturate. Once the filters are saturated, new tasks cannot be learned.

[0027] PackNet filters will inevitably saturate eventually. However, the rate of saturation can be slowed down. Therefore, in this embodiment, during the learning of the current task, repeated filters with high weight similarity are extracted as shared filters between tasks, and one of the repeated filters is retained as a shared filter. The weights of all filters other than the shared filter are initialized to 0 and removed from the learning objects of the current task. This increases the number of filters that can be learned in new tasks, slows down the rate of filter saturation, and increases the number of learnable tasks.

[0028] Figure 2 This is a configuration diagram of the machine learning apparatus 100 according to this embodiment. The machine learning apparatus 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.

[0029] The input unit 10 provides supervised tasks to the continuous learning unit 20 and unknown tasks to the inference unit 60. Here, as an example, the task is image recognition. For example, task 1 is recognizing cats, and task 2 is recognizing specific objects in images such as dogs.

[0030] The weight storage unit 50 stores the weights of multiple filters used for feature detection in the task. The image is passed through these multiple filters, thereby enabling the capture of the image's features.

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

[0032] 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 multiple filters learning the current task with the weights of multiple filters learned from past tasks, and extracts repeated filters with a weight similarity of more 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 multiple filters is calculated in each layer. The filter control unit 40 retains one of the repeated filters as a shared filter, initializes the weights of the filters other than the shared filter, and saves them to the weight storage unit 50. The repeated filters with initialized weights are excluded from the learning objects of the current task and used as learning objects for the next task.

[0033] Here, the predetermined number of rounds is, for example, 10. Preferably, after the learning has stabilized to a certain extent, the filter control unit 40 initializes similar filters. The number of rounds and the time until the learning stabilizes vary depending on the task. Therefore, it is preferable to adjust the number of rounds based on the relationship between loss and accuracy. Here, loss is the error between the output value of the neural network and the correct answer given by the training data, and accuracy is the correctness of the output value of the neural network.

[0034] For example, use one of the following conditions to determine that the learning is stable and adjust the predetermined number of rounds.

[0035] (1) The loss is below a certain value (e.g., below 0.75).

[0036] (2) The accuracy is above a certain value (e.g., above 0.75).

[0037] (3) Satisfying the above two conditions (1) and (2)

[0038] The filter processing unit 30 locks the weights of a predetermined proportion of filters among multiple filters after learning one task, so that they are not used for learning other tasks. For the other filters, the weights are initialized for use in learning other tasks. For example, the filters are arranged in descending order of their weights, the weights of the first 40% of the filters with the largest weights are locked, and the weights of the remaining 60% of the filters are initialized for use in learning other tasks.

[0039] The Continuous Learning Department 20 continuously learns the weights of the filter after initialization for new tasks.

[0040] The inference unit 60 uses the weights of the filters stored in the weight storage unit 50 to infer the unknown input task. The output unit 70 outputs the inference result of the inference unit 60.

[0041] Figure 3 (a) to Figure 3 (e) is an explanation based on Figure 2 A diagram illustrating the continuous learning of the machine learning device 100. Multiple filters in each layer of the convolutional neural network are arranged in a grid pattern, as shown in the diagram. (i, j) refers to the filter in the i-th row and j-th column.

[0042] The learning process of the machine learning device 100 is carried out in the following steps (A) to (E).

[0043] (A) Model learning task 1. Figure 3 (a) shows the initial state of the filters after learning Task 1. All filters have completed learning Task 1, and their color is shown in black.

[0044] (B) Arrange the filters in descending order of their weight values, and initialize the values ​​of 60% of the filters in sequence, starting with the filter with the smallest weight value. Figure 3 (b) shows the final state of the filter after learning task 1. The initialized filter is shown in white.

[0045] (C) Next, learn Task 2. In this step, Figure 3 In (b), the weight value of the black filter is locked, and only the white filter can change its weight value. During the learning process of Task 2, the filter control unit 40 performs the following control: when the filter used in Task 2 is similar to the filter (black) used to complete the learning of Task 1, the filter is initialized and excluded from the learning objects of Task 2. Figure 3 (c) shows the initial state of the filter after learning task 2. Figure 3 The filter shown in white in (b) is the filter for completing the learning of Task 2. Figure 3 (c) is shown with a slash. Figure 3 (b) The filters shown in white are those initialized during the learning process of Task 2 and excluded from the learning objects. Figure 3 In (c), it is shown in white. Here, the (1,1) filter and the (1,5) filter are initialized during the learning process of Task 2 and can be used in subsequent new tasks.

[0046] (D) Similar to step (B), arrange the filters in descending order of their weight values ​​according to the diagonal filters learned in Task 2, and initialize the values ​​of 60% of the filters in order, starting with the filters with the smallest weight values. Figure 3 (d) shows the final state of the filter after learning task 2. The initialized filter is shown in white.

[0047] (E) Next, learn task 3. In this step, lock... Figure 3 The weight values ​​of the black filter and the diagonal filter (d) are changed, but only the weight value of the white filter can be changed. During the learning process of Task 3, the filter control unit 40 performs the following control: if the filter used in Task 3 is similar to the filter (black) used to complete the learning of Task 1 or the filter (diagonal) used to complete the learning of Task 2, the filter is initialized and excluded from the learning objects of Task 3. Figure 3 (e) shows the initial state of the filter after learning task 3. Figure 3 The filters shown in white in (d) are those that have completed the learning of Task 3. Figure 3 (e) is shown as horizontal stripes. Figure 3The filters shown in white in (d) are those initialized during the learning process of Task 3 and excluded from the learning objects. Figure 3 In (e), it is shown in white. Here, the (1,1) filter, (1,5) filter, and (2,2) filter are initialized during the learning process of Task 3 and can be used in subsequent new tasks.

[0048] Then, by performing the same learning process until task N, it is possible to eliminate the duplication of filters between tasks during the learning process, slow down filter saturation, and increase the number of learnable tasks.

[0049] Figure 4 This is an explanation Figure 2 A diagram showing the operation of the filter control unit 40 of the machine learning device 100.

[0050] When learning filter weights in the backpropagation (error backpropagation) of a supervised learning method for neural networks, the filter control unit 40 compares the filter weights of the learning task that has completed a predetermined number of rounds in the current learning with the weights of the filter that has completed the learning task. If they are similar, the filter weights of the task in the current learning are initialized and excluded from the learning objects of the current task.

[0051] Since the model has multiple layers, comparisons are made within each layer. For example, a layer has 128 filters. Given that 51 filters were learned for Task 1, 30 filters were learned for Task 2, and the remaining filters have been initialized, the similarity between the 51 filters for Task 1 and the 30 filters for Task 2 is calculated.

[0052] 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. Here, a threshold is set. When the similarity exceeds the threshold, the two filters are considered duplicates, the weights of the filter for Task 2 are initialized to 0, and it is excluded from the learning objects of subsequent Task 2 tasks.

[0053] When each element of filter A is set to a ij Set each element of filter B to b. ij In cases such as d1(A, B), d2(A, B), d ∞ (A, B), d m In the case of (A, B), calculate the difference in absolute values ​​of the values ​​at the same position between the two filters A and B.

[0054] [Mathematical Expression 1]

[0055]

[0056]

[0057]

[0058]

[0059] In the above explanation, filter similarity is calculated by the difference in the absolute values ​​of values ​​at the same position between two filters. However, similarity can also be calculated using other methods. For example, for each filter, the filter difference absolute value SAD is set as the sum of the horizontal difference absolute value SAD_H and the vertical difference absolute value SAD_V, and is calculated using SAD = SAD_H + SAD_V. If the difference between the filter difference absolute value SAD_A of filter A and the filter difference absolute value SAD_B of filter B is less than a threshold, then filter A and filter B can be considered duplicates. Here, when the first row elements of a 3×3 filter are set to a1, a2, a3, the second row elements are set to a4, a5, a6, and the third row elements are set to a7, a8, a9, the horizontal difference absolute value SAD_H and the vertical difference absolute value SAD_V are given by the following formula.

[0060] SAD_H=|a1-a2|+|a2-a3|+|a4-a5|+|a5-a6|+|a7-a8|+|a8-a9|

[0061] SAD_V=|a1-a4|+|a2-a5|+|a3-a6|+|a4-a7|+|a5-a8|+|a6-a9|

[0062] Alternatively, Euclidean distance and cosine distance can be used as other methods for calculating similarity.

[0063] If the weights of a filter have high similarity, then the filter has the same or no difference in features across tasks, and there is no need to maintain duplicate filters. Therefore, one filter is initialized and used for learning other tasks. Furthermore, here the weights are described as an element in the filter, in... Figure 4 In the case of a 3×3 filter, it is a unit in the matrix, but the weights can be obtained on a filter-by-filter basis, i.e., on a matrix-by-matrix basis.

[0064] More generally, to maximize the performance of task N, if there are duplicate filters between task N (which has completed learning) and task N+1 (which is currently learning), the weights of the filters for task N+1 (which is currently learning) are initialized to 0. This allows for the maximum utilization of a finite number of filters.

[0065] Figure 5This is an explanation based on Figure 2 A flowchart of the continuous learning steps of the machine learning device 100.

[0066] Input unit 10 inputs the current supervised task into continuous learning unit 20 (S10).

[0067] The continuous learning unit 20 continuously learns the weights of multiple filters for the current task in a predetermined number of rounds (S20).

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

[0069] The filter control unit 40 initializes the filters in the current task that have a high similarity to the filters that have completed learning from past tasks (S40).

[0070] When the learning of the current task is completed (S50 "Yes"), proceed to step S60. If the learning of the current task continues (S50 "No"), return to step S20.

[0071] The filter processing unit 30 initializes a predetermined proportion of filters sequentially, starting with the filter with the lowest weight among the multiple filters that have already learned the current task (S60).

[0072] If there are still tasks, return to step S10 and enter the next task ("No" in S70). If there are no next tasks, end continuous learning ("Yes" in S70).

[0073] The various processing operations of the machine learning device 100 described above can, of course, be implemented using hardware such as a CPU and memory, or through firmware stored in ROM (Read-Only Memory), flash memory, or software such as a computer. The firmware and software programs can be recorded on a computer-readable recording medium for provision, or transmitted and received between the device and a server via wired or wireless networks, or transmitted and received as data broadcasts via terrestrial waves or satellite digital broadcasting.

[0074] As described above, the machine learning apparatus 100 according to this embodiment can slow down the saturation rate of the filter of the continuous learning model and can effectively utilize the filter to learn more tasks.

[0075] The present invention has been described above based on embodiments. Those skilled in the art should understand that the embodiments are illustrative, and various modifications can be made to the combinations of the constituent elements and processing procedures, and these modifications are also within the scope of the present invention.

[0076] Industrial availability

[0077] This invention can be used in machine learning techniques.

[0078] 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 machine learning apparatus for an image recognition task, characterized in that, include: The weight storage unit stores the weights of multiple filters for each layer of a multi-layer convolutional neural network, which is input to an image recognition task for recognizing a specific object and extracts features from the input image. The continuous learning unit continuously learns the weights of the multiple filters for the image recognition task of inputting the image and determining the objects in the image; as well as The filter control unit, after a predetermined number of rounds of continuous learning, compares the weights of filters learned from past image recognition tasks with the weights of filters being learned from the current image recognition task in each layer, and extracts repeated filters as shared filters between tasks. These repeated filters are those with a weight similarity greater than a predetermined threshold. The filter control unit retains one of the repeated filters as the shared filter and initializes the weights of the filters other than the shared filter.

2. The machine learning apparatus as described in claim 1, characterized in that, The continuous learning unit continuously learns the initialized weights of filters other than the shared filter for other tasks.

3. The machine learning apparatus as described in claim 1 or 2, characterized in that, The predetermined number of rounds is determined based on conditions related to the rate of change of loss or the rate of change of accuracy, wherein the rate of change of loss is the error between the output value of the learning model and the correct answer given by the training data, and the rate of change of accuracy is the accuracy of the output value of the learning model.

4. A machine learning method for an image recognition task, characterized in that, include: The weight storage step stores the weights of multiple filters for each layer of a multi-layer convolutional neural network, which is input to an image recognition task for recognizing a specific object, and extracts features from the input image. The continuous learning step involves continuously learning the weights of multiple filters for feature detection in the image recognition task, which is to input the image and determine the objects in the image. as well as After a predetermined number of rounds of continuous learning, in each layer, the weights of the filters of the previously learned image recognition task are compared with the weights of the filters of the current image recognition task being learned, and repeated filters are extracted as shared filters between tasks. The repeated filters are filters with a weight similarity of more than a predetermined threshold. One of the repeated filters is retained as the shared filter, and the weights of the filters other than the shared filter are initialized.

5. A computer-readable storage medium storing a machine learning program for an image recognition task, characterized in that, The program is used to cause the computer to execute: The weight storage step stores the weights of multiple filters for each layer of a multi-layer convolutional neural network, which is input to an image recognition task for recognizing a specific object, and extracts features from the input image. The continuous learning step involves continuously learning the weights of multiple filters for feature detection in the image recognition task, which is to input the image and determine the objects in the image. as well as After a predetermined number of rounds of continuous learning, the weights of the filters learned from the past image recognition task are compared with the weights of the filters being learned from the current image recognition task. Repeated filters are extracted as shared filters between tasks. The repeated filters are filters whose weight similarity is above a predetermined threshold. One of the repeated filters is retained as the shared filter. The weights of the filters other than the shared filter are initialized.

Citation Information

Patent Citations

  • Learning device, learning method, and program

    JP2010020446A