Method for determining multi-task processing model architecture
By estimating task affinity and designing the branch depth of a multi-task processing model using a tree topology, the problem of destructive interactions between tasks is solved, resulting in reduced computational costs and more efficient model processing.
Patent Information
- Application Number
- CN202410637841.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-05-22
- Filing Date
- 2024-05-22
- Publication Date
- 2024-11-22
AI Technical Summary
Existing multi-task processing models struggle to effectively mitigate destructive interactions between tasks, leading to high computational costs, especially in high-dimensional domains such as image processing where computation is intensive.
By estimating the pairwise affinity between tasks, tasks are assigned to groups using a tree topology, and the branch depth of the multi-task processing model is determined, negative interactions between tasks are reduced. An architecture design of a common base network and a dedicated branch network is adopted.
It significantly reduces computational costs and improves the efficiency and accuracy of multi-task processing models, especially in environments with limited computing resources such as autonomous driving systems, enabling the simultaneous processing of multiple tasks.
Smart Images

Figure CN119005280A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a method for determining a method for determining an architecture of a multitasking model, a multitasking model for solving at least two, in particular a plurality of mutually different tasks, having an architecture determined according to this method, and the present disclosure relates to a computer program product. Background Art
[0002] Multitask-Learning or also multitasking is a branch of machine learning that focuses on models that can solve multiple tasks in parallel. A common paradigm in multitasking is to train a single neural network to solve various tasks simultaneously. The typical architecture of a multitasking network consists of a common base network (also called a backbone) and a dedicated branch network (also called a head or header), wherein the common base network acts as a feature extractor and its weights are shared by all tasks, while the weights of the dedicated branch network are not shared by all tasks. In such an environment, the tasks to be solved during neural network training can interact with each other either in a constructive (konstruktiv) or destructive (destruktiv) manner within the common base network.
[0003] The present disclosure proposes a method for determining the architecture of a multitasking model to minimize destructive interactions between tasks. Summary of the invention
[0004] One embodiment relates to a method for determining an architecture of a multitasking model having a number L of layers L i , where i=1 to L, for solving at least two, in particular a plurality of, mutually different tasks T i A collection of The method comprises the following steps:
[0005] - For the task to be solved T i A set of tasks T to be solved in the set i The pairwise affinity between
[0006] - Based on pairwise affinity, the task T to be solved i Assigned to number N groups g i , where i = 1 to N; and
[0007] - Determine the layer L iThe branch depth d of the multi-tasking model is specified by the task T to be solved in the multi-tasking model. i The shared base network B is used in layer L of the multi-tasking model. i Which depth branches to the number N branch network Z i , where i=1 to N.
[0008] The method provides for the use of the estimated pairwise affinities of the tasks to design a single multitasking network in which the negative interactions between the tasks are mitigated. That is, no separate base network, also called a backbone network, is used, and the tasks to be solved are not assigned to separate networks. According to the present disclosure, the architecture of the single network is determined using a tree topology in which a plurality of branch networks, also called heads, are connected to a common base network, the backbone network. In other words: the method allows for a finer division, in which parts of the neural network can still be shared by various tasks, for example in the lower layers of a single neural network.
[0009] The common base network acts as a feature extractor, and the weights of the common base network are shared by the tasks to be solved. The branch network is a sub-network dedicated to the task, and its weights are not used by all tasks, but only by the dedicated task respectively.
[0010] The assignment of tasks to branch networks is based on the assignment of tasks to N groups g i For the method, this means that these allocations are available as a result from the previous step.
[0011] The purpose of the step of determining the branch depth d is to determine the layer L where the shared basic network, ie, the backbone network, in the multi-task processing model is located or branches. i The branch depth d=2 means, for example, that the base network includes the 1st and 2nd layers of the multi-task processing model, and branches in a plurality of branch networks are set after the 2nd layer.
[0012] Not only does it compute the affinity between tasks, but it also determines the optimal depth of the common backbone network to identify where conflicts between tasks may arise. Thus, the method determines whether it is still possible to share latent representations before the network is partitioned. ). In this way, the computational cost can be significantly reduced, which is particularly helpful in image processing and other high-dimensional fields where the computations in earlier layers are often task-irrelevant and computationally intensive.
[0013] According to one embodiment, the pairwise affinity indicates how well the corresponding task pair can be trained in a network with shared layers. A high affinity value means that there is positive interference between the task pair, while a low affinity value means that there is negative interference between the task pair. For example, the pairwise affinity can be determined by training the task pair together in a single multi-task network and quantifying the effect that a gradient update of one task has on another task. It is also possible to train more than one task pair together in a single multi-task network.
[0014] According to one embodiment, the pairwise affinity includes an affinity value for the first task in the pair and an affinity value for the second task in the pair. a and Task T b For task T a The affinity value is Z b→a , and for task T b The affinity value is Z a→b These affinity values are not necessarily symmetric, so Z b→a It may not be equal to Z a→b .
[0015] In the case of a task set containing three or more tasks, the affinity of a particular task can be determined by determining the average of these pairwise affinities for the particular task. a , T b , T c The set of tasks T b and T c For task T a The pairwise affinity of the task T is calculated by averaging a Affinity value: (Z b→a +Z c→a ) / 2.
[0016] For example, the determination of affinity is described in Fifty, Chris et al., “Efficiently identifying task groupings for multi-task learning”, Advances in Neural Information Processing Systems 34(2021): 27503-27516, and Standley, Trevor et al., “Which tasks should be learned together in multi-task learning?” International Conference on Machine Learning, PMLR, 2020.
[0017] According to one embodiment, the tasks to be solved are grouped into i The allocation is done so that the corresponding group g i The average pairwise affinity value of is maximized. The task to be solved is to group g i The distribution can be made disjunctively. Alternatively, the distribution does not necessarily have to be disjunctively. Furthermore, since the affinity values are not necessarily symmetric, it is advantageous to make the distribution overcompletely. This means that a task can be distributed to two or more groups. For example, for a task T a and Task T b Task pairs and affinity value Z b→a , Z a→b Applicable: Z a→b >Z b→a The value Z a→b includes correspondingly high values, so when task T a Use Task T b When training, there is a b The positive interference of b→a For example, it includes a correspondingly low value so that when the task T b Use Task T a During training, for task T a There is negative interference. In other words, task T a Will increase the task T b In this case, it is advantageous to separate tasks Ta and T b Assign to the same group, but additionally assign task T a Also assigned to another group to which the task was not assigned.
[0018] Advantageously, a maximum number N of these groups may be predetermined. For example, the maximum number may be adapted to the available computing resources.
[0019] The assignment problem of allocating the tasks to be solved to groups can be solved efficiently using branch and bound or binary integer programming (BIP) solvers.
[0020] According to one embodiment, determining the branch depth d includes: training multiple networks with different branch depths, and selecting the branch depth based on the prediction accuracy of these networks. For example, the prediction accuracy can be determined using appropriate validation data.
[0021] Methods known from the prior art use methods from Neural Architecture Search (NAS) to estimate the optimal branch configuration by training a much larger neural network containing all possible branches as subnetworks. By training multiple individual networks, the method makes it possible to find the optimal branch depth using a computationally simple procedure that requires significantly less GPU memory for each individual run, since the entire hypergraph is not determined at once.
[0022] In principle, after determining the branch depth d, the method described above can be repeated iteratively. This is described below using a network of subgroups and sub-branches.
[0023] According to one embodiment, for a corresponding group g comprising two or more tasks, i , check: add the corresponding group g i The tasks to be solved are assigned to M number of subgroups (ug i ) whether the corresponding group g i The average pairwise affinity values of increase, where i=1 to N.
[0024] According to one embodiment, it is provided that: if the checking shows that the corresponding group g i If the pairwise affinity value of increases, the following steps are performed:
[0025] Based on the pairwise affinity, the corresponding groups g i The task to be solved is T i Assigned to number M subgroups ug i , where i = 1 to M, and determine the corresponding branch network Z i The sub-branch depth ud in the branch Z is: i Layer L i At what depth does the branch Z i Branches to M sub-branch networks UZ i , where i=1 to M.
[0026] The goal of further branching into multiple sub-branch networks is to further split the i-th branch network into M sub-branch networks. The optimal sub-branch depth ud is in the set {d+1, d+2, ..., L-1}, that is, with a depth greater than the branch depth d.
[0027] According to one embodiment, for the corresponding subgroup ug i Iteratively perform the above for the corresponding group g i The steps described for checking and assigning can further improve the architecture of the multi-tasking model.
[0028] Further embodiments relate to a multitasking model having a number L of layers for solving at least two, in particular a plurality of, mutually different tasks, whose architecture is determined using the method according to the described embodiments.
[0029] Further embodiments relate to a computer program product which, when executed on a computer, causes the computer to carry out the method according to the described embodiments.
[0030] A further embodiment relates to the use of the method according to the described embodiment for determining the architecture of a multitasking model having a number L of layers for solving at least two, in particular multiple, tasks that are different from one another, and / or for determining a multitasking model having a number L of layers for solving at least two, in particular multiple, tasks that are different from one another.
[0031] According to one embodiment, the multitasking model is designed or trained to solve tasks in the field of object recognition and / or to control a technical system, in particular to solve tasks in both fields. The fields of control of the technical system and object recognition are used, for example, in the field of automatic or semi-automatic driving and robotics.
[0032] For object recognition, for example, a large number of digital images are provided, in particular digital video images, digital radar images, digital lidar images, digital ultrasound images or digital motion sensor images. A multi-task processing model is trained for object recognition. The trained multi-task processing model is designed to determine a classification result of at least one object in the digital image. In order to control the movement of the technical system, the method comprises: detecting the digital image with a sensor, and controlling the movement of the technical system, in particular a machine, a robot, a vehicle, an aircraft, according to the classification result of at least one object in the digital image.
[0033] A multitasking model with an architecture determined according to the described method can be advantageously used to simultaneously solve multiple tasks in an environment with a limited computing budget. For example, in autonomous driving, the autonomous agent must solve multiple tasks in real time, such as localizing and classifying other road users, such as motor vehicles, pedestrians, cyclists, etc., identifying passable areas, recognizing traffic signs, etc., wherein the available computing power is limited by the existing hardware in the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Further advantages are derived from the description and the drawings. Embodiments of the invention are shown in the drawings and explained in more detail in the following description. Here, the same reference numerals in different drawings respectively represent the same or at least functionally equivalent elements. When describing the individual drawings, reference may also be made to elements in other drawings if necessary. In schematic form:
[0035] Figure 1 A diagram showing a model known in the prior art;
[0036] Figure 2 A multitasking model having an architecture according to a first embodiment is shown;
[0037] Figure 3 shows a multitasking model having an architecture according to a second embodiment, and
[0038] Figure 4 Method steps for determining the architecture of a multi-tasking model NN are shown. DETAILED DESCRIPTION
[0039] From the prior art, see Figure 1 , it is known that different tasks are assigned to different models. According to the public literature: Fifty, Chris et al. "Efficiently identifying taskgroupings for multi-task learning", Advances in Neural Information Processing Systems 34 (2021): 27503-27516" and Standley, Trevor et al.: "Which tasks should be learned together in multi-task learning?", International Conference on Machine Learning, PMLR, 2020, the affinity between tasks is used to assign task groups to each network.
[0040] The present disclosure relates to a method for designing a single multitasking network using the pairwise affinity of tasks, in which the negative interactions between these tasks are mitigated. That is, according to the method, a separate base network, also referred to as a backbone network, is not used, and the tasks to be solved are not assigned to separate networks. According to the present disclosure, a tree topology is used to determine the architecture of a single network, in which a plurality of branch networks (also referred to as heads) are connected to a common base network, i.e., a backbone network. By sharing computing resources, a plurality of multitasking architectures are generally more advantageous than a collection of a plurality of independent single-tasking networks in terms of the trade-off between efficiency and accuracy.
[0041] Refer to the following Figures 2 to 4 A method 100 for determining an architecture of a multi-tasking model NN (eg, a neural network) is explained.
[0042] Figure 2 and Figure 3 For example, a multitasking model having an architecture according to the first embodiment and a multitasking model having an architecture according to the second embodiment are shown.
[0043] The multi-task processing model NN includes L number of layers L i , where i=1 to L, for solving at least two, in particular a plurality of, mutually different tasks T i A collection of
[0044] In this example, the multitasking model NN comprises a number L=3 layers L1 , L2 and L3 for solving, for example, a set of three mutually different tasks T1 , T2 , T3 .
[0045] See also Figure 4 , the method 100 comprises the following steps:
[0046] In step 102, for the task T to be solved i A set of tasks T to be solved in the set i The pairwise affinity between .
[0047] Pairwise affinity describes the following values: The corresponding task pair T a , T b Can be used with a shared layer L i A high affinity value means there is positive interference between the task pair, while a low affinity value means there is negative interference between the task pair. For example, pairwise affinity can be determined by training the task pair together in a single multi-task network and quantifying the effect that gradient updates of one task have on the other task. It is also possible to jointly train more than one task pair in a single multi-task network.
[0048] According to one embodiment, the pairwise affinity includes an affinity value for the first task in the pair and an affinity value for the second task in the pair. a and Task T b For task T a The affinity value is Z b→a , and for task T b The affinity value is Z a→b These affinity values are not necessarily symmetric, so Z b→a It may not be equal to Z a→b .
[0049] In the case of a task set containing three or more tasks, the affinity of a particular task can be determined by determining the average of these pairwise affinities for the particular task. a , T b , T c The set of tasks T b and T c For task T a The pairwise affinity of the task T is calculated by averaging a Affinity value: (Z b→a +Z c→a ) / 2.
[0050] In step 104, based on the pairwise affinity, the task T to be solved is i Assigned to a number N of groups gi, where i=1 to N.
[0051] The task to be solved is T i To group g i The allocation is performed, for example, such that the corresponding group g i The average pairwise affinity value of is maximized. The task to be solved is to group g i The allocation can be made disjointly. Alternatively, the allocation does not necessarily have to be disjoint. Furthermore, since the affinity values are not necessarily symmetric, it is advantageous to make an overcomplete allocation. This means that a task T i can be assigned to two or more groups. For example, for a task containing T a and Task T b Task pairs and affinity value Z b→a , Z a→b Applicable: Z a→b >Z b→a , where the value Z a→b includes correspondingly high values, so when task T a Use Task Tb When training, there is a b The positive interference of b→a For example, it includes a correspondingly low value so that when the task T b Use Task T a During training, for task T a There is negative interference. In other words, task T a Will increase the task T b performance, but not vice versa. In this case, it is advantageous to assign task T a and T b Assigned to the same group g i , but additionally the task T a Also assigned to another group g to which the task was not assigned i .
[0052] It can be pre-determined that these groups g i The maximum number N.
[0053] The task to be solved T i Assign to group g i The assignment problem can be solved efficiently using branch and bound or binary integer programming (BIP) solvers.
[0054] In step 106, it is determined that the layer L i The branch depth d of the NN of the multi-task processing model is specified by the task T to be solved by the multi-task processing model. i The shared base network B is used in layer L of the multi-tasking model. i Which depth branches to the number N branch network Z i , where i=1 to N.
[0055] The common base network B acts as a feature extractor, and the weights of the common base network B are shared by the task to be solved. i It is a sub-network dedicated to the task, and its weights are not used by all tasks, but only by dedicated tasks.
[0056] Task T i To branch network Z i The allocation is based on task T i To N groups g i For the method, this means that these allocations are available as results 104 from the previous step.
[0057] The purpose of step 106 of determining the branch depth d is to determine the shared basic network B in the multi-task processing model, that is, the layer L where the backbone network is located or branches. iThe optimal depth of the branch depth d = 2 means that, for example, the base network includes the first and second layers of the multi-task processing model, and after the second layer, the branches to multiple branch networks Z1, Z2 are set, see Figure 2 For example, a branch depth d=1 means that the base network includes the first layer of the multi-task processing model, and branches to multiple branch networks Z1, Z2 are provided after the first layer, see Figure 3 .
[0058] According to one embodiment, determining the branch depth d includes: training multiple networks with different branch depths, and selecting the best branch depth based on the prediction accuracy of these networks. For example, the prediction accuracy can be determined using appropriate validation data. For example, training based on Figure 2 Network and basis Figure 3 The optimal branch depth can be determined based on the prediction accuracy of these networks. Preferably, the optimal branch depth is additionally selected based on the computer resource consumption required by the neural network architecture.
[0059] In principle, the method already described can be repeated iteratively after the branch depth d has been determined in step 106. This is described below using a network of subgroups and sub-branches.
[0060] According to one embodiment, for a corresponding group g comprising two or more tasks, i , check: add the corresponding group g i The tasks to be solved are assigned to M number of subgroups (ug i ) whether the corresponding group g i The average pairwise affinity value of increases, where i=1 to N, step 108.
[0061] According to one embodiment, it is provided that: if the checking shows that the corresponding group g i If the pairwise affinity value of increases, the following steps are performed (summarized in step 110):
[0062] Based on the pairwise affinity, the corresponding groups g i The task to be solved is T i Assigned to number M subgroups ug i , where i = 1 to M, and determine the corresponding branch network Z i The sub-branch depth ud in the branch Z is: i Layer L i At what depth does the branch Z i Branches to M sub-branch networks UZ i , where i=1 to M.
[0063] The goal of further branching into multiple sub-branch networks is to further split the i-th branch network into M sub-branch networks. These optimal sub-branch depths ud are located in the set {d+1, d+2, ..., L-1}, that is, at a depth greater than the branch depth d.
[0064] According to one embodiment, for the corresponding subgroup ug i Iteratively perform the above for the corresponding group g i The steps described for checking and assigning can further improve the architecture of the multi-tasking model.
[0065] A further embodiment relates to the use of the method 100 according to the described embodiment for determining the architecture of a multitasking model NN having a number L of layers for solving at least two, in particular a plurality of, mutually different tasks T i , and / or for determining a multi-task processing model NN having a number L of layers for solving at least two, in particular a plurality of tasks that are different from one another.
[0066] According to one embodiment, the multitasking model is designed or trained to solve tasks in the field of object recognition and / or to control a technical system, in particular to solve tasks in both fields. The fields of control of the technical system and object recognition are used, for example, in the field of automatic or semi-automatic driving and robotics.
[0067] For object recognition, for example, a large number of digital images are provided (see Figure 3 and Figure 4 The method comprises: detecting the digital image with a sensor, and controlling the movement of the technical system, in particular a machine, a robot, a vehicle, an aircraft, according to the classification result of at least one object in the digital image.
Claims
1. A method (100) for determining the architecture of a multitasking model (NN), the multitasking model having a number L of layers (L i ), where i=1 to L, for solving at least two, in particular a plurality of, mutually different tasks (T i ), where The method (100) comprises the following steps: -For the task to be solved (T i ), estimate (102) the task to be solved in the set (T i ) pairwise affinity between ; - Based on the pairwise affinities, the tasks to be solved (T i ) is assigned (104) to the number N groups (g i ), where i=1 to N; and - Determine (106) the layer (L i ), wherein the branch depth (d) specifies: the branch depth (d) of the multi-tasking model (NN) consisting of the tasks to be solved (T i ) The shared base network (B) is in the layer (L) of the multi-task processing model (NN) i ) which depth branches to the number N branch networks (Z i ), where i=1 to N.
2. The method (100) according to claim 1, wherein the pairwise affinity indicates the following values: corresponding tasks (T i ) can be used in a shared layer (L i )’s network.
3. The method (100) according to claim 1 , wherein the task to be solved (T i ) to group (g i ) is allocated (104) such that the corresponding group (g i ) is maximized.
4. The method (100) according to any one of claims 1 to 3, wherein determining (106) the branch depth (d) comprises: A plurality of networks having branch depths (d) different from each other are trained, and an optimal branch depth (d) is selected based on the prediction accuracy of the networks.
5. The method (100) according to any one of the preceding claims, wherein for a task (T i ) of the corresponding group (g i ) Check (108): The corresponding group (g i ) of the task to be solved (T i ) is assigned to the number M subgroups (ug i ) whether the corresponding group (g i ) with an increase in the average pairwise affinity value from i=1 to N.
6. The method (100) according to claim 5, wherein: If the inspection shows that the corresponding group g i If the pairwise affinity value of increases, the following steps (110) are performed: Based on the pairwise affinity, the corresponding groups (g i ) of the task to be solved (T i ) is assigned to the number M subgroups (ug i ), where i = 1 to M, and determine the corresponding branch network (Z i ) in the sub-branch depth (ud), wherein the sub-branch depth (ud) specifies: i Layer (L i ) at which depth, the branch Z i Branches to M sub-branch networks UZ i , where i=1 to M.
7. The method (100) according to claims 5 and 6, wherein: For the corresponding subgroup (ug i ) Iteratively execute the steps according to claims 5 and 6.
8. A multi-tasking model (NN) having a number L of layers for solving at least two, in particular multiple, mutually different tasks, wherein the architecture of the multi-tasking model is determined according to the method (100) according to claims 1 to 7.
9. A computer program product which, when executed on a computer, causes the computer to perform the method (100) according to any one of claims 1 to 7.
10. Use of the method (100) according to any one of claims 1 to 7, wherein the method is used to determine the architecture of a multitasking model (NN) with a number L of layers for solving at least two, in particular a plurality of mutually different tasks, and / or to determine a multitasking model (NN) with a number L of layers (L i ) of a multitasking processing model (NN), where i=1 to L, to solve at least two, in particular a plurality of, mutually different tasks (T i ), where
