Aether Catalog definitions — MachineLearning_ReLUWidthDepthTradeoff
DefinitionMachineLearning_ReLUWidthDepthTradeoffaether-catalogmachinelearning
Definition bundle for the Aether Catalog module MachineLearning.ReLUWidthDepthTradeoff, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.
Definition code
-- Def bundle generated from MachineLearning/ReLUWidthDepthTradeoff.lean by skeleton subtraction
import Mathlib
import Definitions.Def_MachineLearning_Neural_AlgebraicNeuralArchitecture
/-! # ReLU width--depth capacity trade-offs
This file gives a kernel-checked quantitative core for width--depth comparisons.
It uses the catalog's `AlgebraicNeural.ReLU` rather than introducing another
activation. The capacity model counts the number of cells available to a
piecewise-affine realization: a width `w`, depth `L` architecture has capacity
`(w+1)^L`. This is the standard combinatorial quantity behind region-count
arguments.
The statements below deliberately distinguish *capacity bounds* from a full
analytic universal-approximation theorem. In particular, continuity alone has
no function-independent approximation rate. The proved results quantify the
architectural resources needed once an approximation requires a specified
number of cells.
-/
open Finset BigOperators
namespace ReLUWidthDepth
noncomputable section
open AlgebraicNeural
/-- A scalar one-hidden-layer ReLU realization with `w` hidden neurons. -/
def shallowEval {w : ℕ} (outputBias : ℝ) (outputWeight inputWeight bias : Fin w → ℝ)
(x : ℝ) : ℝ :=
outputBias + ∑ i, outputWeight i * ReLU (inputWeight i * x + bias i)
/-- The three-neuron tent map, a basic depth-separation building block. -/
def tent (x : ℝ) : ℝ := ReLU x - 2 * ReLU (x - 1) + ReLU (x - 2)
/-- Iterated composition of the tent map, corresponding to increasing depth. -/
def iteratedTent : ℕ → ℝ → ℝ
| 0 => id
| L + 1 => tent ∘ iteratedTent L
/-- Region-capacity model for width `w` and depth `L`. -/
def regionCapacity (w L : ℕ) : ℕ := (w + 1) ^ L
/-- Error-scale demand: `m^n` cells corresponds to the common scaling
`ε = 1 / m^n`; the shallow width `m-1` therefore has the encoded
`ε^(-1/n)` behavior. -/
def approximationCellDemand (n m : ℕ) : ℕ := m ^ n
end
end ReLUWidthDepth