Metalearning fast adaptation method, device, equipment, medium and program product
By performing feature analysis and cluster analysis on task-related data, we obtain model parameters shared across task groups, and solve the problem of insufficient adaptability of meta-learning methods in multimodal task distribution, and achieve rapid adaptation and generalization capabilities Improvement and expand the application scope of meta-learning technology.
Patent Information
- Application Number
- CN202411822784.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-12-12
AI Technical Summary
The existing meta-learning methods are not adaptable to multimodal task distribution, making it difficult to achieve fast and accurate adaptation, especially in small sample learning scenarios, and insufficient consideration of similarity or differences between tasks, limiting the algorithm. generalization ability and effectiveness of practical application.
By performing feature analysis on task-related data, identifying and quantifying similarities between tasks, performing cluster analysis to generate task groups, obtaining model parameters of each task group and sharing across groups, and finding task groups with similarity matching for target tasks is found for target tasks. , extract the successful matching task group parameters as the initial model parameters, and obtain the target model parameters through gradient descent optimization.
It significantly improves the adaptability and learning efficiency of the model to new tasks, enhances generalization ability, improves the adaptability in multimodal task distribution and efficient in practical applications, and expands the application scope and practicality of meta-learning technology. value.
Smart Images

Figure CN119272851A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a meta-learning rapid adaptation method, device, equipment, medium and program product. Background Art
[0002] In the field of artificial intelligence, especially with the rapid development of machine learning and deep learning, meta-learning, the concept of "learning to learn", has become a hot topic of research. The core goal of meta-learning is to give the model the ability to quickly adapt to new tasks with a small number of samples, which is extremely important in small sample learning scenarios. However, although existing meta-learning methods have made remarkable achievements in single task distribution, they still face performance bottlenecks when facing multimodal task distribution, making it difficult to achieve fast and accurate adaptation.
[0003] Existing meta-learning methods mainly focus on accelerating the adaptation process of new tasks through gradient descent. These methods learn an excellent model initialization parameter so that when encountering a new task, the model can quickly adjust the parameters through a small number of gradient update steps to adapt to the needs of the new task. However, when dealing with multimodal task distributions, these methods often find it difficult to find a unified initialization strategy that applies to all tasks. In addition, existing methods are insufficient in considering the similarities or differences between tasks, resulting in poor adaptability to new tasks. Existing research does not have a sufficient in-depth understanding of the generalization ability of meta-learning algorithms, which limits the effectiveness and reliability of the algorithms in practical applications. Although existing studies have attempted to explain the generalization ability of meta-learning algorithms through theoretical analysis, these analyses are usually limited to specific algorithm variants or in the context of non-convex optimization problems, and it is difficult to provide a comprehensive explanation. Summary of the invention
[0004] Based on this, it is necessary to provide a meta-learning rapid adaptation method, device, equipment, medium and program product to address the above-mentioned technical problems, which can solve the problem that traditional meta-learning methods are not adaptable enough in multimodal task distribution, especially in small sample learning scenarios.
[0005] In a first aspect, the present application provides a meta-learning fast adaptation method. The method comprises: Perform feature analysis on task-related data to identify and quantify similarities between tasks; task-related data includes at least one of text, pictures, and videos; Perform cluster analysis on the tasks based on similarity to generate several task groups; obtain corresponding model parameters for each task group, and integrate model parameters shared across different task groups to obtain first model parameters; A task group with similarity matching is searched for the target task, and the first model parameters corresponding to the successfully matched task group are extracted as the initial model parameters of the target task; the initial model parameters are optimized to obtain the target model parameters corresponding to the target task.
[0006] In one embodiment, an online learning mechanism is introduced when performing cluster analysis on tasks.
[0007] In one embodiment, for each task group, corresponding model parameters are obtained, and model parameters shared across different task groups are integrated. Obtaining the first model parameter includes: Obtain the model parameters corresponding to each task group, and obtain the model parameters that can be shared across task groups; For each task group, a weighted sum is performed on the model parameters corresponding to the task group and the model parameters that can be shared across the task group to obtain the first model parameters.
[0008] In one embodiment, the task group for finding similarity matches for the target task includes: Perform feature analysis on the target task and task groups, and determine the task group that matches the target task based on the similarities between the target task and each task group.
[0009] In one embodiment, the initial model parameters are optimized to obtain the target model parameters corresponding to the target task, including: The gradient descent method is used to iteratively optimize the initial model parameters. The fitness of the model parameters after each gradient descent iteration is evaluated. When the fitness exceeds the threshold, the iteration is stopped and the model parameters at the time of iteration stop are output as the target model parameters.
[0010] In one embodiment, after obtaining the initial model parameters, the method further includes: Introducing into the initial model parameters the first model parameters corresponding to the task group that does not match the target task in the task group, and obtaining the second model parameters; The second model parameters corresponding to the initial model parameters are optimized to obtain the target model parameters.
[0011] In a second aspect, the present application also provides a meta-learning rapid adaptation device. The device comprises: A task feature analysis module is used to perform feature analysis on task-related data, identify and quantify similarities between tasks; the task-related data includes at least one of text, pictures, and videos; The task grouping and parameter modulation module is used to perform cluster analysis on tasks based on similarity to generate several task groups; for each task group, the corresponding model parameters are obtained, and the model parameters shared across different task groups are integrated to obtain the first model parameters; The fast adaptation strategy module is used to find a task group with similarity matching for the target task, extract the first model parameters corresponding to the successfully matched task group as the initial model parameters of the target task; optimize the initial model parameters to obtain the target model parameters corresponding to the target task.
[0012] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned meta-learning fast adaptation method when executing the computer program.
[0013] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above-mentioned meta-learning fast adaptation method when executed by a processor.
[0014] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps in the above-mentioned meta-learning fast adaptation method when executed by a processor.
[0015] The above-mentioned meta-learning rapid adaptation method, device, equipment, medium and program product analyzes task characteristics, identifies similarities between tasks, and performs task grouping and specific initialization of model parameters accordingly to achieve rapid adaptation to new tasks. Compared with traditional methods, the present invention significantly improves the adaptation speed and learning efficiency while maintaining the generalization ability of the model. The present invention not only provides an in-depth understanding of the rapid adaptation ability of meta-learning algorithms in theory, but also demonstrates its efficiency and reliability in practical applications such as autonomous driving, medical diagnosis, intelligent robots and other fields. Through the present invention, the training of multimodal meta-learning models becomes faster and more accurate, greatly expanding the scope of application and practical value of meta-learning technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a process of a meta-learning fast adaptation method in an embodiment; Figure 2 is a structural block diagram of a meta-learning fast adaptation device in an embodiment; Figure 3 is a schematic diagram of the structure of a task feature analysis module in one embodiment; Figure 4 A schematic diagram of the structure of a task grouping and parameter modulation module in one embodiment; Figure 5 A schematic diagram of the structure of a fast adaptation strategy module in an embodiment; Figure 6 is a flow chart of accident detection and response in an intelligent transportation system in one embodiment; Figure 7 The present invention is a flowchart of medical image diagnosis based on multimodal data in one embodiment. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0018] The embodiment of the present application provides a meta-learning fast adaptation method, which is based on multimodal meta-learning with task similarity perception, such as Figure 1 As shown, the method comprises the following steps: Step 102, feature analysis is performed on the task-related data to identify and quantify the similarities between tasks. The task-related data includes at least one of text, pictures, and videos;
[0019] This step is responsible for in-depth analysis of task data, identifying and quantifying similarities between tasks. Through existing data mining techniques, the intrinsic characteristics of task data are captured. Based on the task features extracted from task-related data, the similarities between tasks are quantitatively analyzed. This process is crucial for subsequent work because it provides the necessary similarity measurement information to quickly adapt to new tasks.
[0020] Among them, feature analysis of task-related data requires feature extraction of task-related data first. Feature extraction is to convert the original data into a numerical vector that can represent the characteristics of the task.
[0021] Then, based on the extracted task features, a similarity measurement method is used to quantify the similarity, that is, to measure the proximity of two tasks in the feature space. Cosine similarity can be used as an indicator of similarity measurement to quantify the similarity between tasks.
[0022] In one embodiment, before performing task feature analysis, the data may be preprocessed, including normalization, denoising, and feature extraction, to improve the validity of the data.
[0023] Step 104, clustering the tasks based on similarity to generate several task groups; for each task group, obtaining corresponding model parameters, and integrating model parameters shared across different task groups to obtain first model parameters.
[0024] Based on the results of task feature analysis, the tasks are divided into different groups and a specific set of model parameters are learned for each group. This process takes advantage of the similarities between tasks, allowing the model to quickly adapt to similar tasks, thereby improving learning efficiency.
[0025] Specifically, this embodiment uses cluster analysis to group tasks according to the similarities between the tasks. The cluster analysis may use tools such as the k-means clustering algorithm.
[0026] In order to enhance the generalization ability of the model, this embodiment introduces a cross-group parameter sharing and coordination mechanism. By allowing model parameters between different groups to be shared to a certain extent, the adaptability of the model to new tasks can be improved. The task group and the model parameters that can be shared across groups between different groups are merged to obtain the first model parameters.
[0027] It should be noted that the model parameters in this step are model parameters that are modulated through parameter optimization using the objective function to adapt to each task in the corresponding task group.
[0028] In other embodiments, each task group corresponds to a meta-learner that can quickly adapt to new tasks in the group. During the construction of the meta-learning period, the model parameters are optimized and modulated through the objective function, and a regularization term is introduced during the optimization and modulation process to control the complexity of the model and prevent overfitting.
[0029] Step 106, searching for a task group with similarity matching for the target task, extracting the first model parameters corresponding to the successfully matched task group as the initial model parameters of the target task; optimizing the initial model parameters to obtain the target model parameters corresponding to the target task.
[0030] When the target task arrives, this step is responsible for quickly matching the task group to which it belongs and initializing it with the first model parameters of the task group. Subsequently, the first model parameters are iteratively adjusted through the optimization algorithm to adapt to the target task. This strategy not only speeds up the adaptation of the model, but also enhances the generalization ability of the model on new tasks.
[0031] Since the first model parameters are already well adapted to each task in the task group, the first model parameters of the task group are then transferred to the model of the target task. Since the similarity between the target task and the task group matches, the target task has a good basis for adapting to the first model parameters. At this point, based on the first parameter model, the optimization of the model parameters can be completed within a smaller number of optimization iterations, thereby speeding up the model's adaptation to the target task as a new task, and at the same time enhancing the model's generalization ability on new tasks.
[0032] In one embodiment, in step 104, an online learning mechanism is introduced when clustering the tasks.
[0033] The task feature analysis process needs to be able to be dynamically updated to adapt to the arrival of new tasks. To this end, an online learning mechanism is introduced so that the cluster center and feature extraction can be adaptively adjusted according to new data, thereby continuously improving the model accuracy.
[0034] In one embodiment, for each task group, corresponding model parameters are obtained, and model parameters shared across different task groups are integrated, and obtaining the first model parameters includes: obtaining model parameters corresponding to each task group, and obtaining model parameters that can be shared across task groups; for each task group, weighted summing the model parameters corresponding to the task group and the model parameters that can be shared across task groups is performed to obtain the first model parameters.
[0035] For each task group, a specific set of model parameters θ is learned m , the first model parameter θ m ' can be expressed as:
[0036] Among them, θ shared are model parameters that can be shared across groups, and β is the weight of the model parameters that can be shared across groups.
[0037] In one embodiment, searching for a task group that matches the target task with similarity includes: performing feature analysis on the target task and the task group, and determining a task group that matches the target task based on the similarity between the target task and each task group.
[0038] First, the feature vector of the target task is determined by task feature analysis technology, and then the similarity between the target task and the known task group is determined using a similarity measurement method, and it is matched with the task group with the highest similarity.
[0039] In one embodiment, the initial model parameters are optimized to obtain the target model parameters corresponding to the target task, including: iteratively optimizing the initial model parameters using the gradient descent method, evaluating the fitness of the model parameters after each gradient descent iteration, stopping the iteration when the fitness exceeds a threshold, and outputting the model parameters when the iteration stops as the target model parameters.
[0040] Gradient descent is an optimization algorithm used to find the minimum value of the loss function in machine learning and deep learning. The basic idea is to gradually adjust the model parameters so that the value of the loss function continues to decrease and eventually reach the local optimum or the global optimum.
[0041] The fitness function is usually related to the objective function of the optimization problem. For example, if the goal is to maximize a certain indicator, then the fitness function can be the value of the indicator; if the goal is to minimize a certain indicator, the fitness function can be the negative or inverse of the objective function. Set the fitness function according to the actual situation to evaluate and guide the optimization direction of the model parameters.
[0042] In one embodiment, after obtaining the initial model parameters, the method further includes: introducing into the initial model parameters first model parameters corresponding to the task group that does not match the target task in the task group to obtain second model parameters; and performing parameter optimization on the second model parameters corresponding to the initial model parameters to obtain the target model parameters.
[0043] In order to enhance the adaptability of the target task and realize cross-group knowledge transfer, the first model parameters of other task groups can be introduced into the initial model parameters. At the same time, in order to emphasize the dominance of the initial model parameters and the influence of other task groups on the task group corresponding to the target task, a weight system is introduced to optimize the composition of the second model parameters. Assume that the second model parameter is θ init , its formula is expressed as:
[0044] Among them, θ m is the initial model parameter, θ j is the first model parameter of the jth task group, γ j is the weight of the first model parameter of the jth task group, and .
[0045] In one embodiment, a multimodal meta-learning fast adaptation method based on task similarity perception includes the following steps: S1. Task Characteristics Analysis Task feature analysis is one of the core steps of the present invention, and its purpose is to identify the similarities between tasks by quantitatively analyzing task data. S1 includes: S1.1. Data preprocessing and feature extraction Before performing task feature analysis, the data needs to be preprocessed, including normalization, denoising, and feature extraction.
[0046] When extracting features, let the original data set be , where N is the number of samples, the goal of feature extraction is to find the mapping , convert the data into feature vectors .
[0047] S1.2 Similarity Measurement This embodiment uses cosine similarity as the indicator of similarity measurement. For two feature vectors f i and f j , the cosine similarity is defined as:
[0048] where · represents the dot product of vectors, Represents the norm of a vector.
[0049] S1.3 Cluster analysis This embodiment uses the k-means clustering algorithm to complete clustering analysis. There are k cluster centers, each cluster center c m Determined by the mean of its member eigenvectors:
[0050] Among them, G m is the set of elements belonging to the mth cluster, where m is an integer from 1 to k.
[0051] S1.4 Dynamic update of task characteristics The task feature analysis module needs to be able to be dynamically updated to adapt to the arrival of new tasks. To this end, an online learning mechanism is introduced so that the clustering center and feature extraction model can be adjusted according to the new task data. is the learning rate, and the update formula of the cluster center is:
[0052] Where t represents the time step, is the set of tasks belonging to cluster m at time step t.
[0053] S1.5. Optimization and Regularization of Feature Analysis In order to prevent overfitting during feature extraction and improve the generalization ability of the model, the L2 regularization term is introduced to optimize the feature extraction model. Optimization objective function It can be expressed as:
[0054] in, is the task loss function, θ is the model parameter, and λ opt is the regularization coefficient, y i is the model output.
[0055] The task feature analysis step takes into account the dynamics and diversity of the environment, can accurately identify the similarities between tasks, and provide the necessary information for task grouping and parameter modulation.
[0056] S2. Task Grouping and Parameter Modulation Task grouping and parameter modulation aims to effectively group tasks and learn specific model parameters for each task group based on the results of task feature analysis. S2 includes: S2.1. Task grouping strategy The task grouping strategy is to divide the tasks into different groups according to the similarity measurement results between tasks. This strategy can be based on the output of cluster analysis, such as each cluster center c m Represents a task group. Task Ti Assigned to the cluster center c that is most similar to it m The groups represented are:
[0057] Among them, G m is around the cluster center c m Task group formed.
[0058] S2.2 Parameter modulation method For each task group G m , learn a specific set of model parameters θ m , these parameters will be used as the initial model parameters for new tasks in the group. Parameter modulation can be achieved by optimizing the following objective function:
[0059] in, is the model parameter θ m In Task T i The loss function on .
[0060] S2.3. Construction of Meta-Learner Each task group G m There is a corresponding meta-learner that can quickly adapt to new tasks in the group. The construction of the meta-learner is based on the following optimization problem:
[0061] in, is a regularization term used to control the complexity of the model and prevent overfitting, and α is the regularization coefficient.
[0062] S2.4. Cross-group parameter sharing and coordination In order to enhance the generalization ability of the model, this embodiment also implements a cross-group parameter sharing and coordination mechanism. By allowing parameters between different groups to be shared to a certain extent, the adaptability of the model to new tasks can be improved. Specifically, the first model parameter obtained after the cross-group parameter sharing and coordination mechanism is:
[0063] Among them, θ m is the model parameter, θ shared are model parameters that can be shared across groups, and β is the weight of the model parameters that can be shared across groups.
[0064] S3, Rapid Adaptation Strategy This step aims to achieve rapid adaptation to new tasks, using the results of the task grouping and parameter modulation modules to quickly adjust the model to adapt to new tasks through a small number of gradient descent steps. S3 includes: S3.1. Task identification and grouping When the target task T new When it arrives, first determine its feature vector f through task feature analysis technology new Then, a similarity measure is used to determine T new similarity with known task groups and assign them to the most appropriate group G m :
[0065] Among them, m best is the index of the task group that is most similar to the target task.
[0066] S3.2 Parameter initialization Once the target task is assigned to a specific task group, the first model parameter θ of this group is used m 'As the initial model parameter θ init To adapt to the target task: θ init =θ m ' (10) S3.3. Gradient descent adaptation Next, we need to analyze the target task related dataset D new Apply the gradient descent algorithm to adjust the initial model parameters θ init And find the optimized target model parameters θ adapted :
[0067] in, is the learning rate, is the loss function on the target task dataset, t is the number of iterations of gradient descent, and θ t+1 is the model parameter output at the (t+1)th iteration, θ t is the model parameter output at the tth iteration.
[0068] S3.4. Fitness evaluation After each gradient descent iteration, the fitness of the model parameters A(θ t ) to determine whether further iterations are needed or a satisfactory degree of adaptation has been achieved, A(θ t ) is expressed as:
[0069] If the fitness exceeds the preset threshold, the iteration is stopped.
[0070] S3.5. Cross-group knowledge transfer In order to enhance the adaptability of the target task, cross-group knowledge transfer is achieved. This can be achieved by setting the initial model parameters θinit The model parameters of other task groups are introduced to achieve this, and the formula is expressed as:
[0071] Among them, γ j is the weight of the jth group of parameters, and , The second model parameters are fused with the first model parameters of other task groups. The model parameters are optimized based on the second model parameters to obtain the final target model parameters.
[0072] In summary, the multimodal meta-learning fast adaptation method based on task similarity perception proposed in the present invention has achieved significant beneficial effects in solving the fast adaptation problem in multimodal task distribution. Compared with the prior art, the present invention achieves performance improvement and efficient use of resources through the following innovations: 1. Enhanced model adaptability: The present invention deeply explores the intrinsic characteristics of task data through task feature analysis, and realizes accurate identification of similarities between tasks. This similarity-based task grouping method enables the model to quickly find similar task groups when faced with new tasks, and use the model parameters of this group for initialization, which significantly improves the model's adaptation speed to new tasks. On the CUB Birds dataset, compared with the existing method MAML (Model-Agnostic Meta-Learning), the method of the present invention achieved a performance improvement of more than 3% in classification accuracy.
[0073] 2. Improved generalization ability: Through task grouping and parameter modulation, the present invention learns specific model parameters related to the task group, which not only speeds up the adaptation speed of the model, but also enhances the generalization ability of the model on new tasks. In the experiment of cross-domain task adaptation, the present method shows higher generalization accuracy on the miniImageNet dataset than the baseline method ANIL (Almost No Inner Loop, meta-learning with almost no inner loop), achieving a 10-shot accuracy gain of about 2%.
[0074] 3. Optimize resource allocation: The fast adaptation strategy of the present invention quickly adjusts the model through a small number of gradient descent steps, reducing the demand for computing resources. Compared with traditional meta-learning methods, the present invention reduces a certain amount of computation while maintaining the same model performance, which is particularly beneficial in resource-constrained environments.
[0075] 4. Improved data utilization efficiency: The present invention adopts advanced data mining technology in the task feature analysis stage, so that the features extracted from the same amount of data are richer and more representative, thereby improving the utilization efficiency of the data.
[0076] 5. Advantages of cross-modal learning: The present invention is specially designed for multimodal tasks and can effectively process information from different data sources and modalities. Through modal feature fusion and cross-modal association learning, the method of the present invention can make full use of the complementary information between different modalities and improve the model's understanding and adaptability to multimodal tasks.
[0077] 6. Dynamic update and adaptive adjustment: The dynamic update of task features of the present invention allows the system to continuously adjust and optimize the cluster center and feature extraction model according to the arrival of new tasks, maintaining the continuous update and adaptive ability of the model. This dynamic update mechanism enables the method of the present invention to adapt to the changes in task distribution over time and maintain long-term learning effects.
[0078] 7. Promote knowledge transfer: The rapid adaptation strategy of the present invention is not limited to the rapid learning of a single task, but can also achieve cross-task knowledge transfer. This means that the knowledge learned on one task can be quickly transferred to another related task, improving the overall efficiency of the learning process.
[0079] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0080] Based on the same inventive concept, the embodiment of the present application also provides a meta-learning rapid adaptation device for implementing the meta-learning rapid adaptation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more meta-learning rapid adaptation device embodiments provided below can refer to the above limitations on the meta-learning rapid adaptation method, which will not be repeated here.
[0081] In one embodiment, Figure 2As shown, a meta-learning rapid adaptation device is provided, which is a multimodal meta-learning based on task similarity perception. The device includes: a task feature analysis module, a task grouping and parameter modulation module and a rapid adaptation strategy module.
[0082] Among them, the task feature analysis module is used to perform feature analysis on task-related data, identify and quantify the similarities between tasks; task-related data includes at least one of text, pictures, and videos. This module is responsible for in-depth analysis of task data, identifying and quantifying the similarities between tasks. Through data preprocessing and feature extraction, similarity measurement, cluster analysis, and dynamic updating of task features, this module can capture the intrinsic characteristics of task data.
[0083] The task grouping and parameter modulation module is used to perform cluster analysis on tasks based on similarity and generate several task groups. For each task group, the corresponding model parameters are obtained, and the model parameters shared across different task groups are integrated to obtain the first model parameters. Based on the results of task feature analysis, this module divides tasks into different groups and learns a set of specific model parameters for each group. This process takes advantage of the similarity between tasks and improves learning efficiency through the construction of meta-learners, cross-group parameter sharing and coordination, and dynamic updating of parameter modulation.
[0084] The fast adaptation strategy module is used to find task groups with similarity matching for the target task, extract the first model parameters corresponding to the successfully matched task group as the initial model parameters of the target task; optimize the initial model parameters to obtain the target model parameters corresponding to the target task; when the target task arrives, this module is responsible for quickly identifying the group to which it belongs and using the model parameters of the group for initialization. Subsequently, through gradient descent adaptation, fitness evaluation, and cross-group knowledge transfer, the model is quickly adjusted to adapt to the target task.
[0085] Figure 2 In the figure, arrows are used to represent data flow and information transmission in each part. The output of the task feature analysis module points to the task grouping and parameter modulation module through arrows, indicating the transmission of the task feature analysis results; the output of the task grouping and parameter modulation module is transmitted to the fast adaptation strategy module through arrows, indicating the transmission of the task grouping and parameter modulation results; the fast adaptation strategy module feeds back the adapted model parameters to the task feature analysis module and the task grouping and parameter modulation module according to the fast adaptation strategy, indicating the transmission of the model adaptation results.
[0086] like Figure 3 As shown in the figure, the task feature analysis module mainly includes: The data preprocessing and feature extraction module is responsible for normalizing and denoising the raw data and extracting key information that can characterize the task characteristics; The similarity measurement module is used to measure the similarity of feature vectors of different tasks using methods such as cosine similarity to provide a basis for task grouping; Cluster analysis module, which is used to divide tasks into different groups based on similarity measurement results and adopt clustering algorithms such as k-means to achieve effective organization of tasks; The task feature dynamic update module is used to adopt an online learning mechanism to dynamically update the clustering center and feature extraction model according to the characteristics of the target task to adapt to changes in task distribution.
[0087] Figure 3 In the process, the output of the data preprocessing and feature extraction module is measured by the feature similarity measurement module, which triggers the cluster analysis of the cluster analysis module. The clustering results of the cluster analysis module guide the task feature dynamic update module to dynamically update the task features. The update results of the task feature dynamic update module are fed back to the cluster analysis module to optimize the accuracy of similarity measurement and cluster analysis. Finally, the outputs of all modules are summarized to the end point, indicating the completion of the task feature analysis process.
[0088] like Figure 4 As shown, the task grouping and parameter modulation module mainly includes: The task grouping strategy module is responsible for effectively dividing tasks into different groups based on the similarity measurement results between tasks; The parameter modulation method module is used to learn a specific set of model parameters for each task group, which will be used as the initial model parameters for the target task within the group; A meta-learner building module, which is used to build a meta-learner for each task group, which can quickly adapt to the target task within the group; The cross-group parameter sharing and coordination module is used to implement the cross-group parameter sharing and coordination mechanism, allowing parameters between different groups to be shared to a certain extent to improve the generalization ability of the model; A parameter modulation dynamic update module is responsible for dynamically updating the parameter modulation module to maintain its effectiveness and adapt to new task data; The task group merging and splitting decision module is used to make decisions on merging or splitting task groups according to changes in task distribution to adapt to dynamic similarity changes between tasks.
[0089] The task grouping results of the task grouping strategy module guide the parameter modulation method module to perform parameter modulation, which in turn triggers the meta-learner construction of the meta-learner construction module. The cross-group parameter sharing and coordination mechanism of the cross-group parameter sharing and coordination module supports the execution of the parameter modulation method module and the meta-learner construction module. The dynamic update of the parameter modulation dynamic update module is fed back to the parameter modulation method module and the meta-learner construction module to optimize the performance of parameter modulation and meta-learner. The merging and splitting decisions of the task grouping strategy module are adjusted to adapt to the changes in task distribution. Finally, the outputs of all modules are aggregated to the end point, indicating the completion of the task grouping and parameter modulation process.
[0090] like Figure 5 As shown in the figure, the rapid adaptation strategy module mainly includes: The target task identification and grouping module is responsible for receiving the target task and identifying its features, and then assigning it to the most appropriate group based on the similarity of the features with the known task groups.
[0091] The parameter initialization module is used to use the model parameters of the group where the target task is located as the initial model parameters, providing a starting point for the rapid adaptation of the target task.
[0092] The gradient descent adaptation module is used to apply the gradient descent algorithm to the dataset of the target task and quickly adjust the model parameters to adapt to the target task through a small number of iterations.
[0093] The fitness evaluation module is used to evaluate the model fitness after each iteration to determine whether further iterations are needed or a satisfactory fitness level has been reached.
[0094] The cross-group knowledge transfer module is used to realize cross-group knowledge transfer and enhance the adaptability of the target task by introducing parameter information of other groups into the initial model parameters.
[0095] The adaptation completion decision module is used to make a decision on whether to complete the adaptation according to the fitness evaluation result. If the fitness reaches a preset threshold, the adaptation process is terminated.
[0096] The arrival of the target task triggers the target task identification and grouping of the target task identification and grouping module, and then the parameter initialization module performs parameter initialization according to the grouping results. The gradient descent adaptation module receives the initial model parameters of the parameter initialization module and performs gradient descent adaptation, and then the fitness evaluation module evaluates the fitness. If the evaluation result of the fitness evaluation module indicates that further iteration is needed, it returns to the gradient descent adaptation module to continue adaptation; if the fitness is satisfactory, it triggers the adaptation completion decision of the adaptation completion decision module. The cross-group knowledge transfer module realizes cross-group knowledge transfer between the parameter initialization module and the gradient descent adaptation module to enhance adaptability. Finally, the outputs of all modules are summarized to the end point, indicating the completion of the rapid adaptation strategy process.
[0097] This embodiment proposes a multimodal meta-learning rapid adaptation device based on task similarity perception. The task feature analysis module uses advanced data mining technology to conduct in-depth analysis of task data, identify and quantify the similarities between tasks. The task grouping and parameter modulation module groups tasks based on the results of task feature analysis, and learns a set of specific model parameters for each group to achieve rapid adaptation. When a new task arrives, the rapid adaptation strategy module quickly identifies the group to which it belongs, and initializes it using the model parameters of the group, and then quickly adjusts the model through a small number of gradient descent steps to adapt to the new task. This embodiment not only improves the adaptation speed of the meta-learning algorithm on new tasks, but also enhances its generalization ability, especially its effectiveness in dealing with multimodal task distributions, bringing important research value and broad application prospects to the field of artificial intelligence.
[0098] Each module in the multimodal meta-learning rapid adaptation device based on task similarity perception can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0099] In other embodiments, an application scenario of the method disclosed in the present invention is also proposed. Figure 6 As shown, the method of the present invention is applied to an intelligent transportation system to achieve rapid detection and effective response to traffic accidents. The specific implementation process is as follows: S1. Multi-source data collection: Traffic data is collected through multi-source devices such as traffic monitoring cameras, vehicle sensors, and weather stations.
[0100] S2. Data fusion and feature extraction: Fuse data from different sources and extract features that are helpful for accident detection, such as vehicle speed, traffic volume, weather conditions, etc.
[0101] S3. Similarity analysis of accident types: using the similarity measurement method of the present invention, similarity analysis and grouping of different types of traffic accidents are performed.
[0102] S4. Accident response strategy initialization: design a response strategy for each accident type, and initialize the strategy parameters using the parameter modulation method of the present invention.
[0103] S5. Real-time accident detection and rapid adaptation: Monitor traffic flow in real time, quickly identify the type of accident once signs of an accident are detected, and adjust the corresponding response strategy.
[0104] S6. Cross-strategy knowledge transfer: During the response strategy adjustment process, realize cross-accident type strategy knowledge transfer to improve the flexibility and effectiveness of the response.
[0105] S7. Accident handling and traffic guidance: Carry out accident handling and traffic guidance based on the adjusted response strategy to minimize the impact of the accident.
[0106] S8. System performance evaluation and optimization: Collect accident handling results and traffic data, evaluate the effectiveness of response strategies, and iteratively optimize system performance.
[0107] In other embodiments, another application scenario of the method disclosed in the present invention is also proposed. Figure 7 As shown, the method of the present invention is applied to a medical image diagnosis system to improve the accuracy and efficiency of diagnosis. The specific implementation process is as follows: S1. Multimodal data acquisition: In a medical environment, multimodal image data of patients is collected through different imaging techniques (such as CT, MRI, X-ray, etc.).
[0108] S2. Data preprocessing and feature extraction: The collected raw image data is preprocessed, including contrast enhancement, noise reduction, etc., and features that are helpful for diagnosis are extracted from it.
[0109] S3. Similarity measurement and task grouping: using the task similarity measurement method of the present invention, the image data of different patients are grouped according to feature similarity.
[0110] S4. Parameter modulation and model initialization: Learn specific model parameters for each group and use these parameters to initialize the diagnostic model to adapt to the image data of different groups.
[0111] S5. Rapid adaptation and adjustment of diagnostic models: When new patient image data is received, the group to which it belongs is quickly identified, and the corresponding model parameters are used for rapid adaptation and adjustment.
[0112] S6. Cross-modal knowledge transfer: In the process of model adjustment, cross-modal knowledge transfer is introduced to utilize the complementary information between different imaging technologies to enhance the performance of the diagnostic model.
[0113] S7. Diagnosis result generation and evaluation: Generate the final diagnosis result and evaluate it to ensure the accuracy of the diagnosis.
[0114] S8. Feedback and iterative model optimization: Use diagnostic results and patient feedback for iterative optimization of the model to continuously improve the performance of the diagnostic system.
[0115] The above two embodiments are merely examples to illustrate applicable scenarios of the present invention, and do not limit the application scenarios of the present invention.
[0116] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in all the above method embodiments when executing the computer program.
[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in all the above method embodiments are implemented.
[0118] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in all the above method embodiments when executed by a processor.
[0119] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0121] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0122] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A meta-learning fast adaptation method, characterized in that: The method comprises: Performing feature analysis on task-related data to identify and quantify similarities between the tasks; the task-related data includes at least one of text, pictures, and videos; Performing cluster analysis on the tasks based on similarity to generate several task groups; obtaining corresponding model parameters for each task group, and fusing the model parameters shared across different task groups to obtain first model parameters; Searching for the task group that matches the target task with similarity, extracting the first model parameters corresponding to the successfully matched task group as the initial model parameters of the target task; optimizing the initial model parameters to obtain the target model parameters corresponding to the target task.
2. The method according to claim 1, characterized in that: An online learning mechanism is introduced when performing cluster analysis on the task.
3. The method according to claim 1, characterized in that For each of the task groups, the corresponding model parameters are obtained, and the model parameters shared across different task groups are integrated to obtain the first model parameters, which includes: Acquire the model parameters corresponding to each of the task groups, and acquire the model parameters that can be shared across the task groups; For each of the task groups, a weighted sum is performed on the model parameters corresponding to the task group and the model parameters that can be shared across groups with the task group to obtain the first model parameters.
4. The method according to claim 1, characterized in that: The task group for searching similarity matches for the target task includes: Perform feature analysis on the target task and the task groups, and determine the task group matching the target task based on similarities between the target task and each of the task groups.
5. The method according to claim 1, characterized in that The performing parameter optimization on the initial model parameters to obtain the target model parameters corresponding to the target task comprises: The initial model parameters are iteratively optimized using the gradient descent method, the fitness of the model parameters after each gradient descent iteration is evaluated, the iteration is stopped when the fitness exceeds a threshold, and the model parameters at the time of iteration stop are output as the target model parameters.
6. The method according to claim 1, characterized in that After obtaining the initial model parameters, the method further includes: Introducing the first model parameters corresponding to the task group in the task group that does not match the target task into the initial model parameters to obtain second model parameters; Parameter optimization is performed on the second model parameters corresponding to the initial model parameters to obtain the target model parameters.
7. A meta-learning rapid adaptation device, characterized in that: The device comprises: A task feature analysis module, used to perform feature analysis on task-related data, identify and quantify similarities between the tasks; the task-related data includes at least one of text, pictures, and videos; The task grouping and parameter modulation module is used to perform cluster analysis on the tasks based on similarity to generate a number of task groups; for each of the task groups, obtain the corresponding model parameters, and fuse the model parameters shared across different task groups to obtain the first model parameters; The fast adaptation strategy module is used to find the task group with similarity matching for the target task, extract the first model parameters corresponding to the successfully matched task group as the initial model parameters of the target task; optimize the initial model parameters to obtain the target model parameters corresponding to the target task.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Image classification method and device based on meta learning, product and storage medium
CN114067155A
Workload prediction method and device for service in service cluster
CN118760561A