IP Library Granted Patent US 12,154,029
Granted Patent B2
US 12,154,029 · App. 16/268,414 · Granted Nov 26, 2024

Continual reinforcement learning with a multi-task agent

Inventors: Tom Schaul (London, GB); Matteo Hessel (London, GB); Hado Philip van Hasselt (London, GB); Daniel J. Mankowitz (St Albans, GB)
Assignee: DeepMind Technologies Limited
G06N3/08G06N3/04
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,154,029
App. No.
16/268,414
Granted
Nov 26, 2024
Kind
B2
Abstract

A method of training an action selection neural network for controlling an agent interacting with an environment to perform different tasks is described. The method includes obtaining a first trajectory of transitions generated while the agent was performing an episode of the first task from multiple tasks; and training the action selection neural network on the first trajectory to adjust the control policies for the multiple tasks. The training includes, for each transition in the first trajectory: generating respective policy outputs for the initial observation in the transition for each task in a subset of tasks that includes the first task and one other task; generating respective target policy outputs for each task using the reward in the transition, and determining an update to the current parameter values based on, for each task, a gradient of a loss between the policy output and the target policy output for the task.

Claims (67)

1. A method of training an action selection neural network used to control an agent interacting with an environment to perform a plurality of different tasks,

wherein the action selection neural network has a plurality of parameters and is configured to:

receive network inputs each comprising (i) a goal signal that is a vector that identifies a first task from the plurality of tasks that is being performed by the agent, and (ii) an observation characterizing a state of the environment, and

process each network input in accordance with the parameters to generate a respective policy output for each network input that defines a control policy for the agent for performing the task identified by the goal signal, the method comprising:

obtaining, from a queue of trajectories, a first trajectory of transitions generated while the agent was performing an episode of the first task from the plurality of tasks, each transition in the first trajectory comprising an initial observation characterizing a state of the environment, an action performed by the agent in response to the observation, a reward received as a result of the agent performing the action, and another observation characterizing a subsequent state of the environment, and the first trajectory of transitions being generated using the action selection neural network conditioned on the goal signal that is the vector that identifies the first task; and

training the action selection neural network on the first trajectory to adjust the control policies for the plurality of tasks, comprising, for each transition in the first trajectory:

generating, in accordance with current values of the parameters, respective policy outputs for the initial observation in the transition for each task in a subset of the plurality of tasks that includes the first task and at least one other task;

generating respective target policy outputs for each task in the subset using at least the reward in the transition, and

determining an update to the current values of the parameters based on, for each task in the subset, a gradient of a loss between the policy outputs for the task and the respective target policy outputs for the task;

selecting, by each of a plurality of actor computing units that each control a respective instance of the agent, a respective task from the plurality of tasks, wherein each of the plurality of actor computing units is configured to select a respective task independently from the other actor computing units;

generating, by each of the plurality of actor computing units and in parallel, a respective trajectory of transitions by selecting actions to be performed by the respective instance of the agent that the actor computing unit controls while the respective instance of the agent is performing an episode of the selected task, wherein the actor computing unit is configured to select the actions using the action selection neural network in accordance with the current values of the parameters and while the action selection neural network is conditioned on the goal signal that is a vector that identifies the respective task that the actor computing unit selected, wherein each transition in the respective trajectory of transitions includes: an observation characterizing a state of the environment, an action selected by the actor computing unit using the action selection neural network and performed by the agent in response to the observation, a reward received as a result of the agent performing the action, and another observation characterizing a subsequent state of the environment; and

adding, by each of the plurality of actor computing units, the generated trajectory to the queue of trajectories.

2. The method of claim 1 , further comprising:

generating the first trajectory of transitions by selecting actions to be performed by the agent while performing the episode of the first task using the action selection neural network and in accordance with the current values of the parameters.

3. The method of claim 1 , further comprising:

generating a batch of trajectories from the trajectories in the queue, wherein the batch includes the first trajectory;

training the action selection neural network on each trajectory in the batch to determine a respective update to the current values of the parameters for each trajectory; and

generating updated values of the parameters from the current values using the updates for the trajectories.

4. The method of claim 1 , wherein generating, in accordance with current values of the parameters, respective policy outputs for the initial observation in the transition for each task in a subset of the plurality of tasks that includes the first task and at least one other task comprises:

processing, for each task in the subset, a network input comprising the initial observation in the transition and the goal signal for the task using the action selection neural network and in accordance with the current values of the parameters.

5. The method of claim 1 , wherein the policy outputs include a respective Q value for each action in a set of possible actions that can be performed by the agent, wherein the Q value is an estimate of a return that would be received if the agent performed the action in response to the observation.

6. The method of claim 5 , wherein generating respective target policy outputs for each task in the subset using at least the reward in the transition comprises:

generating respective n-step returns for each task in the subset.

7. The method of claim 6 , wherein generating n-step returns for each task in the subset comprises:

determining whether the performed action in the transition is the action having the highest Q value in the policy outputs for the task; and

when the performed action in the transition is not the action having the highest Q value, truncating the n-step return using bootstrapping.

8. The method of claim 1 , wherein the action selection neural network is configured to generate an internal goal-independent representation of the state of the environment and to generate the policy outputs for the task based on the goal signal identifying the task and the goal-independent representation.

9. One or more non-transitory computer readable storage media storing instructions that, when executed by one or more computers, cause the one or more computers to perform operations comprising:

training an action selection neural network used to control an agent interacting with an environment to perform a plurality of different tasks,

wherein the action selection neural network has a plurality of parameters and is configured to:

receive network inputs each comprising (i) a goal signal that is a vector that identifies a first task from the plurality of tasks that is being performed by the agent, and (ii) an observation characterizing a state of the environment, and

process each network input in accordance with the parameters to generate a respective policy output for each network input that defines a control policy for the agent for performing the task identified by the goal signal, wherein the training comprising:

obtaining, from a queue of trajectories, a first trajectory of transitions generated while the agent was performing an episode of a first task from the plurality of tasks, each transition in the first trajectory comprising an initial observation characterizing a state of the environment, an action performed by the agent in response to the observation, a reward received as a result of the agent performing the action, and another observation characterizing a subsequent state of the environment, and the first trajectory of transitions being generated using the action selection neural network conditioned on the goal signal that is the vector that identifies the first task; and

training the action selection neural network on the first trajectory to adjust the control policies for the plurality of tasks, comprising, for each transition in the first trajectory:

generating, in accordance with current values of the parameters, respective policy outputs for the initial observation in the transition for each task in a subset of the plurality of tasks that includes the first task and at least one other task;

generating respective target policy outputs for each task in the subset using at least the reward in the transition, and

determining an update to the current values of the parameters based on, for each task in the subset, a gradient of a loss between the policy outputs for the task and the respective target policy outputs for the task;

selecting, by each of a plurality of actor computing units that each control a respective instance of the agent, a respective task from the plurality of tasks, wherein each of the plurality of actor computing units is configured to select a respective task independently from the other actor computing units;

generating, by each of the plurality of actor computing units and in parallel, a respective trajectory of transitions by selecting actions to be performed by the respective instance of the agent that the actor computing unit controls while the respective instance of the agent is performing an episode of the selected task, wherein the actor computing unit is configured to select the actions using the action selection neural network in accordance with the current values of the parameters and while the action selection neural network is conditioned on the goal signal that is a vector that identifies the respective task that the actor computing unit selected, wherein each transition in the respective trajectory of transitions includes: an observation characterizing a state of the environment, an action selected by the actor computing unit using the action selection neural network and performed by the agent in response to the observation, a reward received as a result of the agent performing the action, and another observation characterizing a subsequent state of the environment; and

adding, by each of the plurality of actor computing units, the generated trajectory to the queue of trajectories.

10. The one or more non-transitory computer readable storage media of claim 9 , wherein the operations further comprises:

generating the first trajectory of transitions by selecting actions to be performed by the agent while performing the episode of the first task using the action selection neural network and in accordance with the current values of the parameters.

11. The one or more non-transitory computer readable storage media of claim 10 , wherein the operations further comprises:

generating a batch of trajectories from the trajectories in the queue, wherein the batch includes the first trajectory;

training the action selection neural network on each trajectory in the batch to determine a respective update to the current values of the parameters for each trajectory; and

generating updated values of the parameters from the current values using the updates for the trajectories.

12. The one or more non-transitory computer readable storage media of claim 9 , wherein generating, in accordance with current values of the parameters, respective policy outputs for the initial observation in the transition for each task in a subset of the plurality of tasks that includes the first task and at least one other task comprises:

processing, for each task in the subset, a network input comprising the initial observation in the transition and the goal signal for the task using the action selection neural network and in accordance with the current values of the parameters.

13. The one or more non-transitory computer readable storage media of claim 9 , wherein the policy output includes a respective Q value for each action in a set of possible actions that can be performed by the agent, wherein the Q value is an estimate of a return that would be received if the agent performed the action in response to the observation.

14. The one or more non-transitory computer readable storage media of claim 13 , wherein generating respective target policy outputs for each task in the subset using at least the reward in the transition comprises:

generating respective n-step returns for each task in the subset.

15. The one or more non-transitory computer readable storage media of claim 14 , wherein generating n-step returns for each task in the subset comprises:

determining whether the performed action in the transition is the action having the highest Q value in the policy output for the task; and

when the performed action in the transition is not the action having the highest Q value, truncating the n-step return using bootstrapping.

16. A system comprising one or more computers and one or more storage devices storing instructions that, when executed by the one or more computers, cause the one or more computers to perform operations comprising:

training an action selection neural network used to control an agent interacting with an environment to perform a plurality of different tasks,

wherein the action selection neural network has a plurality of parameters and is configured to:

receive network inputs each comprising (i) a goal signal that is a vector that identifies a first task from the plurality of tasks that is being performed by the agent, and (ii) an observation characterizing a state of the environment, and

process each network input in accordance with the parameters to generate a respective policy output for each network input that defines a control policy for the agent for performing the task identified by the goal signal, wherein the training comprising:

obtaining, from a queue of trajectories, a first trajectory of transitions generated while the agent was performing an episode of the first task from the plurality of tasks, each transition in the first trajectory comprising an initial observation characterizing a state of the environment, an action performed by the agent in response to the observation, a reward received as a result of the agent performing the action, and another observation characterizing a subsequent state of the environment, and the first trajectory of transitions being generated using the action selection neural network conditioned on the goal signal that is a vector that identifies the first task; and

training the action selection neural network on the first trajectory to adjust the control policies for the plurality of tasks, comprising, for each transition in the first trajectory:

generating, in accordance with current values of the parameters, respective policy outputs for the initial observation in the transition for each task in a subset of the plurality of tasks that includes the first task and at least one other task;

generating respective target policy outputs for each task in the subset using at least a vector representing the reward in the transition, wherein the vector includes a respective pseudo-reward for each task in the subset, and wherein generating respective target policy outputs for each task in the subset comprises: generating the respective target policy outputs for each task in the subset using the pseudo-reward for the task in the vector and not using the pseudo-rewards for any of the other tasks in the subset, and

determining an update to the current values of the parameters based on, for each task in the subset, a gradient of a loss between the policy outputs for the task and the respective target policy outputs for the task;

selecting, by each of a plurality of actor computing units that each control a respective instance of the agent, a respective task from the plurality of tasks, wherein each of the plurality of actor computing units is configured to select a respective task independently from the other actor computing units;

generating, by each of the plurality of actor computing units and in parallel, a respective trajectory of transitions by selecting actions to be performed by the respective instance of the agent that the actor computing unit controls while the respective instance of the agent is performing an episode of the selected task, wherein the actor computing unit is configured to select the actions using the action selection neural network in accordance with the current values of the parameters and while the action selection neural network is conditioned on the goal signal that is a vector that identifies the respective task that the actor computing unit selected, wherein each transition in the respective trajectory of transitions includes: an observation characterizing a state of the environment, an action selected by the actor computing unit using the action selection neural network and performed by the agent in response to the observation, a reward received as a result of the agent performing the action, and another observation characterizing a subsequent state of the environment; and

adding, by each of the plurality of actor computing units, the generated trajectory to the queue of trajectories.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 29, 2025
From: DEEPMIND TECHNOLOGIES LIMITED
To: GDM HOLDING LLC
Reel/Frame 071109/0414 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 12, 2019
From: SCHAUL, TOM; HESSEL, MATTEO; HASSELT, HADO PHILIP; MANKOWITZ, DANIEL J.
To: DEEPMIND TECHNOLOGIES LIMITED
Reel/Frame 048574/0357 →
Continuity (2)
Provisional Application 62626659 · Feb 5, 2018
Related Publication 20190244099A1 · Aug 8, 2019
Cited By (1)
US 12,430,564