A method, device and storage medium for customizing a category incremental learning model matching task difficulty
By introducing inequality constraint filtering nodes in the category incremental learning model and using dynamic forward update and gradient descent algorithms, the problem of rapid network scale growth caused by task difficulty matching in the existing technology is solved, and efficient network customization and accuracy improvement is achieved.
Patent Information
- Application Number
- CN202411874322.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The prior art is difficult to match the task difficulty in the process of category incremental learning, resulting in the increase in network size too quickly.
By designing inequality constraints that match the difficulty of the current task, random nodes are screened, neural units of the characterization learning layer of the category incremental learning model are constructed, and the output weight of the model is updated using gradient descent algorithm and dynamic forward update method, and neural units are selectively activated based on the output probability.
Significantly reduce training errors, improve model accuracy, realize the speed and efficiency of network customization, adapt to actual needs in open scenarios, and avoid catastrophic forgetting.
Smart Images

Figure CN119323245B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of classification network design, and more specifically, relates to a method, device and storage medium for customizing a category incremental learning model that matches task difficulty. Background Art
[0002] In recent years, artificial intelligence technologies represented by deep learning have achieved great success. For example, they can match or even surpass the level of the human visual system in tasks such as image classification. However, they still belong to the category of weak artificial intelligence and are only good at processing specific tasks or problem sets that have been trained. When they cannot rely on data from all known categories for joint training, catastrophic forgetting will occur. In order to alleviate forgetting, category incremental learning methods and technologies have been continuously proposed, which requires a single model to be able to continuously learn new categories without overwriting old category knowledge. Therefore, giving intelligent systems the ability to incrementally learn categories is an important step towards general artificial intelligence.
[0003] The extended category incremental learning method gradually increases the size of the network (such as the backbone or branches) to accommodate new categories. When resources are not limited, the classification accuracy can be pushed to the upper bound of category incremental learning, that is, close to the performance of offline batch learning. In fact, if the final network size is comparable to multiple single-task learning networks, that is, the final model size is equivalent to integrating several (e.g., equal to the number of tasks) base models, this goes against the original intention of category incremental learning and should be calculated into the memory budget for fair comparison. At the same time, the model capacity required to learn new categories must be carefully balanced with the number of parameters introduced, especially considering that the number of tasks / categories that the model needs to learn is usually unknown in advance, and base networks that are too large or too small cannot match the requirements of resource conservation in open scenarios.
[0004] From the perspective of algorithm implementation, the expansion quota of current related work usually roughly depends on the change of the loss function. It is difficult to accurately allocate the expansion quota corresponding to the difficulty of the task, which makes the network scale increase rapidly with the increase of the number of tasks. Summary of the invention
[0005] In response to the defects of the related art, the purpose of the present invention is to provide a method, device and storage medium for customizing a category incremental learning model that matches task difficulty, aiming to solve the problem that existing methods are difficult to match task difficulty during category incremental learning, resulting in too rapid an increase in network scale.
[0006] To achieve the above objectives, in a first aspect, the present invention provides a method for customizing a category incremental learning model that matches task difficulty, comprising:
[0007] S1. Given the training data of the current task, design inequality constraints that match the difficulty of the current task and select random nodes to construct neural units of the representation learning layer of the category incremental learning model;
[0008] S2. Using a gradient descent algorithm to reduce the training error, and updating the output weights of the classifier layer of the category incremental learning model in a dynamic forward update manner;
[0009] S3, calculating the output probability of the corresponding category based on the training data of the current task, parameterizing the neural unit according to the activation threshold corresponding to the output probability, updating the category incremental learning model, and obtaining a customized category incremental learning model;
[0010] S4. Obtain test data of a certain task that has been trained, and input the test data into the customized category incremental learning model to activate the corresponding neural unit, so that the customized category incremental learning model can make a prediction and obtain an output category.
[0011] Optionally, step S1 specifically includes:
[0012] S11. Current classification task When it appears, in the adjustable symmetry range Initialize multiple sets of hidden layer parameter pairs , get multiple random nodes ;in For classification tasks The input data, is the interval boundary, represents the number of nodes in each group, is the connection weight, is bias;
[0013] S12. Design a single node adding method And batch node addition method :
[0014] ;
[0015] ;
[0016] in, represents the number of nodes before the representation learning layer is expanded; , Indicates the task Included of the categories indivual, represents the training error, represents the output weight, Represents a random node When the number is 1, it is a single random node; represents the error factor, represents the amount of error reduction, is the convergence equilibrium coefficient;
[0017] S13, designing an inequality constraint that matches the difficulty of the current task, and screening out multiple single nodes and multiple batch nodes from the random nodes according to the inequality constraint, comparing and selecting the best node from the multiple single nodes and multiple batch nodes as the target node; the inequality constraint is expressed as:
[0018] ;
[0019] ;
[0020] S14, add the target node to the corresponding neural unit of the representation learning layer, expand the representation learning layer, and determine whether the expanded network meets the target error or reaches the maximum number of added nodes. If so, obtain the expanded network If not, then return to S11; Expressed as , is the output weight vector, represents the optimal hidden layer parameter pair.
[0021] Optionally, in step S13, the following is further included:
[0022] If no single node or batch of nodes satisfying the inequality constraint is selected from the random nodes, then adjust The value of ,in , and then returns to execute S12.
[0023] Optionally, step S2 specifically includes:
[0024] When using the gradient descent algorithm, only the output weights of the classifier layer of the category incremental learning model are dynamically updated forward, and the updating method includes:
[0025] ;
[0026] ;
[0027] Among them, the output of the category incremental learning model is expressed in matrix form: , the output weight matrix is ; For classification tasks The output label of is the update amount of the output weight matrix, is the output weight matrix after dynamic forward update, is the learning rate.
[0028] Optionally, step S3 specifically includes:
[0029] S31. In the current task During the training process, the training data is used to calculate the output probability of the current task belonging to all categories, and the average value of the highest output probability belonging to a certain category is calculated and used as the activation threshold , and use this category as the target category:
[0030] ;
[0031] in, Indicates the task t The activation threshold, It's a task The number of training samples, and They are respectively No. The input data and output labels of training samples, max means taking the maximum value operation, is the output probability, Indicates that the trigger model is in the task The minimum probability of making a decision;
[0032] S32. Parameterize the neural unit according to the activation threshold, update the category incremental learning model, and obtain a customized category incremental learning model.
[0033] In a second aspect, the present invention further provides a classification task recognition method, which uses a customized category incremental learning model generated by the category incremental learning model customization method for matching task difficulty as described in any one of the first aspects, including:
[0034] The data of the classification task to be tested is obtained, and the data is input into a customized category incremental learning model to activate corresponding neural units, so as to obtain a predicted category of the classification task to be tested.
[0035] Optionally, the step of obtaining data of the classification task to be tested, inputting the data into a customized category incremental learning model to activate corresponding neural units, and obtaining a predicted category of the classification task to be tested includes:
[0036] Get the classification task to be tested The data is input into the customized category incremental learning model to activate the corresponding neural unit and calculate the estimated value of the activation threshold :
[0037] ;
[0038] Among them, is the classification task to be tested The number of input data samples;
[0039] Based on the target categories and activation thresholds corresponding to each trained task , compare activation threshold and activation threshold estimates The distance between , by minimizing the distance, the classification task to be tested is determined The corresponding predicted category.
[0040] In a third aspect, the present invention further provides a customized device for a category incremental learning model matching task difficulty, comprising:
[0041] A model building module is used to design inequality constraints that match the difficulty of the current task given the training data of the current task, and to screen random nodes to build neural units of the representation learning layer of the category incremental learning model;
[0042] A dynamic forward update module, used to reduce the training error by using a gradient descent algorithm, and to update the output weights of the classifier layer of the category incremental learning model by means of a dynamic forward update;
[0043] An activation threshold module is used to calculate the output probability of the corresponding category for the training data of the current task, and parameterize the neural unit according to the activation threshold corresponding to the output probability, and update the category incremental learning model;
[0044] The training loop module is used to cyclically execute the contents of the model building module, the dynamic forward update module and the activation threshold module when the next classification task appears, until all tasks are traversed to obtain a customized category incremental learning model.
[0045] In a fourth aspect, the present invention further provides a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a processor to implement a method for customizing a category incremental learning model for matching task difficulty as described in any one of the first aspects, or to implement a method for identifying a classification task as described in any one of the second aspects.
[0046] Compared with the prior art, the above technical solution conceived by the present invention can achieve the following beneficial effects:
[0047] 1. A customized method for a category incremental learning model that matches the difficulty of a task provided by the present invention introduces an inequality constraint in the expansion process of the neural unit in the representation learning layer to match the difficulty of the current task: multiple single nodes and multiple batch nodes are screened out from random nodes using the inequality constraint, and the optimal node is compared and selected from the multiple single nodes and multiple batch nodes as the target node and added to the corresponding neural unit of the representation learning layer. Therefore, the target node can significantly reduce the training error and improve the model accuracy. Compared with the nodes that do not meet the inequality constraint, that is, the redundant nodes that are eliminated, the target node fully considers the influence between it and the existing nodes, which is functionally equivalent to introducing a lateral connection, so that each node plays an irreplaceable role. The hybrid method of adding a single node and adding a batch node can not only adaptively obtain an expansion quota equivalent to the difficulty of the task, but also increase the speed and efficiency of network customization. The dynamic forward update is adopted to dynamically update the output weights in a manner without error back propagation, which effectively avoids the shortcomings of slow convergence speed and easy to fall into local optimality caused by traditional layer-by-layer error back propagation. Based on the output probability of the current task, the corresponding neural units are selectively activated to obtain a customized category incremental learning model. The category incremental learning model customization method established by the present invention is used to achieve continuous image classification tasks and alleviate catastrophic forgetting. It has the advantages of efficient storage and minimized network expansion, and can better adapt to the actual needs in open scenarios.
[0048] 2. The present invention provides a customized method for category incremental learning models that matches the difficulty of tasks. Unlike over-parameterization or expansion-pruning implementations, the present invention can model neural units from scratch and dynamically expand the network according to the difficulty of a given task. It constructs a near-minimum network for continuous image classification tasks and allows the model to expand its capacity when it cannot fully accommodate new categories, thereby enabling efficient incremental learning of more categories.
[0049] 3. The present invention provides a customized method for a category incremental learning model that matches the difficulty of a task. This method is different from existing multi-head classifier methods, which continuously expand classifiers during training and require the identity of the task being tested to be provided during testing. For the test input data of a certain classification task, the classifier layer of the customized network model selectively reactivates the corresponding neural units based on the test output probability to retrieve knowledge, while the remaining neural units remain in an unactivated state to avoid interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of a method for customizing a category incremental learning network for matching task difficulty provided by the present invention.
[0051] Figure 2 It is a schematic diagram of the customized category incremental learning model provided by the present invention.
[0052] Figure 3 This is a graph showing how the size of the customized network changes as the number of CIFAR-100 tasks increases. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0054] The contents involved in the above embodiment are described below in conjunction with a preferred embodiment.
[0055] Embodiment 1
[0056] like Figure 1 As shown, the present invention provides a method for customizing a category incremental learning model that matches task difficulty, including:
[0057] S1. Given the training data of the current task, design inequality constraints that match the difficulty of the current task and select random nodes to construct neural units of the representation learning layer of the category incremental learning model;
[0058] S2. Using a gradient descent algorithm to reduce the training error, and updating the output weights of the classifier layer of the category incremental learning model in a dynamic forward update manner;
[0059] S3, calculating the output probability of the corresponding category based on the training data of the current task, parameterizing the neural unit according to the activation threshold corresponding to the output probability, and updating the category incremental learning model;
[0060] S4. When the next classification task appears, execute S1-S3 in a loop until all tasks are traversed to obtain a customized category incremental learning model.
[0061] Using a uniformly divided version of the natural image data CIFAR-100, the customized network is required to be able to incrementally recognize 10 10 classification tasks. The classification task is recorded as , , and the training samples are recorded as ,in is the image input, For image output, For the task The number of training samples, and are the input features and the output category numbers respectively. In the image classification task of this embodiment, represents an image size of 32×32, represents a 1×10 image unique hot encoding label. The customized category incremental learning model provided in the embodiment is as follows Figure 2 As shown. Inequality constraints are introduced into the expansion process of the neural units in the representation learning layer to match the difficulty of the current task. A hybrid method of adding single nodes and adding batches of nodes is adopted to adaptively obtain expansion quotas equivalent to the difficulty of the task. The gradient descent algorithm is used only in the classifier layer to reduce the training error, and the output weights are dynamically updated without the need for error back propagation. This not only avoids the shortcomings of slow convergence and easy to fall into local optimality caused by traditional layer-by-layer error back propagation, but also does not require the pseudo-inverse operation of the output matrix of each representation learning layer to be recalculated from scratch. Based on the output probability of the current task, the average value of the highest output probability belonging to a certain category is calculated, and it is used as the activation threshold to parameterize the neural units, and the category incremental learning model is updated to obtain a customized category incremental learning model.
[0062] This scheme accurately and efficiently constructs a compact network for continuous image classification tasks, and allows the model to expand its capacity when it cannot fully accommodate new categories. Compared with the existing empirically determined category incremental learning network architecture, this scheme can allocate expansion quotas that match the difficulty of the task, so that the network expansion matches the model capacity required to adapt to new tasks. The resulting customized method can resist catastrophic forgetting in the category incremental learning process in a task-dependent manner.
[0063] Optionally, step S1 specifically includes:
[0064] S11. Current classification task When it appears, in the adjustable symmetry range Initialize multiple sets of hidden layer parameter pairs , get multiple random nodes ;in, For classification tasks The input data, is the interval boundary, represents the number of nodes in each group, is the connection weight, For bias.
[0065] in, The interval boundaries can be obtained from the set Convenient access, number of groups T max Set to 10, the number of nodes in each group It can be set to 1 or 10 to achieve mixed addition of random nodes. In particular, the adjustable symmetric interval is more flexible than the traditional initialization and fine-tuning method. The number of groups greater than 1 can improve the quality of the target node, and the mixed addition method can more accurately determine the expansion quota of the representation learning layer in the category incremental learning process.
[0066] S12. Design a single node adding method And batch node addition method :
[0067] ;
[0068] ;
[0069] Among them, among them, represents the number of nodes before the representation learning layer is expanded; , Indicates the task Included of the categories indivual, represents the training error, represents the output weight, Represents a random node When the number is 1, it is a single random node; represents the error factor, represents the amount of error reduction, is the convergence balance coefficient. In particular, seeking to satisfy inequality constraints in the node space composed of multiple groups of single nodes and batch nodes can greatly reduce the training instability caused by random nodes.
[0070] S13, designing an inequality constraint that matches the difficulty of the current task, and screening out multiple single nodes and multiple batch nodes from the random nodes according to the inequality constraint, comparing and selecting the best node from the multiple single nodes and multiple batch nodes as the target node; the inequality constraint is expressed as:
[0071] ;
[0072] ;
[0073] Optionally, in step S13, the following is further included:
[0074] If no single node or batch of nodes satisfying the inequality constraint is selected from the random nodes, then adjust The value of ,in , which can be set to 0.01, and then return to execute S12.
[0075] When no node that satisfies the inequality constraint is found, Relax the screening conditions and screen again.
[0076] S14, add the target node to the corresponding neural unit of the representation learning layer, expand the representation learning layer, and determine whether the expanded network meets the target error or reaches the maximum number of added nodes. If so, obtain the expanded network If not, then return to S11; Expressed as , is the output weight vector, represents the optimal hidden layer parameter pair.
[0077] The degree to which a random node satisfies the inequality constraint is proportional to the reduction in training error. For the random nodes found that satisfy the inequality constraint, only the one that minimizes the training error is selected. A set of random nodes As the optimal node, it is added to the corresponding neural unit of the representation learning layer, and the rest are directly discarded. In the process of adding, a combination method is adopted. Each addition needs to satisfy the inequality constraint to ensure that the added node helps to reduce the training error, accurately and efficiently determine the number of nodes required for the current task, and the number of nodes is closely proportional to the difficulty of the current task.
[0078] The network customization method used in this solution replaces the over-parameterization or expansion-pruning implementation commonly used in current category incremental learning methods, which can improve the economy and efficiency of network construction.
[0079] Optionally, step S2 specifically includes:
[0080] When using the gradient descent algorithm, only the output weights of the classifier layer of the category incremental learning model are dynamically updated forward, and the updating method includes:
[0081] ;
[0082] ;
[0083] Among them, the output of the incremental learning model is expressed in matrix form: , the output weight matrix is ; For classification tasks The output label of is the update amount of the output weight matrix, is the output weight matrix after dynamic forward update, is the learning rate.
[0084] Unlike the fixed-size topology that is empirically determined prior to training in the prior art, this solution provides an efficient and scalable category incremental learning model whose output weights need to be repeatedly updated at each expansion. Unlike the traditional training process, which requires layer-by-layer error backpropagation when using the gradient descent algorithm, this solution only requires dynamic forward updates for the output weights of the classifier layer. In this case, the dynamic forward update module is used to dynamically update the output weights without the need for error backpropagation, effectively avoiding the shortcomings of slow convergence and easy falling into local optimality caused by traditional layer-by-layer error backpropagation.
[0085] In this embodiment, for L = Output matrix of representation learning layer with 200 nodes ,Add to Or 10 random nodes , the output matrix of the expanded representation learning layer is In this embodiment, .
[0086] Optionally, step S3 specifically includes:
[0087] S31. In the current task During the training process, the training data is used to calculate the output probability of the current task belonging to all categories, and the average value of the highest output probability belonging to a certain category is calculated and used as the activation threshold , and use this category as the target category:
[0088] ;
[0089] in, Indicates the task The activation threshold, It's a task The number of training samples, and They are respectively No. The input data and output labels of training samples, max means taking the maximum value operation, is the output probability, Indicates that the trigger model is in the task The function of this is to correct the inter-class confusion that occurs when different task test data produce similar output probabilities.
[0090] S32. Parameterize the neural unit according to the activation threshold and update the category incremental learning model.
[0091] Based on the activation threshold corresponding to the output probability during training, each neural unit is parameterized, that is, the parameterized neural unit can only be activated by the input data corresponding to the category to which it belongs, thereby protecting the decision boundary of the previous category from being distorted.
[0092] Based on the above embodiment, when the next classification task appears, S1-S3 are executed in a loop until all tasks are traversed to obtain a customized category incremental learning model.
[0093] During the testing phase, given the trained task-specific test data, the corresponding neural units are autonomously and selectively reactivated to achieve category-incremental prediction without knowing the task identity.
[0094] Given the test input data of a certain classification task for which it has been trained, the customized network can selectively reactivate the required neurons to retrieve knowledge and keep the remaining neurons inactive to prevent interference, thereby achieving category incremental prediction.
[0095] On the basis of the above embodiment, after building a customized category incremental learning model, the model is used in a recognition method for classification tasks, including:
[0096] The data of the classification task to be tested is obtained, and the data is input into a customized category incremental learning model to activate corresponding neural units, so as to obtain a predicted category of the classification task to be tested.
[0097] Specifically include:
[0098] Get the classification task to be tested The data is input into the customized category incremental learning model to activate the corresponding neural unit and calculate the estimated value of the activation threshold :
[0099] ;
[0100] Among them, is the classification task to be tested The number of input data samples;
[0101] Based on the target categories and activation thresholds corresponding to each trained task , compare activation threshold and activation threshold estimates The distance between , by minimizing the distance, the classification task to be tested is determined The corresponding predicted category.
[0102] For any class of test data that has been trained, the prediction result can be determined by measuring the minimum distance between the activation thresholds (between the two activation thresholds corresponding to the training data and the test data).
[0103] The activation threshold estimate obtained for the data of a certain task The activation threshold of each task that needs to be trained is For comparison, select the target category corresponding to the closest task as the category of the test data.
[0104] Figure 3 This is a diagram showing how the size of a customized network changes with the number of CIFAR-100 tasks according to a specific embodiment of the present invention, where the model size is in MB, and 10 tasks are incrementally learned, and each task contains 10 different categories. Figure 3 It can be seen that the method for customizing the category incremental learning model that matches the difficulty of the task proposed in the present invention has a relatively stable model size change curve as the number of tasks increases, indicating that the inequality constraints introduced in the training phase of the present invention can guide the network to establish a model size that matches the difficulty of the task, has the advantages of efficient storage and minimized network expansion, and can better adapt to the actual needs in open scenarios.
[0105] The embodiment of the present invention introduces inequality constraints in the expansion process of the neural units in the representation learning layer to match the difficulty of the current task. It adopts a hybrid method of adding a single node and adding a batch of nodes, which can not only adaptively obtain an expansion quota equivalent to the difficulty of the task, but also increase the speed and efficiency of network customization. It adopts dynamic forward update to dynamically update the output weights without error back propagation, and selectively activates the corresponding neural units based on the output probability of the current task to obtain a customized category incremental learning model. It solves the technical problem that the existing methods are difficult to match the difficulty of tasks in the category incremental learning process, resulting in too fast an increase in network size. It realizes the ability to allocate expansion quotas that match the difficulty of tasks, so that the expansion of the network matches the model capacity required to adapt to new tasks. The customized method can resist catastrophic forgetting in the category incremental learning process in a task-dependent manner, has the beneficial effects of efficient storage and minimizing network expansion, and can better adapt to open scenarios.
[0106] Embodiment 2
[0107] The present invention also provides a customized device for a category incremental learning model matching task difficulty, comprising:
[0108] A model building module is used to design inequality constraints that match the difficulty of the current task given the training data of the current task, and to screen random nodes to build neural units of the representation learning layer of the category incremental learning model;
[0109] A dynamic forward update module, used to reduce the training error by using a gradient descent algorithm, and to update the output weights of the classifier layer of the category incremental learning model by means of a dynamic forward update;
[0110] An activation threshold module is used to calculate the output probability of the corresponding category for the training data of the current task, and parameterize the neural unit according to the activation threshold corresponding to the output probability, and update the category incremental learning model;
[0111] The training loop module is used to cyclically execute the contents of the model building module, the dynamic forward update module and the activation threshold module when the next classification task appears, until all tasks are traversed to obtain a customized category incremental learning model.
[0112] A customized device for a category incremental learning model for matching task difficulty provided in an embodiment of the present invention is used to execute a customized method for a category incremental learning model for matching task difficulty provided in any embodiment of the present invention, and has corresponding beneficial effects.
[0113] Embodiment 3
[0114] The present invention also provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a processor to implement a method for customizing a category incremental learning model of matching task difficulty as described in any one of Example 1, or to implement a method for identifying a classification task as described in any one of Example 1 when executing the method.
[0115] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A customized method for category incremental learning model matching task difficulty, characterized in that: include: S1. Given the training data of the current task, design an inequality constraint that matches the difficulty of the current task, and select random nodes to construct the neural units of the representation learning layer of the category incremental learning model; the training data is a uniformly divided version of the natural image data CIFAR-100, and the training samples in the training data are represented as Where t is the classification task label, t = 1, 2, ..., 10, X t is the image input for classification task t, Y t is the image output of classification task t, |D t | is the number of training samples for task t, M t and C t are the number of input features and the number of output categories respectively; S2. Using a gradient descent algorithm to reduce the training error, and updating the output weights of the classifier layer of the category incremental learning model in a dynamic forward update manner; S3, calculating the output probability of the corresponding category based on the training data of the current task, parameterizing the neural unit according to the activation threshold corresponding to the output probability, and updating the category incremental learning model; S4. When the next classification task appears, execute S1-S3 in a loop until all tasks are traversed to obtain a customized category incremental learning model; Wherein, step S1 specifically includes: S11, when the current classification task t appears, initialize multiple sets of hidden layer parameter pairs {W l ,B l }, get multiple random nodes G l (X t W l +B l ), where X t is the image input for classification task t, λ is the interval boundary, l represents the number of nodes in each group, and W l is the connection weight, B l is bias; S12. Design a single node adding method And batch node addition method Where Ll represents the number of nodes before the learning layer is expanded; c = 1, 2, ..., C t Represents the C contained in task t t The cth of the categories, represents the training error, β l,c (t) represents the output weight, g l Represents a random node G l (X t W l +B l ) is 1, that is, a single random node; δ(t) = 1-r(t)-μ L (t) represents the error factor, r(t) represents the error reduction, μ L (t) is the convergence equilibrium coefficient; S13, designing an inequality constraint that matches the difficulty of the current task, and screening out multiple single nodes and multiple batch nodes from the random nodes according to the inequality constraint, comparing and selecting the best node from the multiple single nodes and multiple batch nodes as the target node; the inequality constraint is expressed as: S14, add the target node to the corresponding neural unit of the representation learning layer, expand the representation learning layer, and determine whether the expanded network meets the target error or reaches the maximum number of added nodes. If so, obtain the expanded network If not, then return to S11; l (X t W l +B l ) is expressed as β l (t) is the output weight vector, represents the optimal hidden layer parameter pair.
2. The method according to claim 1, characterized in that In step S13, it also includes: If no single node or batch of nodes satisfying the inequality constraint is screened out from the random nodes, the value of r(t) is adjusted to r(t)=r(t)+τ, where τ∈(0,1-r(t)), and then the process returns to execute S12.
3. The method according to claim 1, characterized in that Step S2 specifically includes: When using the gradient descent algorithm, only the output weights of the classifier layer of the category incremental learning model are dynamically updated forward, and the updating method includes: min||A L+l W L (t)-Y t || 2 Among them, the output of the category incremental learning model is expressed in matrix form: The output weight matrix is W L (t)=[β1(t),...,β L (t)]; Y t is the image output of classification task t, ΔW L (t) is the update amount of the output weight matrix, is the output weight matrix after dynamic forward update, and λ is the learning rate.
4. The method according to claim 1, characterized in that Step S3 specifically includes: S31. During the training process of the current task t, the training data is used to calculate the output probability of the current task belonging to all categories, the average value of the highest output probability belonging to a certain category is calculated, and it is used as the activation threshold R(t), and the category is used as the target category: Where R(t) represents the activation threshold of task t, |D t | is the number of training samples for task t, and are the input data and output label of the i-th training sample belonging to task t, respectively. max represents the maximum value operation. is the output probability, 1 / C t represents the minimum probability that triggers the model to make a decision on task t; S32. Parameterize the neural unit according to the activation threshold and update the category incremental learning model.
5. A classification task recognition method, using a customized category incremental learning model generated by the category incremental learning model customization method for matching task difficulty as described in any one of claims 1 to 4, characterized in that: include: The data of the classification task to be tested is obtained, and the data is input into a customized category incremental learning model to activate corresponding neural units, so as to obtain a predicted category of the classification task to be tested.
6. The method according to claim 5, characterized in that The step of obtaining data of the classification task to be tested, inputting the data into a customized category incremental learning model to activate corresponding neural units, and obtaining a predicted category of the classification task to be tested includes: Obtain the data of the classification task k to be tested and input it into the customized category incremental learning model to activate the corresponding neural unit, and calculate the estimated value R′(k) of the activation threshold: Among them, among them |D′ k | is the number of input data samples of the classification task k to be tested; Based on the target categories and activation thresholds R(t) corresponding to each trained task, the distance |R(t)-R′(k)| between the activation threshold R(t) and the activation threshold estimate R′(k) is compared, and the predicted category corresponding to the classification task k to be tested is determined by minimizing the distance.
7. A customized device for a category incremental learning model matching task difficulty, characterized in that: include: The model building module is used to design inequality constraints that match the difficulty of the current task given the training data of the current task, and to select random nodes to build the neural units of the representation learning layer of the category incremental learning model; the training data is a uniformly divided version of the natural image data CIFAR-100, and the training samples in the training data are represented as Where t is the classification task label, t = 1, 2, ..., 10, X t is the image input for classification task t, Y t is the image output of classification task t, |D t | is the number of training samples for task t, M t and C t are the number of input features and the number of output categories respectively; A dynamic forward update module, used to reduce the training error by using a gradient descent algorithm, and to update the output weights of the classifier layer of the category incremental learning model by means of a dynamic forward update; An activation threshold module is used to calculate the output probability of the corresponding category for the training data of the current task, and parameterize the neural unit according to the activation threshold corresponding to the output probability, and update the category incremental learning model; The training loop module is used to loop the model building module, the dynamic forward update module, and the activation threshold module when the next classification task appears, until all tasks are traversed to obtain a customized category incremental learning model; Wherein, the model building module is specifically used to execute steps S11-S14; S11, when the current classification task t appears, initialize multiple sets of hidden layer parameter pairs {W l ,B l }, get multiple random nodes G l (X t W l +B l ), where X t is the image input for classification task t, λ is the interval boundary, l represents the number of nodes in each group, and W l is the connection weight, B l is bias; S12. Design a single node adding method And batch node addition method Where Ll represents the number of nodes before the learning layer is expanded; c = 1, 2, ..., C t Represents the C contained in task t t The cth of the categories, represents the training error, β l,c (t) represents the output weight, g l Represents a random node G l (X t W l +B l ) is 1, that is, a single random node; δ(t) = 1-r(t)-μ L (t) represents the error factor, r(t) represents the error reduction, μ L (t) is the convergence equilibrium coefficient; S13, designing an inequality constraint that matches the difficulty of the current task, and screening out multiple single nodes and multiple batch nodes from the random nodes according to the inequality constraint, comparing and selecting the best node from the multiple single nodes and multiple batch nodes as the target node; the inequality constraint is expressed as: S14, add the target node to the corresponding neural unit of the representation learning layer, expand the representation learning layer, and determine whether the expanded network meets the target error or reaches the maximum number of added nodes. If so, obtain the expanded network If not, then return to S11; l (X t W l +B l ) is expressed as β l (t) is the output weight vector, represents the optimal hidden layer parameter pair.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which are used to enable a processor to implement a method for customizing a category incremental learning model for matching task difficulty as described in any one of claims 1-4, or to implement a method for identifying a classification task as described in any one of claims 5-6 when executed.
Citation Information
Patent Citations
Construction method of WiFi gesture increment recognition system based on continuous learning
CN116501164A
Targeted incremental growth with continual learning in deep neural networks
US20220058467A1