Skip to content
AI360Xpert
Beta

Baird's Counterexample

Seven states, zero rewards, linear values, yet off policy TD blows up. Three ingredients together break the contraction that keeps learning stable.

Seven weights start at norm 10.30 and grow past 22.04 at 100 steps and 3302.63 at 1000 steps though every reward is zero
Seven weights start at norm 10.30 and grow past 22.04 at 100 steps and 3302.63 at 1000 steps though every reward is zero

Why Does This Exist?

Linear values feel safe. Squared error is a bowl, so gradient steps should roll downhill. Baird showed in 1995 that this intuition fails once three things combine: function approximation, bootstrapping, and off policy data. That trio is the deadly triad.

His 7-state star MDP has zero reward everywhere, discount γ=0.99\gamma = 0.99, and a linear value v^(s)=wTx(s)\hat{v}(s) = w^T x(s) that can fit the truth w=0w = 0 exactly. Target policy always picks the solid move to the hub. Behavior mostly picks the dashed move that spreads across the rim. Semi-gradient TD with importance weights still explodes. This page covers the construction and the blow up. Neighbors cover the trio in the deadly triad, the sampling shift in off policy with approximation, and true gradient fixes in gradient TD.

You need TD learning first: update toward R+γv^(s′)R + \gamma \hat{v}(s') while ignoring how the target itself moves with ww.

Think of It Like This

A mic facing its own speaker

A whisper enters the mic, the amp adds a little gain, the speaker throws it back into the mic, and the loop repeats. Gain above one turns quiet into squeal even with no singer in the room.

Bootstrapped targets are the mic, semi-gradient pushes are the amp, and off policy sampling aims the speaker at the mic. Zero reward is the quiet room. It still squeals because the loop gain sits above one.

Where it stops: a real amp clips at voltage rails while these weights grow with no ceiling until floats overflow. The math also names the gain exactly through eigenvalues, which air acoustics never does.

How It Actually Works

Six rim states s1s_1 to s6s_6 plus hub s7s_7. Solid action goes to s7s_7. Dashed action lands uniform on the rim. All R=0R = 0. Features with eie_i as unit vectors:

x(si)=2ei+e7,v^(si)=2wi+w7x(s_i) = 2e_i + e_7, \quad \hat{v}(s_i) = 2w_i + w_7 x(s7)=e1+2e7,v^(s7)=w1+2w7x(s_7) = e_1 + 2e_7, \quad \hat{v}(s_7) = w_1 + 2w_7

Behavior picks dashed with 5/65/6 and solid with 1/61/6. Dashed steps get importance ratio ρ=0\rho = 0 and contribute nothing. Solid steps get ρ=6\rho = 6 and update toward γv^(s7)\gamma \hat{v}(s_7). In expectation the 66 cancels the 1/61/6 visit rate, leaving:

E[Δw]=−αAwE[\Delta w] = -\alpha A w

for a fixed 7×77 \times 7 matrix AA. On policy AA stays positive definite and pulls inward. Here AA has eigenvalues with negative real parts near −0.5227-0.5227 and −0.0040-0.0040. Then I−αAI - \alpha A has gain above one along that mode:

1+0.5227α>11 + 0.5227\alpha > 1

Each pass multiplies that component, so norms grow like (1+0.5227α)k(1 + 0.5227\alpha)^k.

Worked example

Start w0=[1,1,1,1,1,1,10]Tw_0 = [1, 1, 1, 1, 1, 1, 10]^T with α=0.01\alpha = 0.01. Norm:

∥w0∥=6×12+102=106≈10.2956\|w_0\| = \sqrt{6 \times 1^2 + 10^2} = \sqrt{106} \approx 10.2956

Expected semi-gradient steps push outward from the start:

∥w1∥≈10.3804,∥w2∥≈10.4657,∥w3∥≈10.5517\|w_1\| \approx 10.3804, \quad \|w_2\| \approx 10.4657, \quad \|w_3\| \approx 10.5517

The drift compounds. By 100100 steps norm is about 22.0422.04, by 500500 about 269.47269.47, by 10001000 about 3302.633302.63. Zero rewards, small step, exact representation, yet infinity bound.

Code

Norm growth only, hand checkable without a full simulator.

import numpy as np

def weight_norm(w: np.ndarray) -> float:    """Euclidean norm of the 7-dim Baird weight vector."""    return float(np.linalg.norm(w))

w0 = np.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 10.0])print(f"{weight_norm(w0):.4f}")  # -> 10.2956
w1 = np.array([1.0241, 1.0244, 1.0244, 1.0244, 1.0244, 1.0244, 10.0726])print(f"{weight_norm(w1):.4f}")  # -> 10.3804

First print is 106\sqrt{106}. Second matches the one step expected update quoted above.

Watch Out For

Blaming nonlinearity or reward scale

It is tempting to blame ReLUs or big rewards when values explode. Baird rules both out: linear model, zero rewards, tiny step.

Symptom: clipping gradients or rescaling rewards changes nothing. Fix: break the triad. Go on policy, switch to true gradient TD such as GTD2 or TDC, or reweight with emphatic traces. Check sampling and bootstrapping before touching the network.

The Quick Version

  • Baird's 7-state star uses zero rewards and linear features that can fit truth exactly.
  • Off policy ratios plus bootstrapping make matrix AA indefinite, with modes near −0.5227-0.5227.
  • Update gain 1+0.5227α1 + 0.5227\alpha exceeds one, so weights multiply outward each pass.
  • Norms run 10.3010.30 to 22.0422.04 at 100 steps to 3302.633302.63 at 1000 steps.
  • Fix by removing one leg: on policy data, true gradients, or emphatic weighting.