Pipeline Degradation
Paper Theorem 9.4 · Lean module MoF_15_NonlinearAgents
Agent pipelines with tool calls are compositions of Lipschitz maps. The effective Lipschitz constant is the product, so deeper pipelines are harder to defend, not easier.
Statement
::: theorem Pipeline Lipschitz degradation. If
::: theorem Pipeline impossibility. If the composed pipeline
The pipeline picture
Every box in the chain composes its Lipschitz constant with the previous. What started as a small constant on a single-stage defense becomes a product across the entire chain.
Why the band explodes
For a single-stage defense with Lipschitz constants
For the full pipeline
The
An explicit three-stage example
For three stages with Lipschitz constants
If
Why naive "defense in depth" is a misnomer
In classical security, stacking independent defenses generally helps (probability of all defenses failing is the product of individual failure probabilities). In the Lipschitz wrapper setting, stacking defenses is precisely what produces the
::: remark This does not contradict defense-in-depth as a general engineering principle — it constrains a specific (and common) way of building it: chaining continuous wrappers before the model. Discontinuous filters, output-side monitoring, or human-in-the-loop review are not Lipschitz compositions and are not covered. :::
In Lean
-- Composition of Lipschitz maps
theorem lipschitz_comp
(hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
LipschitzWith (Kf * Kg) (f ∘ g)
-- Two- and three-stage explicit bounds
theorem two_stage_lipschitz : …
theorem three_stage_lipschitz : …
-- Boundary fixation for pipelines
theorem pipeline_impossibility
(hPipe : Continuous (T ∘ D))
(hPipe_safe : ∀ x, f x < τ → (T ∘ D) x = x)
(h_safe_ne : ∃ x, f x < τ)
(h_unsafe_ne : ∃ x, τ < f x) :
∃ z, f z = τ ∧ (T ∘ D) z = z
-- ε-robust band grows with depth
theorem band_grows_with_depth : …
theorem tool_call_amplifies : …The three-stage pipeline is a direct LipschitzWith.comp composition in Mathlib; the amplification theorem is then the ordinary T2 bound applied to
Next
- Defense dilemma — the single-stage trade-off that gets amplified across the pipeline.
- Multi-Turn Impossibility — the temporal counter-part of this spatial pipeline.