Method and apparatus for assisted learning with joint task and data scheduling
Through the JTDS model and task data scheduler, the problem of existing auxiliary learning methods ignoring data sample-level information is solved, and more effective auxiliary information use and robustness to noise data is achieved.
Patent Information
- Application Number
- CN202280097315.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-01
- Publication Date
- 2025-02-28
AI Technical Summary
Existing auxiliary learning methods only consider task-level relationships, ignoring the different contributions of data samples to the target task within the auxiliary task, resulting in inefficient auxiliary information use and non-rootability to data noise.
A joint task and data scheduling (JTDS) model is proposed. The appropriate scheduling is generated through a parameter-efficient task data scheduler, which captures the importance of different data samples in each auxiliary task to the target task, and jointly optimizes the parameters of the task learning model and task data scheduler through two-layer optimization problems.
Effectively capture the contribution of data samples to the target task, reduces the parameters required for scheduling, improves the robustness of noise data, and is suitable for different scenarios such as supervised learning and semi-supervised learning.
Smart Images

Figure CN119547052A_ABST
Abstract
Description
Technical Field
[0001] Generally speaking, aspects of the present disclosure relate to artificial intelligence, and more particularly, aspects of the present disclosure relate to providing methods and apparatus for assisted learning with joint task and data scheduling. Background Art
[0002] Using auxiliary tasks to help improve the learning of the target task is called auxiliary learning. This learning paradigm aims to model the performance on the target task by leveraging the useful information carried in related tasks. Assisted learning has been widely adopted in different fields, including but not limited to image classification, visual language navigation, and reinforcement learning. Among them, image classification is popular in various scenarios, such as object recognition (traffic signs / road surface / pedestrians / vehicles) in autonomous driving, or defective product recognition in smart manufacturing.
[0003] The typical and most widely adopted approach in auxiliary learning is to calculate the average or total loss of all training samples for each task, linearly combine them into a single loss, and then use the aggregated loss to optimize the task learning model. In order to achieve promising performance on the target task, methods such as grid search or hyperparameter optimization (HPO) tools are always utilized to adjust the linear weights of the task combination. However, this paradigm usually fails when the number of auxiliary tasks is large because the complexity of the search space will explode exponentially.
[0004] In other methods, the gradient similarity between the target task and the auxiliary tasks can be used to automatically assign weights to different auxiliary tasks in an adaptive manner. In addition, by using a small set of target tasks as guidance, it is proposed to learn nonlinear combinations of given tasks to better utilize the auxiliary information.
[0005] However, existing works only consider task-level relationships, thus ignoring the important fact that data samples within the same auxiliary task may have different contributions to the target task. In addition, given that the real world inevitably contains noise, these noisy data samples may also offset the benefits of helpful auxiliary tasks. Therefore, existing works fail to capture the relationships between various data samples and the target task in different auxiliary tasks, thus suffering from inefficient use of auxiliary information and non-robustness to data noise. Summary of the invention
[0006] A simplified overview of one or more aspects is given below to provide a basic understanding of these aspects. This overview is not an extensive overview of all contemplated aspects, and is intended to neither identify key or important elements of all aspects nor to identify the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to a more detailed description that is presented later.
[0007] Since current methods for auxiliary learning only consider task-level relationships, a method and apparatus for learning a joint task and data schedule for auxiliary learning is disclosed, which allows capturing the importance of different data samples in each auxiliary task to the target task.
[0008] Furthermore, to address the challenge of infeasible computational effort due to the large number of required parameters, and the small target task dataset may cause overfitting problems, a Joint Task and Data Scheduling (JTDS) model for auxiliary learning is proposed. The proposed JTDS model utilizes a novel parameter-efficient task-data scheduler to generate appropriate schedules. In particular, the task-data scheduler creates a mapping from task, feature, and label information to the schedule. This mapping can accurately capture the importance of different samples in each auxiliary task to the target task, while greatly reducing the required parameters for the schedule.
[0009] To jointly optimize the parameters of the task learning model and the task data scheduler, the overall learning process is formulated as a two-level optimization problem. In the lower-level optimization, the task learning model parameters will be optimized under the schedule generated by the task data scheduler, and in the upper-level optimization, the scheduler parameters will be optimized using gradients from a small development dataset, and the gradients can be implicit gradients to overcome intractable computational problems.
[0010] Furthermore, the proposed model can be applicable to different scenarios, such as supervised learning, semi-supervised learning, or more severe scenarios where the training labels of the target task are corrupted. The JTDS model has the ability to exploit auxiliary information and is robust to noisy samples in the data.
[0011] According to one aspect, a computer-implemented method for training a task learning model for a target task using one or more auxiliary tasks is disclosed. The method includes: inputting data samples from a training set to the task learning model, wherein each data sample is provided with at least a label on each of the auxiliary tasks; encoding the data samples to extract features of each of the data samples; calculating the loss of the target task and the one or more auxiliary tasks for each data sample, respectively, based at least in part on the output of the task learning model and the associated labels; evaluating the contribution of each of the data samples to the target task within each of the one or more auxiliary tasks; and calculating the training loss of the task learning model based at least in part on the sum of the corresponding losses of the target task and the one or more auxiliary tasks, the corresponding losses of the target task and the one or more auxiliary tasks being weighted by the contribution of each of the data samples to the target task within each of the one or more auxiliary tasks.
[0012] According to another aspect, the target task is an image classification problem.
[0013] According to another aspect, the data samples input from the training set are images; the images are encoded to obtain a feature vector for each of the images; the loss of the image for the image classification problem is calculated based on the probability output by the task learning model for the image classification and the associated label of the image for the image classification problem; the loss of the image for the auxiliary task is calculated based on the probability output by the task learning model for the auxiliary task and the associated label of the image for the auxiliary task; the contribution of each of the images in each of the one or more auxiliary tasks to the image classification problem is evaluated; and the training loss of the task learning model is calculated based on the sum of the corresponding losses of the image classification problem and the one or more auxiliary tasks, the image classification problem and the corresponding losses of the one or more auxiliary tasks being weighted by the contribution of each of the images to the image classification in each of the one or more auxiliary tasks.
[0014] According to another aspect, the contribution of each of the data samples is evaluated based on the influence of each of the data samples and its label on the corresponding auxiliary task and the relationship between the corresponding auxiliary task and the target task.
[0015] According to another aspect, the impact of each of the data samples and its label on the corresponding auxiliary task is evaluated based on whether the features of the data sample are informative for the corresponding auxiliary task and whether its label is correct.
[0016] According to another aspect, the informativeness of the features of the data sample for the auxiliary task is evaluated by an inner product between the features of the data sample and a feature prototype of the corresponding auxiliary task having the same dimension as the features of the data sample.
[0017] According to a further aspect, the correctness of the label is evaluated by the calculated loss for the corresponding auxiliary task.
[0018] According to a further aspect, the method further comprises filtering out the data sample and its label if the label is evaluated as incorrect.
[0019] According to another aspect, the method also includes: updating the parameters of the task learning model at a first learning rate in an iteration to reduce the calculated training loss, wherein the parameters representing the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task are fixed; and updating the parameters representing the contribution of each of the data samples in each of the one or more auxiliary tasks at a second learning rate in the iteration.
[0020] According to another aspect, parameters representing the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task are updated while fixing parameters of the task learning model that have been updated in the iteration.
[0021] According to another aspect, the method also includes: updating the parameters of the task learning model at the first learning rate in the next iteration to reduce the calculated training loss, wherein the parameters have a fixed value updated in the previous iteration, and the fixed value represents the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task.
[0022] According to another aspect, the parameters of the task learning model are updated a certain number of times in one iteration instead of waiting for the parameters of the task learning model to converge.
[0023] According to another aspect, the parameter representing the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task is updated on a validation set or a subset of the validation set, and wherein the validation set contains only data samples and labels on the target task.
[0024] According to another aspect, the parameters of the task learning model are updated using the weighted gradient sum of the data samples within the target task and each of the one or more auxiliary tasks; and the parameters representing the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task are updated using implicit gradients.
[0025] According to another aspect, the method further comprises: testing the task learning model on a validation set after each specific number of iterations of updating, and selecting parameters of the task learning model with the lowest error as final learned parameters of the task learning model.
[0026] According to another aspect, wherein all data samples in the training set are equipped with labels on the target task, or at least a portion of the data samples in the training set are equipped with labels on the target task. A computer-implemented method for image classification is disclosed, wherein the classification of the image is determined by a task learning model, the task learning model is trained using one or more auxiliary tasks using one of the operations of the above method, including: inputting an image to the task learning model; and outputting, by the task learning model, a probability that the image belongs to each of the categories.
[0027] A computer system is disclosed, which includes one or more processors and one or more storage devices storing computer executable instructions, which, when executed, enable the one or more processors to perform the operations of the above method.
[0028] One or more computer-readable storage media storing computer-executable instructions are disclosed. When executed, one or more processors are caused to perform the operations of the above method.
[0029] A computer program product comprising computer executable instructions which, when executed, cause one or more processors to perform the operations of the above method is disclosed. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The disclosed aspects will hereinafter be described in conjunction with the accompanying drawings, which are provided to illustrate and not to limit the disclosed aspects.
[0031] Figure 1 An exemplary model design for a Joint Task and Data Scheduling (JTDS) model in accordance with various aspects of the present disclosure is shown.
[0032] Figure 2 An exemplary overall framework for a JTDS model according to various aspects of the present disclosure is shown.
[0033] Figure 3 An exemplary flowchart for training a task learning model for a target task according to various aspects of the present disclosure is shown.
[0034] Figure 4 Another exemplary flowchart for training a task learning model for a target task according to various aspects of the present disclosure is shown.
[0035] Figure 5 An exemplary computing system in accordance with various aspects of the present disclosure is shown. DETAILED DESCRIPTION
[0036] The present disclosure will now be discussed with reference to several example implementations. It will be understood that these implementations are discussed only to enable those skilled in the art to better understand and thus implement embodiments of the present disclosure, and do not imply any limitation on the scope of the present disclosure.
[0037] Various embodiments will be described in detail with reference to the accompanying drawings. Wherever possible, the same reference numerals will be used throughout the drawings to refer to the same or similar parts. Reference to specific examples and embodiments is for illustrative purposes and is not intended to limit the scope of the present disclosure.
[0038] Using auxiliary tasks to help improve the learning of the target task is called auxiliary learning. Existing auxiliary learning methods only consider the relationship between the target task and the auxiliary tasks, thereby ignoring the fact that data samples within the auxiliary tasks may have different contributions to the target task, which leads to inefficient use of auxiliary information and non-robustness to data noise.
[0039] Taking the image classification task as an example, when the target task is "classify the bird correctly", it is usually difficult for non-domain experts to classify these birds, but it is easy to distinguish visual attributes such as bird beaks, head color, etc. Therefore, the natural approach is to use attribute classification (such as "detect bird beaks" and / or "detect bird head color") as helpful auxiliary tasks. Although images of the frontal bird face help auxiliary tasks to improve the target task, images of the bird's back may provide little useful information. In addition, considering that the real world inevitably contains noise, these noisy data samples may also offset the benefits of helpful auxiliary tasks.
[0040] make is a training set, which includes m data samples that can be used for n+1 different tasks. In the training set, is the ith data sample and is its target for the kth task Still taking image classification as an example, the data sample can be an image, and if the task is to "detect the color of the bird's head", the label can be "red", "yellow", etc.
[0041] make For The following is a set of N data samples and the corresponding labels for each sample, where G is the index of the target task. v is a validation set used to evaluate the learning model for the task.
[0042] The general auxiliary learning process can be formulated as Equation (1), where the task learning model {f k} is parameterized by θ and f k Output for tasks The training loss function is L t , and the loss optimization process P() generates a candidate set {θ p}. Minimize in D v The verification error E on v θ p is selected as the parameter for the target task.
[0043] Due to the different f k Usually some parameters are shared, so the information of the auxiliary task can be passed on to the target task. In short, the goal of auxiliary learning is to design an appropriate L t to combine the information of a given task in order to obtain an optimal task learning model (parameterized by θ) for the target task.
[0044] A simple but widely adopted approach to utilizing auxiliary tasks is to combine the average training losses of each task in a linear fashion as formulated in Equation (2), where l k (·,·) is the task The loss function is then used to adjust the weight w of each task using grid search or other hyperparameter optimization (HPO) methods. k However, these methods suffer from the problem of exponentially exploding search space when the number of auxiliary tasks is large.
[0045] Recent methods propose to assign weights to different tasks based on the gradient similarity between the target task and the auxiliary tasks. Since the gradient similarity usually changes during the training process, this approach assigns adaptive weights to each task. However, these methods are limited in exploiting useful information in the auxiliary since they ignore information at the data sample level.
[0046] To address this problem, this paper proposes a joint task and data scheduling (JTDS) model including a task learning model and a task data scheduler, which will be discussed in detail below. In addition, it is proposed to jointly schedule tasks and data samples for auxiliary learning. Specifically, the task learning model is configured with a schedule about the importance of each data sample within each task to the target task.
[0047] However, learning such a joint schedule is challenging. Assuming that the dataset contains m data samples and the number of auxiliary tasks is n, the number of required parameters for scheduling is O(mn). Given the data-driven nature of current deep learning, even with 10 4 A dataset with 10 samples and 1 auxiliary task will also result in 2 10 4 parameters. To obtain the optimal values for such a large number of parameters, both the search-based and gradient-based methods described above would be infeasible because the computational cost explodes. Therefore, a novel parameter-efficient task data scheduler is disclosed that creates a mapping from task, feature, and label information to a schedule and simultaneously reduces the amount of computation required to learn the schedule.
[0048] First, we formulate the auxiliary problem. We represent all training task IDs as U = {1, 2, …, n, G}, where For auxiliary tasks, and is the target task. Different from equation (2), our training optimization target L t It is expressed in equation (3), where w ik Given in the task The key challenge is how to determine the total m(n+1) parameters {w ik As mentioned above, directly optimizing such a large number of parameters is challenging, so a parameter-efficient scheduler is designed to generate w ik is necessary. To this end, the parameter-efficient task data scheduler is described in detail below. Given all training data samples and tasks, the scheduler outputs {w ik}, the schedule captures the importance of each data sample within each task to the target task.
[0049] Figure 1 An exemplary model design for a JTDS model according to various aspects of the present disclosure is shown. The JTDS model is shown to include two main components, namely, a parameter-efficient task data scheduler 101 for general-purpose assisted learning and a task learning model (TLM) 102. In addition, the interaction between the scheduler 101 and the TLM 102 is also shown in FIG. Figure 1 It is expected that the scheduler 101 provides an appropriate joint schedule for training the TLM 102 so that the target task Task learning models with excellent performance on
[0050] For TLM 102, the most widely used hard parameter sharing architecture (a common backbone encoder and several task-specific heads for each task) is used as an example rather than a limitation, where different tasks are best distinguished by shape, other examples such as soft parameter sharing architectures are possible. Figure 1 As can be seen, the output of the scheduler {w ik} is passed to the task learning model to calculate the training loss L as in Equation (3) t .
[0051] In order to decide an appropriate schedule while using fewer parameters, it is natural to relate the schedule to existing information. Considering the factors that influence the importance of each data sample within each task to the target task, two assumptions are proposed that can help build a parameter-efficient task data scheduler.
[0052] The first hypothesis focuses on the relationship between the target task and each data sample within each auxiliary task. Assumption 1. If the task For the target task is beneficial and For the task is beneficial, then in the auxiliary task Internal data sample For the target task It is beneficial.
[0053] The first hypothesis states that tasks and data samples contribute multiplicatively to the target task. and Have low correlation or for Not very informative, this would make This assumption allows the same data samples in different auxiliary tasks to have different levels of importance in terms of their relevance to the target task. The different data samples in can also be based on the data samples for How informative is the information to show different levels of importance.
[0054] On the other hand, the second hypothesis focuses on evaluating the training for How much informativeness is there? Assumption 2. If Includes useful features, and is the correct label, then For the task It is informative.
[0055] The second hypothesis implies The features and loss terms Can provide information about for In one embodiment, the correctness of a label can be determined by its corresponding loss value.
[0056] The first assumption is that w ik Decomposed into two parts, namely (1) and The correlation between them, and (2) for The second assumption further decomposes part (2) into the importance of sample features and the rationality of labels. Based on the above two assumptions, we will further discuss the parameter-efficient task data scheduler.
[0057] like Figure 1 As shown, a learnable task relationship vector α = [α1,…,α n ,α G ] to describe each task and The relationship between k express for In addition, for The importance of depends on the sample characteristics and sample loss. In the data sample will be sent to the task learning model f k To obtain its characteristics and its losses where f k,enc (·) is used for The encoder of the task learning model is Figure 1 As shown in the figure. Due to different f kSome parameters are usually shared, so in one embodiment, a hard parameter sharing architecture (a common backbone encoder and several task-specific heads for each task) can be used, which Figure 1 In other embodiments, other sharing architectures for multiple tasks may be used, including, to name a few examples, soft parameter sharing architecture, hierarchical sharing architecture, sparse sharing architecture, etc.
[0058] In order to judge from the perspective of features for The importance of introducing a set of learnable task prototypes in the scheduler 101 Each P k Is with and represents the task The characteristic prototype of c ik These prototypes are used to evaluate the data samples Does it include Useful features. In addition, by using the prototype To achieve dimensionality reduction of data features.
[0059] Based on the idea that the normalized loss distribution of clean and noisy data can be modeled by two beta distributions parameterized by two sets of parameters, the scheduler 101 assigns an adaptive pass filter to each task to filter out the noise pairs. By introducing the learnable parameters {a k} k∈U and {b k} k∈U , these filters are flexible for different scenarios. Represented as l ik , the scheduler 101 generates a joint schedule w ik , as shown in Equation (4), where σ() is an activation function to ensure non-negative values. The second term uses the inner product between the task prototype and the sample features to evaluate The third item is used to evaluate Is it The linear classifier of the noise pair, and is the loss after normalization. Considering w ik Depending on the loss, features, and introduced learnable parameters that are updated during the training process, w ik It is naturally adaptive.
[0060] The disclosed scheduler 101 comprehensively considers task, feature and label information, while only introducing an additional set of learnable parameters where the number of parameters is O(dn) if the features of all tasks are assumed to have the same dimension d and d is the dimension of the features. Considering the fact that the feature dimension d (typical values {32, 64, 128, 256}) is usually much smaller than the dataset size m, the number of parameters to be optimized is greatly reduced.
[0061] Figure 2 An exemplary overall framework for a JTDS model according to various aspects of the present disclosure is shown. Figure 2 A two-layer optimization process for TLM 102 and scheduler 101 is shown in FIG.
[0062] During lower layer optimization 201, TLM 102 t The task learning model parameters θ are updated a certain number of times using the scheduled gradient. After a certain step of lower layer optimization, the training loss of TLM 102 is calculated to obtain the gradient, which is used to update the parameters β of scheduler 101 in 202. The task learning model parameters θ are updated using the objective of minimizing the training loss in equation (3). Given that the goal of scheduler 101 is to obtain the optimal value for D v The optimal training schedule for the target task on can be obtained by using D v In another example, a small development dataset is introduced It only contains information about the task (i.e., target task) information, D dev is from the validation set D v A small subset of samples.
[0063] Specifically, as described above, the problem is formulated as a two-level optimization problem shown in equation (5). in, And L t (θ, β) is the scheduling training loss in Equation (3).
[0064] During the lower layer optimization 201, the parameters θ of the TLM 102 are updated, where the parameters β of the scheduler 101 are fixed. As an example, θ is updated by using the scheduling gradient, as shown in equation (6), by using the weighted gradient sum of data samples within different tasks.
[0065] Although w ik is also a function of θ, because as shown in equation (4), and l ik Both depend on θ, but when updating θ in Equation (6), only l is considered ikThe gradient with respect to θ, ignoring w ik The gradient with respect to θ, because our goal is to find the most useful task-data pairs and use their losses to train the task learning model. In fact, if we also consider w ik With respect to the gradient of θ, it is very likely that some trivial solution of θ is obtained. A possible solution could be that θ is obtained by forcing all w ik are equal to zero to minimize L t In this case, the model will ignore the loss for each task and data sample pair, thus failing to learn any knowledge about the task in the underlying optimization. Therefore, the gradient in Equation (6) only involves the loss l ik .
[0066] During the upper layer optimization 202, it is necessary to derive L dev (θ * (β)) with respect to the gradient of β. Given L dev (θ * (β)) depends directly on θ instead of β, and the implicit gradient can be obtained by using implicit differentiation. L can be obtained using the chain rule as shown in Equation (7) dev (θ * (β)) with respect to the gradient of β.
[0067] However, directly computing the inverse of the Hessian This is intractable for deep models. Therefore, a K-truncated Neumann series is used to approximate the inverse, as shown in Equation (8). By using this approximation to approximate the inverse of the Hessian, the implicit gradient can be calculated in Equation (9)
[0068] After obtaining the gradients of θ and β, Algorithm 1 gives a complete algorithm for simultaneously learning the TLM 102 and the task data scheduler 101. Algorithm 1 is shown only as an example, and other embodiments are possible.
[0069] For example, the training set D t , validation set D v , iteration threshold T, the first learning rate η1 and the second learning rate η2 are input to the JTDS model. As another example, the small development dataset D dev Instead of D v Input to the JTDS model for training the parameter β of the scheduler. As another example, the truncation threshold K can also be input to the JTDS model for calculating the implicit gradient. As another example, the counting threshold M can also be input to the JTDS model for lower layer optimization.
[0070] As shown in Algorithm 1, the training set D t , validation set D v , iteration threshold T, first learning rate η1 and second learning rate η2, small development data set D dev , truncation threshold K and counting threshold M are input to JTDS.
[0071] In such Figure 2 During the lower layer optimization shown in 201, the parameter θ of TLM 102 is updated, wherein the parameter β of scheduler 101 is fixed. ik ,c ik ; β) Assign importance w to each sample in each task as in equation (4) ik The parameter θ is updated with the gradient in equation (6) at a first learning rate. Instead of waiting for θ to converge, a more efficient M-step optimization is shown in Algorithm 1, i.e., after θ has been updated M times, it is switched to the upper optimization to optimize β.
[0072] In such Figure 2 During the upper optimization shown in 202, the parameter β of the scheduler 101 is updated. As discussed previously, β can be updated using implicit gradients and can be K-truncated to reduce the amount of computation. In order to train the task learning model on the target task, D v To further reduce the amount of computation, we can use a small development dataset D dev Instead of D v As shown in Algorithm 1, first calculate L dev and L t , and then use implicit gradient to update β according to equation (9) with the second learning rate η2. By using implicit gradient, the update of β is simplified to a one-step optimization.
[0073] To be consistent with the lower-level optimization using Equation (6), during the upper-level optimization, shown in Algorithm 1, the detach() operation is used to discard the feature c ik and loss The gradient with respect to θ.
[0074] In addition, to avoid overfitting of the task learning model to D dev ,,After each T iterations of upper and lower layer optimization, on the validation set D v The model is learned on the test task, and the θ with the lowest error can be recorded as the final learned model for the target task as in Equation (1).
[0075] Figure 3An exemplary flow chart for training a task learning model for a target task according to various aspects of the present disclosure is shown. As described below, some or all of the features shown may be omitted in a specific implementation within the scope of the present disclosure, and some of the features shown may not be required to implement all embodiments. In some examples, the method may be performed by any suitable device or unit for performing the functions or algorithms described below. In some examples, the process may be performed by the above reference Figure 1 and Figure 2 The described scheduler 101 and / or TLM 102 are executed.
[0076] Typically, the use of one or more auxiliary tasks to train a task learning model for a target task is discussed in the context of a task, including but not limited to image classification, audio classification, recommendation, visual language navigation, and reinforcement learning. Taking image classification as an example, if the target task is a bird classification problem, attribute classification can be used as an auxiliary task to help bird classification. As another example, if the target task is a general image classification problem, the rotation prediction problem can be an auxiliary task for self-supervised learning.
[0077] The process is used to train a task learning model for a target task using one or more auxiliary tasks, and can begin at block 301 by inputting data samples from a training set into the task learning model, wherein each data sample is provided with at least a label on each of the auxiliary tasks. For example, the data samples can be images, audio, text, video, visual data, etc. for different types of tasks. In an example, the operation of block 301 can be as described above with reference to Figure 1 and Figure 2 The TLM 102 described above is performed.
[0078] In one aspect, a fully supervised setting is configured for a target task, where all training samples are provided with labels on the target task. In another aspect, a semi-supervised setting is configured for a target task, where only a portion of the training samples are provided with labels on the target task. In either scenario, the training labels may be corrupted.
[0079] The process proceeds to block 302, where the data samples are encoded to extract features of each of the data samples. In one example, the operation of block 302 may be as described above with reference to Figure 1 and Figure 2 The TLM 102 described above is performed.
[0080] In one aspect, a hard parameter sharing architecture can be used, which has a common backbone encoder and several task-specific heads for each task. In another aspect, a soft parameter sharing architecture can be used, which has multiple task-specific encoders and heads, respectively. In yet another aspect, other sharing architectures for multiple tasks can be used, such as a hierarchical sharing architecture, a sparse sharing architecture, etc.
[0081] For example, the features of each data sample in the data sample can be expressed as in is a data sample, and f k,enc () is the task learning model f k The encoder.
[0082] The process proceeds to block 303-1, where the loss of the target task and one or more auxiliary tasks is calculated for each data sample based at least in part on the output of the task learning model and the associated labels. In one example, the operation of block 303-1 can be described by reference to Figure 1 and Figure 2 The TLM 102 described above is performed.
[0083] For example, the loss for the target task and one or more auxiliary tasks is calculated as in, Represents a data sample The task learning model f k The output of Represents a data sample , and θ represents the learnable parameters of the task learning model.
[0084] The process proceeds to block 303-2, where the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task is evaluated. In one example, the operation of block 303-2 can be described by reference to Figure 1 and Figure 2 The described scheduler 101 is executed.
[0085] In one aspect, the contribution of each data sample in the data samples is evaluated based on the impact of each data sample and its label on the corresponding auxiliary task and the relationship between the corresponding auxiliary task and the target task, which indicates that the task and the data sample make a multiplicative contribution to the target task.
[0086] In another aspect, the influence of each data sample and its label in the data samples on the corresponding auxiliary task is evaluated based on whether the features of the data sample provide information for the corresponding auxiliary task and whether its label is correct.
[0087] In a further aspect, the informativeness of features of a data sample for an auxiliary task is evaluated by an inner product between the features of the data sample and a feature prototype of the corresponding auxiliary task having the same dimension as the features of the data sample.
[0088] In another aspect, the correctness of the labels is evaluated by the calculated loss of the corresponding auxiliary task.
[0089] In further aspects, if the label is evaluated as incorrect, the data sample and its label are filtered out.
[0090] For example, ik represents the contribution of each data sample in each auxiliary task in one or more auxiliary tasks to the target task, and can be calculated according to equation (4) above, where α k refers to the relationship between the corresponding auxiliary tasks and the target tasks, used to evaluate the informativeness of features of data samples for the auxiliary task, and represents a filter that evaluates the correctness of the label by computing the loss for the corresponding auxiliary task, and the noisy pair can be represented by the parameter {a k} k∈U and {b k} k∈U Filter out.
[0091] The process proceeds to block 304, where a training loss of the task learning model is calculated based at least in part on the sum of the corresponding losses of the target task and the one or more auxiliary tasks, the target task and the one or more auxiliary tasks being weighted by the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task. In an example, the operation of block 304 can be described above with reference to Figure 1 and Figure 2 The TLM 102 described above is performed.
[0092] For example, we can use w according to equation (3) above ik To calculate the training loss, through which the task learning model is provided with a schedule of the importance of each data sample within each task to the target task.
[0093] Figure 4Another exemplary flow chart of training a task learning model for a target task according to various aspects of the present disclosure is shown. As described below, some or all of the features shown may be omitted in a particular implementation within the scope of the present disclosure, and some of the features shown may not be required to implement all embodiments. In some examples, the process may be performed by any suitable device or unit for performing the functions or algorithms described below. In some examples, the method may be performed by the above reference Figure 1 and Figure 2 The described scheduler 101 and / or TLM 102 are executed.
[0094] The process is used to train a task learning model for a target task using one or more auxiliary tasks, and may start at box 401 and proceed to boxes 402, 403, and 404, which may perform the same Figure 3 The same operations as described in the blocks 301-304 of FIG. In the example, the operations of blocks 401-404 may be performed by the above reference Figure 1 and Figure 2 The described scheduler 101 and / or TLM 102 are executed.
[0095] The process proceeds to block 405, where in the iteration, the parameters of the task learning model are updated at a first learning rate to reduce the calculated training loss, wherein the parameters representing the contribution of each data sample in each of the one or more auxiliary tasks to the target task are fixed. The updated parameters of the task learning model will be transmitted to block 403-1 for optimization in the next iteration, and to block 406 for upper layer optimization in the current iteration. In the example, the operation of block 405 can be referred to above. Figure 1 and Figure 2 The described TLM 102, or any suitable device or unit for performing a function or algorithm may be performed.
[0096] For example, the parameters of the task learning model can be updated in iterations according to Equation (6), and where θ represents the parameters of the task learning model and η1 is the first learning rate, where θ represents the contribution w ik Parameter set is fixed.
[0097] In one aspect, the parameters of the task learning model are updated a certain number of times in one iteration, rather than waiting for the parameters of the task learning model to converge.
[0098] In another aspect, parameters of the task learning model are updated using a weighted sum of gradients of data samples within the target task and each of the one or more auxiliary tasks.
[0099] The process proceeds to block 406, where in an iteration, a parameter representing the contribution of each of the data samples in each of the one or more auxiliary tasks is updated at a second learning rate. The updated parameter representing the contribution will be transmitted to block 403-2 for optimization in the next iteration. In an example, the operation of block 406 can be described by referring to Figure 1 and Figure 2 The described scheduler 101, or any suitable device or unit for performing a function or algorithm may be executed.
[0100] For example, in the iteration, the representation contribution w is updated with the second learning rate η2 ik Parameters
[0101] In one aspect, the parameters representing the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task are updated while the parameters of the task learning model that have been updated in the iteration are fixed. As described above, the updated parameters θ of the task learning model are transmitted to block 406 for upper layer optimization in the current iteration.
[0102] In another aspect, a parameter representing a contribution of each of the data samples in each of the one or more auxiliary tasks to the target task is updated on a validation set or a subset of the validation set, and wherein the validation set contains only the data samples and labels on the target task.
[0103] In another aspect, a parameter representing the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task is updated using an implicit gradient. For example, the implicit gradient can be calculated according to equation (9), and the optimization is transformed into a one-step optimization by using the implicit gradient.
[0104] The process returns to box 403, and after both the parameters of the task learning model and the parameters representing the contribution of each data sample in each auxiliary task in one or more auxiliary tasks to the target task are updated, the next iteration starts from box 403 to 406 and performs the operations described above.
[0105] Additionally, the process proceeds to block 407 to determine whether the iteration count satisfies the iteration threshold T, and proceeds to block 408 after each T iteration of updating the parameters of the task learning model, where the task learning model can be tested on the validation set, and the parameters of the task learning model with the lowest error are selected as the final learned parameters of the task learning model. In the example, the operation of block 407 can be referred to above. Figure 1 and Figure 2The described TLM 102, or any suitable device or unit for performing a function or algorithm may be performed.
[0106] Figure 5 5 shows an exemplary computing system according to various aspects of the present disclosure. The computing system may include at least one processor 510. The computing system may also include at least one storage device 520. It should be understood that the storage device 520 may store computer executable instructions that, when executed, cause the processor 510 to perform operations according to the above-mentioned combination. Figures 1 to 4 Any operation of an embodiment of the present disclosure is described.
[0107] Embodiments of the present disclosure may be embodied in a computer-readable medium such as a non-transitory computer-readable medium. The non-transitory computer-readable medium may include instructions that, when executed, cause one or more processors to perform a method for training a task learning model for a target task using one or more auxiliary tasks, the method comprising: inputting data samples from a training set to the task learning model, wherein each data sample is provided with at least a label on each of the auxiliary tasks; encoding the data samples to extract features of each of the data samples; calculating the loss of the target task and the one or more auxiliary tasks for each data sample based at least in part on the output of the task learning model and the associated labels; evaluating the contribution of each of the data samples to the target task within each of the one or more auxiliary tasks; and calculating the training loss for the task learning model based at least in part on the sum of the corresponding losses of the target task and the one or more auxiliary tasks, the corresponding losses of the target task and the one or more auxiliary tasks being weighted by the contribution of each of the data samples to the target task within each of the one or more auxiliary tasks.
[0108] The non-transitory computer readable medium may also include instructions which, when executed, cause one or more processors to perform the following steps in conjunction with Figures 1 to 4 Any operation of the embodiments of the present disclosure described.
[0109] Embodiments of the present disclosure may be embodied in a computer program product comprising computer executable instructions that, when executed, cause one or more processors to perform operations according to the present disclosure. Figures 1 to 4 Any operation of an embodiment of the present disclosure is described.
[0110] It should be understood that all operations in the above methods are exemplary only, and the present disclosure is not limited to any operations in these methods or the order of these operations, and should encompass all other equivalents under the same or similar concept.
[0111] It should also be understood that all modules in the above-mentioned device can be implemented in various ways. These modules can be implemented as hardware, software or a combination thereof. In addition, any module in these modules can be further divided into submodules or combined together in function.
[0112] The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects. Therefore, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents of the elements of the various aspects described throughout this disclosure are expressly incorporated herein by reference and are intended to be covered by the claims, and these structural and functional equivalents are known or will be known later to those of ordinary skill in the art.
Claims
1. A computer-implemented method for training a task learning model for a target task using one or more auxiliary tasks, comprising: Inputting data samples from the training set into the task learning model, wherein each data sample is provided with at least a label on each of the auxiliary tasks; Encoding the data samples to extract features of each data sample in the data samples; Based at least in part on the outputs of the task learning model and the associated labels, respectively, calculating a loss for the target task and the one or more auxiliary tasks for each data sample; evaluating a contribution of each of the data samples to the target task in each of the one or more auxiliary tasks; and A training loss of the task learning model is calculated based at least in part on a sum of respective losses of the target task and the one or more auxiliary tasks, wherein the respective losses of the target task and the one or more auxiliary tasks are weighted by the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task.
2. The computer-implemented method of claim 1 , wherein: The target task is an image classification problem.
3. The computer-implemented method of claim 2, wherein: The data samples input from the training set are images; The images are encoded to obtain a feature vector for each of the images; Calculating the loss of the image for the image classification problem based on the probability output by the task learning model for the image classification and the associated label of the image for the image classification problem; Calculating a loss for the image for the auxiliary task based on a probability output by the task learning model for the auxiliary task and an associated label of the image for the auxiliary task; evaluating a contribution of each of the images to the image classification problem within each of the one or more auxiliary tasks; and The training loss of the task learning model is calculated based on the sum of the corresponding losses of the image classification problem and the one or more auxiliary tasks, wherein the corresponding losses of the image classification problem and the one or more auxiliary tasks are weighted by the contribution of each of the images to the image classification in each of the one or more auxiliary tasks.
4. The computer-implemented method of claim 1 , wherein: The contribution of each of the data samples is evaluated based on the influence of each of the data samples and its label on the corresponding auxiliary task and the relationship between the corresponding auxiliary task and the target task.
5. The computer-implemented method of claim 4, wherein: The influence of each of the data samples and its label on the corresponding auxiliary task is evaluated based on whether the features of the data sample are informative for the corresponding auxiliary task and whether its label is correct.
6. The computer-implemented method of claim 5, wherein: The informativeness of the features of the data sample for the auxiliary task is evaluated by an inner product between the features of the data sample and a feature prototype of the corresponding auxiliary task having the same dimension as the features of the data sample.
7. The computer-implemented method of claim 5, wherein: The correctness of the labels is evaluated by the calculated loss for the corresponding auxiliary task.
8. The computer-implemented method of claim 5, further comprising: If the label is evaluated as incorrect, the data sample and its label are filtered out.
9. The computer-implemented method of claim 1 , further comprising: updating parameters of the task learning model at a first learning rate in an iteration to reduce the calculated training loss, wherein a parameter representing the contribution of each of the data samples to the target task in each of the one or more auxiliary tasks is fixed; as well as The parameter representing the contribution of each of the data samples within each of the one or more auxiliary tasks is updated at a second learning rate in the iteration.
10. The computer-implemented method of claim 9, wherein: Parameters representing the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task are updated with parameters of the task learning model that have been updated in the iteration fixed.
11. The computer-implemented method of claim 9, further comprising: In a next iteration, the parameters of the task learning model are updated at the first learning rate to reduce the calculated training loss, wherein the parameters have fixed values updated in a previous iteration, and the fixed values represent the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task.
12. The computer-implemented method of claim 9, wherein: The parameters of the task learning model are updated a specific number of times in one iteration, rather than waiting for the parameters of the task learning model to converge.
13. The computer-implemented method of claim 9, wherein: The parameter representing the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task is updated on a validation set or a subset of the validation set, and wherein the validation set only contains data samples and labels on the target task.
14. The computer-implemented method of claim 9, wherein: The parameters of the task learning model are updated using a weighted gradient sum of the data samples within the target task and each of the one or more auxiliary tasks; and Wherein, the parameter representing the contribution of each of the data samples in each of the one or more auxiliary tasks to the target task is updated using implicit gradients.
15. The computer-implemented method of claim 9, further comprising: After every specific number of iterations of updating, the task learning model is tested on a validation set, and the parameters of the task learning model with the lowest error are selected as the final learned parameters of the task learning model.
16. The computer-implemented method of claim 1, wherein: All data samples in the training set are provided with labels for the target task, or at least a portion of the data samples in the training set are provided with labels for the target task.
17. A computer-implemented method for image classification, wherein: The classification of the image is determined by a task learning model, which is trained using one or more auxiliary tasks using a method according to any one of claims 1 to 16, including: Inputting the image into the task learning model; and The task learning model outputs the probability that the image belongs to each of the categories.
18. A computer system comprising: one or more processors; as well as One or more storage devices storing computer executable instructions which, when executed, cause the one or more processors to perform the operations of the method according to any one of claims 1 to 16.
19. One or more computer-readable storage media storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of any one of claims 1 to 16.
20. A computer program product comprising computer executable instructions which, when executed, cause one or more processors to perform the operations of the method of any one of claims 1 to 16.