Method and apparatus for continuous learning of tasks
By adopting a architecture of parallel learning of multiple narrower subnets in multi-task continuous learning, combining feature integration, integrated collaboration and task adaptive gating, the problem of difficult to balance learning plasticity and memory stability in the prior art is solved, and the performance of continuous learning is improved.
Patent Information
- Application Number
- CN202280097902.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is difficult to effectively balance learning plasticity and memory stability in multi-task continuous learning, resulting in catastrophic forgetting when learning new tasks or limiting memory of old tasks when learning new tasks.
A novel framework for continuous learning of task sequences is proposed, using multiple fixed number of narrower subnets to learn incremental tasks in parallel. Improve differences between tasks, flatness of solutions, and coverage of parameter space through feature integration, integrated collaboration and task adaptive gating.
By improving the architecture, the generalization errors of learning plasticity and memory stability in continuous learning are naturally reduced, the performance of multi-task continuous learning is improved, and the learning ability of new tasks and memory retention of old tasks is enhanced.
Smart Images

Figure CN119631086A_ABST
Abstract
Description
Technical Field
[0001] Generally speaking, aspects of the present disclosure relate to artificial intelligence (AI), and more specifically, aspects of the present disclosure relate to continuous learning of multiple tasks. Background Art
[0002] Continuous learning is a branch of machine learning that focuses on sequential learning of tasks, with the goal of learning new problems without forgetting previously learned tasks. The ability to incrementally learn sequences of tasks is crucial for artificial neural networks. Since the training data distribution is highly dynamic, the network needs to carefully balance learning plasticity and memory stability. In general, excessive plasticity in learning new tasks can lead to catastrophic forgetting of old tasks, while excessive stability in remembering old tasks can limit the learning of new tasks.
[0003] Continuous learning efforts either utilize a single model to learn all tasks, which must sacrifice the performance of each task to find a shared solution, or allocate dedicated parameter subspaces for each task to overcome their mutual interference, which generally lacks scalability. Recent work has observed that wider networks generally suffer from less catastrophic forgetting, while different components such as batch normalization, skip connections, and pooling layers play various roles. Therefore, the choice of architecture for effective continuous learning remains an open problem. It is expected that the performance of continuous learning can be improved by utilizing improved architectures. Summary of the invention
[0004] To improve the performance of continual learning, this disclosure proposes a novel framework for continual learning of task sequences.
[0005] According to an embodiment, a computer-implemented method for continuous learning of multiple tasks is provided. The method includes: receiving input data in parallel by multiple continuous learning subnetworks, the input data is related to one of the multiple tasks, the number of the multiple continuous learning subnetworks is fixed and is independent of the number of multiple tasks; generating multiple feature representations based on the input data by the multiple continuous learning subnetworks respectively; generating predictions related to the one task by a feature integration subnetwork based on the multiple feature representations; generating a continuous learning loss value based on the predictions related to the one task and information related to tasks that have been learned until the one task; and updating the learnable parameters of the multiple continuous learning subnetworks and the feature integration subnetwork based on the continuous learning loss value.
[0006] According to an embodiment, a computer-implemented method for performing a task using a trained model is provided. The method includes: receiving input data in parallel by a plurality of continuous learning subnetworks of the model, the input data being related to the task in a plurality of tasks, the number of the plurality of continuous learning subnetworks being fixed and independent of the number of the plurality of tasks; generating a plurality of feature representations based on the input data by the plurality of continuous learning subnetworks respectively; and generating predictions related to the task by a feature integration subnetwork of the model based on the plurality of feature representations.
[0007] According to an embodiment, a computer system is provided, which includes one or more processors and one or more storage devices storing computer-executable instructions, which, when executed, cause the one or more processors to perform the operations of the method as described above and to perform the operations of the method according to various aspects of the present disclosure.
[0008] According to an embodiment, one or more computer-readable storage media storing computer-executable instructions are provided, which when executed cause one or more processors to perform the operations of the methods described above and to perform the operations of the methods according to various aspects of the present disclosure.
[0009] According to an embodiment, there is provided a computer program product comprising computer executable instructions which, when executed, cause one or more processors to perform the operations of the method as described above as well as to perform the operations of the method according to aspects of the present disclosure.
[0010] The proposed architecture with a fixed number of narrower subnetworks to learn incremental tasks in parallel can naturally reduce the generalization error of learning plasticity and memory stability in continuous learning by improving the difference between tasks, the flatness of solutions, and the coverage of parameter space (which are related to the upper limit of generalization error). Other advantages and enhancements are explained in the description below. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The disclosed aspects will hereinafter be described in conjunction with the accompanying drawings, which are provided to illustrate and not to limit the disclosed aspects.
[0012] Figure 1 An exemplary framework for continuous learning of task sequences in accordance with aspects of the present disclosure is shown.
[0013] FIG. 2A to FIG. 2C A conceptual model of influencing factors according to aspects of the present disclosure is shown.
[0014] FIG. 3A to FIG. 3E Each illustrates an exemplary framework for continuous learning of task sequences according to aspects of the present disclosure.
[0015] Figure 4 Exemplary performance of SCL and CoSCL with different numbers of continuous learners according to aspects of the present disclosure are shown.
[0016] Figure 5 Exemplary performance of SCL according to aspects of the present disclosure and CoSCL with the same number of continuous learners are shown.
[0017] Figure 6 The performance of corresponding continuous learners in CoSCL according to aspects of the present disclosure is shown.
[0018] Figure 7 Estimation of the H-divergence of corresponding features from a small learner across tasks in accordance with aspects of the present disclosure is shown.
[0019] Figure 8 The curvature of the loss landscape of a learned solution in accordance with aspects of the present disclosure is shown.
[0020] Fig. 9 An exemplary process for continuous learning of multiple tasks in accordance with aspects of the present disclosure is shown.
[0021] Fig.10 An exemplary process for performing a task using a trained model in accordance with aspects of the present disclosure is shown.
[0022] Fig.11 An exemplary computing system in accordance with aspects of the present disclosure is shown. DETAILED DESCRIPTION
[0023] The present disclosure will now be discussed with reference to several example implementations. It will be understood that these implementations are discussed only to enable those skilled in the art to better understand and thus implement embodiments of the present disclosure, and do not imply any limitation on the scope of the present disclosure.
[0024] Various embodiments will be described in detail with reference to the accompanying drawings. Wherever possible, the same reference numerals will be used throughout the drawings to refer to the same or similar parts. Reference to specific examples and embodiments is for illustrative purposes and is not intended to limit the scope of the present disclosure.
[0025] Figure 1 An exemplary framework for continuous learning of task sequences in accordance with aspects of the present disclosure is shown.
[0026] For the sake of illustration, the input data 110 can be exemplified by image data, and the task can be exemplified by an image classification task. It should be understood that various aspects of the present disclosure can be applied to various applications and scenarios in which various tasks are performed. For example, the input data can be image data, video data, graph data, game data, or text data. The task can be a classification task, such as classification based on images, videos, graphics, etc., can be an image segmentation task, can be a content generation task, such as content generation based on graph data, text data, can be an action generation task, such as action generation based on video data, graph data, game data, etc. In addition, the prediction of the task can be the classification of image data, video data, or graph data, can be image segmentation of image data or video data, can be content or action generated based on text data, game data, graph data, or video data, etc.
[0027] For example, various aspects of the present disclosure can be applied to autonomous driving systems, intelligent transportation systems, intelligent manufacturing systems, industrial equipment systems, intelligent maintenance equipment systems, medical equipment systems, social networking systems, financial network systems, website platforms, etc.
[0028] For example, the input data may be image data or video data obtained in one of an autonomous driving system, an intelligent transportation system, an intelligent manufacturing system, an industrial equipment system, an intelligent maintenance equipment system, a medical equipment system, etc. It should be understood that the image data or video data may be any form of image, such as a brightness image, a radar image, a LiDAR image, an ultrasound image, a motion image, a thermal image, etc. The plurality of tasks may be image classification tasks or image segmentation tasks. Furthermore, the prediction of the task may be a classified or segmented image portion associated with the image data or video data. The image segmented image portion of the image segmentation task may be an image portion associated with an area of interest of the image or video, such as an image portion corresponding to a pedestrian in an autonomous driving system, an image portion associated with a traffic condition in an intelligent transportation system, an image portion associated with a parameter such as an unqualified portion of a product in an intelligent manufacturing system, an industrial equipment system, an intelligent maintenance equipment system, etc., an image portion associated with body tissue in a medical equipment system, etc. The classification of the image classification task may be one of a plurality of classifications as parameters for the operation of the system. For example, the classification for the autonomous driving system may be a classification of two or more scenes such as a parking lot, an urban road, a highway, etc. The classification for intelligent transportation systems can be classified into leisure traffic, medium traffic, busy traffic, etc. The classification for intelligent manufacturing systems, industrial equipment systems or intelligent maintenance equipment systems can be classified into unqualified, qualified, etc. The classification for medical equipment systems can be classified into normal conditions, warning conditions, and adverse conditions, etc.
[0029] For example, the input data may be video data obtained in one of an autonomous driving system, an intelligent transportation system, an intelligent manufacturing system, an industrial equipment system, an intelligent maintenance equipment system, a medical equipment system, and the like. It should be understood that the video data may be any form of image, such as a brightness image, a radar image, a LiDAR image, an ultrasound image, a motion image, a thermal image, and the like. Multiple tasks may be action generation tasks. The prediction of a task may be an action based on video data. The operation of the action system generated by the action generation task. For example, the action of an autonomous driving system may be an action for automatically controlling a vehicle, such as braking, accelerating, parking, and the like. The action of an intelligent transportation system may be to automatically control traffic, such as adjusting the duration of a traffic light, and the like. The action of an intelligent manufacturing system, an industrial equipment system, or an intelligent maintenance equipment system may be to pick up defective products or broken components, and the like. The action of a medical equipment system may be to guide a physical inspection process, and the like.
[0030] For example, the input data may be graph data obtained in one of a social network system, a financial network system, a website platform, etc. Multiple tasks may be identifying abnormal accounts included in the graph data. The prediction of the task may be the classification of the account. For example, the classification of the account may be the classification of malicious accounts, normal accounts, etc.
[0031] The input data 110 may include a training data set for each of tasks 1 to T. For example, the training data set for task 1 may include dog images and classification labels, the training data set for task 2 may include cat images and classification labels, the training data set for task 3 may include bird images and classification labels, and so on.
[0032] A continuous learning neural network 120 (also referred to as a continuous learning model 120 ) may be trained to perform tasks 1 to T based on corresponding training data sets for tasks 1 to T. During training or learning of the model 120 , predictions 130 may be generated by the model 120 based on the input data 110 , and optimization target values 140 may be generated based on the predictions 130 , and learnable parameters of the model 120 may be updated based on the target values 140 .
[0033] like Figure 1 As shown, the general setting of continuous learning can be: a neural network 120 with parameters θ incrementally learns T tasks, and is therefore called a "continuous learner". The training set and test set of each task follow the same distribution The training set Including N t data-label pairs. For classification tasks, it can include one or more classes. After learning each task, their performance is evaluated on a test set of all tasks that have ever been seen. tis only available when learning task t, but an ideal continuous learner should behave as if they were trained jointly. To achieve this goal, it is crucial to balance the learning plasticity of new tasks and the memory stability of old tasks. Therefore, the loss function for continuous learning can usually be defined as: Among them, L t (·) is the task-specific loss for the current learning task t, for example, it can be the cross entropy for supervised classification, and is the loss associated with the already learned tasks 1 to t-1, which is used to achieve an effective trade-off in order to allow the continuous learner to learn incremental tasks without severe catastrophic forgetting.
[0034] Representative strategies for continual learning include weight regularization (e.g., Cha, S., Hsu, H., Hwang, T., Calmon, F. P., Moon, T.: Cpr: Classifier-projection regularization for continual learning, arXiv preprint arXiv:2006.07326), parameter isolation (e.g., Jung, S., Ahn, H., Cha, S., Moon, T.: Continuous learning with adaptive group sparsity regularization based on node importance, arXiv e-prints pp. arXiv–2003), and memory replay (e.g., Wang, L., Zhang, X., Yang, K., Yu, L., Li, C., Hong, L., Zhang, S., Li, Z., Zhong, Y., Zhu, J.: Memory replay with data compression for continual learning, arXiv preprint arXiv:2202.06592).
[0035] For example, for weight regularization, in denotes the learning parameters for the old task and I 1:t-1 Indicates the “importance” of these parameters. For example, it can be based on the Fisher information matrix F of the corresponding old task 1:t-1 To achieve I 1:t-1 , as detailed in e.g. Cha. For example, for memory replay, in This is done by storing some old training samples or by learning a generative model for D k For example, for parameter isolation, Dynamically isolated into multiple task-specific subspaces and represents a "free" parameter used for current and future tasks. Often used as a sparse regularizer to save It should be understood that in various aspects of the present disclosure, any continuous learning strategy may be applied, such as the existing continuous learning strategies exemplified above and future upcoming continuous learning strategies.
[0036] The goal of continuous learning is to find a solution θ for the learner 120 in the parameter space Θ, which can be found in a set of distributions and Consider a bounded loss function in denotes the label space and c is the upper limit, so that l(y1,y2)=0 holds if and only if y1=y2. Then, the distribution The group loss on can be defined as follows: where f θ (·) is the prediction of the input parameterized by θ. Similarly, the group loss on the distribution of old tasks is defined as:
[0037] To minimize and In both cases, the continuous learning model needs to minimize the current training set D in the constrained parameter space t The empirical risk on in And the parameter space Θ depends on the previous experience carried by the parameters or data in order to prevent catastrophic forgetting on old tasks. Similarly, represents the empirical risk on old tasks.
[0038] In practice, sequentially learning each task by minimizing the empirical loss can find multiple solutions, but and provide significantly different generalization capabilities, i.e., different learning plasticity and memory stability. Several recent studies have shown that flatter solutions are more robust to catastrophic forgetting. To find such flat solutions, in our example, the robust empirical risk is defined by the worst case of the neighborhood in parameter space as where b is the radius around θ and ∥·∥ denotes the L2 norm, which is also defined as for the old task as Then, solve the constrained robust empirical risk minimization (i.e., ) will find an approximate solution to the flat optimum that exhibits better generalization ability. In particular, by using the empirical loss The minimum value found can also be (only if the “radius” of its loss landscape is sufficiently wider than b). Intuitively, such a flat solution may mitigate catastrophic forgetting because it is more robust to parameter changes.
[0039] However, this approach is not sufficient. If the new task is very different from the old task, the parameter changes required to learn it well may be much larger than the "radius" of the old minimum, leading to catastrophic forgetting. On the other hand, staying around the old minimum is not a good solution to the new task, thus limiting the plasticity of learning. In one aspect of the present disclosure, let and The generalization errors represent the learning plasticity of new tasks and the memory stability of old tasks respectively, and the upper limits of these two errors can be given as follows.
[0040] Proposal 1. Let Θ be a cover of parameter space with VC dimension d. If is the distribution of tasks 1 to t for continuous learning, then for any δ∈(0,1), with probability at least 1-δ, for every solution θ of tasks 1 to t for continuous learning in parameter space Θ 1:t , that is, θ 1:t ∈Θ: in Is the distribution and of -divergence, where I(h) is the characteristic function. is the total number of training samples on all old tasks.
[0041] From Proposition 1, it can be seen that the generalization error of both learning plasticity and memory stability is directly bounded by the robust empirical risk and the distribution difference between new and old tasks, while minimizing the robust empirical risk (i.e., finding a flat solution) is directly related to mitigating both errors. In addition, the generalization gap on new and old tasks is shown as follows by the optimal solution of the robust empirical risk minimization.
[0042] Proposal 2: Order represents the optimal solution for tasks 1 to t obtained by continuous learning through robust empirical risk minimization on new tasks, that is, where Θ denotes a cover of the parameter space with VC dimension d. Then for any δ∈(0,1), the probability is at least 1-δ: in and Is the distribution and of -divergence, where I(h) is the characteristic function.
[0043] From Proposition 1 and Proposition 1, it can be seen that the errors in learning plasticity and memory stability in continual learning both depend on three factors: (1) the difference between tasks; (2) the flatness of the solution; and (3) the coverage of the parameter space.
[0044] FIG. 2A to FIG. 2C A conceptual model of the influence of the first two factors based on the theoretical analysis above is shown. In the figure, labels "A" and "B" represent Task A and Task B, and it should be understood that the order in which Task A and Task B are learned is not important.
[0045] Figure 2A The original solution of Task A and Task B is shown conceptually, where Indicates that task A has the minimum loss The solution, Indicates that task B has the minimum loss The solution, θ A,B Represents the shared solution of Task A and Task B. Figure 2B and Figure 2C The dotted line in Figure 2A The original solution in . Figure 2B As shown, finding a flatter solution to the task can reduce the shared solution θ A,B The generalization error and generalization gap of Figure 2C As shown, reducing the divergence between tasks can reduce the shared solution θ A,B It can be clearly seen that a solution for one task that is flatter or closer to the solution of other tasks can reduce the generalization error and generalization gap of the shared solution.
[0046] Although finding flat minima for continual learning has attracted increasing attention in recent work, it is difficult to mitigate the other two factors by learning all tasks using a shared set of parameters or learning each task using an isolated parameter subspace. Considering the above three factors, it is desirable to improve continual learning from an architectural perspective.
[0047] Figure 3A An exemplary framework for continuous learning of task sequences in accordance with aspects of the present disclosure is shown.
[0048] For illustration, the input data 310 may be exemplified by image data, and the task may be exemplified by an image classification task. The input data 210 may include a training data set for each of the tasks 1 to T. It should be understood that various aspects of the present disclosure may be applied to various applications and scenarios in which various tasks are performed.
[0049] Instead of using a single neural network to learn all tasks, Figure 3A Multiple sub-networks are used in the architecture. For example, Figure 3A As shown, K sub-networks 320-1 to 320-K are used. The K sub-networks 320-1 to 320-K can be represented as i=1, ..., K. The K sub-networks 320-1 to 320-K receive input data (such as an image) in parallel and generate corresponding feature representations of the input image. In practice, the sub-networks 320-1 to 320-K are more efficient than a single continuous learning model (such as Figure 1 The sub-networks of the model 120 shown are much narrower in order to save parameters, so each sub-network 320 can be referred to as a small continuous learner, and the framework can be referred to as a collaborative small continuous learner (CoSCL).
[0050] The feature integration subnetwork 330 receives the corresponding feature representations generated by the subnetworks 320-1 to 320-K and obtains predictions based on the feature representations. In one implementation, the feature integration subnetwork 330 can be implemented by a fully connected layer or a fully connected network that predicts the average of the corresponding feature representations. The feature integration subnetwork 330 can be represented as Then the final prediction p is Then, the optimization parameters can be Optimize the objective or loss L CoSCL It can be determined by the above equation (1), that is, Therefore, based on the loss To update or optimize the optimizable parameters
[0051] Figure 3B An exemplary framework for continuous learning of task sequences in accordance with aspects of the present disclosure is shown.
[0052] exist Figure 3A and Figure 3B In the same or corresponding units, the same labels are used and are not described in detail in Figure 3A and Figure 3B The same or corresponding units in .
[0053] exist Figure 3B In the embodiment of the present invention, the predictions p1…p made by the corresponding feature representations from the continuous learners 320-1 to 320-K are used. K To further shorten the divergence between the continuous learners 320-1 to 320-K, so as to enhance the advantage of feature integration. In one implementation, the corresponding prediction p corresponding to the continuous learner 320-i is i for By penalizing the predictions p1…p related to the current task made by the corresponding feature representations from the continuous learners 320-1 to 320-K K The difference of is used to perform additional collaboration of the continuous learners 320-1 to 320-K. In one implementation, the widely used Kullback Leibler (KL) divergence can be adopted, and the ensemble collaboration (EC) loss is defined as follows:
[0054] Optimize the objective or loss L CoSCL It can be determined by the above equations (1) and (9), that is, where γ is a hyperparameter. Therefore, we can To update or optimize the optimizable parameters In one implementation, the well-known Adam method can be used to update the parameters
[0055] Figure 3C An exemplary framework for continuous learning of task sequences in accordance with aspects of the present disclosure is shown.
[0056] exist FIG. 3A to FIG. 3C In the same or corresponding units, the same labels are used and are not described in detail in FIG. 3A to FIG. 3C The same or corresponding units in .
[0057] exist Figure 3C In the embodiment, in order to more effectively modulate the task correlation, a set of task adaptive gates (TG) {g t,i}Weight the outputs of the small continuous learners 320-1 to 320-K. Then, the final prediction p is Specifically, for a continuous learner i performing task t, the gate output by the gate subnetwork 340 is defined as g t,i =σ(s·α t,i ), where α t,i are learnable weights, s is a scaling factor and σ(·) represents the sigmoid function.
[0058] Then, all optimizable parameters are Optimize the objective or loss L CoSCL It can be determined by the above equation (1), that is, Therefore, based on the loss To update or optimize the optimizable parameters
[0059] Figure 3DAn exemplary framework for continuous learning of task sequences in accordance with aspects of the present disclosure is shown.
[0060] exist FIG. 3A to FIG. 3D In the same or corresponding units, the same labels are used and are not described in detail in FIG. 3A to FIG. 3D The same or corresponding units in .
[0061] exist Figure 3D In the embodiment, in order to more effectively modulate the task correlation, a set of task adaptive gates (TG) {g t,i}Weight the outputs of the small continuous learners 320-1 to 320-K. Then, the final prediction p is Specifically, for a continuous learner i performing task t, the gate output by the gate subnetwork 340 is defined as g t,i =σ(s·α t,i ), where α t,i are learnable weights, s is a scaling factor and σ(·) represents the sigmoid function. Then, all optimizable parameters are
[0062] and using the predictions p1…p made by the corresponding feature representations from the continuous learners 320-1 to 320-K K To further shorten the divergence between the continuous learners 320-1 to 320-K, so as to enhance the advantage of feature integration. In one implementation, the corresponding prediction p corresponding to the continuous learner 320-i is i for By penalizing the predictions p1…p related to the current task made by the corresponding feature representations from the continuous learners 320-1 to 320-K K The difference of is used to perform additional collaboration of the continuous learners 320-1 to 320-K. In one implementation, the KL divergence can be adopted, and the ensemble collaboration (EC) loss is defined as follows:
[0063] Optimize the objective or loss L CoSCL It can be determined by the above equations (1) and (10), that is, where γ is a hyperparameter. Therefore, we can To update or optimize the optimizable parameters
[0064] Figure 3E An exemplary framework for continuous learning of task sequences according to aspects of the present disclosure is shown.
[0065] exist FIG. 3A to FIG. 3EIn the same or corresponding units, the same labels are used and are not described in detail in FIG. 3A to FIG. 3E The same or corresponding units in .
[0066] exist Figure 3E In the embodiment of the present invention, the gate sub-network 340 is implemented as a continuous learning neural network. As shown in the figure, the gate sub-network receives input data 310 and generates a plurality of gates based on the input data 310. t,i If the task label is not provided in the training dataset, the gate g can be inferred by the continuous learner 340 t,i Or the weight α of the gate mentioned above t,i In one implementation, the continuous learner 340 includes a feature extractor and a fully connected layer, and can be represented as Then, all optimizable parameters are
[0067] Optimize the objective or loss L CoSCL It can be determined by the above equations (1) and (10), that is, where γ is a hyperparameter. Therefore, we can To update or optimize the optimizable parameters It should be understood that in another implementation, the parameter φ of the gate sub-network 340 g The continuous learning loss L is included in equation (1) together with the parameters of the continuous learners 320-1 to 320-K. CL 's calculation.
[0068] It should be understood that the gate sub-network 340 implemented as a continuous learner can also be used for FIG. 3A to FIG. 3D In the embodiment of .
[0069] like FIG. 3A to FIG. 3E As shown, by designing an architecture with a fixed number of narrower subnetworks to learn incremental tasks in parallel, two errors related to learning plasticity and memory stability can be naturally reduced by improving the difference between tasks, the flatness of solutions, and the coverage of parameter space. The difference between tasks, the flatness of solutions, and the coverage of parameter space are effectively improved through feature integration, ensemble collaboration, and task-adaptive gating.
[0070] In one embodiment, the process of structural optimization is shown in Table 1 below, where EWC stands for elastic weight consolidation, which implements a weight regularization strategy. Table 1
[0071] In an exemplary experiment, FIG. 3A to FIG. 3E As shown, the visual classification task is performed based on CoSCL. Four representative continuous learning benchmarks are considered. The first two benchmarks have the CIFAR-100 dataset, which contains 100-class color images with 500 training samples and 100 test samples per class, with a size of 32×32. The 100 classes are randomly split (RS) into 20 incremental tasks or according to super classes (SC). The other two benchmarks have larger datasets and are randomly split into 10 incremental tasks: CUB-200-2011 includes 200 classes and 11788 bird images of size 224×224, and is split into 30 images per class for training and the rest for testing. Tiny-ImageNet is derived from iILSVRC-2012 and consists of 200-class natural images of size 64×64.
[0072] As an implementation, a CNN architecture with 6 convolutional layers and 2 fully connected layers can be used for a single continuous learner (SCL) 120 (which is considered as a baseline) and for multiple small continuous learners 320. Since CoSCL consists of multiple continuous learners, a similar architecture and a correspondingly reduced network width (i.e., using fewer channels) is used to keep the total number of parameters comparable to the baseline in order to make the comparison as fair as possible. Then, there is an intuitive trade-off between the number of learners and the width of the sub-network.
[0073] Figure 4 The exemplary performance of SCL and CoSCL with different numbers of continuous learners is shown, where the total number of parameters is comparable for SCL and CoSCL with different numbers of continuous learners. The horizontal axis represents the number of small continuous learners for CoSCL, and the vertical axis represents the average accuracy of 20 tasks.
[0074] Figure 5 The exemplary performance of SCL and CoSCL with the same number of continuous learners is shown. “#” represents the number of parameters, and SCL represents a single continuous learner, such as Figure 1 As shown in Figure 2, CE stands for classifier ensemble, FE stands for feature ensemble, TG stands for task adaptation gate, and EC stands for ensemble collaboration. FE, FE+EC, FE+TG, and FE+TG+EC are respectively FIG. 3A to FIG. 3D As shown in Figure 4 and Figure 5 As shown, CoSCL can improve the performance compared to SCL with a comparable number of parameters due to the fact that CoSCL can effectively improve the difference between tasks, the flatness of the solution, and the coverage of the parameter space.
[0075] Figure 6The performance of the corresponding continuous learner in CoSCL is shown. CL ID represents the ID of the continuous learner 320, TID represents the ID of the task, and the grayscale represents the relative accuracy. Figure 6 The upper and lower halves in are obtained based on the training data sets CIFAR-100-SC and CIFAR-100-RS, respectively. In the example shown, five continuous learners 320 are used in CoSCL to incrementally learn twenty tasks. As shown in the figure, the performance of the corresponding continuous learners in CoSCL varies significantly across tasks. The relative accuracy of each task is calculated by subtracting the average of the performance of each continuous learner, where there is an accuracy gap of about 10% to 20% between the best accuracy and the worst accuracy. The predictions made by the feature representations of each continuous learner are significantly different across tasks and complement each other, indicating that their solutions are highly diverse.
[0076] Figure 7 shows the features from the small learner 320 across tasks -Estimation of divergence. Specifically, the discriminator is trained to distinguish whether the image features from the small learner 320 belong to the task, where Figure 7 The larger discrimination loss shown on the vertical axis indicates a smaller -divergence. Figure 7 As shown, FE and EC can be reduced to a great extent -divergence, while TG has a modest benefit.
[0077] Figure 8 The curvature of the loss landscape of the learned solution is shown. T0 to T4 represent tasks 0 to 4, and L represents the loss. As shown in the figure, FE and EC help the network converge to a flatter minimum. Figures 4 to 8 As shown in the figure, using CoSCL to coordinate multiple small continuous learners helps to reduce the gap between tasks in the feature space. -divergence and find flat minima, which can benefit both learning plasticity and memory stability.
[0078] Fig. 9 An exemplary process for continuous learning of multiple tasks according to various aspects of the present disclosure is shown. It should be understood that the process can be implemented with a computer or a processor.
[0079] At block 910, input data is received in parallel by a plurality of continuous learning sub-networks, the input data being related to a task among a plurality of tasks, the number of the plurality of continuous learning sub-networks being fixed and independent of the number of the plurality of tasks.
[0080] At block 920 , a plurality of feature representations are generated based on the input data by the plurality of continuous learning sub-networks, respectively.
[0081] At block 930 , a prediction related to a task is generated by the feature integration subnetwork based on the plurality of feature representations.
[0082] At block 940 , a continuous learning loss value is generated based on the prediction associated with the one task and information associated with tasks that have been learned up to the one task.
[0083] At block 950 , learnable parameters of the plurality of continuous learning sub-networks and the feature integration sub-network are updated based on the continuous learning loss value.
[0084] In one embodiment, a plurality of predictions related to the one task are generated by the feature integration subnetwork based on the plurality of feature representations, respectively. An integrated collaborative loss value is generated based on the plurality of predictions related to the one task. At block 950, learnable parameters of the plurality of continuous learning subnetworks and the feature integration subnetwork are updated based on the continuous learning loss value and the integrated collaborative loss value.
[0085] In an embodiment, the plurality of feature representations are weighted using a plurality of gates output by the gating sub-network. At block 930, a prediction related to the one task is generated by the feature integration sub-network based on the plurality of weighted feature representations. At block 950, learnable parameters of the plurality of continuous learning sub-networks, the feature integration sub-network, and the gating sub-network are updated based on the continuous learning loss value.
[0086] In an embodiment, a plurality of feature representations are weighted using a plurality of gates output by a gating subnetwork. A plurality of predictions related to the one task are generated by a feature integration subnetwork based on the plurality of weighted feature representations, respectively, and an integrated collaborative loss value is generated based on the plurality of predictions related to the one task. At box 930, a prediction related to the one task is generated by the feature integration subnetwork based on the plurality of weighted feature representations. At box 950, learnable parameters of the plurality of continuous learning subnetworks, the feature integration subnetwork, and the gating subnetwork are updated based on the continuous learning loss value and the integrated collaborative loss value.
[0087] In an embodiment, the gate sub-network includes a set of vectors corresponding to a plurality of tasks and a plurality of continuous learning sub-networks.
[0088] In an embodiment, the gate subnet comprises a continuously learning gate subnetwork, wherein the continuously learning gate subnetwork receives input data and generates a plurality of gates based on the input data.
[0089] In an embodiment, at block 940 , a continuous learning loss value is generated based on one of a weight regularization method, a memory replay method, and a parameter isolation method.
[0090] In an embodiment, the integrated collaborative loss value represents the divergence between multiple predictions related to the one task and corresponding to multiple continuous learning sub-networks respectively. Based on the multiple predictions related to the one task, the integrated collaborative loss value is generated using the KullbackLeibler (KL) divergence value.
[0091] In an embodiment, the multiple consecutive learning sub-networks have the same or similar structure.
[0092] In an embodiment, the input data includes one or more of image data, video data, graph data, game data, and text data, the multiple tasks include one or more of a classification task, an image segmentation task, and a content or action generation task, and the prediction includes classification of image data, video data, or graph data, image segmentation of image data or video data, and one or more of content or actions generated based on text data, game data, graph data, or video data.
[0093] In an embodiment, the input data includes image data or video data obtained in one of an autonomous driving system, an intelligent transportation system, an intelligent manufacturing system, an industrial equipment system, an intelligent maintenance equipment system, and a medical equipment system, the plurality of tasks include an image classification task or an image segmentation task, and the prediction includes a classified or segmented image portion related to the image data or video data. In an embodiment, the input data includes video data obtained in one of an autonomous driving system, an intelligent transportation system, an intelligent manufacturing system, an industrial equipment system, an intelligent maintenance equipment system, and a medical equipment system, the plurality of tasks include an action generation task, and the prediction includes an action based on the video data. In an embodiment, the input data includes graph data obtained in one of a social networking system, a financial network system, and a website platform, the plurality of tasks include the identification of abnormal accounts included in the graph data, and the prediction includes the classification of accounts.
[0094] Fig.10 An exemplary process for performing a task using a trained model according to various aspects of the present disclosure is shown. It should be understood that the process can be implemented with a computer or a processor.
[0095] At box 1010, input data is received in parallel by multiple continuous learning sub-networks of the model, the input data is related to a task in a plurality of tasks, and the number of the multiple continuous learning sub-networks is fixed and independent of the number of the plurality of tasks.
[0096] At block 1020 , a plurality of feature representations are generated based on the input data by the plurality of continuous learning sub-networks, respectively.
[0097] At block 1030 , a task-related prediction is generated by a feature integration subnetwork of the model based on the multiple feature representations.
[0098] In an embodiment, the plurality of feature representations are weighted using a plurality of gates output by the gating subnetwork. At block 1030, a prediction related to the task is generated by the feature integration subnetwork based on the plurality of weighted feature representations.
[0099] In an embodiment, the gate sub-network includes a set of vectors corresponding to a plurality of tasks and a plurality of continuous learning sub-networks.
[0100] In an embodiment, the gate sub-network comprises a continuously learning gate sub-network, wherein the continuously learning gate sub-network receives input data and generates a plurality of gates based on the input data.
[0101] In an embodiment, the multiple consecutive learning sub-networks have the same or similar structure.
[0102] In an embodiment, the input data includes one or more of image data, video data, graph data, game data, text data, and the multiple tasks include one or more of classification tasks, image segmentation tasks, content or action generation tasks.
[0103] Fig.11 1 shows an exemplary computing system according to various aspects of the present disclosure. The computing system 1100 may include at least one processor 1110. The computing system 1100 may also include at least one storage device 1120. The storage device 1120 may store computer executable instructions that, when executed, cause the processor 1110 to perform operations according to the embodiment of the present disclosure. Figures 1 to 10 Any operation of an embodiment of the present disclosure is described.
[0104] Embodiments of the present disclosure may be embodied in a computer-readable medium such as a non-transitory computer-readable medium. The non-transitory computer-readable medium may include instructions that, when executed, cause one or more processors to perform operations according to the embodiment of the present disclosure. Figures 1 to 10 Any operation of an embodiment of the present disclosure is described.
[0105] Embodiments of the present disclosure may be embodied in a computer program product comprising computer executable instructions that, when executed, cause one or more processors to perform operations according to the present disclosure. Figures 1 to 10 Any operation of an embodiment of the present disclosure is described.
[0106] It should be understood that all operations in the above methods are merely exemplary operations, and the present disclosure is not limited to any operations in these methods or the order of these operations, and should encompass all other equivalents under the same or similar concept.
[0107] It should also be understood that all modules in the above-mentioned device can be implemented in various ways. These modules can be implemented as hardware, software or a combination thereof. In addition, any module in these modules can be further divided into submodules or combined together in function.
[0108] The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects. Therefore, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents of the elements of the various aspects described throughout this disclosure are expressly incorporated herein by reference and are intended to be covered by the claims, and these structural and functional equivalents are known or will be known later to those of ordinary skill in the art.
Claims
1. A computer-implemented method for continuous learning of multiple tasks, comprising: receiving input data in parallel by a plurality of continuous learning sub-networks, the input data being related to one of the plurality of tasks, the number of the plurality of continuous learning sub-networks being fixed and independent of the number of the plurality of tasks; The plurality of continuous learning sub-networks respectively generate a plurality of feature representations based on the input data; Generating, by a feature integration subnetwork, a prediction related to the one task based on the plurality of feature representations; generating a continuous learning loss value based on the prediction related to the one task and information related to tasks that have been learned up to the one task; and The learnable parameters of the plurality of continuous learning sub-networks and the feature integration sub-network are updated based on the continuous learning loss value.
2. The method according to claim 1, further comprising: Generating, by the feature integration subnetwork, a plurality of predictions related to the one task based on the plurality of feature representations respectively; generating an integrated collaborative loss value based on the plurality of predictions associated with the one task; Wherein, the updating of the learnable parameters further includes: updating the learnable parameters of the multiple continuous learning sub-networks and the feature integration sub-network based on the continuous learning loss value and the integrated collaborative loss value.
3. The method according to claim 1, further comprising: weighting the plurality of feature representations using a plurality of gates output by the gate subnetwork; Wherein, generating the prediction related to the one task further comprises: generating the prediction related to the one task based on the multiple weighted feature representations by the feature integration subnetwork; Wherein, updating the learnable parameters further comprises: updating the learnable parameters of the multiple continuous learning sub-networks, the feature integration sub-network and the gate sub-network based on the continuous learning loss value.
4. The method according to claim 2, further comprising: weighting the plurality of feature representations using a plurality of gates output by the gate subnetwork; Wherein, generating the prediction related to the one task further comprises: generating the prediction related to the one task based on the multiple weighted feature representations by the feature integration subnetwork; Wherein, generating a plurality of predictions related to the one task further comprises: generating, by the feature integration subnetwork, the plurality of predictions related to the one task based on the plurality of weighted feature representations respectively; Wherein, the updating of the learnable parameters further comprises: updating the learnable parameters of the plurality of continuous learning sub-networks, the feature integration sub-network and the gate sub-network based on the continuous learning loss value and the integrated collaborative loss value.
5. The method according to claim 4, wherein: The gating sub-network includes a set of vectors corresponding to the plurality of tasks and the plurality of continuous learning sub-networks.
6. The method according to claim 4, wherein: The gate sub-network includes a continuously learning gate sub-network, wherein the continuously learning gate sub-network receives the input data and generates the plurality of gates based on the input data.
7. The method according to claim 4, wherein: The generating the continuous learning loss value includes generating the continuous learning loss value based on one of a weight regularization method, a memory replay method, and a parameter isolation method.
8. The method according to claim 4, wherein: The integrated collaborative loss value represents the divergence between the multiple predictions related to the one task and corresponding to the multiple continuous learning sub-networks respectively.
9. The method according to claim 8, wherein: The generating the integrated collaborative loss value includes generating a Kullback Leibler (KL) divergence value based on the multiple predictions related to the one task.
10. The method according to claim 4, wherein: The input data includes one or more of image data, video data, graph data, game data, and text data, the multiple tasks include one or more of classification tasks, image segmentation tasks, and content or action generation tasks, and the prediction includes one or more of the following: classification of the image data, the video data, or the graph data, image segmentation of the image data or the video data, and content or action generated based on the text data, game data, graph data, or video data.
11. The method according to claim 4, wherein: The input data includes image data or video data obtained in one of an autonomous driving system, an intelligent transportation system, an intelligent manufacturing system, an industrial equipment system, an intelligent maintenance equipment system, and a medical equipment system, the plurality of tasks include an image classification task or an image segmentation task, and the prediction includes a classified or segmented image portion associated with the image data or video data; or The input data includes video data obtained in one of an autonomous driving system, an intelligent transportation system, an intelligent manufacturing system, an industrial equipment system, an intelligent maintenance equipment system, and a medical equipment system, the plurality of tasks include an action generation task, and the prediction includes an action based on the video data; or The input data includes graph data obtained in one of a social networking system, a financial network system, and a website platform, the multiple tasks include identifying abnormal accounts included in the graph data, and the prediction includes classification of the accounts.
12. A computer-implemented method for performing a task using a trained model, comprising: receiving input data in parallel by a plurality of continuous learning sub-networks of the model, the input data being related to the task in a plurality of tasks, the number of the plurality of continuous learning sub-networks being fixed and independent of the number of the plurality of tasks; The plurality of continuous learning sub-networks respectively generate a plurality of feature representations based on the input data; A prediction related to the task is generated by a feature integration subnetwork of the model based on the multiple feature representations.
13. The method according to claim 12, further comprising: weighting the plurality of feature representations using a plurality of gates output by the gate subnetwork; Wherein, generating the prediction related to the task further includes: generating the prediction related to the task based on the multiple weighted feature representations by the feature integration subnetwork.
14. The method according to claim 13, wherein: The gating sub-network includes a set of vectors corresponding to the plurality of tasks and the plurality of continuous learning sub-networks.
15. The method according to claim 13, wherein: The gate sub-network includes a continuously learning gate sub-network, wherein the continuously learning gate sub-network receives the input data and generates the plurality of gates based on the input data.
16. The method according to claim 12, wherein: The multiple continuous learning sub-networks have the same or similar structure.
17. The method according to claim 12, wherein: The input data includes one or more of image data, video data, graph data, game data, and text data, the multiple tasks include one or more of classification tasks, image segmentation tasks, and content or action generation tasks, and the prediction includes one or more of the following: classification of the image data, the video data, or the graph data, image segmentation of the image data or the video data, content or action generated based on the text data, game data, graph data, or video data.
18. A computer system comprising: one or more processors; as well as One or more storage devices storing computer executable instructions which, when executed, cause the one or more processors to perform the operations of the method according to any one of claims 1 to 17.
19. One or more computer-readable storage media storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of any one of claims 1 to 17.
20. A computer program product comprising computer executable instructions which, when executed, cause one or more processors to perform the operations of the method of any one of claims 1 to 17.
Citation Information
Cited By
Psychological consultation model training method and device, electronic equipment and storage medium
CN120781052A
Training method and device of psychological counseling model, electronic equipment and storage medium
CN120781052B