Method and system for modeling task features
By building a task input gateway, task feature extraction engine, replay buffer and task classification engine, extracting and decoupling task invariant features and task changing features, the difficult trade-off problem between stability and plasticity of existing continuous learning methods is solved, reducing the forgetting problem and improving model performance.
Patent Information
- Application Number
- CN202311813219.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-27
- Filing Date
- 2023-12-26
- Publication Date
- 2025-05-27
AI Technical Summary
Existing continuous learning methods are difficult to trade off between stability and plasticity, and are prone to forgetting problems when the number of tasks increases, and resource consumption is high.
By building a task input gateway, task feature extraction engine, replay buffer and task classification engine, task invariant features and task change characteristics are extracted, internal task relationships and cross-task relationships are captured, and task invariant features and task change characteristics are decoupled.
It effectively reduces the forgetting problem in continuous learning, improves the feature quality and learnability of the model, and reduces resource consumption.
Smart Images

Figure CN120045986A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a system and method for modeling task characteristics, and in particular, but not limited to, a system and method for modeling task characteristics for continuous learning applications. Background Art
[0002] Existing continual learning methods used in machine learning applications can be roughly divided into three categories: 1) regularization-based methods, 2) structure-based methods, and 3) replay-based methods (i.e., memory-based methods).
[0003] Regularization-based methods add constraints or penalties to the loss function, gradients, or input samples during training. One example method proposes adding a penalty term to limit excessive changes in the important weights of the model. Another method proposes to evaluate the importance of weights stimulated by synaptic intelligence. In this method, when locating the minimum, the regularization term used can reduce the search space of the parameters, which leads to a dilemma between stability and plasticity. Another regularization method proposes to measure the uncertainty of each node for a new task and apply two additional regularization terms for plasticity and stability. The regularization term in the gradient direction expands the search space and adapts the model to new tasks. An example method utilizes the Orthogonal Weights Modification (OWM) algorithm to decompose the new task gradient into the old task subspace to maintain the performance on the old task. Another method proposes to decompose the new task gradient and update the orthogonal gradient to the previous task. The goal of the regularization-based method is to learn new tasks that have minimal impact on the performance of the previous task. However, these methods face a trade-off between stability and plasticity and may suffer from forgetting problems when the number of tasks increases.
[0004] Structure-based methods aim to learn task-specific classifiers or model parameters. Depending on whether the model structure is expanded during training, they can be classified as dynamic or fixed network structure methods. When the previous model structure and knowledge are insufficient to learn new tasks, dynamic methods (e.g., DEN) can dynamically add neurons to the network. An example method of structure-based methods proposes to use expert gates to select the most relevant previous tasks to train new tasks. The learning-growth framework attempts to find the best model structure for each task during learning. In contrast, fixed network methods usually build large network structures that can provide enough neurons for all task training. In one instance, the attention mechanism is to identify and retain important neurons during new task training, while shielding irrelevant neurons. Another method proposes to save bit-level information and estimate the information gain of neurons to update parameters. Another method proposes a method to prevent forgetting by treating convolution filters as important parameters. These structure-based methods usually select certain filters to be retained for previous tasks and prevent them from being updated when training new tasks. Additional neurons and parameters provide model capabilities for new tasks. However, due to the dynamic addition of new neurons, this may require a lot of computing resources.
[0005] Replay-based methods take inspiration from human learning and review to prevent forgetting. One example method uses distance-based classification to select samples closest to the class center for the replay buffer. Another complement to this method selects the most representative samples for the replay buffer. Gradient Episodic Memory (GEM) is an example method based on the replay method. The GEM method proposes to measure the memory buffer during training of a new task to prevent the increasing loss of previous tasks. Another example method proposes to store class prototypes of previous tasks in the buffer. Another example proposes using VAEGAN as a replay buffer to generate samples in the latent space based on the previous task latent encoding. Replay-based methods provide previous references to the model by re-exposing the model to previous task samples, thereby helping the model reduce forgetting old tasks when learning new tasks.
[0006] Contrastive learning is another method for training machine learning models. The availability of labeled data is critical for deep learning. Contrastive learning methods have been proposed as self-supervised learning schemes using unlabeled data. DeepInfoMax is an exemplary method for maximizing the mutual information between an audio clip and its context audio, providing a contrastive learning approach. MoCo is another example scheme for learning input representations and their relationships to other inputs by determining whether they are similar or different. Instead of learning the semantic class of the input, the model identifies whether two inputs are the same or different. If they are the same, their potential representations should be very close. There are other contrastive methods. Although these methods still require large-scale unlabeled data to train the model, they provide good pre-trained feature extractors.
[0007] Some existing methods of continual learning and contrastive learning mainly focus on instance-level learning and do not explore cross-task information. Due to the focus on instance-level learning, current continual learning and contrastive learning methods may require a lot of computing resources. Some examples of these methods also require large datasets for learning, which also makes them resource-intensive. Summary of the invention
[0008] According to a first aspect of the present disclosure, a system for modeling task features for continuous learning is provided. The system comprises:
[0009] a task input gateway configured to receive a sequence of task samples;
[0010] A task feature extraction engine configured to process the received task samples and extract task invariant features and task variable features;
[0011] a replay buffer configured to store a subset of previous tasks as representative of previous tasks processed by the system;
[0012] a task classification engine configured to execute a task relationship process to determine task relationships between tasks, wherein the task relationships are based at least in part on a subset of previous tasks accessed from the replay buffer;
[0013] An output module is configured to output the task relationship used in continuous learning, wherein the replay buffer is updated by storing a subset of the output.
[0014] In one example, the task classification engine is configured to decouple the task invariant features and the task variable features based on the task relationship.
[0015] In one example, the task classification engine is configured as follows:
[0016] capturing internal task relationships based on processing the task variation features and the task invariant features;
[0017] Based on the subset of the previous tasks accessed from the replay buffer, cross-task relationships are constructed.
[0018] In one example, the task classification engine is configured to decouple the task invariant feature from the task variable feature based on at least one of the intra-task relationship and the cross-task relationship.
[0019] In one example, the system is configured to determine a contrastive learning pair, wherein the intra-task relationship and the cross-task relationship are defined by the determined contrastive learning pair.
[0020] In one example, the task classification engine is configured to determine a plurality of contrasts to decompose the task invariant features and the task varying features.
[0021] In one example, the task classification engine is configured to determine three types of contrasts to decompose the task invariant features and the task varying features.
[0022] In one example, the system includes:
[0023] a task-invariant feature extractor configured to extract the task-invariant feature from the received task sample series;
[0024] A task variation feature extractor is configured to extract the task variation feature from the received task sample series.
[0025] In one example, the task classification engine is configured as follows:
[0026] The task invariant features and the task variable features are extracted by applying at least one or more constraints, wherein the constraints include:
[0027] Establishing a boundary between the task-invariant feature and the task-varying feature;
[0028] Generate similar task-invariant features across tasks;
[0029] Establish different boundaries between the task variation characteristics of each task or classification.
[0030] In one example, the task classification engine is configured to decouple the task invariant feature and the task variable feature based on the following operations:
[0031] Determine the orthogonal distance loss function;
[0032] Applying the orthogonal distance loss function to the identified task-invariant features and the task-variant features;
[0033] Determine contrastive learning pairs of features;
[0034] The learning pair is utilized to further decouple the task-invariant features and the task-variant features.
[0035] In one example, the task classification engine is configured to determine the internal task relationship, wherein the internal task relationship is determined based on the learning pair, which decouples the task invariant features and the task varying features while clustering the invariant features regardless of categories.
[0036] In one example, the task classification engine is further configured to:
[0037] applying a classifier to the task variation features, wherein the classifier is configured to group together task variation features of a particular category;
[0038] For each defined category, learning pairs of task-varying features are determined.
[0039] In one example, the task classification engine is configured as follows:
[0040] extracting features of samples of previous tasks from the replay buffer;
[0041] determining the task-varying features, the task-invariant features, and additional updated learned pairs of the task-varying and task-invariant features based on features from the replay buffer;
[0042] A cross-task relationship is determined based on the updated learned pairs.
[0043] In one example, the internal task relationship is defined as a contrast loss function, wherein the function of the internal task relationship is:
[0044] Among them, x′ pp represents positive samples, I represents all samples, pp represents the positive pair subset, |pp| represents the total number pp, τ represents the temperature index, and np represents the negative pair;
[0045] Among them, pp represents the learning pair set from the task invariant features, and np represents the learning pair set between the task invariant features and the task variable features.
[0046] In an example, the contrastive loss function is an example of an orthogonal distance loss function.
[0047] In one example, the cross-task relationship is defined by a learning pair, wherein the learning pair includes np, pp and vp, wherein np represents a learning pair set between the task invariant feature and the task variable feature, pp represents a learning pair set from the task invariant feature, and vp represents a learning pair of the task variable feature;
[0048] Wherein, each set of learning pairs includes additional items;
[0049] np includes additional learning pairs (x′ s,c = i , x′ p,m ), pp includes (x′ s,c=i , x′ s,m ), vp includes the negation of (x′ p,c=i , x′ p,m ), where m represents a feature from the replay buffer.
[0050] In one example, the task features to be modeled include identifying the task invariant features and the task varying features based on the internal task relationships and the cross-task relationships; wherein the system provides a model for learning based on decomposing the task into the task invariant features and the task varying features.
[0051] In one example, the system includes:
[0052] a classifier, which is configured to classify tasks based on specific categories;
[0053] A discriminator is configured to distinguish the difference between the task invariant features and the variable features of each task.
[0054] According to a second aspect of the present disclosure, a computer-implemented method for modeling task features for continuous learning is provided. The computer-implemented method comprises the following steps:
[0055] receiving one or more task samples;
[0056] Extracting task invariant features and task variable features from the received task samples;
[0057] receiving a subset of the previous task from a replay buffer;
[0058] Perform task relationship processes to:
[0059] capturing internal task relationships based on processing the task variation features and the task invariant features;
[0060] constructing cross-task relationships based on a subset of the previous tasks accessed from the replay buffer;
[0061] The task-invariant feature and the task-variant feature are decoupled based on at least one of the intra-task relationship and the cross-task relationship.
[0062] In one example, the computer-implemented method includes the following additional steps:
[0063] The task invariant features and the task variable features are extracted by applying at least one or more constraints, wherein the constraints include:
[0064] Establishing a boundary between the task-invariant feature and the task-varying feature;
[0065] Generate similar task-invariant features across tasks;
[0066] Different boundaries are established between the task variation characteristics from each task or category.
[0067] In one example, the computer-implemented method includes:
[0068] determining the internal task relationship based on the learning pair, wherein the learning pair decouples the task invariant features and the task varying features while clustering the invariant features regardless of category;
[0069] Grouping together specific categories of task variation characteristics;
[0070] Identify learning pairs of task variation characteristics for each defined category;
[0071] extracting features of samples of previous tasks from the replay buffer;
[0072] determining the task-varying features, the task-invariant features, and additional updated learned pairs of the task-varying and task-invariant features based on features from the replay buffer;
[0073] A cross-task relationship is determined based on the updated learned pairs.
[0074] According to a third aspect, the present disclosure relates to a data processing device comprising a processor and a memory unit, or one or more hardware and / or software modules, for executing a method for modeling task characteristics for continuous learning.
[0075] According to a fourth aspect, the present disclosure relates to a computer program comprising instructions, which, when executed by a computer, cause the computer to perform the method for modeling task features for continuous learning as described above. Optionally, the method may be the method described above.
[0076] In another example, a computer program may include instructions for causing a computer to perform a method of modeling task features for continuous learning as described herein.
[0077] According to a fifth aspect, the present disclosure relates to a computer-readable medium comprising instructions which, when executed by a computer, cause the computer to perform the method of modeling task features for continuous learning as described herein.
[0078] As used herein, the term "comprising" (and its grammatical variations) is used in the inclusive sense of "having" or "including," and not in the sense of "consisting only of.
[0079] It should be understood that, if any prior art information is referred to herein, this reference does not constitute an admission that the information forms part of the common general knowledge in the art, in Australia or any other country. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Embodiments of the present disclosure will be described below by way of examples with reference to the accompanying drawings.
[0081] Figure 1 A system for modeling task characteristics for continual learning is shown.
[0082] Figure 2 A schematic diagram of a computing system that may be implemented with or used as a part of the system is shown.
[0083] Figure 3 A method for modeling task characteristics for continual learning is shown.
[0084] Figure 4 A further example of a system for modeling task characteristics for continual learning is shown. DETAILED DESCRIPTION
[0085] The present disclosure relates to a system and method for continuous learning, in particular for improved continuous learning. The present disclosure relates to a system and method for capturing knowledge for continuous learning. Knowledge capture involves modeling task features.
[0086] The present disclosure relates particularly to a system and method for modeling task features for continuous learning. The system and method for modeling task features are configured to classify tasks into task invariant features and task varying features for continuous learning. The task invariant features and task varying features capture generalized and task-specific knowledge used in continuous learning. The system and method for capturing knowledge for continuous learning provide a machine learning network (i.e., a machine learning model) that can be applied to continuous learning tasks. The task invariant features and task varying features are decoupled from each other in terms of distance and similarity, which can enhance feature decomposition. The system and method are configured to construct internal task relationships and cross-task relationships to further decouple task invariant features and task varying features, thereby enhancing the feature quality and learnability of the model.
[0087] The proposed framework utilizes omni-directional and multi-level contrasts to separate task-invariant and variable features in training sequences of continual learning tasks. The construction of intra-task and cross-task relations effectively extracts uniformly distributed invariant and variable features, which improve the classification task and alleviate the forgetting problem in continual learning.
[0088] The system for modeling task features for continuous learning is configured to model, i.e., construct intra-task relations and cross-task relations. The intra-task and cross-task relations are contrast relations. The intra-task relations and cross-task relations are configured to decouple task-invariant features and task-variant features for continuous learning. Task-invariant and task-variant features are intended to capture generalized knowledge and task-specific knowledge in the continuous learning process. The proposed system and method for modeling task features are configured to enhance the quality of task-invariant features and task-variant features with a clear classification margin.
[0089] refer to Figure 1 , showing an embodiment of the present disclosure. This embodiment provides a system and method for modeling task features for continuous learning. The system includes:
[0090] a task input gateway configured to receive a sequence of task samples;
[0091] A task feature extraction engine is configured to: process received task samples, decompose each task sample, and extract task invariant features and task variable features;
[0092] a replay buffer configured to store a subset of previous tasks as representative of previous tasks processed by the system;
[0093] A task classification engine configured to: capture internal task relationships based on processing task variation features and task invariance features; build cross-task relationships based on a subset of previous tasks accessed from a replay buffer; and an output module configured to output task relationships used in continuous learning, wherein the replay buffer is updated by storing a subset of the output.
[0094] In addition, the task classification engine is configured to: capture intra-task relations based on processing task variation features and task invariant features; and construct cross-task relations based on a subset of previous tasks accessed from the replay buffer. The task classification engine configuration may be further configured to decouple task invariant features and task variation features based on at least one of the intra-task relations and the cross-task relations.
[0095] refer to Figure 1 The system 100 for modeling task characteristics includes a task input gateway 102 configured to receive a series of task samples. The task samples can be multiple tasks that need to be resolved (i.e., processed by the system). The system provides a way to identify task characteristics and decompose tasks into specific component elements and classify them to make task processing easier, simpler, and faster.
[0096] The system also includes a task feature extraction engine 104 in communication with the task input gateway 102. The task feature extraction engine 104 can be configured to process the received task samples, decompose each task sample, and extract task invariant features and task variation features. The task feature extraction engine 104 can be configured to identify task invariant features and task variation features. Task invariant features can be task features that do not change between tasks. Task variation features are task features that change between tasks and can also change between categories, i.e., within a task class.
[0097] The system 100 further includes a replay buffer 106 configured to store a subset of previous tasks as representative of previous tasks processed by the system. The replay buffer 106 may be a memory element or may be a database or other data storage structure.
[0098] The system 100 includes a task classification engine 108 in communication with the task feature extraction engine. The task classification engine 108 can be configured to perform a task relationship process to determine task relationships between tasks, wherein the task relationships are based at least in part on a subset of previous tasks accessed from the replay buffer 106.
[0099] The task classification engine 108 is configured to decouple the task invariant features and the task variation features based on the task relationships. The task classification engine is further configured to: capture the internal task relationships based on processing the task variation features and the task invariant features; and construct the cross-task relationships based on the subset of previous tasks accessed from the replay buffer. The task classification engine 108 is configured to decouple the task invariant features and the task variation features based on at least one of the internal task relationships and the cross-task relationships.
[0100] In one example, the task classification engine 108 is configured to determine a plurality of contrasts to decompose the task invariant features and the task variation features. The task classification engine 108 is configured to extract the task invariant features and the task variation features by applying at least one or more constraints, wherein the constraints may include one or more of the following:
[0101] Establishing a boundary between the task-invariant feature and the task-variant feature;
[0102] Generate similar task-invariant features across tasks;
[0103] Different boundaries are established between the task variation characteristics from each task or category.
[0104] The task classification engine 108 is configured to decouple the task invariant features and the task varying features based on the following operations: determining an orthogonal distance loss function; applying the orthogonal distance loss function to the identified task invariant features and the task varying features; and determining contrastive learning pairs of the features. The task classification engine 108 is configured to further decouple the task invariant features and the task varying features using the learning pairs.
[0105] The system 100 may optionally include a task invariant feature extractor configured to extract task invariant features from the received series of task samples. The system 100 may further optionally include a task variation feature extractor configured to extract task invariant features from the received series of task samples. The task classification engine 108 is configured to determine the internal task relationship, wherein the internal task relationship is determined based on the learning pair, and the learning pair decouples the task invariant features and the task variation features while clustering the invariant features without considering the category.
[0106] The task classification engine 108 is configured to: extract features of samples of previous tasks from a replay buffer; determine task variation features, task invariant features, and additional updated learning pairs of task variation features and task invariant features based on the features from the replay buffer; and determine cross-task relationships based on the updated learning pairs.
[0107] The system 100 is configured to determine contrastive learning pairs, wherein intra-task relationships and cross-task relationships are defined by the determined contrastive learning pairs.
[0108] The system 100 includes an output module 110 configured to output task relationships used in continuous learning, wherein a replay buffer is updated by storing a subset of the output. The components of the system 100 may be software modules that are part of a larger software application. In another example, one or more components of the system 100 may be hardware modules, such as an integrated circuit or a microprocessor or an FPGA or an ASIC or a combination thereof. Reference Figure 1 The system 100 may include a combination of software and hardware modules. In one example, the system 100 may be implemented in a computer (ie, a computing device, a computing apparatus, or a computing system).
[0109] In one example, the system 100 can define components of a machine learning system trained for continuous learning. The system 100 can be configured to implement a method for modeling task features. The system 100 is configured to define a processing flow for a machine learning task (e.g., a computer vision task), wherein the task involves receiving input samples (i.e., task samples) and how to perform the task.
[0110] System 100 utilizes omni-directional and multi-level contrasts to separate task-invariant features and task-varying features in a training sequence of a continuous learning task. The construction of intra-task and cross-task relationships effectively extracts well-defined and well-distributed task-invariant and task-varying features. This improves classification tasks and alleviates the forgetting problem in continuous learning. The replay buffer for defining cross-relationships helps to improve the forgetting problem. System 100 for modeling task features is proposed for use in continuous learning models, such as machine learning or AI models for continuous learning. System 100 improves feature quality in the decomposition of task-invariant and task-varying features. An example application may be a computer vision product.
[0111] In this exemplary embodiment, the system and method for modeling task features for continuous learning can be implemented by a computer (i.e., a computing device or a computing system or a computing device) with an appropriate processor, memory, and user interface. The computer can be implemented by any computing architecture, including: a portable computer, a tablet computer, a stand-alone personal computer (PC), a smart device, an Internet of Things (IoT) device, an edge computing device, a client / server architecture, a "dumb" terminal / host architecture, a cloud computing-based architecture, or any other appropriate architecture. The computer, i.e., a computing device, can be appropriately programmed to implement the present disclosure.
[0112] like Figure 2, a schematic diagram of a computer, i.e., a computing system or computing device 200 is shown. The computing system or computing device is used to implement an exemplary embodiment of the system 100 for modeling task characteristics for continuous learning. The computing device 200 may be a part of the system 100 for modeling task characteristics for continuous learning.
[0113] As shown in the embodiment, the system 100 can be implemented on a computer 200. The computer 200 includes appropriate components required to receive, store and execute appropriate computer instructions. These components may include: a processing unit 202, which includes a central processing unit (CPU), a math co-processing unit (Math Processor), a graphics processing unit (GPU) or a tensor processing unit (TPU) for tensor or multi-dimensional array calculation or manipulation operations; a read-only memory (ROM) 204; a random access memory (RAM) 206; an input / output (I / O) device (e.g., a disk drive 208); an input device 210 (e.g., an Ethernet port, a USB port, etc.). Optionally, the computer 200 may include a display 212, such as a liquid crystal display, a light-emitting display, or any other suitable display. The computer 200 may also include a communication link 214, such as a WiFi network interface or a Bluetooth network interface or a cellular network interface. The network interface allows the computer 200 to transmit data using an appropriate communication network and protocol.
[0114] The computer 200 (i.e., the system 100) may include instructions that may be stored in the ROM 204, the RAM 206, or the disk drive 208 and may be executed by the processing unit 202. A plurality of communication links 214 may be provided, which may be variously connected to one or more computing devices, such as servers, personal computers, terminals, wireless or handheld computing devices, IoT devices, smart devices, and edge computing devices. At least one of the plurality of communication links may be connected to an external computing network via a telephone line or other type of communication link.
[0115] The computing device 200 may include storage devices such as a disk drive 208, which may include a solid-state drive, a hard disk drive, an optical drive, a tape drive, or a remote or cloud-based storage device. The computing device 200 may use a single disk drive or multiple disk drives, or a remote storage service. The computer 200 (i.e., the computing device 200) may also have a suitable operating system resident in its disk drive or ROM.
[0116] Alternatively, a computer may provide the necessary computing power to operate or interface with a machine learning network such as a neural network to provide various functions and outputs. The neural network may be implemented locally, or may also be accessed or partially accessed through a server or cloud-based service. The machine learning network may also be untrained, partially trained, or fully trained, and / or may also be retrained, modified, or updated over time. The system 100 may be used as part of a neural network or other AI model for continuous learning. The system 100 and its functions may be used to process data and learn. One or more neural network models or other machine learning models and associated libraries may be stored in a model database 216. In addition, training data may be stored in another training database 218. The processor 202 may be configured to access a model from a model database 216 and train one or more models using training data from a training data database 218. Alternatively, the model may be stored in a memory unit, for example, in a ROM or RAM. Databases 216, 218 may be stored in a memory unit or a disk drive. A replay buffer as described above may be stored in a memory unit.
[0117] In another example, computing device 200 (i.e., computing apparatus) can be configured to communicate with a remote device or remote computing system or remote server. One or more components of system 100 can be stored remotely and can be accessed via a communication network. For example, replay buffer 106 can be stored on remote server 220 and can be accessed by computing device 200 when using system 100.
[0118] Figure 3 A method 300 for modeling task characteristics for continuous learning is shown. The method 300 can be implemented by the system 100 and its components. The method 300 can also be executed by the processing unit 202 of the computer 200 when the system executes the processing unit 202. The method 300 for modeling task characteristics for continuous learning can be a computer-implemented method for modeling task characteristics.
[0119] The computer-implemented method 300 includes step 302. Step 302 includes: receiving one or more task samples. Step 304 includes: extracting task invariant features and task variation features from the received task samples. The step of extracting the task invariant features and the task variation features includes applying at least one or more constraints, wherein the constraints include:
[0120] Establishing a boundary between the task-invariant feature and the task-varying feature;
[0121] Generate similar task-invariant features across tasks;
[0122] Different boundaries are established between the task variation characteristics from each task or category.
[0123] Step 306 includes: receiving a subset of previous tasks from the replay buffer. Step 308 includes: capturing intra-task relationships based on processing task variation features and task invariance features. Step 310 includes: constructing cross-task relationships based on the subset of previous tasks accessed from the replay buffer.
[0124] Step 308 includes: determining internal task relationships based on the learning pairs, the learning pairs decoupling task invariant features and task varying features while clustering invariant features regardless of category. Step 312 includes: grouping together specific, i.e., category-specific, task varying features. Step 314 includes: determining learning pairs of task varying features for each defined category. Step 316 includes: determining task varying features, task invariant features, and additional updated learning pairs of task varying and task invariant features based on features from the replay buffer. Step 310 includes: determining cross-task relationships based on the updated learning pairs. Step 318 includes: decoupling task invariant features and task varying features based on at least one of the internal task relationships and the cross-task relationships. Method 300 may be repeated.
[0125] Figure 4 Another exemplary embodiment of a system 400 for modeling task features is shown. The system 400 can be used for continuous learning applications. The system 400 can be configured to implement the method 300. The system 400 can be used to model intra- and cross-task relationships for continuous learning.
[0126] The system 400 includes a task invariant feature extractor 402S, a task variable feature extractor 404P, and a classifier 406C for each task. The variable feature extractor can be defined as P = {P 1 , P 2 ,…,P n}, the classifier can be defined as C = {C 1 , C 2 , …, C n}. The system 400 also includes an identifier D408.
[0127] The system 400 is configured to extract features from the input using a task-invariant feature extractor 402 and a task-variant feature extractor 404, respectively. After feature extraction, the extracted features are embedded into the same latent space using a projection head. This is mathematically defined as follows:
[0128] x s =S(X i ), x p =P(X i ) (1)
[0129] x′ s =SH(x s ), x′ p =PH(x p ), (2)
[0130] Among them, SH(·) and PH(·) are the projection heads of task-invariant features and task-variant features. In order to expand the distance between task-invariant features and task-variant features in the latent space, the orthogonal distance loss [1] is used to constrain their representation, which is defined as:
[0131]
[0132] in, Represents the square of the Frobenius norm.
[0133] However, only the orthogonal distance loss may not be sufficient for feature decomposition because it only enlarges the distance of components, while some components of the invariant and varying features may have connections that are crucial for classification. Therefore, in order to explore the internal task relationship between them and enhance the feature decomposition, KDC 410 is configured to combine the orthogonal distance loss with the task classification engine 410 (i.e., knowledge decomposition constraint (KDC)) to decouple the invariant features and the varying features while retaining their basic connections.
[0134] The task classification engine 410 (i.e., KDC) provides multiple constraints for extracting well-distributed task invariant and varying features. These constraints include: a) establishing a clear boundary between invariant features and varying features, b) promoting the generation of similar task invariant features across tasks, and c) ensuring a clear boundary between task invariant features from each task or class.
[0135] The task classification engine 410 is configured to utilize constraints and an orthogonal loss function L in the decomposition process. d, while implementing the desired features. A suitable network applying a supervised contrastive learning process (e.g., SupCon) can be applied to supervise the contrastive learning process. The contrastive learning process applied by the task classification engine 410 (i.e., KDC) includes introducing a class label for each instance. KDC 410 is configured to use the above-mentioned constraints on task-invariant features and task-varying features by constructing a full range of contrasts.
[0136] The task-invariant features and the task-varying features need to be pushed away from each other in terms of distance and made different. KDC410 is configured to separate the invariant features and the varying features and distinguish them. d KDC 410 utilizes the concept of contrastive learning pairs to model the relationship between the two aspects as complementary while increasing the feature distance. Task classification engine 410 (ie, KDC) is configured to utilize the invariant features as x′ s As anchor and construct negative pair as x′ p , to decouple task-invariant features from task-variant features. In addition, it is recognized that features from the same or different semantic classes should have similar effects. KDC 410 further extends x′ {s,c=i} and {x′ {p,c=i} , x′ {p,c≠i}}, where c represents the category label, that is, construct negative pairs between them. The negative pair is set to np:
[0137] np={(x′ {s,c=i} , x′ {p,c=i} ), (x′ {s,c=i} , x′ {p,c≠i} )}. (4)
[0138] KDC 410, i.e., task classification engine 410, is further configured to use an inverse loss function to enforce that the invariant features from all tasks and classes are similar one by one. The adversarial loss function can be defined as:
[0139] L d =min SH max D ∑1*log(D(SH(x s ))), (5)
[0140] Among them, x s represents the task-invariant feature, and SH(·) represents the task-invariant feature projection head.
[0141] To further improve the invariant features and minimize the distance between them, the relationship between the invariant features of all categories within a task is modeled. Invariant features can be collected regardless of the category label, and the smaller the distance between them, the more similar they will be. Therefore, every two invariant features should be constructed into a positive pair. In this way, the positive pair set includes the following pairs, x′{s,c=i} , and using {x′ {s,c=i} , x′ {s,c≠i}} constructs a positive pair, which is written as pp:
[0142] pp = {(x′ {s,c=i} , x′ {s,c=i} ), (x′ {s,c=i} , x′ {s,c≠i} )}. (6)
[0143] When they use the same anchor x′ s When KDC, i.e., classification engine 410, combines np and pp as constraints L sp In this case, L sp It can be formulated as:
[0144]
[0145] Among them, x′ pp represents positive samples, I represents all samples, pp represents the positive pair subset, |pp| represents the total number of pp, and τ represents the temperature index. Figure 4 This is shown by feature 412, which shows a task-invariant feature arranged in a learning pair.
[0146] In order to facilitate the KDC 410 (ie, the task classification engine) with supervision information and the collection of x′ s The label 1 is assigned to all x′ s , regardless of the class labels, making them indistinguishable in comparison. On the other hand, x′ p Assigned with label 0, compare it with x′ s decouples and pushes features apart to obtain sharp edges. This term enhances x′ when decoupling constant and varying features. s The similarities between them are investigated and their internal task relationships are studied. Variation features with clear class boundaries can improve classification task performance.
[0147] To achieve this, the classification engine 410 (KDC 410) classifies x′ from the same category p The constraint is closed, while the features from different classes are constrained to be pushed apart to obtain task-varying features with clear boundaries. Therefore, the learning pair set of varying features is denoted as vp. Considering the class label, vp includes the positive pair set {x′ p,c=i , x′ p,c=j ), and the negative pair set {x′ p,c=i , x′ p,c=j}. The constraint of vp is expressed as L p , which is the same as equation (7). Figure 4Further shown in FIG. 4 is feature 414 , which illustrates task variation features grouped and separated by category.
[0148] Previous methods ignored cross-task relationships, resulting in a chaotic distribution of changing features for different tasks. The task classification engine 410 implements a replay-based approach. The task classification engine 410 is configured to input replay and current task samples into the model simultaneously during training. Although treating replayed samples as current task samples helps to alleviate forgetting, it does not directly contribute to feature extraction of the current task. In order to alleviate the forgetting problem and enhance the robustness of feature extraction, KDC is configured to consider feature relationships between the current task and the memory, i.e., cross-task relationships. The task classification engine 410 is configured to construct additional learning pairs that follow similar strategies for internal task relationship construction and feature decomposition. Specifically, the learning pair set np includes additional learning pairs (x′ s,c=i , x′ p,m ), pp includes (x′ s,c=i , x′ s,m ), vp includes negative pairs (x′ p,c=i , x′ p,m ), where m represents the features from the replay samples. The cross-task relation construction complements the intra-task contrastive design with all-round contrastive learning pairs.
[0149] KDC 410 combines the regularization term L of the previous and current models r , to prevent the model parameters and x′ s and x′ p The similarity between changes too quickly, which may lead to model collapse problems and make the model difficult to train. The complete KDC loss term is defined as follows:
[0150] L c =L sp +L p +L r (8)
[0151] Classifier 406C passes x′ of each task s and x′ p The cross entropy loss is used as the classification loss:
[0152] L task =-∑log(C(concat(x′ s , x′ p )), Y), (9)
[0153] Here, C represents the task-specific classifier and concat represents feature concatenation.
[0154] The objective function during training can be written as:
[0155] L=λ 1 *L task +λ 2 *L d +λ 3 *L dis +λ 4 *L c , (10)
[0156] Among them, λ represents the hyperparameter of each project.
[0157] After training a task, a small number of current task samples are randomly saved in the memory R. The change features of the replayed samples do not calculate the gradient of the current task. Before training the next task, KDC 410 is configured to randomly initialize the task change feature extractor and classifier C i , to replace the previous P i-1 and C i-1 , and with D i-1 In contrast, the discriminator D is randomly initialized with an additional output neuron i In the test phase, the task-invariant feature extractor S n Replaces the previous invariant feature extractor {S 1 , S 2 , …, S n-1}, used to extract task-invariant features for all test samples.
[0158] The described system and method for modeling task features for continuous learning are particularly suitable for machine learning applications. The system and method for modeling task features for continuous learning can be used in supervised or unsupervised or semi-supervised learning applications or a combination thereof. The proposed system and method for continuous learning can be applied to deep learning models. The system and method can also be applied to other learning models. The system for modeling task features improves the feature quality of task-invariant and task-varying feature decomposition. The proposed system uses a replay buffer that includes a subset of previous tasks. The replay buffer is used to build cross-task relationships, which can alleviate the forgetting problem of machine learning models in continuous learning. The continuous learning model for task feature recognition proposed by the system can be used in various continuous learning applications, such as computer vision products.
[0159] System 100 is advantageous because the system implements a method for continuous classification tasks that effectively explores intra- and cross-task relationships by constructing four-sided contrastive learning pairs. System 100 is advantageous because it improves performance over prior art systems. KDC 410 is also advantageous because KDC utilizes three types of contrasts to decompose generalized task-invariant features and task-variant features. System 100 includes a replay buffer with contrast-constrained replay sampling to mitigate forgetting problems and model cross-task relationships.
[0160] The proposed task classification engine 410 (i.e., KDC) is designed to model intra-task relations and cross-task relations using the contrastive learning method described herein, with well-distributed task-invariant features and variable features. This effectively improves feature quality and model performance on continuous learning tasks.
[0161] Although not required, the embodiments described with reference to the accompanying drawings may be implemented as an application programming interface (API) or a series of libraries used by developers, or may be included in another software application, such as a terminal or personal computer operating system or a portable computing device operating system. Generally, since program modules include routines, programs, objects, components, and data files that help perform specific functions, those skilled in the art will understand that the functionality of a software application may be distributed among multiple routines, objects, or components to achieve the same functionality required herein.
[0162] It should also be understood that in the case where the methods and systems of the present disclosure are implemented in whole or in part by a computing system, any suitable computing system architecture may be used. This would include stand-alone computers, network computers, and dedicated hardware devices. Where the terms "computing system" and "computing device" are used, these terms are intended to include any suitable configuration of computer hardware capable of implementing the described functionality.
[0163] It will be appreciated by those skilled in the art that various changes and / or modifications may be made to the present disclosure as shown in the specific embodiments without departing from the spirit or scope of the present disclosure as broadly described. Therefore, the present embodiments are to be considered in all aspects as illustrative and not restrictive.
[0164] Unless otherwise indicated, any reference to prior art contained herein is not to be taken as an admission that the information is common general knowledge.
[0165] In addition, it should be noted that the embodiments may be described as processes, which are depicted as flow charts, flow charts, structure diagrams, or block diagrams. Although a flow chart may describe the operations as a sequential process, many operations may be performed in parallel or simultaneously. In addition, the order of the operations may be rearranged. A process terminates when its operations are completed. A process may correspond to a method, function, procedure, subroutine, subprogram, etc. in a computer program. When a process corresponds to a function, its termination corresponds to the function returning to the calling function or the main function.
Claims
1. A system for modeling task features for continual learning, It is characterized in that include: a task input gateway configured to receive a sequence of task samples; A task feature extraction engine configured to process the received task samples and extract task invariant features and task variable features; a replay buffer configured to store a subset of previous tasks as representative of previous tasks processed by the system; a task classification engine configured to perform a task relationship process to determine task relationships between tasks; wherein the task relationships are based at least in part on a subset of previous tasks accessed from the replay buffer; An output module is configured to output the task relationship used in continuous learning, wherein the replay buffer is updated by storing a subset of the output.
2. The system according to claim 1, It is characterized in that in, The task classification engine is configured to decouple the task invariant features and the task variable features based on the task relationship.
3. The system according to claim 1, It is characterized in that in, The task classification engine is configured as follows: capturing internal task relationships based on processing the task variation features and the task invariant features; Based on the subset of the previous tasks accessed from the replay buffer, cross-task relationships are constructed.
4. The system according to claim 3, It is characterized in that in, The task classification engine is configured to decouple the task invariant features from the task varying features based on at least one of the intra-task relationship and the cross-task relationship.
5. The system according to claim 3, It is characterized in that in, The system is configured to determine contrastive learning pairs; wherein the intra-task relationship and the cross-task relationship are defined by the determined contrastive learning pairs.
6. The system according to claim 3, It is characterized in that in, The task classification engine is configured to determine a plurality of contrasts to decompose the task invariant features and the task varying features.
7. The system according to claim 4, It is characterized in that in, The task classification engine is configured to determine three types of contrasts to decompose the task invariant features and the task varying features.
8. The system according to claim 1, It is characterized in that in, The system further comprises: a task-invariant feature extractor configured to extract the task-invariant features from the received task sample series; A task variation feature extractor is configured to extract the task variation feature from the received task sample series.
9. The system according to claim 8, It is characterized in that in, The task classification engine is configured as follows: The task invariant features and the task variable features are extracted by applying at least one or more constraints, wherein the constraints include: Establishing a boundary between the task-invariant feature and the task-variant feature; Generate similar task-invariant features across tasks; Different boundaries are established between the task variation characteristics from each task or category.
10. The system according to claim 6, It is characterized in that in, The task classification engine is configured to decouple the task invariant features and the task variable features based on the following operations: Determine the orthogonal distance loss function; Applying the orthogonal distance loss function to the identified task-invariant features and the task-variant features; Determine contrastive learning pairs of features; The learning pair is utilized to further decouple the task-invariant features and the task-variant features.
11. The system according to claim 10, It is characterized in that in, The task classification engine is configured to determine the internal task relationship; wherein the internal task relationship is determined based on the learning pair, which decouples the task invariant features and the task varying features while clustering the invariant features regardless of the category.
12. The system according to claim 10, It is characterized in that in, The task classification engine is further configured to: applying a classifier to the task variation features; wherein the classifier is configured to group together task variation features of a particular category; For each defined category, learning pairs of task-varying features are determined.
13. The system according to claim 10, It is characterized in that in, The task classification engine is configured as follows: extracting features of samples of previous tasks from the replay buffer; determining the task-varying features, the task-invariant features, and additional updated learned pairs of the task-varying and task-invariant features based on features from the replay buffer; A cross-task relationship is determined based on the updated learned pairs.
14. The system according to claim 11, It is characterized in that in, The internal task relationship is defined as a contrast loss function; wherein the function of the internal task relationship is: Among them, x′ pp represents positive samples, I represents all samples, pp represents the positive pair subset, |pp| represents the total number pp, τ represents the temperature index, and np represents the negative pair; Among them, pp represents the learning pair set from the task invariant features, and np represents the learning pair set between the task invariant features and the task variable features.
15. The system according to claim 14, It is characterized in that in, The cross-task relationship is defined by a learning pair, wherein the learning pair includes np, pp and vp, wherein np represents a learning pair set between the task invariant feature and the task variable feature, pp represents a learning pair set from the task invariant feature, and vp represents a learning pair of the task variable feature; Wherein, each set of learning pairs includes additional items; np includes additional learning pairs (x′ s,c=i ,x′ p,m ), pp includes (x′ s,c=i ,x′ s,m ), vp includes the negation of (x′ p,c=i ,x′ p,m ), where m represents a feature from the replay buffer.
16. The system according to claim 1, It is characterized in that in, The task features to be modeled include identifying the task invariant features and the task varying features based on internal task relationships and cross-task relationships; wherein the system provides a model for learning based on decomposing the task into the task invariant features and the task varying features.
17. The system according to claim 1, It is characterized in that in, The system further comprises: a classifier, which is configured to classify tasks based on specific categories; A discriminator is configured to distinguish the difference between the task-invariant features and the task-variant features of each task.
18. A computer-implemented method for modeling task characteristics for continual learning, It is characterized in that The following steps are involved: receiving one or more task samples; Extracting task invariant features and task variable features from the received task samples; receiving a subset of the previous task from a replay buffer; Perform task relationship processes to: capturing internal task relationships based on processing the task variation features and the task invariant features; constructing cross-task relationships based on a subset of the previous tasks accessed from the replay buffer; The task-invariant feature and the task-variant feature are decoupled based on at least one of the intra-task relationship and the cross-task relationship.
19. The computer-implemented method of claim 18, It is characterized in that in, The method comprises the following additional steps: The task invariant features and the task variable features are extracted by applying at least one or more constraints; wherein the constraints include: Establishing a boundary between the task-invariant feature and the task-variant feature; Generate similar task-invariant features across tasks; Different boundaries are established between the task variation characteristics from each task or category.
20. The computer-implemented method of claim 18, It is characterized in that include: determining the internal task relationship based on a learning pair, wherein the learning pair decouples the task-invariant features and the task-variant features while clustering the invariant features regardless of the category; Grouping together specific categories of task variation characteristics; Identify learning pairs of task variation characteristics for each defined category; extracting features of samples of previous tasks from the replay buffer; determining the task-varying features, the task-invariant features, and additional updated learned pairs of the task-varying and task-invariant features based on features from the replay buffer; A cross-task relationship is determined based on the updated learned pairs.