# US 2021/0034969 A1 · Training an unsupervised memory-based prediction system to learn compressed representations of an environment

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0034969 A1
- Document ID: US20210034969A1
- Status: Published application
- Kind: A1
- Application number: 16/766,945
- Filed: 2019-03-11
- Published: 2021-02-04
- Earliest claimed: 2018-03-09
- Assignees: DeepMind Technologies Limited
- Applicants: DeepMind Technologies Limited
- Inventors: Gregory Duncan Wayne; Chia-Chun Hung; David Antony Amos; Mehdi Mirza Mohammadi; Arun Ahuja; Timothy Paul Lillicrap
- Web page: https://patentgrep.com/patent/US20210034969A1

## CPC

- G06N 3/088: Non-supervised learning, e.g. competitive learning
- A61P 35/00: Antineoplastic agents
- C07C 275/36: with at least one of the oxygen atoms further bound to a carbon atom of a six-membered aromatic ring, e.g. N-aryloxyphenylureas
- C07D 239/47: One nitrogen atom and one oxygen or sulfur atom, e.g. cytosine
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0475: Generative networks
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 3/092: Reinforcement learning
- G06N 3/098: Distributed learning, e.g. federated learning
- C07C 2601/04: with a four-membered ring
- C07C 2601/08: the ring being saturated
- C07C 2601/14: The ring being saturated
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- A61P: SPECIFIC THERAPEUTIC ACTIVITY OF CHEMICAL COMPOUNDS OR MEDICINAL PREPARATIONS
- C07C: ACYCLIC OR CARBOCYCLIC COMPOUNDS
- C07D: HETEROCYCLIC COMPOUNDS (macromolecular compounds C08)

## Abstract

Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for training a memory-based prediction system configured to receive an input observation characterizing a state of an environment interacted with by an agent and to process the input observation and data read from a memory to update data stored in the memory and to generate a latent representation of the state of the environment. The method comprises: for each of a plurality of time steps: processing an observation for the time step and data read from the memory to: (i) update the data stored in the memory, and (ii) generate a latent representation of the current state of the environment as of the time step; and generating a predicted return that will be received by the agent as a result of interactions with the environment after the observation for the time step is received.

## Claims

### Claim 1

A method for training a memory-based prediction neural network system using a predictive modeling process, wherein the memory-based prediction neural network system has a plurality of memory-based prediction parameters and is configured to receive an input observation characterizing a state of an environment interacted with by an agent and to process the input observation and data read from an external memory to update data stored in the external memory and to generate a latent representation of the state of the environment, the method comprising:
for each of a plurality of time steps:
receiving an observation for the time step characterizing a current state of the environment being interacted with by the agent at the time step;
processing the observation for the time step and data read from the external memory using the memory-based prediction neural network system and in accordance with current values of the memory-based prediction parameters to: (i) update the data stored in the external memory, and (ii) generate a latent representation of the current state of the environment as of the time step; and
generating, using the latent representation of the current state of the environment as of the time step, a predicted return that will be received by the agent as a result of interactions with the environment after the observation for the time step is received;
determining a gradient based on, for one or more of the time steps, a difference between the predicted return for the time step and an actual return received by the agent; and
adjusting the values of the memory-based prediction parameters using the gradient.

### Claim 2 (depends on 1)

The method of claim 1, wherein processing the observation for the time step and data read from the external memory using the memory-based prediction neural network system to: (i) update the data stored in the external memory, and (ii) generate a latent representation of the current state of the environment as of the time step, comprises:
processing, using an encoding system and in accordance with current values of encoding system parameters, an input comprising the observation for the time step to generate an encoded representation of the observation;
processing, using a representation system and in accordance with current values of representation system parameters, an input comprising the encoded representation and data read from the external memory at a previous time step to generate the latent representation of the current state of the environment as of the time step; and
reading data from the external memory and writing data to the external memory using the latent representation.

### Claim 3 (depends on 2)

The method of claim 2, wherein adjusting the values of the memory-based prediction parameters using the gradient comprises:
adjusting the values of the representation system parameters using the gradient.

### Claim 4 (depends on 2)

The method of claim 2, wherein reading data from the external memory using the latent representation comprises:
processing, using a recurrent neural network and in accordance with current values of recurrent neural network parameters, an input comprising: (i) the latent representation, (ii) the data read from the external memory at the previous time step, and (iii) an action performed by the agent at the time step, to generate a recurrent neural network output; and
reading data from the external memory based on the recurrent neural network output.

### Claim 5 (depends on 2)

The method of claim 2, wherein writing data to the external memory using the latent representation comprises writing the latent representation to a specific location in the external memory and updating data previously written to the external memory using the latent representation.

### Claim 6 (depends on 2)

The method of claim 2, wherein writing data to the external memory using the latent representation comprises, in response to determining that the external memory is full, overwriting specific data in the external memory-based on how frequently the specific data is read from the external memory.

### Claim 7 (depends on 4)

The method of claim 4, wherein processing, using the representation system, the input comprising the encoded representation and data read from the external memory at the previous time step to generate the latent representation comprises:
processing, using a prior neural network and in accordance with current values of prior neural network parameters, an input comprising: (i) the recurrent neural network output, and (ii) the data read from the external memory at the previous time step, to generate parameters of a prior probability distribution over a latent representation space;
processing, using a posterior neural network and in accordance with current values of posterior neural network parameters, and input comprising: (i) the parameters of the prior probability distribution, (ii) the encoded representation of the observation, (iii) the recurrent neural network output, and (iv) the data read from the external memory at the previous time step, to generate parameters of a posterior probability distribution over the latent representation space; and
generating the latent representation by sampling a latent representation from the posterior probability distribution.

### Claim 8 (depends on 7)

The method of claim 7, wherein:
the parameters of the prior probability distribution include prior mean parameters and prior standard deviation parameters;
the parameters of the posterior probability distribution include posterior mean parameters and posterior standard deviation parameters; and
sampling a latent representation from the posterior probability distribution comprises sampling a latent representation from a Normal distribution defined by the parameters of the posterior probability distribution.

### Claim 9 (depends on 7)

The method of claim 7, further comprising:
determining a divergence gradient based on, for one or more of the time steps, a measure of similarity between: (i) the prior probability distribution over the latent representation space at the time step, and (ii) the posterior probability distribution over the latent representation space at the time step; and
adjusting the values of the memory-based prediction parameters using the divergence gradient.

### Claim 10 (depends on 2)

The method of claim 2, wherein adjusting the values of the memory-based prediction parameters using the gradient comprises:
adjusting the values of the encoding system parameters and the values of the decoding system parameters using the gradient.

### Claim 11 (depends on 2)

The method of claim 2, wherein generating, using the latent representation of the current state of the environment as of the time step, a predicted return that will be received by the agent as a result of interactions with the environment after the observation for the time step is received, comprises:
processing, using a decoding system and in accordance with current values of decoding system parameters, a decoding system input to generate the predicted return, wherein the decoding system input comprises: (i) the latent representation, and (ii) an action selection policy output used by the agent to select an action to be performed at the time step, an action performed by the agent at the time step, or both.

### Claim 12 (depends on 11)

The method of claim 11, wherein the decoding system further generates a predicted reconstruction of the observation for the time step.

### Claim 13 (depends on 12)

The method of claim 12, further comprising:
determining an additional gradient based on, for one or more of the time steps, a difference between: (i) the predicted reconstruction of the observation for the time step, and (ii) the observation for the time step; and
adjusting the values of the memory-based prediction parameters using the additional gradient.

### Claim 14 (depends on 11)

The method of claim 11, wherein processing, using a decoding system, a decoding system input to generate a predicted return comprises:
processing, using a state-value function neural network and in accordance with current values of state-value function neural network parameters, an input comprising: (i) the latent representation, and (ii) the action selection policy output used by the agent to select the action to be performed at the time step, to generate a state-value estimate;
processing, using an advantage function neural network and in accordance with current values of advantage function neural network parameters, an input comprising: (i) the latent representation for the time step, and (ii) the action performed by the agent at the time step, to generate an advantage estimate; and
generating the predicted return based on the state-value estimate and the advantage estimate.

### Claim 15 (depends on 11)

The method of claim 11, wherein the action selection policy output used by the agent to select an action to be performed at the time step comprises a score distribution over a predetermined set of possible actions that could be performed by the agent.

### Claim 16

(canceled)

### Claim 17

(canceled)

### Claim 18

(canceled)

### Claim 19

(canceled)

### Claim 20

(canceled)

### Claim 21

(canceled)

### Claim 22

(canceled)

### Claim 23

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 for training a memory-based prediction neural network system using a predictive modeling process, wherein the memory-based prediction neural network system has a plurality of memory-based prediction parameters and is configured to receive an input observation characterizing a state of an environment interacted with by an agent and to process the input observation and data read from an external memory to update data stored in the external memory and to generate a latent representation of the state of the environment, the operations comprising:
for each of a plurality of time steps:
receiving an observation for the time step characterizing a current state of the environment being interacted with by the agent at the time step;
processing the observation for the time step and data read from the external memory using the memory-based prediction neural network system and in accordance with current values of the memory-based prediction parameters to: (i) update the data stored in the external memory, and (ii) generate a latent representation of the current state of the environment as of the time step; and
generating, using the latent representation of the current state of the environment as of the time step, a predicted return that will be received by the agent as a result of interactions with the environment after the observation for the time step is received;
determining a gradient based on, for one or more of the time steps, a difference between the predicted return for the time step and an actual return received by the agent and
adjusting the values of the memory-based prediction parameters using the gradient.

### Claim 24

One or more non-transitory computer storage media storing instructions that when executed by one or more computers cause the one or more computers to perform operations for training a memory-based prediction neural network system using a predictive modeling process, wherein the memory-based prediction neural network system has a plurality of memory-based prediction parameters and is configured to receive an input observation characterizing a state of an environment interacted with by an agent and to process the input observation and data read from an external memory to update data stored in the external memory and to generate a latent representation of the state of the environment, the operations comprising:
for each of a plurality of time steps:
receiving an observation for the time step characterizing a current state of the environment being interacted with by the agent at the time step;
processing the observation for the time step and data read from the external memory using the memory-based prediction neural network system and in accordance with current values of the memory-based prediction parameters to: (i) update the data stored in the external memory, and (ii) generate a latent representation of the current state of the environment as of the time step; and
generating, using the latent representation of the current state of the environment as of the time step, a predicted return that will be received by the agent as a result of interactions with the environment after the observation for the time step is received;
determining a gradient based on, for one or more of the time steps, a difference between the predicted return for the time step and an actual return received by the agent and
adjusting the values of the memory-based prediction parameters using the gradient.

### Claim 25 (depends on 24)

The non-transitory computer storage media of claim 24, wherein processing the observation for the time step and data read from the external memory using the memory-based prediction neural network system to: (i) update the data stored in the external memory, and (ii) generate a latent representation of the current state of the environment as of the time step, comprises:
processing, using an encoding system and in accordance with current values of encoding system parameters, an input comprising the observation for the time step to generate an encoded representation of the observation;
processing, using a representation system and in accordance with current values of representation system parameters, an input comprising the encoded representation and data read from the external memory at a previous time step to generate the latent representation of the current state of the environment as of the time step; and
reading data from the external memory and writing data to the external memory using the latent representation.

### Claim 26 (depends on 25)

The non-transitory computer storage media of claim 25, wherein adjusting the values of the memory-based prediction parameters using the gradient comprises:
adjusting the values of the representation system parameters using the gradient.

### Claim 27 (depends on 25)

The non-transitory computer storage media of claim 25, wherein reading data from the external memory using the latent representation comprises:
processing, using a recurrent neural network and in accordance with current values of recurrent neural network parameters, an input comprising: (i) the latent representation, (ii) the data read from the external memory at the previous time step, and (iii) an action performed by the agent at the time step, to generate a recurrent neural network output; and
reading data from the external memory based on the recurrent neural network output.
