Lyapunov Stability Test
Hypothesis
The normalised Lyapunov function \( V_{\text{norm}} \) is monotonically non-increasing along trajectories of the composed adaptive system. That is:
\[ V_{\text{norm}}(\theta_{t+1}) \le V_{\text{norm}}(\theta_t) \quad \forall\, t \]The standard (unnormalised) Lyapunov function may violate this due to scale sensitivity. The normalised variant corrects this.
Method
Setup: Four test conditions: normalised V over 1000 steps, standard V over 1000 steps, EMA-smoothed V, and adversarial injection.
Parameters:
- Steps per trial: 1000
- Parameter dimension: 4
- Violation criterion: \( V(t+1) > V(t) + \epsilon \) where \( \epsilon = 10^{-12} \)
- Adversarial: gradient magnitude increased 100x at step 5
Procedure: Run the composed system forward, recording \( V \) at each step. Count violations. For the adversarial test, inject a destabilising gradient and check whether the Lyapunov monitor detects the instability.
Results
| Condition | Violations | Total Steps | Rate | Status |
|---|---|---|---|---|
| Normalised V | 0 | 1000 | 0% | Pass |
| Standard V | 39 | 1000 | 3.9% | Fail |
| EMA-smoothed V | 0 | 1000 | 0% | Pass |
| Adversarial injection | Instability detected at step 5 | — | Pass | |
Analysis
- Normalised V (0/1000): The normalised construction \( V_{\text{norm}} = V / (1 + \|\theta\|^2) \) eliminates scale-dependent oscillations. Zero violations confirm the theoretical guarantee.
- Standard V (39/1000): The 3.9% violation rate demonstrates that unnormalised Lyapunov functions are unreliable for multi-scale systems. The violations cluster around steps where parameter magnitudes change rapidly.
- EMA-smoothed V (0/1000): Exponential moving average smoothing also achieves zero violations, confirming that temporal averaging can substitute for normalisation in practice.
- Adversarial (step 5): The Lyapunov monitor correctly flags the instability at the exact step of adversarial injection, demonstrating its utility as a runtime safety check.
Conclusion
Pass — The normalised Lyapunov function maintains monotonic decrease with zero violations over 1000 steps. Theorem 3 is validated. The standard V's 3.9% failure rate confirms that normalisation is necessary, not merely convenient.
Reproducibility
../simplex/build/sxc exp_lyapunov.sx -o build/exp_lyapunov.ll
clang -O2 build/exp_lyapunov.ll ../simplex/runtime/standalone_runtime.c \
-o build/exp_lyapunov -lm -lssl -lcrypto -L$(brew --prefix openssl)/lib
./build/exp_lyapunov
Related
- Theorem 3 — Normalised Lyapunov Stability
- exp-contraction — Contraction mapping (Theorem 1)
- exp-invariants — Foundational invariants (Prop 3.5)