A multi-task neural network system with task-specific policies and shared policies
Through the collaborative training method, the shared policy network and the worker set share knowledge in the multi-task neural network system, solving the problems of knowledge sharing and rapid learning between different tasks in the multi-task neural network system, achieving more efficient training and more robustness task execution.
Patent Information
- Application Number
- CN201880028533.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-05-19
- Filing Date
- 2018-05-22
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2038-05-22
AI Technical Summary
The existing technology is difficult to effectively train a multi-task neural network system to share knowledge between different tasks and quickly learn and improve task execution, and the hyperparameter settings are not robust.
Using a collaborative training method, collaborative training is performed on multiple different tasks through a shared policy network and a set of trainable workers, so that each worker learns the corresponding task strategy, learns shared behaviors through multi-task strategies, and uses the objective function to optimize the task strategy. Differences and explorability with multitasking strategies.
Enables more efficient neural network training, reduces the amount of training data required for each task, improves learning speed and the final effect of task execution, and exhibits fewer parameters and more robust performance in a variety of neural network architectures Hyperparameter settings.
Smart Images

Figure CN110892418B_ABST
Abstract
Description
[0001] This application is a non-provisional application of and claims priority to U.S. Provisional Patent Application No. 62 / 508,991, filed on May 19, 2017, the entire contents of which are incorporated herein by reference. Background Art
[0002] The present specification relates to methods of training neural networks to perform multiple tasks, and to adaptive computer systems, such as neural network systems, for performing multiple tasks.
[0003] A neural network is a machine learning model that uses one or more layers of nonlinear units to predict an output for a received input. Some neural networks are deep neural networks that include one or more hidden layers in addition to the output layer. The output of each hidden layer is used as the input to the next layer in the network (i.e., the next hidden layer or output layer). Each layer of the network generates an output from the received input based on the current values of the corresponding set of parameters.
[0004] Some of the techniques described herein are applied in the field of reinforcement learning. In a reinforcement learning system, an agent interacts with an environment by performing actions selected by the reinforcement learning system in response to received observations representing the current state of the environment. Some reinforcement learning systems select actions to be performed by the agent in response to receiving a given observation based on the output of a neural network. Summary of the invention
[0005] This specification describes an adaptive system, such as a neural network system, implemented as a computer program on one or more computers at one or more locations for performing a plurality of different tasks, and a method for training the system to perform these tasks. Preferably, the tasks are related, and the corresponding parts of the system can then learn shared behaviors and task-specific behaviors. Knowledge can be shared between these parts of the system.
[0006] Workers can be associated with corresponding tasks or task groups. The workers associated with each task or task group are set to perform the task or task group. The system can adopt and / or generate at least one corresponding "task policy" for each task, which indicates how the workers associated with the task should perform the task. If there is only one worker per policy, it can be equivalently regarded as a "worker policy". If there are multiple workers associated with a given task in the task, they can share the task policy of the task (that is, the task policy is used as the worker policy of each of those multiple workers), or each of the multiple workers can have a corresponding worker policy as the task policy for the task.
[0007] The shared or common part of the system can learn a multi-task policy. The shared part can be, but does not have to be, a neural network.
[0008] A task policy may follow a common multi-task policy according to a measure of distance between policies; for example, a multi-task policy may define the centroid of the task policy. The task policies may, but need not, be implemented using corresponding neural networks. They may, but need not, operate substantially independently of one another.
[0009] In one example, the system can be part of a reinforcement learning system. A task can include control of a corresponding agent ("worker") acting on or within one or more environments (e.g., the same environment or corresponding environments). The system can output data for selecting actions for the agent to perform ("action data"). For example, the system can input data to observe or otherwise receive data related to the state of the environment, and based on the observed state can determine the action to be performed. Each environment can be real or simulated. One or more task policies can be used to generate data for selecting actions to be performed. Each task policy can specify an action to be performed for an observed state, or can specify a distribution from which actions to be performed for an observed state can be obtained as samples.
[0010] Although the system may be part of a reinforcement learning system, it may not be. For example, the described techniques may be applied to tasks such as image or video recognition or classification, for example using a feed-forward network with convolutions. In general, the system may be configured to receive any kind of digital data input and generate any kind of score, classification, or regression output based on that input.
[0011] For example, if the input to a neural network is an image or features that have been extracted from an image, the output generated by the neural network for a given image may be a score for each of a set of object categories, each score representing an estimated likelihood that the image contains an object belonging to that category.
[0012] As another example, if the input to a neural network is an Internet resource (e.g., a web page), a document or a portion of a document, or features extracted from an Internet resource, a document or a portion of a document, the output generated by the neural network for a given Internet resource, document or portion of a document may be a score for each topic in a set of topics, each score representing an estimated likelihood that the Internet resource, document or portion of a document is related to that topic.
[0013] As another example, if the input to a neural network is features of the impression context of a particular advertisement, the output generated by the neural network may be a score representing the estimated likelihood that the particular advertisement will be clicked.
[0014] As another example, if the input to the neural network is features of a personalized recommendation for a user, e.g., features characterizing the context of the recommendation, e.g., features characterizing previous actions taken by the user, the output generated by the neural network can be a score for each content item in a set of content items, each score representing an estimated likelihood that the user will respond favorably to the recommended content item.
[0015] As another example, if the input to a neural network is a sequence of text in one language, the output generated by the neural network may be a score for each text in a set of texts in another language, each score representing an estimated likelihood that the text in the other language is a correct translation of the input text into the other language.
[0016] As another example, if the input to a neural network is a sequence representing a spoken utterance, the output generated by the neural network may be a score for each text in a set of texts, each score representing an estimated likelihood that the text is a correct transcript of the utterance.
[0017] When used as part of a reinforcement learning system, the environment can be a simulated environment, such as a video game, and the worker can be a simulated user playing the video game. As another example, the simulated environment can be a sports simulation environment, such as a driving simulation or a flight simulation, and the worker can be a simulated vehicle navigating the sports simulation. In these embodiments, the action can be a control input to control the simulated user or the simulated vehicle.
[0018] In some other embodiments, the environment is a real-world environment and the worker is a mechanical worker that interacts with the real-world environment. For example, the worker may be a robot that interacts with the environment to complete a specific task. As another example, the worker may be an autonomous or semi-autonomous vehicle that navigates the environment. In these embodiments, the action may be a control input to control the robot or autonomous vehicle.
[0019] In general, an innovative aspect of the subject matter described in this specification can be embodied in a method of training a multi-task computer system (such as a multi-task neural network system), the system comprising a set of trainable workers combined with a shared module (such as a shared policy network). The trainable workers and shared modules can be trained in a collaborative manner on multiple different tasks, so that each worker learns to perform a corresponding associated task according to a corresponding task strategy, and the shared modules learn a multi-task strategy representing a common behavior for the tasks. For example, during training, training errors / weight adjustments from collaborative training can be propagated through both the shared policy network and the trainable workers. The system can learn via supervised or unsupervised losses, for example using reinforcement learning. The shared portion of the system (i.e., the shared modules, such as the shared policy network) can be trained on the behavior of the workers, and vice versa.
[0020] The propagated error may be determined by optimizing an objective function. The objective function may include a first entropy term that measures the difference between the distribution of the task policy and the distribution of the multi-task policy. The term may include the Kullback-Leibler divergence and may be discounted by a discount factor. The objective function may also include a second entropy term that depends on the distribution of the task policy to encourage exploration. The second entropy term may also be discounted by the same or a different discount factor.
[0021] In a reinforcement learning system, the task policy distribution and the multi-task policy distribution may include a state-action distribution. The objective function may include a discounted reward term that depends on the expected reward for taking an action in a state. Such reinforcement learning systems may be based on, for example, Deep Q-Network (DQN), Double-DQN, Advantage Actor Critic (A3C) networks, or other architectures. Learning may be synchronous or asynchronous; for example, Hogwild!. The algorithm may be used for parallel stochastic gradient descent (or ascent) learning.
[0022] Collaborative training can include alternating between training one or more trainable workers (i.e., corresponding task strategies for associated tasks) and training a shared policy network. Thus, the system can alternate between learning task (worker) strategies and extracting multi-task strategies (e.g., learning in an iterative manner). Alternatively, the set of worker neural networks and the shared policy network can be jointly trained, i.e., the worker (task) strategies and the multi-task strategies are optimized together, for example by using a loss function such as the combination described above. A separate network can be used for each worker (task) strategy, the shared policy network used only for the multi-task strategy, or the worker network can define a soft advantage relative to the multi-task strategy, where the soft advantage can be parameterized by a controllable temperature value.
[0023] Typically, co-training may include back-propagation including a gradient term intended to match probabilities from a task policy with probabilities from a multi-task policy to extract a multi-task policy from the task policy.
[0024] In another aspect, a multi-task neural network system processes input data associated with one of a plurality of learned tasks to be performed and provides output data to control the performance of the task. Such a system may include an input for receiving input data and a set of workers coupled to the input, each worker being configured to perform a corresponding task by outputting action data according to a corresponding task strategy. A shared policy network may be coupled to one or both of the input and the set of workers and may define a multi-task strategy representing a common behavior for the task. The multi-task neural network system may be configured to combine the output of the adaptive system for each task with the learned multi-task strategy to define a task strategy for the task so that at least one worker can perform the corresponding learned task.
[0025] The workers (agents) may include neural networks; they may share some, all, or no weights with the shared policy network. The system may have a multi-column architecture in which the worker neural network modules define at least one column of neural network layers and in which the shared policy network defines a second column of neural network layers. The workers and shared policy network may together define, for example, a reinforcement learning system with convolutions or a feed-forward neural network.
[0026] The subject matter described in this specification can be implemented in specific embodiments to achieve one or more of the following advantages. These methods can be used to train neural networks more efficiently. For example, the network can benefit more effectively from transfer learning, in which training for one task can be used to guide training for another related task. This can reduce the total amount of training data required for each task. These methods can be used to extract common behaviors from workers running for multiple different tasks. Moreover, such systems can learn faster and produce improved final execution of tasks after training. They may be more robust to hyperparameter settings. For a given execution of each task, they may also have fewer parameters overall. These techniques are generally applicable to many different neural network architectures, including: architectures for supervised learning and unsupervised learning, architectures for reinforcement learning, and architectures for data classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A multi-tasking adaptive computer system, such as a multi-tasking neural network system, is schematically illustrated.
[0028] Figure 2 shows the method used to perform reinforcement learning. Figure 1 The multi-tasking adaptive computer system shown.
[0029] Figure 3 A method performed by a multi-tasking adaptive computer system is shown.
[0030] Figure 4 A method for training a multi-task adaptive computer system is shown.
[0031] Figure 5 A portion of a first multi-task neural network system is shown.
[0032] Figure 6 A portion of a second multi-task neural network system is shown.
[0033] In the various drawings, like reference symbols and designations indicate like elements. DETAILED DESCRIPTION
[0034] The specification discloses a multi-task adaptive computer system, such as a multi-task neural network system. The system will be implemented by one or more computers configured to perform a specific operation or action. Software, firmware, hardware, or a combination thereof is installed on each computer, which, when running, causes the computer to perform the operation or action. For one or more computer programs to be configured to perform a specific operation or action, it means that the one or more programs include instructions that, when executed by a data processing device, cause the device to perform the operation or action.
[0035] Figure 1 A high-level schematic diagram of a multi-tasking adaptive computer system is provided. For illustrative purposes only, it is shown as being used to perform four tasks, but the system can be easily generalized to any number of tasks. In the case of four tasks, the neural network system may include four workers 11, 12, 13, 14, each worker being used to perform a corresponding task. In a variation of the system, the number of workers may be higher than the number of tasks, so that one or more tasks may be associated with a corresponding subset of workers including multiple workers, and those tasks are performed by the associated set of workers. The subsets of workers may not overlap.
[0036] Each worker produces an output that is a function of its input. This function depends on the task the worker is performing and is called the corresponding task policy (or worker policy). The corresponding task policies of the four workers are denoted by π1, π2, π3, and π4. Each policy may not be deterministic. In other words, it can be a sample from a probability distribution defined by the corresponding policy, which specifies the corresponding probabilities of all possible outputs of the worker.
[0037] In addition, the multi-task adaptive computer system includes a shared module 15 that stores a "multi-task policy" denoted as π0, which is also a function that generates at least one output from its input. Again, optionally, the function can be random; that is, it can be a sample from a probability distribution defined by the multi-task policy. The shared module 15 can be implemented as a neural network, referred to herein as a "shared policy network".
[0038] Task policies π1, π2, π3, and π4 and the multi-task policy π0 are generated together in a collaborative training process described below. During this training, each worker learns to perform a corresponding task according to the corresponding task policy, and the shared policy network learns the multi-task policy π0. Specifically, during the collaborative training process, the multi-task policy π0 is adapted to "extract" common behaviors or representations from task-specific task policies π1, π2, π3, and π4. At the same time, the multi-task policy π0 is used to "regularize" the task policies π1, π2, π3, and π4 so that the task policies do not deviate too much from the multi-task policy. As explained in more detail below, the regularization can be based on the Kullback-Leibler (KL) divergence. In this way, the knowledge gained in one task is extracted into the shared policy and then transferred to other tasks.
[0039] In one example, tasks executed by respective workers are generating actions to be performed by respective agents acting on or within one or more environments. For example, each agent may act on or within the same environment, which is assumed below. In a variation, there may be multiple environments, and corresponding one or more agents may act on or within each environment; these environments are generally similar to each other according to some criteria.
[0040] To interact with the environment, the computer system receives data representing the current state of the environment ("state data") and, in response to the received data, causes each agent to perform a corresponding action a, which is an element of an action space (i.e., a discrete action space or a continuous action space) represented by A. In this specification, the data representing the state of the environment is referred to as an observation. By representing each of the multiple times by t, the state data can be represented as s t , and indicates the state of the (corresponding) environment at time t. The set of all possible realizations of state data is denoted by S. Therefore, s t ∈S.
[0041] Figure 2 An example of this is shown in FIG. 1 , in which a single computer 2 is shown for simplicity. Computer 2 implements Figure 1 The multi-tasking adaptive computer system shown. The four tasks are to control four corresponding agents 21, 22, 23, 24 acting on or within the environment 20.
[0042] Figure 3 Shown by Figure 1 The method 300 is performed by a multitasking computer system. At time t, computer 1 receives state data s from environment 20. t (Step 1). The integer index i is used to label the task (so i takes one of the values 1, 2, 3, or 4). Since the number of tasks is equal to the number of workers in this example, the index i can also be considered to label the worker.
[0043] In step 302, Figure 1 The four workers of the multi-tasking computer system generate corresponding action data. The action data specifies a corresponding action a for each of the agents 21, 22, 23, and 24. t , the action is the corresponding element of A.
[0044] In step 303 , the computer 2 sends the action data to the corresponding agents 21 , 22 , 23 , 24 .
[0045] In step 304, once the agents 21, 22, 23, 24 have executed the corresponding actions a on the environment 20, t , then the multi-task computer system receives a reward {R i (a t ,s t )} These may be transmitted from the environment 20 to the computer 2, or may be calculated by a separate module (not shown).
[0046] In step 305, the policy of each agent and the multi-task policy are updated.
[0047] In step 306, it is determined whether the termination criterion is met. If yes, the method terminates (step 307). If no, the method returns to step 301 and waits for the next state data. The index t is updated to t+1.
[0048] Figure 2 The situation can be changed from several aspects. First, computer 2 can be replaced by multiple computers that work together to realize a multi-task adaptive computer system.
[0049] In some embodiments, there are multiple environments, with one or more agents acting in each environment.
[0050] In some embodiments, the environment is a simulated environment (e.g., simulated by computer 2), and each agent is implemented as one or more computers that interact with the simulated environment. For example, the simulated environment can be a video game, and the agent can be a simulated user playing the video game.
[0051] In other embodiments, the environment is a real-world environment and the agent is a mechanical agent that interacts with the real-world environment. For example, the agent can be a robot that interacts with the environment to complete a specific task, or an autonomous or semi-autonomous vehicle that navigates the environment. In these cases, the observations can be data captured by one or more sensors of the agent (e.g., a camera, a LIDAR sensor, a temperature sensor, etc.) as the agent interacts with the environment.
[0052] The advantage of the system is that each agent (such as a robot, autonomous or semi-autonomous vehicle) can improve its interaction with a simulated or real-world environment.
[0053] The training process will now be explained mathematically. The number of tasks is denoted by n, i.e., index i=1,…,n. For simplicity, we assume that each task has infinite horizon and that each task has the same discount factor γ. The method can be easily generalized to other scenarios, such as undiscounted finite horizon. For simplicity, we will also assume that the action space A and the state space S are the same for all tasks. A given action is denoted by a, where a∈A. For each task i, the transition dynamic p i (s′|s,a) and reward function R i (a,s) are different.
[0054] We further assume that a single corresponding worker is associated with each task, and let π i Let π be the task-specific random task policy for the corresponding i-th task. (Since there is only one worker per task, the task policy can be equivalently viewed as the worker policy.) The dynamics and the policy produce a joint distribution over state and action trajectories starting from some initial state, which we also denote as π i The neural network system also stores a “multi-task policy” π0. The multi-task policy π0 will capture the common agent behaviors across tasks.
[0055] The task policy and the multi-task policy are generated together in a co-training process by optimizing an objective function that includes a term representing the expected return and one or more regularization terms that provide policy regularization. The first regularization term ensures that each task policy π i Regularize towards a multi-task strategy and use discounted KL divergence Another regularization term is based on discounted entropy to further encourage exploration.
[0056] Specifically, the objective function to be maximized is:
[0057]
[0058] where cKL and c Ent are scalar factors greater than zero that determine the strength of KL and entropy regularization, α≡c KL / (c KL +c Ent ) and β≡1 / (c KL +c Ent ). logπ0(a t |s t ) can be regarded as a reward design term, which encourages actions with higher probability under the multi-task strategy, while the entropy term -logπ i (a t |s t ) encourages exploration. Above we use the same regularization cost c for all tasks KL and c Ent However, it is easy to generalize this to task-specific costs. This can be important if the tasks vary widely in reward size and amount of exploration required, although it does introduce additional hyperparameters.
[0059] A range of optimization techniques from the literature can be applied to maximize the objective function (1) above. We now present two such approaches. The first is based on a published technique called soft Q-learning and extraction. We will start with a simple case in tabular form, namely, for some combinations of values of a and s and for π given π0 i Optimize and at a given π i In the case of an alternating maximization procedure that optimizes π0, a table or other appropriate data structure contains explicit values for π0 and π1.
[0060] exist Figure 4 The training process 400 is shown in FIG. 4. In step 401, an initial estimate of the multi-task policy π0 is set (eg, all actions are equally likely).
[0061] In step 401, modify π i , keeping π0 fixed. By keeping π0 fixed, (1) decomposes into a separate maximization problem for each task, and is the entropy-regularized expected return with a redefined (regularized) reward It can be optimized using soft Q-learning (also called G-learning), which is based on the following "softened" Bellman updates to the state and action values (see, for example, J. Schulman, P. Abbeel, and X. Chen, "Equivalence between policy gradients and softQ-Learning", arXiv:1704.06440, 2017):
[0062]
[0063] The Bellman update is softened in the following sense: i The operator that is usually the maximum for the action is replaced by the soft maximum under the inversion, which hardens into the maximum operator: β→∞. The optimal strategy π i So it is the Boltzmann strategy for inversion β:
[0064]
[0065] Among them, A i (a,s)=Q i (a,s)-V i (s t ) is the softened advantage function. Note that the softened state value V i (s) acts as a log regularizer above. The multi-task policy π0 can be interpreted as a policy prior, which is a view in the literature on probabilistic inference in RL. However, unlike previous studies, it is raised to a power of α ≤ 1. This softens the effect of the prior π0 on , and is a result of additional entropy regularization beyond the KL divergence.
[0066] In step 403, assume that each modified task strategy π i , the multi-task policy π0 is modified. Therefore, the neural network system will learn π0 instead of setting π0 in advance as in some earlier multi-task learning techniques (usually as a uniform distribution between actions). The only term in (1) that depends on π0 is:
[0067]
[0068] This simply fits a model π0 to the log-likelihood of a mixture of γ-discounted state-action distributions under policy π i Each task i has a log-likelihood. Maximum likelihood (ML) estimates can be derived from the state-action visit frequencies at each task transition, and the optimal ML solution is given by a mixture of state-conditional action distributions. Alternatively, in the non-tabular case, stochastic gradient ascent can be employed, which happens to lead to substituting the task policy π for i Distillation is the update to π0. Note, however, that the distillation step follows naturally from the KL regularization objective in the policy. Another difference from previous work on using distillation in deep learning is that the multi-task policy is “fed back” to improve the task policy in the next optimization pass and acts as a pipeline where common and transferable knowledge is shared between the task policies.
[0069] In step 404, it is determined whether the termination criteria are met. If not, the method 400 returns to step 402. If met, the method terminates in step 405.
[0070] Consider the effect of additional entropy regularization. First, assume that there is no additional entropy regularization, i.e., α = 1, and consider the simple case of only n = 1 tasks. Then, when the multi-task policy π0 and the task policy π i When π is equal and the KL regularization term is 0, (5) is maximized. Therefore, the objective function is reduced to the unregularized expected return, so the task policy π i Converges to a greedy policy that locally maximizes the expected return. From another perspective, the alternating maximization scheme is equivalent to trust region methods such as Natural Gradient or TRPO, which use a KL ball centered on the previous policy and are considered to converge to a greedy policy.
[0071] If α < 1, then there is an additional entropy term in (1). Therefore, even when π0 = π i and KL(π1||π0), the greedy strategy will not maximize the objective (1). Instead, (1) uses the entropy regularization factor β' = β / (1-α) = 1 / c Ent is reduced to the expected return of entropy regularization, so that the optimal policy is a Boltzmann form with inversion β. In summary, the additional entropy term ensures that the task policy does not become greedy, and we can adjust c appropriately Ent To control the amount of exploration.
[0072] This additional control over the amount of exploration is very valuable when there are multiple tasks. Consider the case where one of the tasks is easier and is solved first, while the other tasks are harder and have much less reward. Without the entropy term, both the multi-task policy and the all-task policy could converge to a policy that solves the easy task before encountering rewards for the other tasks. Furthermore, since the policy is greedy, it may not fully explore the other tasks or even encounter rewards, resulting in suboptimal behavior.
[0073] The second approach to minimizing the objective function is based on the use of policy gradients and better parameterization. The algorithm in the first approach is used on the multi-task policy π0 and the task policy π i and is reminiscent of the EM algorithm for learning latent variable models, where π0 plays the role of a parameter and π i It plays the role of the posterior distribution of the latent variable. However, if we use, for example, a deep neural network to implement π0 and π i, then this alternating maximization process may be slower than optimizing the task policy and multi-task policy jointly via stochastic gradient ascent (1). In this case, π is given by the policy gradient alone with entropy regularization. i , and can be performed in frameworks such as advantage action-criteria.
[0074] We compare the function performed by the neural network with the policies π0 and π i The relationship between is called parameterization.
[0075] A simple way to parameterize the policy is to use a i The corresponding neural network (“task network”, equivalently “worker network” if there is one worker per task) implements each task policy π i , so that the network performs the function Equal to π i Another neural network (the "shared policy network") is used to implement the multi-task policy π0, where the function performed by the policy network π0 is equal to π0. Figure 5 This parameterization is schematically shown in FIG. 5 , where the shared policy network is denoted 50 and one of the task networks is denoted 5i. The policy network 50 implements the policy π0. Each task network 5i operates to implement the corresponding policy π i . The only interaction between networks 50 and 5i is during training, not when performing tasks using the multi-task neural network system. Networks 50 and 5i interact via KL regularization. However, the reward term of the objective function causes the task network 50i to diverge from the policy network 50 to increase the expected reward. The entropy term of the objective function causes networks 50 and 5i to have a tendency to diverge further.
[0076] An alternative parameterization that may yield faster transfer is obtained by considering the form of the optimal Boltzmann policy (4). Specifically, the neural network system can parameterize the multi-task policy using a policy network with the following parameters:
[0077]
[0078] And use the execute function with parameter θ i The corresponding network for (the “task network”, or equivalently the “worker network” if each task has one worker) estimates the soft advantage of each task i:
[0079]
[0080] Formulas (6) and (7) use “hat” notation to denote parameterized approximations of corresponding quantities. The policy for task i is then parameterized as:
[0081]
[0082] Note that instead of using equation (7) to obtain an advantage estimate, the neural network system can use (8) to parameterize the policy that is optimized via policy gradient.
[0083] exist Figure 6 This is schematically illustrated in , where the policy network is denoted as 60 and the i-th task network is denoted as 6i. The shared policy network 60 implements the policy π0. Figure 5 In comparison, Figure 6 In the example, the policy network 60 and each task network 6i are run together to generate the corresponding policy π i . This can be seen as a two column architecture for the policy, where one column is the multi-task policy and the other is the adjustments required specifically for task i. Both during training and operation, there is interaction between networks 60 and 6i. During training, this is achieved via KL regularization. However, the reward term of the objective function causes the task network 60i to diverge from the policy network 60 to increase the expected reward. The entropy term of the objective function causes networks 60 and 60i to have a tendency to diverge further.
[0084] Assuming the above parameters, we can now derive the policy gradient. i The gradient of is given by the standard policy gradient theorem:
[0085]
[0086] in, is the regularized reward. Note that due to the logarithmic derivative trick, the partial derivative of the entropy in the integrand has the expectation If a baseline value is estimated, it can be subtracted from the regularization gain as a control variable. The gradient with respect to θ0 is:
[0087]
[0088] Note that the first term is related to θ i The second term tries to match the task policy Probability and multi-task strategies under If the system uses the same architecture Parameterizing π i , but without KL regularization on this policy, the second term does not exist. The presence of KL regularization makes the multi-task policy learning the centroid of all task policies (in a sense, if The second term is zero), and helps to quickly transfer information between tasks and to new tasks. In our experiments, we found that the absence of KL regularization significantly affects the stability of the algorithm. The presence of entropy regularization in addition to KL regularization allows the amount of transfer and exploration to be controlled separately.
[0089] The framework we have just described allows for many possible algorithm instantiations, arising as combinations of objectives, algorithms, and architectures, which we will describe and summarize below.
[0090] First, consider the trade-off between KL divergence and entropy regularization. In the case of α = 0, the multi-task neural network system has a purely entropy regularized objective function that is not coupled and transmitted between tasks. In the case of α = 1, the multi-task neural network system has a purely KL regularized objective function that does couple and transmit between tasks, but if the multi-task policy and the task policy become similar and greedy, it may stop exploring prematurely. In the case of 0>α>1, the multi-task neural network system has an objective function that includes two terms.
[0091] Secondly, replace the optimization (such as Figure 4 Alternating optimization produces an algorithm similar to policy extraction / actor imitation, but is essentially multi-task policy iteration with feedback into task policy optimization. Similarly, soft Q-learning can be applied to each task instead of policy gradients. While alternating optimization may be slower, empirical evidence from policy extraction / actor imitation systems suggests that it may learn more stably, especially for significantly different tasks.
[0092] Third, separate parameterizations (such as Figure 5 ) and two two-column parameterizations (as Figure 6 In the two-column case (in which each task policy is parameterized to use the multi-task policy), the behaviors extracted into the multi-task policy are “immediately available” to the task policies, so the transfer can be faster. However, if the transfer process happens too quickly, each task may not be explored effectively.
[0093] This specification uses the term "configuration" in relation to system and computer program components. For a system of one or more computers to be configured to perform a particular operation or action, it means that the system has installed thereon software, firmware, hardware, or a combination thereof that, when run, causes the system to perform those operations or actions. For one or more computer programs to be configured to perform a particular operation or action, it means that the one or more programs include instructions that, when executed by a data processing device, cause the device to perform those operations or actions.
[0094] The embodiments and functional operations of the subject matter described in this specification can be implemented in digital electronic circuit systems, in tangibly embodied computer software or firmware, in computer hardware (including the structures disclosed in this specification and their structural equivalents), or in a combination of one or more of them. The embodiments of the subject matter described in this specification can be implemented as one or more computer programs, that is, one or more modules of computer program instructions encoded on a tangible non-transitory program carrier to be executed by a data processing device or to control the operation of the data processing device. Alternatively or in addition, the program instructions can be encoded on an artificially generated propagation signal, for example, a machine-generated electrical, optical, or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device for execution by a data processing device. The computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. However, the computer storage medium is not a propagated signal.
[0095] The term "data processing equipment" encompasses all equipment, devices and machines for processing data, including, for example, a programmable processor, a computer, or multiple processors or computers. The equipment may include special-purpose logic circuits, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). In addition to hardware, the equipment may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[0096] Computer programs (also referred to or described as programs, software, software applications, modules, software modules, scripts, or codes) can be written in any form of programming language, including compiled or interpreted languages, declarative languages, or procedural languages, and can be deployed in any form, including deployment as independent programs or as modules, components, subroutines, or other units suitable for use in a computing environment. Computer programs can but need not correspond to files in a file system. Programs can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), or in a single file dedicated to the program in question, or in multiple collaborative files (e.g., files storing one or more modules, subroutines, or partial codes). Computer programs can be deployed to execute on one computer or on multiple computers located at one site or distributed in multiple sites and interconnected by a communication network.
[0097] As used in this specification, "engine" or "software engine" refers to a software-implemented input / output system that provides an output different from the input. An engine can be a coding block of a function, such as a library, a platform, a software development kit (SDK), or an object. Each engine can be implemented on a computing device of any appropriate type including one or more processors and a computer-readable medium, for example, a server, a mobile phone, a tablet computer, a notebook computer, a music player, an e-book reader, a laptop or desktop computer, a PDA, a smart phone, or other fixed or portable devices. In addition, two or more engines can be implemented on the same computing device or on different computing devices.
[0098] The processes and logic flows described in this specification may be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating outputs. The processes and logic flows may also be performed by special-purpose logic circuits (e.g., FPGAs (field programmable gate arrays) or ASICs (application-specific integrated circuits)), and the devices may also be implemented as special-purpose logic circuits (e.g., FPGAs (field programmable gate arrays) or ASICs (application-specific integrated circuits)). For example, the processes and logic flows may be performed by a graphics processing unit (GPU) and the devices may also be implemented as a graphics processing unit (GPU).
[0099] Computers suitable for executing computer programs include, for example, can be based on general-purpose microprocessors or special-purpose microprocessors or both or any other type of central processing unit.Usually, the central processing unit can receive instructions and data from read-only memory or random access memory or both.The essential element of a computer is a central processing unit for carrying out or executing instructions and one or more memory devices for storing instructions and data.Usually, a computer will also include one or more mass storage devices (for example, disks, magneto-optical disks or optical disks) for storing data, or a computer can be operatively coupled to receive data from the mass storage device or transfer data to the mass storage device or carry out both.However, a computer does not need to have such a device.In addition, a computer can be embedded in another device, for example, a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver or a portable storage device (for example, a universal serial bus (USB) flash drive), just to name a few.
[0100] Computer-readable media suitable for storing computer program instructions and data include all forms of nonvolatile memory, media and memory devices, including, for example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, CD-ROM disks and DVD-ROM disks. The processor and memory may be supplemented by or incorporated in special purpose logic circuitry.
[0101] To provide interaction with a user, embodiments of the subject matter described in this specification may be implemented on a computer having: a display device for displaying information to the user, such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor; and a keyboard and pointing device, such as a mouse or trackball, through which the user can provide input to the computer. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user may be received in any form, including acoustic input, voice input, or tactile input. In addition, the computer may interact with the user by sending documents to and receiving documents from a device used by the user (e.g., by sending a web page to a web browser on a user device of the user in response to a request received from the web browser).
[0102] Embodiments of the subject matter described in this specification may be implemented in a computing system that includes a back-end component (e.g., as a data processor), or includes a middleware component (e.g., an application server), or includes a front-end component (e.g., a client computer with a graphical user interface or a web browser through which a user can interact with an implementation of the subject matter described in this specification), or any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LANs") and wide area networks ("WANs"), such as the Internet.
[0103] A computing system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0104] Although this specification includes many specific implementation details, these details should not be regarded as limitations on the scope of any invention or the content that may be required, but as descriptions of the features of the specific embodiments that can be directed to a specific invention. Some features described in the context of a separate embodiment in this specification can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or according to any suitable sub-combination. In addition, although the above may describe the features as working with certain combinations and initially even the features are required in the same manner, one or more features from the required combination can be deleted from the combination in some cases. And the required combination can point to the change of a sub-combination or a sub-combination.
[0105] Likewise, although operations are shown in a particular order in the accompanying drawings, it should not be understood that such operations need to be performed in the particular order described or in a sequential order, or that all illustrated operations need to be performed to achieve the desired result. In some cases, multitasking and parallel processing can be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0106] Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the claims. For example, the actions set forth in the claims may be performed in a different order and still achieve the desired results. As an example, the processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, in order to achieve the desired results. In some embodiments, multitasking and parallel processing may be advantageous.
Claims
1. A method for selecting an action to be performed in an environment by one or more trained workers of a multi-task neural network system, the multi-task neural network system comprising a set of trainable workers in conjunction with a shared policy network, wherein: The environment is a simulation environment, and the action is a control input for controlling a simulation worker to interact with the simulation environment, or The environment is a real-world environment, and the action is a control input for controlling the mechanical worker to interact with the real-world environment, The method comprises: Co-training the set of trainable workers and the shared policy network on multiple tasks such that each worker learns to perform a corresponding one of the multiple tasks according to a corresponding task strategy and the shared policy network learns a multi-task policy representing a common behavior for the multiple tasks; and selecting, by a reinforcement learning system of the multi-task neural network system, an action to be performed by one or more of the set of trainable workers when interacting with the environment, wherein the collaborative training comprises: training the shared policy network on the behavior of the trainable worker, and when training the trainable worker, using the multi-task policy from the shared policy network to determine the task policy for the trainable worker, The collaborative training is performed by optimizing an objective function, and the objective function for each task includes: at least a first entropy term measuring a difference between a distribution of the task policy and a distribution of the multi-task policy to regularize the distribution of the task policy toward the distribution of the multi-task policy, Wherein, the multi-task strategy is fed back during the collaborative training to improve the task strategy.
2. The method according to claim 1, wherein: The objective function further comprises for each task: A reward item indicates an expected reward obtained by a worker when executing the task according to the task strategy.
3. The method according to claim 2, wherein: The objective function further includes a second exploration entropy term for each task, wherein the second exploration entropy term depends on the distribution of the task policies to encourage exploration.
4. The method according to claim 2, wherein: The plurality of tasks comprises a sequence of actions, each of the actions being performed in response to a state, and wherein the respective distribution of each of the task policies and the distribution of the multi-task policies each comprises a state-action distribution.
5. The method according to claim 4, wherein: The reward term is a discounted reward term that depends on the expected reward obtained by taking an action in the state.
6. The method according to any one of claims 1 to 5, wherein: The collaborative training includes alternating between training one or more trainable workers in the set of trainable workers and training the shared policy network.
7. The method according to any one of claims 1 to 5, wherein: The collaborative training includes: jointly optimizing the multi-task strategy of the shared strategy network and one or more of the task strategies.
8. The method according to any one of claims 1 to 5, further comprising: The task strategy is parameterized using the multi-task strategy.
9. The method according to any one of claims 1 to 5, wherein: The set of trainable workers includes one or more neural networks, and the collaborative training includes jointly training the one or more neural networks and the shared policy network via back-propagation.
10. The method according to claim 9, wherein: The back-propagation uses an objective function that includes a term for matching probabilities from the task policy with probabilities from the multi-task policy to extract the multi-task policy from the task policy.
11. A method for selecting an action to be performed in an environment by one or more trained workers of an adaptive multitasking computer system, the adaptive multitasking computer system comprising a set of trainable workers and a shared module, wherein: The environment is a simulation environment, and the action is a control input for controlling a simulation worker to interact with the simulation environment, or The environment is a real-world environment, and the action is a control input for controlling the mechanical worker to interact with the real-world environment, The method comprises: Co-training the set of trainable workers and the shared module on multiple tasks such that each worker learns to perform a corresponding one of the multiple tasks according to a corresponding task strategy and the shared module learns a multi-task strategy representing a common behavior for the multiple tasks; and selecting, by a reinforcement learning system of the adaptive multi-tasking computer system, an action to be performed by one or more trainable workers in the set of trainable workers when interacting with the environment, The collaborative training comprises: training the shared module on the behavior of the trainable worker, and determining the task strategy for the trainable worker using the multi-task strategy from the shared module when training the trainable worker, wherein the collaborative training is performed by optimizing an objective function, the objective function comprising, for each task: a reward item indicating an expected reward obtained by the worker when executing the task; and at least a first entropy term measuring a difference between a distribution of the task policy and a distribution of the multi-task policy to regularize the distribution of the task policy toward the distribution of the multi-task policy, Wherein, the multi-task strategy is fed back during the collaborative training to improve the task strategy.
12. The method according to claim 11, wherein: The objective function further includes a second exploration entropy term for each task, wherein the second exploration entropy term depends on the distribution of the task policies to encourage exploration.
13. The method according to claim 11, wherein: The plurality of tasks comprises a sequence of actions, each of the actions being performed in response to a state, and wherein the respective distribution of each of the task policies and the distribution of the multi-task policies each comprises a state-action distribution.
14. The method according to claim 13, wherein: The reward term is a discounted reward term that depends on the expected reward obtained by taking an action in the state.
15. The method according to any one of claims 11 to 14, wherein: The collaborative training includes alternating between training one or more trainable workers in the set of trainable workers and training the shared module.
16. The method according to any one of claims 11 to 14, wherein: The collaborative training includes: jointly optimizing the multi-task strategy of the shared module and one or more of the task strategies.
17. The method according to any one of claims 11 to 14, further comprising: The task strategy is parameterized using the multi-task strategy.
18. The method according to any one of claims 11 to 14, wherein: The set of trainable workers and the shared module each include one or more neural networks, and the collaborative training includes: jointly training the one or more neural networks through back-propagation.
19. A multi-task neural network system for selecting actions to be performed in an environment, the multi-task neural network system being configured to process input data relating to a plurality of learned tasks to be performed and to provide output data to control the performance of the plurality of learned tasks, wherein: The environment is a simulation environment, and the action is a control input for controlling a simulation worker to interact with the simulation environment, or The environment is a real-world environment, and the action is a control input for controlling the mechanical worker to interact with the real-world environment, The multi-task neural network system comprises: An input end, the input end is used to receive the input data; a set of workers coupled to the input, each worker configured to perform an associated one of the plurality of learned tasks by outputting action data according to a corresponding learned task strategy, and each task being associated with a control module; and a shared policy network coupled to one or both of the input and the set of workers, wherein the shared policy network defines a learned multi-task policy representing a common behavior for the plurality of learned tasks, wherein the workers and the shared policy network are trained on a plurality of different tasks in a collaborative training process such that each worker learns to perform an associated one of the tasks according to a corresponding task policy and the shared policy network learns a multi-task policy representing a common behavior for the tasks, and In the collaborative training process, the shared policy network is trained on the behavior of the worker, and the multi-task policy from the shared policy network is used in training the worker to determine the task policy for the worker, and The collaborative training is performed by optimizing an objective function, and the objective function for each task includes: at least a first entropy term measuring a difference between a distribution of the task policy and a distribution of the multi-task policy to regularize the distribution of the task policy toward the distribution of the multi-task policy, wherein the multi-task strategy is fed back during the collaborative training to improve the task strategy, wherein the multi-task neural network system is configured to: for each task, combine the output of the associated control module with the learned multi-task strategy to define a corresponding task strategy, and Wherein, the reinforcement learning system of the multi-task neural network system selects actions to be performed by one or more workers in the worker set when interacting with the environment.
20. The multi-task neural network system according to claim 19, wherein: Each of the control modules is a neural network module.
21. The multi-task neural network system according to claim 20, wherein: The neural network system has a multi-column architecture, wherein the neural network module defines at least one column of neural network layers, and wherein the shared policy network defines a second column of neural network layers.
22. The multi-task neural network system according to claim 19, wherein: The action data comprises action value data defining an expected value of an action to be performed.
23. The multi-task neural network system according to any one of claims 19 to 22, wherein: The action data includes data defining the likelihood of each of a plurality of possible actions that the worker is capable of performing.
24. The multi-task neural network system according to any one of claims 19 to 22, wherein: The control modules operate substantially independently of each other.
25. The multi-task neural network system according to any one of claims 19 to 22, wherein: The set of workers includes a neural network including shared weights.
26. A system comprising one or more computers and one or more storage devices storing instructions which, when executed by the one or more computers, cause the one or more computers to perform the operations of the respective methods of any one of claims 1 to 18.
27. One or more computer storage media storing instructions that, when executed by one or more computers, cause the one or more computers to perform the operations of a corresponding method according to any one of claims 1 to 18.
28. One or more computer storage media storing instructions that, when executed by one or more computers, cause the one or more computers to implement the system of any one of claims 19 to 25.
