# Filippov Sliding Layer for Neural State-Space Models

- ID: 2586
- Canonical URL: https://synthcore.org/idea/2586/filippov-sliding-layer-for-neural-state-space-models
- API JSON: https://synthcore.org/api/idea/2586.json
- API Markdown: https://synthcore.org/api/idea/2586.md
- Verification status: failed_benchmark
- Source: [arXiv:2608.19785](https://arxiv.org/abs/2608.19785)
- Category: dynamics
- Solves: stability, accuracy
- ML areas: ssm, world-model, rnn, training
- Math tags: dynamical-systems, control-theory, geometry, linear-algebra, numerical-analysis
- Ratings: usefulness 8/10; difficulty 6/10; novelty 8/10

## 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.

## 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.

## Key formulas

- $$s(x)=n^{\top}x-c,\qquad a^{+}(x)=n^{\top}f^{+}(x),\qquad a^{-}(x)=n^{\top}f^{-}(x).$$
- $$f_F(x)=(1-\alpha(x))f^{-}(x)+\alpha(x)f^{+}(x),\qquad \alpha(x)=\frac{a^{-}(x)}{a^{-}(x)-a^{+}(x)}.$$
- $$n^{\top}f_F(x)=0\quad\text{when }a^{+}(x)<0<a^{-}(x).$$
- $$\tilde\alpha(x)=\operatorname{clip}_{[0,1]}\left(\frac{a^{-}(x)}{a^{-}(x)-a^{+}(x)+\delta}\right),\qquad \hat f(x)=w(s)f_F(x)+(1-w(s))f_{\operatorname{sign}(s)}(x).$$

## 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

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: inconclusive
- Verdict: 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.

### Mechanism check

- Verdict: 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.
- Confidence: 9/10
- 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.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.3579
- Paired wins: 4/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_report.json](https://synthcore.org/code/904/bench_report.json)
- [check_filippov.py](https://synthcore.org/code/904/check_filippov.py)
- [filippov_experiment.py](https://synthcore.org/code/904/filippov_experiment.py)
- [filippov_layer.py](https://synthcore.org/code/904/filippov_layer.py)
- [filippov_results.json](https://synthcore.org/code/904/filippov_results.json)
- [fix_runtime.py](https://synthcore.org/code/904/fix_runtime.py)
- [report.md](https://synthcore.org/code/904/report.md)
- [report_bench_2026-09-01T143925.md](https://synthcore.org/code/904/report_bench_2026-09-01T143925.md)
- [stage2_bench.py](https://synthcore.org/code/904/stage2_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/904)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
