Where the Slack Lives: Measuring Every Constant in a Lipschitz Generalization Bound

A generalization bound is a guaranteed ceiling on test error, computed only from training data. When the guarantee is built from Lipschitz constants (the largest factor by which a network can stretch a small change in its input), it becomes a long chain of inequalities. Each link loses some tightness. Theorists spend real effort sharpening individual constants: a $\sqrt{2}$ here, a $1/18$ there. On real networks the finished bound is off by dozens of orders of magnitude, and nobody has measured which links account for that. This note proposes a slack ledger. For each inequality in a standard Lipschitz-margin bound, we measure numerically, on trained image classifiers, how much that single step inflates the bound. The ledger then tells us which constant-sharpening results would change a real certificate and which are mathematically interesting but numerically irrelevant.

The payoff is a map for theory, and we will test it in two regimes where the answer should differ sharply. In the first, a frozen pretrained feature extractor feeds a linear classifier. Here every quantity in the bound is exactly computable, so small constants such as Maurer's $\sqrt{2}$ could decide whether the bound is vacuous (above 100% error). In the second, the whole deep network is trained end to end, and we expect the product of per-layer norms to swamp everything else. The same measurements also give the first numerical probe on real data of an open conjecture: that the vector-contraction constant can be lowered from $\sqrt{2}$ to 1.

Core Claim

Our central claim is that constant-factor improvements to Lipschitz generalization theory should be judged by their share of measured slack on real models. That share is measurable. The bound we audit has the familiar form

$$\text{err}(f) \le \hat{R}_\gamma(f) + 2\sqrt{2}\,\frac{1}{\gamma}\,\mathfrak{R}_n(\mathcal{F}) + 3\sqrt{\frac{\log(2/\delta)}{2n}},$$

where the symbols mean the following. $\text{err}(f)$ is the 0-1 test error of the trained classifier $f$. $\hat{R}_\gamma(f)$ is its training error measured with a margin ramp loss of width $\gamma$. $\mathfrak{R}_n(\mathcal{F})$ is the Rademacher complexity (how well the class $\mathcal{F}$ can fit random $\pm 1$ signs on $n$ points) of the vector-valued function class. $\delta$ is the failure probability.

The factor $\sqrt{2}/\gamma$ comes from the vector-contraction inequality of A vector-contraction inequality for Rademacher complexities. That paper shows that composing a vector-valued class with $L$-Lipschitz functions multiplies complexity by at most $\sqrt{2}L$, with no $\sqrt{\log K}$ dependence on the number of classes $K$. For a deep network, $\mathfrak{R}_n(\mathcal{F})$ is then usually bounded through a product of per-layer spectral norms.

The ledger splits the gap between the right-hand side and the true test error into five multiplicative factors:

  • the margin surrogate versus 0-1 loss;
  • the contraction step;
  • the gap between the class-level Rademacher complexity and what a realistic class can actually fit;
  • per-layer products versus the true end-to-end Lipschitz constant;
  • the concentration term.

What Prior Work Establishes and What It Leaves Open

Two papers motivate the ledger by documenting the gap without apportioning it. Some Fundamental Aspects about Lipschitz Continuity of Neural Networks measures, for a ResNet-50 on ImageNet, layer-wise product upper bounds as high as $10^{40}$. Sample Jacobian lower bounds on the same network sit around $10^3$. It does not turn either number into a generalization certificate. On progressive sharpening, flat minima and generalisation derives a bound from the input-output Jacobian norm and shows that this norm tracks the generalization gap better than loss curvature. It could not evaluate its bound numerically on CIFAR. We differ from both by carrying the measurement all the way through to the bound and attributing slack step by step.

Three papers supply constants whose practical weight is unknown:

None of the three contains an experiment on data. We reuse their inequalities unchanged and ask only what each costs numerically.

Two papers supply methods for tighter measurement:

We use both to place certified values between the naive product and the sample-based lower bound.

One paper constrains what we can claim. On the Sample Complexity of Lipschitz Constant Estimation proves that estimating a Lipschitz constant from samples needs roughly $(MK/\epsilon)^d$ points. So sampled Jacobian norms on images are lower bounds, never certificates. The ledger therefore reports every factor as an interval, bounded by a certified value on one side and an optimization-based estimate on the other. It never substitutes an estimate into a guarantee.

Research Program

The first component is an exact ledger for linear classifiers on frozen features. The function class is linear maps from fixed $d$-dimensional features to $K$ logits, with the weight matrix's Frobenius norm at most $B$. For this class the Rademacher complexity of the logits has a closed form: it equals $B$ times the expected norm of the sign-weighted feature matrix, which reduces to $B\sqrt{\sum_i \|x_i\|^2}/n$. Every term of the bound is then computable. We choose $B$ and $\gamma$ over a grid, paying a union-bound cost for the grid.

Features come from backbones pretrained on a different dataset from the one being evaluated. This is essential, because features learned on the evaluation training set would break the independence the bound requires. We plan ImageNet-pretrained ResNets and ViTs (pretrained-backbone tuning code such as dongzelian/SSF provides the plumbing) probed on CIFAR-10 and CIFAR-100. In this regime we swap in each constant improvement one at a time and record whether the bound crosses from vacuous to non-vacuous. The improvements are: the $\sqrt{2}$ contraction versus a hypothetical constant 1, the offset-localized square-loss bound with $c$ optimized instead of fixed at $1/18$, and grid choices for margin and norm.

The second component is a contraction probe that tests Maurer's conjecture on real data. Because the linear class's logit complexity is exact, we can maximize the composed quantity

$$\mathbb{E}_\epsilon \sup_{W} \sum_i \epsilon_i\, h_i(W x_i)$$

over $W$, and over families of $L$-Lipschitz $h_i$, using many restarts. Here $\epsilon_i$ are random signs and $h_i$ are per-sample Lipschitz functions. The families are margin ramps, coordinate maxima, norms, and adversarially parameterized piecewise-linear maps.

Any optimization result is a valid lower bound on the supremum. So if we ever find a value exceeding $L$ times the exact logit complexity, that is a genuine counterexample to the constant-1 conjecture on real features. If the ratio stays below 1 across $K \in \{10, 100, 1000\}$ and many $h$ families, that is evidence, not proof, and we will say so.

The third component is a deep-network ledger. We train ResNet-18, VGG-11, and a small ViT on CIFAR-10 and CIFAR-100, and a ResNet-50 on ImageNet. For each network we record four Lipschitz quantities:

  • the naive per-layer power-iteration product;
  • the Gram-iteration certified product;
  • the certified local constant from bound propagation, where it runs;
  • the sampled Jacobian lower bound.

To estimate how far the realistic class's fitting capacity falls below its analytic bound, we train the same architecture to fit random sign vectors while projecting its layers onto the spectral budget of the trained model. The result is a lower-bound estimate of the complexity the analytic bound certifies.

The final output assigns each ledger factor a range in orders of magnitude, so a theorist can see whether their constant sits in a $10^{0.15}$ slice or a $10^{37}$ slice.

Baselines

The naive reference point is the textbook spectral-product margin bound with Maurer's $\sqrt{2}$, naive power iteration, and default constants. Based on the $10^{40}$ products reported by Some Fundamental Aspects about Lipschitz Continuity of Neural Networks, we expect it to be vacuous on every deep model. It anchors the ledger's total.

The strongest existing certificate for unmodified deep networks is the partition-based bound of Non-vacuous Generalization Bounds for Deep Neural Networks without any modification to the trained models. It reports an optimized bound of about 38.2% against about 17.7% actual test error for ResNet-152 V2 on ImageNet, and bounds 2 to 3 times the test error across 32 architectures. We will run their bound on our exact CIFAR and ImageNet checkpoints and on the linear-probe models, with the same data split and the same confidence level $\delta$.

For CIFAR-10 the comparison point is the effective-depth bound of Comparative Generalization Bounds for Deep Neural Networks, reported between 0.53 and 0.66. For ImageNet with model modification it is the PAC-Bayes compression bound of Non-vacuous Generalization Bounds at the ImageNet Scale: a PAC-Bayesian Compression Approach, a Top-5 bound below 89% against roughly 13% true error. On CIFAR-100 linear probes we found no reported result on Lacuna for any of these bounds, so we will compute all of them ourselves.

We do not expect a Lipschitz bound on full deep networks to beat the partition bound, and we will not frame that as the goal. In the linear-probe regime, "beating it" means a fully Lipschitz certificate whose ratio of bound to test error falls below the partition bound's ratio on the same probe.

The key ablation replaces one constant at a time while holding the rest fixed, under an equal union-bound budget for any tuned constant. This isolates the ledger's claim that attribution, not any single sharpened constant, is what matters.

Why not just…?

Why not just use PAC-Bayes compression? It yields non-vacuous bounds, but only for a modified network: Non-vacuous Generalization Bounds at the ImageNet Scale: a PAC-Bayesian Compression Approach prunes LeNet-5 to 1.5% of its weights and reports failure on VGG-16. It certifies a different network and says nothing about which Lipschitz constant is loose, which is the question here.

Why not just use the partition bound, which is already non-vacuous on ImageNet? This is a genuine threat as a certificate, and we treat it as the bar in the Baselines. However, it treats the network as a black box that assigns labels to regions of input space. It cannot tell a theorist whether sharpening $\sqrt{2}$ or bounding the per-layer product matters. The linear-probe comparison will show whether a Lipschitz certificate can match it anywhere. If it cannot even there, that negative result is itself the ledger's answer.

Why not just evaluate on a held-out test set? A Hoeffding bound on held-out data is nearly tight and beats every bound here. We concede that it is the right tool for deployment certification. The ledger's purpose is different: it diagnoses where the theory loses tightness, which a test-set number cannot do.

Why not just prove the constant-1 conjecture? A proof would be better, but the probe is cheap. A counterexample found on real features would settle the question negatively. A consistent ratio below 1 across many $K$ and $h$ families would tell theorists where to look.

Decisive Checks

The first decisive check is a threshold test in the linear-probe regime on CIFAR-100. For a fixed training set size and backbone, we record whether switching $\sqrt{2}\to 1$ or tuning the offset constant moves the bound below 100% error. If no single constant crosses the threshold, constant-factor work alone cannot rescue this regime.

The second check is the deep ledger on ResNet-50 on ImageNet. We predict that the per-layer product factor exceeds all other factors combined by at least 30 orders of magnitude. We also predict that Gram-iteration certification recovers only a small fraction of that factor, which would direct future effort toward bounds on the whole network rather than per-layer constants. If instead the certified local constants from bound propagation close most of the gap on the shallower CIFAR networks, the ledger will show exactly the depth at which the gap reopens.

The third check is the contraction probe. We report the largest measured ratio over the tested $K$ values and $h$ families, and whether it ever exceeds 1.