A training method and device for a memory-enhanced continuous learning neural network model

By introducing a hippocampal-like memory storage area into the neural network and constructing an scalable memory module, the problem of forgetting in continuous learning of artificial neural networks is solved, memory enhancement and efficient memory of the original tasks are achieved, and catastrophic problems are overcome. Forgetting, reduces the forgetting rate and increases training speed.

CN113688882BActive Publication Date: 2024-09-06TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110886523.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-03
Publication Date
2024-09-06
Estimated Expiration
2041-08-03

AI Technical Summary

Technical Problem

The existing technology cannot effectively solve the catastrophic forgetting problem that occurs in continuous learning of artificial neural networks when the number of models to be learned is large and the storage space is limited. Moreover, the lack of memory modules leads to serious forgetting phenomena and cannot effectively memorize and enhance memory. .

Method used

A memory-enhanced continuous learning neural network model training method is proposed. By introducing a hippocampus-like memory storage area into the neural network, the mean and variance of the data are used to build an scalable memory module to achieve memory enhancement for the original task. , combine the loss function and regularization constraints to reduce the forgetting phenomenon.

Benefits of technology

While occupying less storage area and training resources, it converges quickly, reduces the decline in task classification accuracy when continuously learning multiple tasks, realizes efficient memory of continuous learning tasks, overcomes the problem of catastrophic forgetting, reduces the forgetting rate and Increase training speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113688882B
    Figure CN113688882B
Patent Text Reader

Abstract

The present invention proposes a training method and device for a memory-enhanced continuous learning neural network model, wherein the method includes the following steps: obtaining input training data and preprocessing the training data; inputting the preprocessed training data into a feature extraction network and outputting features corresponding to the training data; inputting features corresponding to the training data into a classification network and outputting category vectors corresponding to the training data; establishing a memory storage area and storing target features that meet preset conditions among the features corresponding to the training data into the memory storage area; and constructing a neural network based on the feature extraction network, the classification network and the memory storage area. The method proposed in the present application is inspired by human brain memory playback, utilizes a simple data playback method, and constructs an expandable memory module by storing the mean and variance of the data, thereby achieving a memory enhancement effect on the original task and solving the problem of forgetting the learned tasks that occurs in the continuous learning problem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer multimedia technology, and in particular to an image classification technology. Background Art

[0002] As we all know, humans can learn new skills without forgetting the original knowledge. However, for existing artificial intelligence, especially deep neural networks, catastrophic forgetting occurs when learning new knowledge. For an artificial neural network, forgetting the previously learned content after learning new skills is called catastrophic forgetting. Continuous learning means that artificial neural networks can continuously learn different tasks and overcome the problem of low accuracy of past tasks as the number of tasks increases. Therefore, how to enable artificial neural networks to achieve continuous learning like humans and overcome the forgetting problem is very important in both academic and application fields.

[0003] At present, many cutting-edge research has been carried out on the problem of continuous learning. NeurIPS, ICML, and CVPR, the top conferences in the fields of machine learning and computer science, have successively held workshops on continuous learning for discussions and exchanges. There are three existing solutions for continuous learning. The first is from the data perspective. This solution is to store samples of past tasks and add sample replays to new tasks. The second is to start from the neural network update method. This solution mainly adds regularization terms to the loss function to limit the direction of model update. The third solution is to start from the neural network structure. This solution designs different network structures and masks for different tasks. Although the existing continuous learning research has made breakthrough progress, it is still a long way from truly solving the problem of catastrophic forgetting. In the case of a large number of model learning and limited storage space, it is difficult for existing solutions to achieve very effective results.

[0004] At the same time, the existing continuous learning methods are not combined with human brain memory patterns and deep-seated reasons for forgetting. The human brain has a corresponding hippocampus to store memories, but artificial neural networks lack memory modules. The lack of memory modules in the human brain will cause forgetting or even inability to remember. The deep-seated reasons for forgetting in neural networks are also the same, so how to construct memory modules for memory enhancement and introduce the concept of the hippocampus into the field of continuous learning is an important topic and solution. Summary of the invention

[0005] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

[0006] To this end, the first purpose of the present invention is to propose a training method for a memory-enhanced continuous learning neural network model, so as to achieve the memory enhancement effect of the original task under the inspiration of human brain memory playback, and solve the problem of forgetting the learned tasks that arises in the continuous learning problem.

[0007] The second objective of the present invention is to provide an image classification method.

[0008] The third object of the present invention is to provide a training device for a memory-enhanced continuous learning neural network model.

[0009] A fourth object of the present invention is to provide a non-transitory computer-readable storage medium.

[0010] To achieve the above object, the first embodiment of the present invention provides a training method for a memory-enhanced continuous learning neural network model, comprising the following steps:

[0011] Obtaining input training data and preprocessing the training data;

[0012] Input the preprocessed training data into a feature extraction network, and output features corresponding to the training data;

[0013] Input the features corresponding to the training data into a classification network, and output the category vector corresponding to the training data;

[0014] Establishing a memory storage area, and storing target features that meet preset conditions among the features corresponding to the training data in the memory storage area;

[0015] A neural network is constructed based on the feature extraction network, the classification network and the memory storage area.

[0016] Optionally, in one embodiment of the present application, preprocessing the training data includes:

[0017] Process the training data into vectors of a common format In the form of, n represents the task number, i represents the data number under the current task, and j represents the vector component under the current data.

[0018] Optionally, in one embodiment of the present application, storing target features satisfying preset conditions among the features corresponding to the training data in the memory storage area includes:

[0019] For each task n, a sub-memory storage area m is set in the memory storage area M. n ;

[0020] The memory storage area corresponding to n tasks is expressed as: M = {m1 ,m 2 ,m 3 ,……,m n}.

[0021] Optionally, in one embodiment of the present application, before constructing a neural network according to the feature extraction network, the classification network and the memory storage area, it also includes:

[0022] Construct loss function;

[0023] The feature extraction network and the classification network are updated using the loss function according to the features corresponding to the training data and the category vectors corresponding to the training data.

[0024] Optionally, in one embodiment of the present application, after storing the target features satisfying the preset conditions among the features corresponding to the training data in the memory storage area, the method further includes:

[0025] For the current task m, the vector of the current task Through the feature extraction network, f i m , according to the data under the same label of the current task m, the feature vector set {f1 m , f2 m , f3 m , ..., f i m} and the label Y1 corresponding to the feature vector set m ;

[0026] Calculate the mean of the features in the feature vector set and variance The calculated mean, variance and label are stored in the sub-memory storage area m of the current task m in the memory storage area. m ;

[0027] Put all k different categories of tasks m into the sub-memory storage area m m , so as to compress and store the memory of the current task m into the memory storage area.

[0028] Optionally, in one embodiment of the present application, the mean and variance The calculation formula is:

[0029]

[0030]

[0031] Put all k different categories of tasks m into the sub-memory storage area m m In, we get:

[0032]

[0033] Optionally, in one embodiment of the present application, after the feature extraction network and the classification network are updated using the loss function, the method further includes:

[0034] By storing the mean and variance of the features of task m, according to the sub-memory storage area m m Generate a Normal Distribution Feature Set

[0035] generating memory enhancement data according to the normal distribution feature set;

[0036] The classification network is trained and updated according to the memory enhancement data.

[0037] To achieve the above-mentioned purpose, a second embodiment of the present application proposes an image classification method, comprising:

[0038] Get a dataset of images to be classified;

[0039] The data set of the image to be classified is input into a neural network trained by the training method of the memory-enhanced continuous learning neural network model described in any one of claims 1 to 7 to output the classification label of the image to be classified.

[0040] To achieve the above-mentioned purpose, the third aspect of the present application proposes a training device for a memory-enhanced continuous learning neural network model, comprising the following modules:

[0041] An acquisition module, used to acquire input training data and preprocess the training data;

[0042] A feature extraction module is used to input the preprocessed training data into the feature extraction network and output features corresponding to the training data;

[0043] A classification module, used to input the features corresponding to the training data into a classification network and output a category vector corresponding to the training data;

[0044] A creation module is used to establish a memory storage area, and store target features that meet preset conditions among the features corresponding to the training data into the memory storage area;

[0045] A construction module is used to construct a neural network based on the feature extraction network, the classification network and the memory storage area.

[0046] To achieve the above-mentioned objectives, the fourth aspect embodiment of the present application proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a training method for a memory-enhanced continuous learning neural network model, or implements an image classification method.

[0047] The technical effect of the present application is as follows: Inspired by the memory playback of the human brain, a simple data playback method is used to construct an expandable memory module by storing the mean and variance of the data, thereby achieving a memory enhancement effect on the original task and solving the problem of forgetting the learned tasks that occurs in continuous learning problems.

[0048] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0050] Figure 1 A flowchart of a training method for a memory-enhanced continuous learning neural network model provided in an embodiment of the present application;

[0051] Figure 2 A schematic diagram of a memory-enhanced continuous learning neural network model provided in an embodiment of the present application;

[0052] Figure 3 A schematic diagram of a training device for a memory-enhanced continuous learning neural network model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0054] The following describes a training method for a memory-enhanced continuous learning neural network model provided by an embodiment of the present invention with reference to the accompanying drawings.

[0055] like Figure 1 As shown, in order to achieve the above-mentioned purpose, the first aspect of the present invention proposes a training method for a memory-enhanced continuous learning neural network model, comprising the following steps:

[0056] Step S10, obtaining input training data, and preprocessing the training data;

[0057] Step S20, inputting the preprocessed training data into a feature extraction network, and outputting features corresponding to the training data;

[0058] Step S30, inputting the features corresponding to the training data into a classification network, and outputting a category vector corresponding to the training data;

[0059] Step S40, establishing a memory storage area, and storing target features that meet preset conditions among the features corresponding to the training data in the memory storage area;

[0060] Step S50, constructing a neural network based on the feature extraction network, the classification network and the memory storage area.

[0061] In one embodiment of the present application, further, specifically, the memory-enhanced continuous learning neural network model proposed in the embodiment of the present application has a principle block diagram as shown below: Figure 2 As shown, by introducing a hippocampus-like memory storage area into the neural network, the memory enhancement function for continuous learning tasks is realized. Specifically, the training part is divided into neural network training and memory storage. The input training data is preprocessed and feature extraction is performed under the feature extraction network designed by the present invention. The extracted features are divided into two parts, one part is used to train the classification network, and the label of the current task data is output. The other part of the extracted features is stored in the memory storage area using the memory compression method of the present invention to generate memory enhancement materials. When the neural network continuously learns different tasks, the above training process is continued to achieve the training purpose of the feature extraction network and the classification network and the generation of task-associated memory materials. In the test stage of inputting unlabeled data into the model, the model fixes the feature extraction network, activates the memory storage area, performs memory enhancement on the task-associated memory stored in the memory storage area, updates the classification network, and outputs the memory-enhanced label to achieve the testing and labeling of unlabeled data.

[0062] The memory-enhanced continuous learning neural network model proposed in the embodiment of the present application introduces a memory storage area for tasks in the training phase, and effectively feeds these memories back to the neural network through memory enhancement in the testing phase. By utilizing the regularization constraints of the constructed neural network model itself and combining memory enhancement means, it converges quickly while occupying less storage area and training resources, reduces the phenomenon of decreased task classification accuracy in the case of continuous learning of multiple tasks by the neural network, realizes efficient memory of continuous learning tasks, and overcomes the problem of catastrophic forgetting.

[0063] In one embodiment of the present application, further, preprocessing the training data includes:

[0064] Process the training data into vectors of a common format In the form of, n represents the task number, i represents the data number under the current task, and j represents the vector component under the current data.

[0065] In one embodiment of the present application, further, a feature extraction network is constructed. The feature extraction network part is mainly used to extract the features contained in the data. Here, different network structures can be selected according to actual needs, such as ResNet, VGGNet, etc. We select the convolution part of these networks to obtain our feature extraction network S. For the jth data of the nth task Through the feature extraction network S, we can get the feature f i n ,Right now

[0066]

[0067] For the jth data of the nth task The extracted feature f i n It will be used to train the classification network and store it in the memory storage area in a memory compression manner.

[0068] In one embodiment of the present application, further, a classification network is constructed, and the classification network part mainly converts the f generated by the feature extraction network into i n Classify and output a category vector. Here, a two-layer fully connected layer structure is used to build a classification network. The specific input and output dimensions are related to the actual data size. Since the present invention belongs to a single-label classification problem, the final output category vector has only one element. We get the classification network as H, for The extracted feature f i n The label can be output by the classification network H(f i n ) to determine the degree of correlation between each component. i n ) is the largest output component in the data we determined. The mathematical representation is:

[0069]

[0070] in Represents the data The labels determined by the feature extraction network and the classification network.

[0071] In one embodiment of the present application, further, in one embodiment of the present application, further, specifically, in order to realize the memory enhancement function, it is necessary to first establish a storage space, and reserve an area for storing specific content that has passed the feature extraction network. Our memory storage area is constructed based on the principle of hippocampal memory in the human brain. For each task, a subspace needs to be opened up in the storage space to store various information.

[0072] Storing target features that meet preset conditions among the features corresponding to the training data in the memory storage area includes:

[0073] For each task n, a sub-memory storage area m is set in the memory storage area M. n ;

[0074] The memory storage area corresponding to n tasks is expressed as: M = {m 1 ,m 2 ,m 3 ,……,m n}.

[0075] The neural network and storage area are built. Due to the size of data and storage area limitations in practical applications, the above construction can be appropriately adjusted.

[0076] In one embodiment of the present application, further, the embodiment of the present application takes into account the problem of reduced classification accuracy caused by past feature extraction changes in the feature extraction part when continuously learning multiple tasks and the problem of confusion of new categories during classification, and designs the following loss function:

[0077]

[0078] Among them, θ represents With label Y i n The difference between p (θ) represents the cross entropy function obtained under the current task, Represents the difference in parameters of the feature extraction part before and after the current task update. It represents the quadratic constraint relationship that causes confusion in classification after the classification part is updated. Feature extraction part The parameters of the feature extraction network will not change much, but will still follow L p (θ) decreases in the direction of update, while This causes the classification network to have a large loss function due to the square relationship after category confusion occurs, which limits updates.

[0079] This loss function comprehensively considers data forgetting and parameter changes of different networks. Under the constraints of this loss function, we update all data of the current task, which can better suppress the occurrence of forgetting.

[0080] The above steps are just a round of updates to the feature extraction network and the classification network. In order to better perform feature extraction and classification, obtain excellent features, obtain higher accuracy and a certain anti-forgetting effect, it is necessary to repeat the above steps until the feature extraction network training results are good and the classification network classification accuracy meets the requirements. Since the feature extraction network in the present invention has relatively strong robustness, under the loss function set by the present invention, it can converge under relatively few update rounds to obtain a relatively good feature extraction network. The classification network obtains a certain continuous learning ability through regularized constraints, and can learn new tasks with a small amount of data, so there will not be many repeated rounds.

[0081] Optionally, in one embodiment of the present application, before constructing a neural network according to the feature extraction network, the classification network and the memory storage area, it also includes:

[0082] Construct loss function;

[0083] The feature extraction network and the classification network are updated using the loss function according to the features corresponding to the training data and the category vectors corresponding to the training data.

[0084] In one embodiment of the present application, further, after storing the target features satisfying the preset conditions among the features corresponding to the training data in the memory storage area, the method further includes:

[0085] For the current task m, the vector of the current task Through the feature extraction network, f i m , according to the data under the same label of the current task m, the feature vector set {f1 m ,f2 m ,f3 m ,……,f i m} and the label Y1 corresponding to the feature vector set m ;

[0086] Calculate the mean of the features in the feature vector set and variance The calculated mean, variance and label are stored in the sub-memory storage area m of the current task m in the memory storage area. m ;

[0087] Put all k different categories of tasks m into the sub-memory storage area m m , so as to compress and store the memory of the current task m into the memory storage area.

[0088] In one embodiment of the present application, further, the mean and variance The calculation formula is:

[0089]

[0090]

[0091] Put all k different categories of tasks m into the sub-memory storage area m m In, we get:

[0092]

[0093] The above steps are the neural network update method for a single task in continuous learning. When there are n tasks in total, the above steps need to be repeated n times to learn different tasks. After the above operations, the neural network of the embodiment of the present application can continuously learn multiple tasks and achieve good classification results. The following is the memory enhancement link for the neural network.

[0094] In one embodiment of the present application, further, after the feature extraction network and the classification network are updated using the loss function, the method further includes:

[0095] By storing the mean and variance of the features of task m, according to the sub-memory storage area m m Generate a Normal Distribution Feature Set

[0096] generating memory enhancement data according to the normal distribution feature set;

[0097] The classification network is trained and updated according to the memory enhancement data.

[0098] Using these memory enhancement data, the classification network H can be trained and updated. Here, the update round is set to 1 for memory enhancement. The update round can also be increased appropriately, but the enhancement data should be kept as small as possible compared to the total amount of task training data. Similarly, memory enhancement can be performed on each task. After the memory enhancement operation, the classification network H becomes H′ after training and updating. At this point, the classification network H′ and the feature extraction network S have better robustness for continuous learning tasks, and can better label the tasks that have been learned in the past.

[0099] Test data to be classified

[0100] Through the memory enhancement link of the classification network in the previous step, the classification network H is updated to H′. In the test phase, the a-th unlabeled data from task m is tested The updated classification network H′ and the trained feature extraction network S can be applied, mathematically expressed as:

[0101]

[0102] in Represents the unlabeled data obtained after memory enhancement .

[0103] By following all the above steps, the classification function of the memory-enhanced continuous learning neural network model for labeled data can be realized. When constructing the neural network model and memory storage space, the dimension of the network and the size of the storage space can be adjusted according to the needs of the actual data. The neural network model constructed in the embodiment of the present application is a relatively robust and adjustable neural network model, which can achieve good learning effects for continuous learning tasks.

[0104] In one embodiment of the present application, further, by conducting experiments on two standard data sets in the image field, Cifar-10 and Cifar-100, the memory-enhanced continuous learning neural network model proposed in the embodiment of the present application showed excellent performance. In the Cifar-10 data set, the number of tasks is set to 5, each task has two categories, and the number of training rounds is 40; in the Cifar-100 data set, the number of tasks is set to 10, each task has 10 categories, and the number of training rounds is 80. In both experiments, the model memory replay rate is set to 10% of the original data set. For these two standard data sets, the memory enhancement model proposed in the present invention, under the same training rounds, compared with the existing continuous learning method, the forgetting rate is reduced by 50% and 40% respectively, and the training speed and model convergence speed are also correspondingly improved.

[0105] The technical effect of the present application is as follows: Inspired by the memory playback of the human brain, a simple data playback method is used to construct an expandable memory module by storing the mean and variance of the data, thereby achieving a memory enhancement effect on the original task and solving the problem of forgetting the learned tasks that occurs in continuous learning problems.

[0106] To achieve the above-mentioned purpose, a second embodiment of the present application proposes an image classification method, comprising:

[0107] Get a dataset of images to be classified;

[0108] The data set of the image to be classified is input into a neural network trained by the training method of the memory-enhanced continuous learning neural network model of the first aspect of the present application to output the classification label of the image to be classified.

[0109] As attached Figure 3 As shown, in order to achieve the above-mentioned purpose, the third aspect of the present application proposes a training device for a memory-enhanced continuous learning neural network model, comprising the following modules:

[0110] An acquisition module, used to acquire input training data and preprocess the training data;

[0111] A feature extraction module is used to input the preprocessed training data into the feature extraction network and output features corresponding to the training data;

[0112] A classification module, used to input the features corresponding to the training data into a classification network and output a category vector corresponding to the training data;

[0113] A creation module is used to establish a memory storage area, and store target features that meet preset conditions among the features corresponding to the training data into the memory storage area;

[0114] A construction module is used to construct a neural network based on the feature extraction network, the classification network and the memory storage area.

[0115] To achieve the above-mentioned objectives, the fourth aspect embodiment of the present application proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements a training method for a memory-enhanced continuous learning neural network model, or implements an image classification method.

[0116] The technical effects of the present application are as follows: the present invention proposes a data playback model, which achieves the ability to resist catastrophic forgetting while occupying a small storage space by storing the mean and variance of the data, thereby achieving the purpose of learning without forgetting; the present invention proposes a method for constructing a memory module of a deep neural network, which improves the robustness of the deep neural network by constructing an extended memory module, and the memory module has strong expansion capability and good portability, and can be expanded for different deep neural networks; the present invention proposes a memory enhancement method, which achieves memory enhancement of past tasks by imitating the memory mode of the human cerebral cortex and hippocampus, and solves the problem of catastrophic forgetting.

[0117] Although the present application is disclosed in detail with reference to the accompanying drawings, it should be understood that these descriptions are merely exemplary and are not intended to limit the application of the present application. The scope of protection of the present application is defined by the appended claims and may include various modifications, alterations and equivalents made to the invention without departing from the scope and spirit of the present application.

[0118] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0119] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0120] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0121] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0122] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0123] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0124] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0125] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A training method for a memory-enhanced continuous learning neural network model, characterized in that: include: Obtaining input training data and preprocessing the training data; Input the preprocessed training data into a feature extraction network, and output features corresponding to the training data; Input the features corresponding to the training data into a classification network, and output the category vector corresponding to the training data; Establishing a memory storage area, and storing target features that meet preset conditions among the features corresponding to the training data in the memory storage area; Constructing a neural network based on the feature extraction network, the classification network and the memory storage area; Get a dataset of images to be classified; Inputting the data set of the image to be classified into the trained neural network to output the classification label of the image to be classified; After storing the target features satisfying the preset conditions among the features corresponding to the training data in the memory storage area, the method further includes: For the current task m, the vector of the current task The feature extraction network is used to obtain , according to the data under the same label of the current task m, the feature vector set The label corresponding to the feature vector set ; Calculate the mean of the features in the feature vector set and variance , store the calculated mean, variance and label in the sub-memory storage area of ​​the current task m in the memory storage area ; Put all k different categories of tasks m into the sub-memory storage area , so as to compress and store the memory of the current task m into the memory storage area; The mean and variance The calculation formula is: ; ; Put all k different categories of tasks m into the sub-memory storage area In, we get: ; After the feature extraction network and the classification network are updated by using the loss function, the method further includes: By storing the mean and variance of the features of task m, according to the sub-memory storage area Generate a Normal Distribution Feature Set ; generating memory enhancement data according to the normal distribution feature set; The classification network is trained and updated according to the memory enhancement data.

2. The training method according to claim 1, characterized in that: Preprocessing the training data includes: Process the training data into vectors of a common format In the form of, n represents the task number, i represents the data number under the current task, and j represents the vector component under the current data.

3. The training method according to claim 2, characterized in that: Storing target features that meet preset conditions among the features corresponding to the training data in the memory storage area includes: For each task n, a sub-memory storage area is set in the memory storage area M ; The memory storage area corresponding to n tasks is expressed as: .

4. The training method according to claim 1, characterized in that: Before constructing a neural network according to the feature extraction network, the classification network and the memory storage area, it also includes: Construct loss function; The feature extraction network and the classification network are updated using the loss function according to the features corresponding to the training data and the category vectors corresponding to the training data.

5. A training device for a memory-enhanced continuous learning neural network model, characterized in that: include: An acquisition module, used to acquire input training data and preprocess the training data; A feature extraction module is used to input the preprocessed training data into the feature extraction network and output features corresponding to the training data; A classification module, used to input the features corresponding to the training data into a classification network and output a category vector corresponding to the training data; A creation module is used to establish a memory storage area, and store target features that meet preset conditions among the features corresponding to the training data into the memory storage area; A construction module, used to construct a neural network according to the feature extraction network, the classification network and the memory storage area; The device is also used for: Get a dataset of images to be classified; Inputting the data set of the image to be classified into the trained neural network to output the classification label of the image to be classified; After storing the target features satisfying the preset conditions among the features corresponding to the training data in the memory storage area, the method further includes: For the current task m, the vector of the current task The feature extraction network is used to obtain , according to the data under the same label of the current task m, the feature vector set The label corresponding to the feature vector set ; Calculate the mean of the features in the feature vector set and variance , store the calculated mean, variance and label in the sub-memory storage area of ​​the current task m in the memory storage area ; Put all k different categories of tasks m into the sub-memory storage area , so as to compress and store the memory of the current task m into the memory storage area; The mean and variance The calculation formula is: ; ; Put all k different categories of tasks m into the sub-memory storage area In, we get: ; After the feature extraction network and the classification network are updated by using the loss function, the method further includes: By storing the mean and variance of the features of task m, according to the sub-memory storage area Generate a Normal Distribution Feature Set ; generating memory enhancement data according to the normal distribution feature set; The classification network is trained and updated according to the memory enhancement data.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the training method of the memory-enhanced continuous learning neural network model as described in any one of claims 1 to 4 is implemented.