Md. Asif Uddin
Problem I.2.B03

Proving the mistake bound

proof▲▲▲

Symbolic throughout.

STATEMENT

Prove Novikoff’s theorem: on separable data the perceptron makes at most (R/γ)2(R/\gamma)^2 mistakes. State every assumption where it is used, and say at the end which step each assumption was load-bearing for.

GIVEN

A dataset {(xi,yi)}\{(\vec{x}_i, y_i)\} with yi{1,+1}y_i \in \{-1,+1\} and xiR\lVert\vec{x}_i\rVert \le R for all ii. Assume separability: there exists a unit vector u\vec{u}, u=1\lVert\vec{u}\rVert = 1, with

yiu,xiγ>0for every iy_i \langle \vec{u}, \vec{x}_i \rangle \ge \gamma > 0 \quad\text{for every } i

The perceptron starts at w0=0\vec{w}_0 = \vec{0} and updates wk+1=wk+yixi\vec{w}_{k+1} = \vec{w}_k + y_i\vec{x}_i on the kk-th mistake. The bias is absorbed by appending a constant 11 to every xi\vec{x}_i, so only w\vec{w} appears.

FIND

An upper bound on kk, the total number of updates, in terms of RR and γ\gamma only.

STRATEGY

Track one scalar from below and another from above. The inner product u,wk\langle\vec{u},\vec{w}_k\rangle can only grow, and wk2\lVert\vec{w}_k\rVert^2 cannot grow fast. Cauchy–Schwarz then traps kk between them. The whole proof is the observation that a quantity growing linearly cannot stay below one growing as a square root forever.

SOLUTION

Step 1 — the lower bound on the projection. Suppose the kk-th mistake is on example (xi,yi)(\vec{x}_i, y_i). Take the inner product of the update with u\vec{u}, using linearity:

u,wk=u,wk1+yixi=u,wk1+yiu,xi\langle \vec{u}, \vec{w}_{k} \rangle = \langle \vec{u}, \vec{w}_{k-1} + y_i\vec{x}_i \rangle = \langle \vec{u}, \vec{w}_{k-1} \rangle + y_i\langle \vec{u}, \vec{x}_i \rangle

By the separability assumption the last term is at least γ\gamma. So each mistake advances the projection by at least γ\gamma:

u,wk  u,wk1+γ\langle \vec{u}, \vec{w}_{k} \rangle \ \ge\ \langle \vec{u}, \vec{w}_{k-1} \rangle + \gamma

Starting from w0=0\vec{w}_0 = \vec{0}, whose projection is 00, induction over kk mistakes gives

\langle \vec{u}, \vec{w}_{k} \rangle \ \ge\ k\gamma \tag{lower}

Where the assumption entered: separability, and only there.

Step 2 — the upper bound on the norm. Expand the squared norm of the same update:

wk2=wk1+yixi2=wk12+2yiwk1,xi+yi2xi2\lVert \vec{w}_{k}\rVert^2 = \lVert \vec{w}_{k-1} + y_i\vec{x}_i \rVert^2 = \lVert \vec{w}_{k-1}\rVert^2 + 2y_i\langle \vec{w}_{k-1}, \vec{x}_i\rangle + y_i^2\lVert \vec{x}_i\rVert^2

Now use the two facts available. First, the update happened because the example was a mistake, so its margin was non-positive: yiwk1,xi0y_i\langle\vec{w}_{k-1},\vec{x}_i\rangle \le 0, and the cross term can only help. Second, yi2=1y_i^2 = 1 and xi2R2\lVert\vec{x}_i\rVert^2 \le R^2. Therefore

wk2  wk12+R2\lVert \vec{w}_{k}\rVert^2 \ \le\ \lVert \vec{w}_{k-1}\rVert^2 + R^2

and by induction from w0=0\lVert\vec{w}_0\rVert = 0:

wk2  kR2sowk  Rk(upper)\lVert \vec{w}_{k}\rVert^2 \ \le\ kR^2 \qquad\text{so}\qquad \lVert \vec{w}_{k}\rVert \ \le\ R\sqrt{k} \tag{upper}

Where the assumptions entered: the bounded radius, and — crucially — the fact that updates occur only on mistakes. Take that away and the cross term is unsigned, and the bound fails.

Step 3 — squeeze with Cauchy–Schwarz. For any vectors, u,wuw\langle \vec{u}, \vec{w}\rangle \le \lVert\vec{u}\rVert\,\lVert\vec{w}\rVert (Inner products, norms and cosine similarity 0.LA.03), and u=1\lVert\vec{u}\rVert = 1. Chaining the two bounds:

kγ (lower) u,wk  wk (upper) Rkk\gamma \ \overset{\text{(lower)}}{\le}\ \langle \vec{u}, \vec{w}_k\rangle \ \le\ \lVert\vec{w}_k\rVert \ \overset{\text{(upper)}}{\le}\ R\sqrt{k}

Step 4 — solve for kk. From kγRkk\gamma \le R\sqrt{k}, and since k>0k > 0, divide by k\sqrt{k}:

kγRkRγk(Rγ)2\sqrt{k}\,\gamma \le R \quad\Longrightarrow\quad \sqrt{k} \le \frac{R}{\gamma} \quad\Longrightarrow\quad k \le \left(\frac{R}{\gamma}\right)^{2}

\blacksquare

What made it work. The projection grows linearly in the number of mistakes, while the norm grows only as k\sqrt{k}. A vector cannot have its shadow on a unit direction outrun its own length, so the two rates must collide, and the collision point is the bound.

Answer

k  (Rγ)2k \ \le\ \left(\frac{R}{\gamma}\right)^{2}

A dimensionless count. Note what it does not contain: the number of examples nn, the dimension dd, and the presentation order. The bound holds for a million points in a million dimensions arriving adversarially.

Check — sanity

Dimensional consistency. RR and γ\gamma are both lengths — RR a norm, γ\gamma a projection onto a unit vector — so R/γR/\gamma is dimensionless and so is its square. A bound on a count must be dimensionless, and this one is.

It reproduces the run of I.2.B02. There R=2R = 2 and γ=0.4472\gamma = 0.4472, giving k20k \le 20. The observed count was 22. A valid upper bound must be at least the truth, and 2202 \le 20.

Both monotonicities are right. Larger RR (data further from the origin) raises the bound; larger γ\gamma (an easier separation) lowers it. If the inequality had come out the other way round in either variable, a sign was lost.

The degenerate case behaves. If the data is already separated at the start, no mistake occurs, k=0k = 0, and 0(R/γ)20 \le (R/\gamma)^2 holds for any positive right-hand side.

Where this breaks

Every step of Step 2 used updates occur only on mistakes. Change the rule to update on every example regardless of margin and the cross term 2yiwk1,xi2y_i\langle\vec{w}_{k-1},\vec{x}_i\rangle is no longer 0\le 0; the norm can grow faster than RkR\sqrt k, and the squeeze collapses. This is why the perceptron is not gradient descent on a smooth loss: it is a rule that acts only on its own errors, and the proof depends on exactly that.

Separability is load-bearing in Step 1 alone, but its failure is total: without some u\vec{u} achieving margin γ>0\gamma > 0, there is no lower bound at all, kk is unbounded, and the algorithm cycles forever (I.2.X07).

Variation

Suppose w00\vec{w}_0 \neq \vec{0}. Redo Steps 1 and 2 carrying the initial terms, and show the bound becomes k(R+w0)2/γ2k \le \big(R + \lVert\vec{w}_0\rVert\big)^2/\gamma^2 up to constants. Then say why the theorem is usually stated from zero.

Draws on