Think of the target as a moving point y(θ) and the prediction q^(θ)=Q(s,a;θ).
Coupled update (no target net):
θt+1=θt+α(y(θt)−q^(θt))∇q^
Because y also increases when q^ does (both share θ), the "error" y−q^ can fail to shrink — the fixed-point iteration is not guaranteed to be a contraction. By pinning y to θ− that changes on a slower timescale, we get a two-timescale system: fast θ solves a regression toward a slowly-drifting target. Stochastic-approximation theory says such two-timescale schemes converge when the ratio of learning rates →0. That is the formal justification for τ≪1 or large C.
The TD target r+γmaxa′Q(s′,a′;θ) depends on θ; updating θ moves the target you're chasing, causing correlated feedback → oscillation/divergence. A frozen copy gives a stable target.
What are the two ways to update the target network?
Hard update: copy θ−←θ every C steps. Soft update: θ−←τθ+(1−τ)θ− with small τ.
In the soft update, what does τ control?
The tracking speed / effective memory (∼1/τ steps). τ→1 = no target net; τ→0 = frozen forever.
Does gradient flow through θ−?
No — θ− is treated as a constant; the target is a stationary label.
What is the TD target for a terminal transition?
y=r only (no bootstrapped γmaxQ term).
How does Double DQN differ from a target network?
Double DQN reduces max-overestimation bias by selecting the action with the online net and evaluating it with the target net; it's orthogonal to the stability role of the target network.
What theory justifies slow target updates?
Two-timescale stochastic approximation: fast online net regresses to a slowly-drifting target; convergence needs the learning-rate ratio → 0.
Write the full TD loss with a target network.
L(θ)=(r+γmaxa′Q(s′,a′;θ−)−Q(s,a;θ))2.
Recall Feynman: explain to a 12-year-old
Imagine practising archery, but the target keeps moving every time you shoot — and it moves because of your own shots. You'd never hit anything! So instead, we freeze the target for a while (or let it drift very slowly). You practise hitting the frozen target, get good, then move the target a tiny bit, practise again. That "frozen bullseye" is the target network — it makes learning calm and steady instead of chaotic.
Dekho, DQN mein hum ek neural network se Q(s,a) predict karte hain, aur uska target hota hai r+γmaxQ(s′,a′). Problem yeh hai ki yeh target bhi usi network se aata hai. Matlab jab aap weights update karte ho prediction sudharne ke liye, to target khud hi hil jaata hai — jaise aap teer maar rahe ho par nishaana har shot pe khisak raha hai. Isse training oscillate karti hai ya diverge ho jaati hai (deadly triad ka chakkar).
Solution simple hai: ek target network rakho — yeh online network ki ek purani, frozen copy hai (θ−). Target (y) hamesha is frozen copy se compute karo, aur is copy ke through koi gradient mat bahne do. Ab target thodi der ke liye ek fixed label ban jaata hai, aur problem normal supervised regression jaisi stable ho jaati hai.
Copy update karne ke do tareeke hain. Hard update: har C steps pe θ−←θ (poora copy). Soft update (Polyak): har step θ−←τθ+(1−τ)θ− with chhota τ jaise 0.005 — yeh target ko dheere-dheere online net ke peeche khinchta hai. Yaad rakho: target net stability ke liye hai, aur Double DQN alag cheez hai jo overestimation bias kam karta hai — dono saath use hote hain, confuse mat karna.