Price of Robustness, Interactive
← text notes · von Berg, Fono, Datres, Maskey & Kutyniok, ICLR 2026. Five widgets: what the margin and the co-margin measure, why isoperimetry makes Lipschitz functions nearly constant, the surrogate trick at the heart of every proof, the law itself as a calculator, and a toy experiment you can rerun. Everything is computed in your browser.
1. Margin, class stability and co-stability in 2-D
The data are drawn from a Gaussian blob. The "true" label is the sign of x2, and each label is flipped with probability η, so the Bayes risk is R* = η. Pick a classifier f = sgn∘g. The page computes the margin hf(x), the distance from x to the nearest point with the other label, on a 240 × 180 grid with an exact distance transform. It then averages hf over 2000 fresh draws to get the class stability S(f) = E[hf] (Definition 1). It also reports the co-stability S*(g) = E|g|, the Lipschitz constant L(g), and their ratio, the normalized co-stability S̄*(g) (Definition 10). Click the picture to drop a point and see its margin disc.
2. Isoperimetry: Lipschitz functions are nearly constant in high dimension
Draw x from N(0, I/d), so that ‖x‖ ≈ 1 whatever the dimension. This distribution is c-isoperimetric with c = 1 (Definition 3). For any L-Lipschitz f, the probability that f(x) strays t from its mean is at most 2 exp(−d t²/(2cL²)). The spread is of order L√(c/d), which shrinks with d. The left panel shows 4000 values of f(x) − Ef on a fixed axis. The right panel shows the empirical tail against the isoperimetric bound, and against Hoeffding's bound 2 exp(−t²/2), which only knows that f lies in [−1, 1] and so cannot improve with d.
3. The surrogate: trading a Lipschitz constant for a thin band
A classifier jumps, so the Lipschitz toolbox cannot touch it directly. Every proof in the paper replaces f = sgn∘g with the ramp F = sgnγ∘g. The ramp is (L/γ)-Lipschitz, and it disagrees with f only where |g| < γ. So the error splits into two terms. The smooth part costs (1/γ)·√(c log|F| /(nd)), which is Bubeck and Sellke's bound for Lipschitz classes. The band part costs P(|g| ≤ γ), which isoperimetry makes exponentially small once γ is below the typical margin. A small γ makes the band cheap and the smooth part expensive. A large γ does the opposite. The paper takes γ = S/2.
Model for the margin: the score is t = df(x), whose absolute value is the margin. It is taken to be ±(S + √(c/d)·Z) with Z standard normal and c = 1: a 1-Lipschitz function fluctuating at the isoperimetric scale around its mean S. The band probability is then exact, not a bound.
3b. Example 9: why class stability alone cannot survive a covering argument
Take gw(x) = w·tanh(x) for x ~ N(0, 1). For every w ≠ 0 the boundary is the single point 0, so S(f) = E|x| ≈ 0.80, and w and −w are close in parameter space. Yet sgn∘gw and sgn∘g−w disagree everywhere.
4. The law of robustness as a calculator
Corollary 6: with probability at least 1 − δ, every classifier in the class that fits the training set below the noise level (R̂ ≤ R* − ε) has
S(f) < S* = max{ (3K/ε)·√(c·p/(nd)) , √((8c/d)·log(6K/ε)) }, with p = log|F|.
The absolute constant K is not given in the paper, so only the shape is meaningful. Everything here is a ceiling: a memoriser can have any stability below the curve.
5. A toy law: interpolating random features
This is the same experiment as code/rf_margin_toy.py, at browser scale. Inputs are uniform on the unit sphere in ℝd. Labels are sgn(x₁) with a fraction flipped. The model is g(x) = a·relu(Wx)/√p with W frozen and Gaussian, and only a is fit. For p ≥ n that fit is the minimum-norm interpolant, for p < n least squares. For each p the page estimates S(f) on 200 fresh points, by walking to the boundary DeepFool-style and then bisecting. That gives an upper bound on each distance, like the paper's adversarial estimate.