Filippov Sliding Layer for Neural State-Space Models
Implementation & benchmark of arXiv:2608.19785 — Learning piecewise-smooth dynamical systems
Source paper: Learning piecewise-smooth dynamical systems arXiv:2608.19785 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
At a learned switching hyperplane, replace ambiguous hard routing by a convexified vector field whose normal component is zero whenever neighboring vector fields point toward the surface. This gives a non-chattering approximation of Filippov sliding and can improve long-horizon integration near friction thresholds, impacts, and climate regime boundaries.
Formulas
Mathematical statement
For a surface H={x:s(x)=n^T x-c=0}, let f^+(x) and f^-(x) be the regional vector fields on the two sides, and define normal velocities a^+=n^T f^+(x) and a^-=n^T f^-(x). In the attracting sliding case a^+<0<a^- under the chosen orientation, the Filippov vector field is the convex combination f_F=(1-alpha)f^-+alpha f^+ with n^T f_F=0, where alpha=a^-/(a^- - a^+). Implement this rule in a narrow band around the learned surface, using clipped or softly clipped alpha. The defining property is zero predicted normal velocity during sliding, rather than generic smooth interpolation.
Implementation notes
Add this as the routing rule of the hyperplane-gated model whenever two neighboring experts are available. For each candidate surface, evaluate both f^+ and f^- at the current state, compute a^+=n^T f^+ and a^-=n^T f^-, and identify attracting sliding when a^+<-m and a^->m for margin m>0. Inside a band |s|<epsilon, compute alpha=a^-/(a^- - a^+ + delta), clip alpha to [0,1], and use f_F=(1-alpha)f^-+alpha f^+. Use w(s)=sigmoid((epsilon-|s|)/tau) to transition into the sliding rule, with gradients through the experts and hyperplane parameters but optionally stop-gradient through hard side selection. Outside the band use ordinary regional routing. The paper contributes the Filippov interpretation and explicit switching-surface setting; epsilon, tau, delta, and the numerical integrator are engineering choices. First experiment: train on a damped oscillator with Coulomb friction, dx_1/dt=x_2 and dx_2/dt=-kx_1-bx_2-F_c sign(x_2), using Euler or RK4 at several step sizes. Compare hard routing, sigmoid blending, and the sliding layer on long-rollout position, energy, and surface residual. The quantitative prediction is that during detected sliding, |n^T f_hat| should remain below 0.05 times the typical vector-field norm, while hard routing exhibits alternating side switches and a larger residual. Test whether chatter frequency and residual remain bounded across a fourfold change in integration step size.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Inconclusive
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built and ran a Coulomb-friction oscillator study with hard routing, smooth tanh blending, and a Filippov sliding layer. The mechanism manifested: the exact convex combination had maximum normal residual 0.0 across 20 force-ratio values, smooth residual scaled linearly with force ratio with observed slope 0.50 versus predicted 0.5, and the sliding residual stayed approximately 0.00468 across epsilon values. In rollouts, the sliding layer reduced band residual from 0.423-0.442 for hard routing to 0.00469-0.00471 while hard chatter ranged from 304 to 41 switches per second as dt increased from 0.002 to 0.016.
- Agent confidence
- 9/10
- Baseline
- Hard Euler routing: band normal residuals 0.4232, 0.4263, 0.4319, 0.4420 at dt=0.002, 0.004, 0.008, 0.016; chatter rates 303.95, 153.95, 78.85, 41.25 switches/s.
- Idea
- Filippov Euler routing: band residual maxima 0.004688, 0.004691, 0.004697, 0.004710 at the same step sizes; exact identity residual 0.0 and alpha error 0.0. Smooth residual-versus-force-ratio slope was 0.500 with near-zero intercept.
Limitations: This is a hand-specified two-dimensional oscillator rather than a learned neural state-space model. Only Euler integration was tested, with one deterministic parameter seed; no training, RK4 comparison, reference-solution long-horizon error, GPU execution, or multidimensional learned hyperplane routing was evaluated.
How to run: python3 filippov_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.19785)
Ahead of the baseline (−10.3%) but not statistically significant (p=0.3579, wins 4 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0001
- Idea mean
- 0.0001
- Effect (Δ)
- -0 (−10.3%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.3579 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 6 configs
Only dynamics was tested, with 12 epochs and 1200/300 train/test examples. No trained-model sliding cases were observed, so the quantitative mechanism prediction was not confirmed.
How to run: python3 stage2_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
The registered dynamics track compared matched GRU systems differing only in hard versus Filippov routing. Filippov routing reduced mean test MSE from 5.99486e-05 to 5.37679e-05, but p=0.3579 and therefore there was no significant win. The trained-model mechanism signature was unconfirmed because no qualifying attracting sliding examples occurred.
- Baseline
- best lr=0.04; mean MSE=5.994863204250578e-05; std=2.276605305533657e-05
- Idea
- lr=0.04, epsilon=0.08, tau=0.016; mean MSE=5.376790909394913e-05; std=1.6198896783739743e-05
Benchmark result
Ahead of the baseline (−10.3%) but not statistically significant (p=0.3579, wins 4 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0001
- Idea mean
- 0.0001
- Effect (Δ)
- -0 (−10.3%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.3579 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 6 configs
Only dynamics was tested, with 12 epochs and 1200/300 train/test examples. No trained-model sliding cases were observed, so the quantitative mechanism prediction was not confirmed.
How to run: python3 stage2_bench.py
Artifacts
- bench_report.json 3.3 KB View Raw
- check_filippov.py 1.1 KB View Raw
- filippov_experiment.py 6.4 KB View Raw
- filippov_layer.py 1.7 KB View Raw
- filippov_results.json 4.6 KB View Raw
- fix_runtime.py 0.5 KB View Raw
- report.md 1.7 KB View
- report_bench_2026-09-01T143925.md 3.4 KB View
- stage2_bench.py 5.5 KB View Raw