Auxiliary learning method, device and storage medium for joint selection of tasks and data
The importance and usefulness of training sample data are determined through the task learning model. Combined with the correlation between tasks and data, a learnable task-data arrangement model is constructed for alternating iterative optimization. This solves the problem of only considering the impact of the task level in existing technologies, improves the data utilization and robustness of auxiliary learning, and improves the performance of the target task.
Patent Information
- Application Number
- CN202210425169.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-04-22
AI Technical Summary
Existing auxiliary learning methods only consider the task level and ignore the impact of the data level, resulting in instability to noisy data and inability to fully utilize the auxiliary information in the data, which in turn affects the performance of the target task.
The task learning model is used to determine the importance and usefulness of the training sample data for each task to be learned. Combined with the relevance between the task and the data, the model parameters are updated to construct a learnable task-data arrangement model for alternating iterative optimization.
The utilization rate of auxiliary information in each data and each task to be learned is improved, the robustness of the target task is enhanced, and the performance of the target task is improved.
Smart Images

Figure CN114897058B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing technology, and in particular to an auxiliary learning method, device, and storage medium for joint selection of tasks and data. Background Art
[0002] Auxiliary learning refers to using information from auxiliary tasks to improve the performance of target tasks. Currently, auxiliary learning has been widely used in various deep learning methods.
[0003] However, the current auxiliary learning method only considers the relationship between different auxiliary tasks and the target task at the task level, but ignores the fact that different data under the same task will also have different impacts on the target task. The data under the same task includes data that is beneficial to the target task and noise data. If only the task level is considered without considering the impact of the data level on the target task, the auxiliary learning method will not be able to fully utilize the auxiliary information in the task and data, and will not be robust to noise data, which will lead to the performance of the target task being not good enough. Summary of the Invention
[0004] The embodiments of the present application provide an auxiliary learning method, device, and storage medium for joint selection of tasks and data, aiming to improve the performance of target tasks.
[0005] In a first aspect, an embodiment of the present application provides an auxiliary learning method for joint selection of tasks and data, the method comprising:
[0006] Inputting a training sample data set into a task learning model, wherein each training sample data in the training sample data set carries labels corresponding to a target task and multiple auxiliary tasks, and the task learning model is used to train multiple tasks to be learned, wherein the multiple tasks to be learned include a target task to be learned and multiple auxiliary tasks to be learned;
[0007] Processing the training sample data set by the task learning model to determine the importance of each training sample data to each task to be learned;
[0008] Determining the degree of benefit of each training sample data of each task to be learned to the target task based on the importance and the relevance of each of the multiple tasks to be learned to the target task;
[0009] According to the degree of benefit, the model parameters of the task learning model are updated.
[0010] Optionally, processing the training sample data set by the task learning model to determine the importance of each training sample data to each task to be learned includes:
[0011] Obtaining features corresponding to each training sample data through the task learning model, and determining the feature importance of each training sample data to each task to be learned;
[0012] Obtaining a loss function value for each training sample data under each task to be learned based on a label carried by each training sample data and a predicted value of each training sample data by each of the multiple tasks to be learned in the task learning model;
[0013] Determining the rationality of the label carried by each training sample data in each task to be learned according to the loss function value of each training sample data under each task to be learned;
[0014] The importance of each training sample data to each task to be learned in the plurality of tasks to be learned is determined according to the feature importance and the rationality.
[0015] Optionally, determining the degree of benefit of each training sample data of each task to be learned to the target task is performed by a learnable task-data arrangement model; and the method further comprises:
[0016] The model parameters of the task-data arrangement model and the model parameters of the task learning model are updated alternately and iteratively.
[0017] Optionally, the method further comprises: performing the following steps through the task-data arrangement model:
[0018] Constructing a learnable task relationship vector, wherein the task relationship vector represents the relevance of each of the plurality of tasks to be learned to the target task;
[0019] Constructing learnable task prototypes corresponding to each of the multiple tasks to be learned, and representing the feature importance of each training sample data to the task by calculating the inner product of the feature corresponding to each training sample data and the transposed task prototype of each task to be learned;
[0020] Constructing a learnable filter corresponding to each of the plurality of tasks to be learned, wherein the filter is used to determine the rationality of a label of each training sample data in each task to be learned;
[0021] The model parameters of the task-data arrangement model include: the learnable task relationship vector, the learnable task prototype and the parameters of the learnable filter.
[0022] Optionally, the updating process of the model parameters of the task-data arrangement model at least includes:
[0023] Obtain a target sample data set, where each target sample data in the target sample data set carries a label corresponding to the target task;
[0024] Inputting the target sample data set into the task learning model to obtain a loss function value corresponding to the target sample data set;
[0025] Calculating the gradient of the task-data arrangement model according to the loss function value corresponding to the target sample data set and the loss function value corresponding to the training sample data set;
[0026] Model parameters of the task-data scheduling model are updated according to the gradient.
[0027] Optionally, after updating the model parameters of the task learning model according to the degree of benefit, the method further includes:
[0028] Each time the model parameters of the task learning model are updated a first calibration number of times, a test sample data set is obtained, where each test sample data in the test sample data set carries a label corresponding to the target task;
[0029] Inputting the test sample data set into the task learning model, obtaining an output of the task learning model for the test sample data set, and determining an error of the output;
[0030] After the number of tests on the task learning model reaches the second calibration number, the task learning model with the smallest output error is selected as the trained model.
[0031] Optionally, the loss function of the task learning model is:
[0032]
[0033] Where U is the ID set of the multiple tasks to be learned, m is the number of data in the training sample data set, is the i-th training sample data, is the label corresponding to the kth task to be learned carried by the i-th training sample data, k∈U,w ik For training sample data The degree of benefit of the kth task to be learned to the target task, Training sample data The loss function value in the kth task to be learned.
[0034] In a second aspect, an embodiment of the present application provides an auxiliary learning device for joint selection of tasks and data, the device comprising:
[0035] A data input module is used to input a training sample data set into a task learning model, wherein each training sample data in the training sample data set carries a label corresponding to a target task and multiple auxiliary tasks, and the task learning model is used to train multiple tasks to be learned, wherein the multiple tasks to be learned include a target task to be learned and multiple auxiliary tasks to be learned;
[0036] An importance determination module, configured to process the training sample data set using the task learning model to determine the importance of each training sample data set for each task to be learned;
[0037] a benefit determination module, configured to determine the benefit of each training sample data of each task to be learned to the target task based on the importance and the relevance of each of the multiple tasks to be learned to the target task;
[0038] A model updating module is used to update the model parameters of the task learning model according to the degree of benefit.
[0039] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the auxiliary learning method for joint selection of tasks and data described in the first aspect of the embodiment.
[0040] Beneficial effects:
[0041] A training sample data set is input into a task learning model, wherein each training sample data in the training sample data set carries labels corresponding to a target task and multiple auxiliary tasks, and the task learning model is used to train multiple tasks to be learned, wherein the multiple tasks to be learned include a target task to be learned and multiple auxiliary tasks to be learned; the training sample data set is processed by the task learning model to determine the importance of each training sample data to each task to be learned; based on the importance and the relevance of the multiple tasks to be learned to the target task, the beneficialness of each training sample data of each task to be learned to the target task is determined; and based on the beneficialness, the model parameters of the task learning model are updated.
[0042] In this method, during the training of the task learning model based on the training sample data set, the model parameters of the task learning are updated according to the degree of beneficialness. The degree of beneficialness represents the different influences of each training sample data in each task to be learned on the target task, and the degree of beneficialness is determined based on the importance of each training sample data to each task to be learned, and the relevance of each task to be learned to the target task. That is to say, when determining the degree of beneficialness, both the influence of the data level on the target task and the influence of the task level on the target task are considered. Compared with only considering the influence of the task level on the target task, this method can improve the utilization rate of each data and auxiliary information in each task to be learned in auxiliary learning, and improve the robustness of the target task, thereby improving the performance of the target task. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0044] Figure 1 This is a flowchart of the steps of the auxiliary learning method for joint selection of tasks and data proposed in one embodiment of the present application;
[0045] Figure 2 This is a flowchart of the steps for determining importance proposed in one embodiment of the present application;
[0046] Figure 3 This is a flowchart of the steps of top-level optimization and update proposed in one embodiment of the present application;
[0047] Figure 4 This is a functional module diagram of an auxiliary learning device for joint selection of tasks and data proposed in one embodiment of the present application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0049] Assisted learning is a learning method that uses auxiliary tasks to help improve the target task. That is, during the learning and training process of the target task, one or more auxiliary tasks are introduced to assist in learning, which can improve the accuracy of the target task. However, existing assisted learning only considers the impact of different auxiliary tasks on the target task at the task level, while ignoring the impact of the data under each task to be learned on the target task.
[0050] Taking the image classification task as an example, when the target task is "correctly classify a bird", auxiliary task 1: "detecting a bird's beak" and auxiliary task 2: "detecting a bird's tail" will both provide useful assistance to the target task.
[0051] For auxiliary task 1, the image data of the front of the bird is definitely helpful in identifying the bird's beak, that is, the image data can provide useful information for the auxiliary task, while the image data of the bird's tail can provide little useful information for identifying the bird's beak, that is, the image data of the bird's tail is not important for the target task in auxiliary task 1.
[0052] For auxiliary task 2, the image data of the bird's front is not important, but the image data of the bird's tail can provide useful information. At this time, the image data of the bird's tail is important for the target task in auxiliary task 2.
[0053] It can be seen that different data have different importance to the target task in different auxiliary tasks. If we only focus on the impact of the task level on the target task, it will lead to the inability to fully utilize the impact of the auxiliary information of each data on the target task, and the inevitable noise data in the data will weaken the impact of useful auxiliary information on the target task, thereby leading to low efficiency of the target task in utilizing the auxiliary information and non-robustness to noise data. In order to solve these problems, this application proposes an auxiliary learning method for joint selection of tasks and data.
[0054] Reference Figure 1 , shows a flowchart of the steps of an auxiliary learning method for joint selection of tasks and data in an embodiment of the present invention. The method may specifically include the following steps:
[0055] S101: Inputting a training sample data set into a task learning model, wherein each training sample data in the training sample data set carries labels corresponding to a target task and multiple auxiliary tasks.
[0056] The task learning model is used to train multiple tasks to be learned, and the multiple tasks to be learned include a target task to be learned and multiple auxiliary tasks to be learned; the training sample data set is input into the task learning model, and the multiple tasks to be learned are learned based on the training sample data set respectively. Therefore, each training sample data in the training sample data set carries a label corresponding to the target task and labels corresponding to each of the multiple auxiliary tasks.
[0057] For example, suppose there is 1 target task, n auxiliary tasks, and m data in the training sample data set. For any training sample data, there are a total of (1+n) labels, and the (1+n) labels can be the same or different.
[0058] S102: Processing the training sample data set by the task learning model to determine the importance of each training sample data to each task to be learned.
[0059] In the process of processing the training sample data set by the task learning model, the data generated by the processing process is obtained to determine the importance of each training sample data for any task to be learned. The importance can reflect whether the training sample data is beneficial to the learning task.
[0060] It can be considered that if the information of a training sample data is important for a task to be learned, the training sample data contains features that are useful for the task to be learned, and the label corresponding to the task carried by the training sample data is correct.
[0061] Reference Figure 2 , shows a flowchart of the steps for determining importance provided by this embodiment. In a feasible implementation, the importance of each training sample data to each task to be learned can be determined by the following steps:
[0062] A1: Obtain the features corresponding to each training sample data through the task learning model, and determine the feature importance of each training sample data to each task to be learned.
[0063] Multiple tasks to be learned in the task learning model share a backbone encoder. When the training sample data set is input into the task learning model, the backbone encoder can generate the corresponding features of each training sample data; at the same time, a corresponding task prototype can be constructed for each task to be learned, and the dimension of the task prototype of each task to be learned is the same as the dimension of the feature of the training data sample; then the inner product of the feature of each training sample data and the transposed inner product of the task prototype corresponding to each task to be learned is calculated respectively. The inner product can represent the feature importance of each training sample data for each task to be learned.
[0064] A2: Based on the label carried by each training sample data and the predicted values of each training sample data for each of the multiple tasks to be learned in the task learning model, obtain the loss function value of each training sample data under each task to be learned; based on the loss function value of each training sample data under each task to be learned, determine the rationality of the label carried by each training sample data in each task to be learned.
[0065] In the task learning model, each task to be learned is processed for a training sample data set to obtain a predicted value of each task to be learned for each training sample data. After comparing the predicted value with the label carried by each training sample data, the loss function value of each training sample data under each task to be learned is obtained. The rationality of the label carried by each training sample data set in each task to be learned is determined through the loss function value.
[0066] Because, whether the label of a training sample data for a task is reasonable can be reflected in the loss function value of the training sample data under the task to be learned. For example, data with a relatively small loss function value can be regarded as non-noise data, and its label can also be regarded as correct and reasonable, while data with a relatively large loss function value can be regarded as noise data, and its label can be regarded as unreasonable.
[0067] Therefore, in this embodiment, a filter is set for each task to be learned, and the loss function value of all training sample data in each task to be learned is generated through the task learning model, and then the noise data is filtered out through the filter.
[0068] A3: Determine the importance of each training sample data to each of the multiple tasks to be learned based on the feature importance and the rationality.
[0069] In any task to be learned, the feature importance of each training sample data and the rationality of the label can represent the importance of each training sample data to the task, that is, whether the data reflected by the importance is beneficial to the learning task.
[0070] S103: Determine the benefit of each training sample data of each task to be learned to the target task based on the importance and the relevance of each of the multiple tasks to be learned to the target task.
[0071] Generally speaking, if a training sample data is beneficial to an auxiliary task to be learned, and the auxiliary task to be learned is beneficial to the target task, then the training sample data can be considered to be beneficial to the target task as well.
[0072] Based on this, this method can determine the degree of beneficialness of each training sample data under each task to be learned to the target task according to the importance of each training sample data to each task to be learned and the relevance of each task to be learned to the target task. That is, the beneficialness takes into account whether the training sample data is beneficial to the task to be learned and whether the task to be learned is beneficial to the target task. The beneficialness can characterize the different effects of each training sample data in each task to be learned on the target task.
[0073] S104: updating the model parameters of the task learning model according to the degree of benefit.
[0074] By determining the degree to which each training sample data under each task to be learned is beneficial to the target task, the model parameters of the task learning model are updated.
[0075] Since the importance of the training sample data to each task to be learned and the relevance of each task to be learned to the target task are taken into account when determining the degree of helpfulness, when using the degree of helpfulness to update the model parameters of the task learning model, the impact of both the data level and the task level on the target task are considered. Compared with only considering the impact of the task level on the target task, this method can improve the utilization rate of the auxiliary information of each data and each task to be learned in auxiliary learning, and improve the robustness of the target task, thereby improving the performance of the target task.
[0076] In order to facilitate the determination of the degree of benefit of each training sample data of each task to be learned to the target task, in a feasible implementation manner, the method also constructs a task-data arrangement model, and considering that the task learning model is constantly updated and optimized, the task-data arrangement model is also learnable. The model parameters of the learnable task-data arrangement model and the model parameters of the task learning model are alternately iteratively updated so that the task-data arrangement model can adaptively determine a more accurate degree of benefit for the continuously optimized task learning model.
[0077] Specifically, let the IDs of multiple tasks to be learned in the task learning model be recorded as:
[0078] U = {1, 2, ..., n, G}
[0079] Among them, 1 to n are the IDs corresponding to the n auxiliary tasks to be learned, and G is the ID corresponding to the target task to be learned.
[0080] The training sample dataset is recorded as:
[0081]
[0082] The training sample data set includes m training sample data, where: is the i-th training sample data, is the label of the i-th training sample data in the k-th task to be learned, k∈U.
[0083] The task learning model is denoted as {f k}, its parameter is θ, and its predicted value for the output of the kth task to be learned is recorded as f k .
[0084] Specifically, the following steps are performed by the model parameters of the learnable task-data arrangement model:
[0085] Construct a learnable task relationship vector, denoted as α = [α1,…α n , α G ], where α k Represents the relevance between the kth task to be learned and the target task.
[0086] Construct multiple learnable task prototypes corresponding to each of the tasks to be learned, and record the learnable task prototypes corresponding to each of the tasks to be learned as P k Represents the task prototype of the kth task to be learned.
[0087] Construct a learnable filter corresponding to each of the plurality of tasks to be learned, wherein the filter is a linear filter, and the filter parameters are learnable {a k} k∈U With {b k} k∈U .
[0088] Furthermore, the model parameters of the task-data arrangement model include: the learnable task relationship vector, the learnable task prototype and the parameters of the learnable filter, which are expressed as:
[0089]
[0090] Specifically, the task-data arrangement model determines the benefit w ik The process is as follows:
[0091] Get the backbone encoder f of the model learned through the task k,enc (·) Get training sample data The characteristics of And c ik Dimensions and task prototypes P k Same; determine the training sample data Characteristics of c ik With the task prototype P k The inner product of the transpose of is used as the training sample data The feature importance for the kth task to be learned.
[0092] Generate training sample data based on task learning model The loss function value in the kth task to be learned is recorded as:
[0093]
[0094] For training sample data The loss function value in the kth task to be learned is normalized. The loss after normalization is recorded as Then the training sample data is determined by the learnable filter The rationality of the label of the kth task to be learned is recorded as
[0095] Then, the training sample data The degree of benefit w of the kth task to be learned to the target task ik The calculation formula is as follows:
[0096]
[0097] Where σ() is an activation function that ensures non-negative values.
[0098] It can be seen that the degree of benefit w ik It includes both the relevance of each task to be learned and the target task, as well as the importance of each training sample data to each task to be learned, thus including the impact of both the data level and the task level on the target task.
[0099] In this method, the parameters of the task learning model are updated according to the degree to which each training sample data under each task to be learned is beneficial to the target task. Therefore, the loss function of the task learning model is as follows:
[0100]
[0101] Furthermore, in this embodiment, the model parameters of the task learning model and the model parameters of the task-data arrangement model are alternately iteratively updated, and each iterative update process includes a bottom-level optimization update and a top-level optimization update.
[0102] The underlying optimization update is to update the task learning model; specifically, based on the training sample dataset D t , the parameters θ of the task learning model are updated with a first gradient and a first training speed η1, wherein when the underlying optimization update is performed for the first time, the parameters β of the task-data arrangement model are assigned a preset value.
[0103] The first gradient is the weighted gradient sum of the training sample data of different tasks to be learned, specifically the following formula:
[0104]
[0105] Updated parameter θ * for:
[0106]
[0107] Moreover, in this embodiment, in each bottom-level optimization update, the parameters of the task learning model can be optimized M times continuously, and then the top-level optimization update process is switched.
[0108] Reference Figure 3 , shows a flowchart of the top-level optimization and update steps provided by this embodiment. The top-level optimization and update is to update the task-data arrangement model. Specifically, it includes the following sub-steps:
[0109] B1: Obtain a target sample data set, where each target sample data in the target sample data set carries a label corresponding to the target task.
[0110] The target sample dataset is the training sample dataset D t The target sample data set is obtained by sampling and recorded as:
[0111]
[0112] Among them, the target sample dataset D dev There are r target sample data in the target sample data set, and each target sample data in the target sample data set carries the label corresponding to the target task.
[0113] B2: Input the target sample data set into the task learning model to obtain the loss function value corresponding to the target sample data set.
[0114] The target sample dataset D is trained by the task learning model dev The target sample data set D is obtained dev The corresponding loss function value is as follows:
[0115]
[0116] Where θ * Learn the updated model parameters for the task obtained through the underlying optimization update.
[0117] B3: Calculate the gradient of the task-data arrangement model according to the loss function value corresponding to the target sample data set and the loss function value corresponding to the training sample data set.
[0118] The loss function value Lt corresponding to the training sample data set refers to the task learning model after the underlying optimization update based on the training sample data set D t The loss function value obtained after processing can be obtained by two methods:
[0119] One method is to use the training sample dataset D t Also input the task learning model to obtain the training sample data set D t The corresponding loss function value Lt, but because the top-level optimization update only updates the parameters of the task-data arrangement model, the parameters of the task learning model are not updated, that is, the data obtained by the task learning model based on the training sample data set is not returned.
[0120] Another method is to update the task learning model for the last time on the training sample dataset D in an underlying optimization update. t The loss function value Lt obtained by processing is stored, and when the task-data scheduling model is updated, the stored loss function value Lt can be called.
[0121] Specifically, the gradient calculation formula of the task-data arrangement model is as follows:
[0122]
[0123] Where I is the identity matrix, K is the truncated term of the sum of the Newman series (taking the first K terms of the infinite series), and i in this formula is: the i-th term of the Newman series.
[0124] B4: Update the model parameters of the task-data scheduling model according to the gradient.
[0125] Specifically, the model parameter β of the task-data arrangement model is updated using the gradient of the task-data arrangement model and the second training rate η2. The updating process is as follows:
[0126]
[0127] Where I is the identity matrix, and K is the truncated term of the Newman series sum (taking the first K terms of the infinite series). The i in this formula is the i-th term of the Newman series.
[0128] After the top-level optimization update is completed, the task-data arrangement model with updated parameters is used to continue updating the parameters of the task learning model.
[0129] The task learning model and the task-data arrangement model are updated through the above two-layer optimization. However, in order to avoid the task learning model from devOverfitting can be tested after updating the task learning model several times, including:
[0130] C1: Every time the model parameters of the task learning model are updated a first calibration number of times, a test sample data set is obtained, where each test sample data in the test sample data set carries a label corresponding to the target task.
[0131] The number of calibration updates for the model parameters of the task learning model can be regarded as testing the task learning model every time the underlying optimization is performed and the calibration is updated T times.
[0132] During testing, the test sample dataset D v ,in,
[0133]
[0134] Test sample dataset D v There are N test sample data, each of which carries the label corresponding to the target task, but the test sample data set D v Different from the target sample dataset D dev , test sample data set D v The number of data in the target sample dataset D is greater than dev The amount of data in .
[0135] C2: Input the test sample data set into the task learning model, obtain the output of the task learning model for the test sample data set, and determine the error of the output.
[0136] The task learning model outputs the test sample dataset D v and determine the error of the prediction result.
[0137] C3: After the number of tests on the task learning model reaches the second calibration number, the task learning model with the smallest output error is selected as the trained model.
[0138] Each time the first calibration number of underlying optimization updates is performed, the test sample data D v The task learning model is tested once, and the number of tests is accumulated. When the number of tests reaches the second calibration number, the task learning model with the smallest error is regarded as the trained model.
[0139] By configuring a learnable task-data arrangement model and alternately iteratively optimizing the task-data arrangement model and the task learning model, a target task with better results can be obtained.
[0140] This application has at least the following beneficial effects:
[0141] 1. Update the parameters of the task learning model based on the degree of benefit that each training sample data in each task to be learned has on the target task. This takes into account both the task level (i.e., the impact of different tasks on the target task) and the data level (i.e., the impact of different data in different tasks on the target task). This can improve the efficiency of the target task in utilizing auxiliary information in the task and data, and improve the robustness to noisy data, thereby further improving the performance of the target task.
[0142] 2. Alternating iterative optimization of the task-data arrangement model and the task learning model can provide more accurate benefit levels for the task learning model, thereby obtaining target tasks with better results.
[0143] Reference Figure 4 , shows a functional module diagram of an auxiliary learning device for joint selection of tasks and data in an embodiment of the present invention, the device comprising:
[0144] A data input module 100 is configured to input a training sample data set into a task learning model, wherein each training sample data in the training sample data set carries labels corresponding to a target task and multiple auxiliary tasks, and the task learning model is configured to train multiple tasks to be learned, wherein the multiple tasks to be learned include a target task to be learned and multiple auxiliary tasks to be learned;
[0145] The importance determination module 200 is used to process the training sample data set through the task learning model to determine the importance of each training sample data to each task to be learned;
[0146] A benefit determination module 300 is configured to determine the benefit of each training sample data of each task to be learned to the target task based on the importance and the relevance of each of the multiple tasks to be learned to the target task;
[0147] The model updating module 400 is configured to update the model parameters of the task learning model according to the degree of benefit.
[0148] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the auxiliary learning method for joint selection of tasks and data as described in the embodiment.
[0149] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0150] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0151] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0152] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0154] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0155] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0156] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. An auxiliary learning method for joint selection of tasks and data, characterized in that: The method comprises: Inputting a training sample data set into a task learning model, wherein each training sample data in the training sample data set carries labels corresponding to a target task and multiple auxiliary tasks, the task learning model is used to train multiple tasks to be learned, the multiple tasks to be learned include a target task to be learned and multiple auxiliary tasks to be learned, each training sample data in the training sample data set is image data of a target object, and the target task to be learned is an image classification task for the image data of the target object; Processing the training sample data set by the task learning model to determine the importance of each training sample data to each task to be learned; Determining, based on the importance and the relevance of each of the multiple tasks to be learned to the target task, the degree of benefit of each training sample data of each task to be learned to the target task, wherein the degree of benefit represents the different effects of each training sample data in each task to be learned on the target task; updating the model parameters of the task learning model according to the degree of benefit; The processing of the training sample data set by the task learning model to determine the importance of each training sample data to each task to be learned includes: Obtaining features corresponding to each training sample data through the task learning model, and determining the feature importance of each training sample data to each task to be learned; Obtaining a loss function value for each training sample data under each task to be learned based on a label carried by each training sample data and a predicted value of each training sample data by each of the multiple tasks to be learned in the task learning model; Determining the rationality of the label carried by each training sample data in each task to be learned according to the loss function value of each training sample data under each task to be learned; The importance of each training sample data to each of the multiple tasks to be learned is determined according to the feature importance and the rationality.
2. The method according to claim 1, characterized in that Determining the degree to which each training sample data of each task to be learned is beneficial to the target task is performed by a learnable task-data arrangement model; the method further includes: The model parameters of the task-data arrangement model and the model parameters of the task learning model are updated alternately and iteratively.
3. The method according to claim 2, characterized in that The method further comprises: performing the following steps by the task-data arrangement model: Constructing a learnable task relationship vector, wherein the task relationship vector represents the relevance of each of the plurality of tasks to be learned to the target task; Constructing learnable task prototypes corresponding to each of the multiple tasks to be learned, and representing the feature importance of each training sample data to the task by calculating the inner product of the feature corresponding to each training sample data and the transposed task prototype of each task to be learned; Constructing a learnable filter corresponding to each of the plurality of tasks to be learned, wherein the filter is used to determine the rationality of a label of each training sample data in each task to be learned; The model parameters of the task-data arrangement model include: the learnable task relationship vector, the learnable task prototype and the parameters of the learnable filter.
4. The method according to claim 3, characterized in that The updating process of the model parameters of the task-data arrangement model at least includes: Obtain a target sample data set, where each target sample data in the target sample data set carries a label corresponding to the target task; Inputting the target sample data set into the task learning model to obtain a loss function value corresponding to the target sample data set; Calculating the gradient of the task-data arrangement model according to the loss function value corresponding to the target sample data set and the loss function value corresponding to the training sample data set; Model parameters of the task-data scheduling model are updated according to the gradient.
5. The method according to any one of claims 1 to 4, characterized in that: After updating the model parameters of the task learning model according to the degree of benefit, the method further includes: Each time the model parameters of the task learning model are updated a first calibration number of times, a test sample data set is obtained, where each test sample data in the test sample data set carries a label corresponding to the target task; Inputting the test sample data set into the task learning model, obtaining an output of the task learning model for the test sample data set, and determining an error of the output; After the number of tests on the task learning model reaches the second calibration number, the task learning model with the smallest output error is selected as the trained model.
6. The method according to claim 1, characterized in that The loss function of the task learning model is: Where U is the ID set of the multiple tasks to be learned, m is the number of data in the training sample data set, is the i-th training sample data, is the label corresponding to the kth task to be learned carried by the i-th training sample data, k∈U, For training sample data The degree of benefit of the kth task to be learned to the target task, For training sample data The loss function value in the kth task to be learned.
7. An auxiliary learning device for joint selection of tasks and data, characterized in that: The device comprises: A data input module is configured to input a training sample data set into a task learning model, wherein each training sample data in the training sample data set carries labels corresponding to a target task and a plurality of auxiliary tasks, the task learning model is configured to train a plurality of tasks to be learned, the plurality of tasks to be learned including a target task to be learned and a plurality of auxiliary tasks to be learned, each training sample data in the training sample data set is image data of a target object, and the target task to be learned is an image classification task for the image data of the target object; An importance determination module is used to process the training sample data set through the task learning model to determine the importance of each training sample data to each task to be learned; obtain the features corresponding to each training sample data through the task learning model, and determine the feature importance of each training sample data to each task to be learned; obtain the loss function value of each training sample data under each task to be learned based on the label carried by each training sample data and the predicted values of the multiple tasks to be learned in the task learning model for each training sample data; determine the rationality of the label carried by each training sample data in each task to be learned based on the loss function value of each training sample data under each task to be learned; determine the importance of each training sample data to each task to be learned in the multiple tasks to be learned based on the feature importance and the rationality; a benefit determination module, configured to determine the benefit of each training sample data of each task to be learned to the target task based on the importance and the relevance of each of the multiple tasks to be learned to the target task, wherein the benefit represents the different effects of each training sample data in each task to be learned on the target task; A model updating module is used to update the model parameters of the task learning model according to the degree of benefit.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the auxiliary learning method for joint selection of tasks and data according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-task classification method and device and related equipment
CN111881968A
Incremental learning method driven by task correlation
CN113392980A