What is a deep Q-network?

A deep Q-network (DQN) is a deep neural network, trained with a variant of Q-learning, that estimates each action's expected future reward from high-dimensional input such as raw pixels.

Unlike classic Q-learning, where values sit in a table and earlier agents relied on handcrafted features or low-dimensional states, DQN estimates values with a convolutional network and trains it stably using experience replay and a target network.

Topic
Machine learning, models and training
Also known as
DQN, deep Q-learning
Origin
DeepMind, 2013 preprint, 2015 Nature

How a deep Q-network works

  1. The agent observes the environment; the output layer gives a separate Q-value for each valid action.
  2. The agent mostly picks the highest-valued action and occasionally a random one for exploration.
  3. Experiences go into a replay memory and are sampled at random for training, breaking correlations between consecutive samples.
  4. Target values are computed with a separate target network copied from the online network at fixed intervals.

In more detail

Overestimation and Double DQN

Because Q-learning takes the maximum over estimated action values, it tends to prefer overestimated values and sometimes learns unrealistically high ones. Double DQN reduces this bias by choosing the greedy action with the online network and estimating its value with the target network; the target network remains a periodic copy of the online network as in DQN. The adaptation led to much better performance on several games.

Why a deep Q-network matters for on-premises AI

DQN was introduced as the first deep learning model to learn control policies directly from high-dimensional sensory input with reinforcement learning. Its Nature version, given only pixels and the game score, reached a level comparable to a professional human games tester across 49 Atari games with the same algorithm, architecture and hyperparameters. Later work showed that DQN can overestimate action values and that a Double Q-learning adaptation reduces this.

ON-PREMISES EXAMPLE

A warehouse automation company trains a DQN agent in simulation to order its robots' tasks. The learned policy first runs in shadow mode in the real warehouse and goes live after comparison with planners' decisions.

Common questions

What is the difference between DQN and classic Q-learning?

Classic Q-learning keeps a value for each state and action in a table. DQN estimates these values with a deep neural network, so it can work with large inputs such as raw pixels.

Can DQN be used with continuous action spaces?

Not directly. The output layer produces a separate value for each valid action, so DQN assumes a discrete set of actions.

Why is experience replay used?

Consecutive experiences are correlated and the data distribution shifts during learning. Sampling past experiences at random eases these problems, smooths learning and helps avoid oscillation or divergence of the parameters.

Sources

In the glossary: Glossary, A to D

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.