A target network is a separate, slowly updated copy of a value network that is used to compute the bootstrap targets in temporal difference learning, so that the targets do not shift every time the main network’s weights change. Reinforcement learning algorithms such as the Deep Q-network (DQN) rely on it to keep training stable when a neural network approximates the Q-function.
The technique became standard in deep reinforcement learning after the 2015 DQN work on Atari games, and it now appears in most value-based and actor-critic methods, including Double DQN, DDPG, TD3 and soft actor-critic. Its purpose is narrow but critical: it breaks the feedback loop in which a network chases targets that it is itself moving.
Why bootstrapped targets need a target network
A target network is needed because bootstrapping makes the regression target depend on the learned function. In Q-learning, the target for a transition is the reward plus the discounted maximum Q-value of the next state. When the same network produces both the prediction and that next-state estimate, every gradient step changes the target as well as the prediction.
This creates a moving-target problem. Updating Q for one state also changes Q for similar states through shared weights, including the next states used in targets. Errors can then reinforce themselves and grow, which is one reason function approximation, bootstrapping and off-policy learning together form the so-called deadly triad that can cause divergence.
With a target network, the loss becomes the squared difference between the online network’s Q-value and a target computed by the frozen copy with parameters theta-minus. For a stretch of training, the targets behave like a fixed supervised dataset, which makes the optimization problem far better conditioned.
The following table separates the two networks and their responsibilities.
| Property | Online network | Target network |
|---|---|---|
| Parameters | Theta, updated every gradient step | Theta-minus, copied or averaged from theta |
| Main output | Q-value of the current state and action | Q-value estimate of the next state |
| Receives gradients | Yes | No |
| Selects actions in the environment | Yes, usually with epsilon-greedy | No |
Hard and soft update schemes
Target networks are synchronized with the online network by either a hard update or a soft update. Both schemes delay information flow from the online weights into the targets; they differ in whether that delay is periodic or continuous.
A hard update copies all online weights into the target network every C steps. The original DQN used a period of 10,000 steps on Atari, and many implementations choose values between about 1,000 and 10,000 environment or gradient steps. A soft update, also called Polyak averaging, blends the weights at every step with a small coefficient tau.
| Scheme | Update rule | Typical setting | Common algorithms |
|---|---|---|---|
| Hard update | Copy theta into theta-minus every C steps | C of about 1,000-10,000 | DQN, Double DQN, Rainbow DQN |
| Soft update | Theta-minus becomes tau times theta plus (1 – tau) times theta-minus | Tau of about 0.001-0.01 | DDPG, TD3, soft actor-critic |
| No target network | Targets use current theta | Not applicable | Some on-policy methods such as PPO |
Hard updates create step changes in the targets at every synchronization, which can produce visible jumps in the loss curve. Soft updates produce smoother target trajectories and are favored in continuous control, where actor and critic interact and sudden target shifts destabilize both.
Target networks in Double DQN and actor-critic methods
Beyond stabilizing targets, the target network also serves as a second estimator in several algorithms. Double DQN reduces maximization bias by letting the online network choose the next action while the target network evaluates it, which decouples selection from evaluation without adding a new network.
Actor-critic methods for continuous actions typically keep target copies of both the actor and the critic. TD3 adds two critics, each with a target copy, and uses the minimum of the two target estimates to further limit overestimation. Soft actor-critic follows a similar pattern with an entropy term in the target.
| Algorithm | Target networks kept | Purpose beyond stability |
|---|---|---|
| DQN | One target Q-network | None; stabilizes bootstrap targets |
| Double DQN | One target Q-network | Evaluates actions chosen by the online network |
| DDPG | Target actor and target critic | Supplies smooth next-action targets |
| TD3 | Target actor and two target critics | Clipped double Q-learning |
| Soft actor-critic | Target critics | Stable soft value targets |
Choosing the update rate
The update period C or coefficient tau controls a trade-off between stability and learning speed. A slower target gives more stable regression problems but propagates new value information more slowly, because improved estimates reach the targets only after a delay.
- Too fast: targets move almost as quickly as the online network, and oscillation or divergence returns.
- Too slow: learning stalls because targets reflect an outdated policy, which is especially harmful in sparse-reward tasks.
- Interaction with replay: large experience replay buffers and slow targets both add lag, so tuning one often requires adjusting the other.
- Measure in gradient steps: when the replay ratio changes, the period should be expressed in gradient updates rather than environment steps.
Practitioners usually start from published defaults for the algorithm family and adjust only when learning curves show instability or slow progress. Monitoring the gap between online and target Q-values helps diagnose which direction to move.
Limitations and common misconceptions
A target network reduces but does not eliminate instability. Divergence can still occur with poor reward scaling, high learning rates or strong distribution shift in offline reinforcement learning, where methods such as conservative Q-learning add further safeguards.
A frequent misconception is that the target network is a separately trained model. It is never trained by gradient descent; it only receives copies or averages of the online weights. Another misconception is that it removes overestimation bias by itself, whereas that effect requires the Double DQN style decoupling or clipped double estimates. Research on alternatives, such as normalization layers that allow stable training without delayed targets, continues, but the target network remains the default choice.
The idea in brief
Imagine learning archery while someone keeps moving the target after every shot. You would never improve. A target network keeps the target still for a while so the learner can aim properly.
In reinforcement learning, an AI estimates how good each move is. It also uses its own estimates to set its goals. A frozen copy of the AI provides those goals instead. The copy updates slowly and on a schedule. This simple trick makes learning far more reliable.
A practical scenario
A robotics engineer trains a simulated robot arm to place objects into bins using TD3 with continuous control. In the first attempt, the engineer accidentally sets the soft update coefficient tau to 0.5, so the target critics follow the online critics almost immediately.
The critic’s Q-values climb into the thousands within 50,000 steps, far above any achievable return, and the arm’s policy collapses into erratic motions. After restoring tau to 0.005, the Q-estimates track realistic returns, and the success rate rises steadily.
After about 400,000 steps, the arm places objects correctly in roughly 90% of evaluation episodes. The fix required no change to the network architecture, which shows that a correctly tuned target network can decide whether training succeeds or diverges.