Lipschitz bounds for neural-network operations #
This module owns Lipschitz estimates for ReLU, matrix-vector multiplication, linear layers, and
composition. The underlying real-valued tensor norm API lives in
NN.Proofs.Analysis.Lipschitz.Norm.
Import NN.Proofs.Analysis.Lipschitz for the complete norm and network-bound API.
Bridges between tensorL2Dist bounds and Mathlib's LipschitzWith #
A tensorL2Dist bound with a nonnegative constant is a Mathlib Lipschitz bound.
A Mathlib Lipschitz bound on real tensors is a tensorL2Dist bound.
ReLU is 1-Lipschitz on scalar tensors.
ReLU is 1-Lipschitz in the L2 norm for tensors of every shape.
Rank-one ReLU is 1-Lipschitz in $\ell_2$.
This theorem is just the vector specialization of relu_lipschitz_general, but it is convenient
for callers working with ordinary .dim n .scalar activations.
ReLU is 1-Lipschitz for the Euclidean metric on real tensors.
Tensor subtraction can be rewritten as addition of a -1 scale.
This is a small algebraic normal form used by linear-operator proofs, where it is often easier to
reuse additive and scaling lemmas than reason about subSpec directly.
Subtracting the zero tensor on the right leaves the tensor unchanged.
Matrix-vector multiplication sends the zero vector to the zero vector.
The proof follows the spec definition: each output coordinate is a fold over scalar products, and every scalar product contains a zero input coordinate.
Frobenius norm of a matrix tensor.
We use the Frobenius-norm-style bound:
$$ \lVert W\rVert_F =\sqrt{\sum_i\lVert\operatorname{row}_i(W)\rVert_2^2}, $$
This is an upper bound for the induced Euclidean operator norm; it is not the spectral norm.
Instances For
The Frobenius norm bounds matrix-vector multiplication in the Euclidean norm.
Linear transformations preserve $\ell_2$-norm bounds. Fundamental theorem for neural network stability analysis.
Composition of Lipschitz functions preserves Lipschitz property. Essential for analyzing deep neural networks.
This is LipschitzWith.comp read through tensorL2Dist_eq_dist. A negative Lf is degenerate:
the hypothesis on f then forces x = y, and both sides vanish.
ReLU + Linear composition Lipschitz bound. Practical theorem for single neural network layer analysis.