Infinite Research · Technical Report 3
Saturating loops: stability certificates for modulated filters with saturation in the feedback
Infinite · infinitedevices.org
pre-registered2026-11-23published2026-11-23version1.0outcomeMixed. H1 (sound) holds on all 411 kernels, blind set included, and H4 (forgets its past) holds. H2 fails as registered, and H3 passes on the generated set (74.0%) but fails on the blind set (56.6%, bar 70%), so the coverage claim is not confirmed.
Abstract
Report 2 showed that a compiler can prove a linear filter cannot blow up under any modulation of its knobs. Real filters saturate: a tanh per ladder stage, a clipped integrator, a soft clipper in the feedback. Saturation can make things worse, not better: a loop that is stable for small signals can wind up and blow up for loud ones. We asked whether the same compiler pass extends to Field kernels whose loop is linear except for scalar saturators (tanh, a soft clipper, clamp, sin, abs). Before measuring, we pre-registered five hypotheses with kill criteria. The pass finds each saturator in the kernel's compiled code, cuts it out, reads the remaining linear system from Infinite's interpreter, and looks for one energy function that falls for every knob setting and every saturator gain allowed by the saturator's sector. On 411 kernels (11 from the literature, 200 generated, 200 blind), the oracle finds a growing or stuck witness for 169; the pass certifies 0 of them (H1). Linearising the saturators and running Report 2's certifier is unsound: it certifies 2 generated kernels that wind up and blow up. The pass certifies 74.0% of stable generated kernels but only 56.6% of the blind set, which has larger kernels and more saturators, against a bar of 70%: H3 is not confirmed. Most certified kernels also provably forget their starting state, and none failed a two-start test (H4). On the tanh Moog ladder a Lur'e-Lyapunov certificate reaches Hélie's hand-proved 5/3 for cutoff ceilings up to g = 0.5237, but not over the port's full range, where the explicit filter itself self-oscillates below 5/3; H2 fails as registered. The pass runs in Python, as a research tool; it is not in the app.
Keywords nonlinear filters, saturation, Lur'e systems, absolute stability, Lyapunov, LMI, time-varying filters, Moog ladder, DSP compiler, Field, virtual analog
1Introduction
Saturation is how analog-style filters sound like analog filters: a tanh at each stage of a Moog ladder, a clipper on a state-variable filter's integrator, a soft clipper in a feedback path. It is also the part of a filter that no shipped tool checks. Report 2 showed that a compiler can prove, from a kernel's code alone, that a filter linear in its state cannot blow up under any modulation of its knobs [1]. That proof does not cover a saturating loop, and the obvious shortcut (replace each saturator by its slope at zero and run the linear proof) is wrong: on generated kernels it certifies loops that are stable for small signals and blow up for loud ones (Figure 1).
Stability proofs for saturating filters exist for named circuits, written by hand. Hélie proved the continuous-time tanh Moog ladder stable for resonance k < 5/3 under time-varying cutoff and resonance, with an energy function built from the circuit [2]. Danish, Bilbao and Ducceschi gave port-Hamiltonian schemes for the Korg35 and Moog filters whose stability survives discretisation, with the Moog's proof limited to fixed resonance [3]. Chowdhury gave two nonlinear biquad structures that are stable when every nonlinearity has slope at most 1 [4]. Each covers one structure. Field users and agents write their own.
This report asks whether a compiler can certify, from a kernel's code, that a loop which is linear except for scalar saturators can neither blow up nor stick in an oscillation with no input, under any modulation of its knobs. A kernel like that is a Lur'e system, and control theory has the tools [5]. Our contributions are a pass that finds saturators in Field's compiled code and extracts the Lur'e form from the real interpreter (Section 3.1), sector and Lur'e-Lyapunov certificates on Report 2's certifier (Section 3.3), and an evaluation against an oracle for growing and stuck trajectories, a hand proof and a blind set (Section 4).
2Pre-registered hypotheses
All five hypotheses, with the numbers that would kill them, were committed (commit bbab01bf) before the first measurement. One method decision was amended by the owner after phase 0, as recorded in the README: the Lur'e-Lyapunov certificate became the main method, with the sector-only certificate kept as its baseline.
| Claim | Metric and bar | Kill criterion | |
|---|---|---|---|
| H1 | Sound: the pass never certifies a kernel that can blow up or stick. | 0 certificates on kernels with a witness, on L, G and the blind set B. | any such certificate (after a rig-bug check) |
| H2 | It matches or beats the hand proof for the tanh Moog ladder under modulation. | Certified any-speed k range ≥ Hélie's 5/3 on the explicit Field Moog with a saturator per stage, and never past the oracle's first witness. | certified range < 5/3, or a certificate past a witness |
| H3 | It covers most stable-looking saturating kernels. | ≥ 70% of generated kernels without a witness certified, then the same on B. | < 70% |
| H4 | It proves most of them forget their past, soundly. | Convergence certificates on ≥ 50% of certified kernels, and none fails the two-start test. | < 50%, or any failure |
| H5 | It is cheap enough for a compiler. | Median ≤ 50 ms per kernel in C++. | scored only if an in-app port is approved |
The study ships as research if H1 to H3 pass; whatever the result, it is published. Because the author wrote the analysis and the corpora, "confirmed" requires the blind set B, generated after the scorer was locked and scored once.
3Method
3.1Saturators, found in the compiled kernel
A Field kernel whose next state is x⁺ = A(θ)x + B(θ)w + (input), with w = φ(y) and y = C(θ)x, applied elementwise by scalar saturators φᵢ, is a Lur'e system with a time-varying linear part. The pass recognises a fixed library of shapes, each with a sector (the range of φ(y)/y) and a slope range proved on paper and checked numerically: tanh, the soft clipper y/(1 + |y|), and clamp (sector and slope [0, 1]); abs (sector and slope [−1, 1]); sin (sector [−0.217, 1], slope [−1, 1]). A self-test in a dev build walks the interpreter's compiled code, finds each shape on a value that depends on the state (Field has no tanh instruction, so tanh is matched as (e − 1)/(e + 1) with e = exp(2y)), and cuts it: its output becomes an injected input w and its argument a recorded output y. One sample step per unit vector of x and of w gives A, B, C and D. Report 2's linearity gate then checks that nothing nonlinear is left; a loop with a nonlinearity outside the library fails the gate and is reported out of scope, never certified.
3.2Kernels and ground truth
L holds 11 filters ported from published equations and written as Field kernels a second time from the same equations: the tanh and soft-clipped Moog ladders with a saturator per stage, Moog and diode ladders with saturation on the feedback only, a Korg35-style 2-pole, a saturating one-pole, two transposed-direct-form biquads with saturated states or output, a Rossum-style saturating 2-pole, a state-variable filter with a clipped integrator and a clipped allpass phaser loop. G holds 200 generated kernels: Report 2's linear generator (sizes 1 to 6, 1 to 3 knobs, coefficients from affine, sin, pow, exp and if terms) with 1 to 3 saturators on loop paths, on a state's whole update (a ladder stage) or where a state is read. B, the blind set, uses seed 20261124, sizes up to 8, up to 4 saturators and 30% of terms with if.
A kernel is "not safe" when the oracle finds a witness with zero input: a periodic switching of knob settings and a start whose trajectory grows past 10⁶ times its start within 2¹⁶ samples, or a periodic orbit of the switched nonlinear map, refined by Newton's method to a residual below 1e-10, with amplitude above 1e-3, that sticks and never decays. The oracle was checked first on the tanh Moog: at every cutoff ceiling its first witness lies within 0.001 of the filter's frozen self-oscillation limit, the known answer.
3.3Certificates
G1 (goes quiet). The sector certificate (T1) replaces each saturator by an unknown gain δᵢ in its sector and asks Report 2's certifier for one quadratic energy xᵀPx that falls for every knob setting and every δ in the box: A + B diag(δ) C is affine in each δᵢ, so the box's corners and Report 2's adaptive cell cover decide it [1]. Every corner must decrease strictly, δᵢ = 0 included, which is sound and conservative. On ladders a sector bound is provably not enough: for two tanh stages in cascade, no quadratic energy works even at a fixed cutoff. The Lur'e-Lyapunov certificate (T3) adds the saturators' integrals to the energy, V = xᵀPx + 2Σ qᵢ∫φᵢ, with sector and slope bounds as S-procedure terms, solved as an LMI with Clarabel through CVXPY [6, 7]. T3's corners are exact only for knob-affine kernels with tanh, soft or clamp shapes; elsewhere a T3 pass is recorded as grid-only and not counted. G1 is T1 or an exact T3.
G2 (forgets its past). Two runs under the same input and modulation differ by e⁺ = (A + B S C)e, with each Sᵢ inside φᵢ's slope range (mean-value theorem). The slope certificate (T4) is T1 on that box. For tanh, soft, clamp and abs the slope range equals the sector, so T4 is T1's problem and its verdict carries over; sin gets its own run. A two-start test checks every certified kernel: two random starts, the same random input up to +12 dBFS and the same random modulation (held for 1 to 512 samples), 32 768 samples, failure if the difference has not fallen below 1e-6.
Float32. A certificate is a float64 statement; the interpreter computes in Float32. An entry error ε in A, B, C moves each corner matrix by a bounded amount, so the P-norm moves by at most √κ(P)·n times that. With a safety factor of 10, the certificate holds in Float32 if that is below the cover's slack. ε is the kernel's measured Field error.
4Results
4.1The Field side
| set | kernels | compiled and dumped | match Python | largest error | over the register cap |
|---|---|---|---|---|---|
| L | 11 | 11 | 11 | 8.7e-08 | 0 |
| G | 200 | 127 | 127 | 2.9e-07 | 73 |
| B | 200 | 81 | 81 | 2.5e-07 | 119 |
Every kernel the interpreter compiles matches the Python reference to Float32 rounding (Table 1): all 11 literature filters, written separately from their equations, and every compiled generated kernel. Kernels over the interpreter's 128-register cap (73 of G, 119 of B; a dense update of size n costs about 3n² registers) are scored on the Python model. Three loops with a nonlinearity outside the library (exp(s) − 1, s/(1 + s²), and a clip with an offset) fail the linearity gate and leave scope; the same loop with clamp passes at 3.7e-8.
4.2Linearise and hope is unsound
On G, the oracle finds a witness for 73 kernels (25 grow, 48 stick). Today's frozen check calls 64 of 73 of them safe at the default knobs, and 14 of 73 even on a full grid. Report 2's certifier on the linearised kernel certifies 2 of them. Both fail the same way, at a fixed knob setting: the saturator sits on a path that stabilises the loop. Small signals see slope 1 and decay; large signals see slope near 0, the stabilising path is cut, and the loop that remains is unstable (Figure 1). That is integrator windup, found by the oracle without being looked for. A state 20 to 25 dB over full scale is enough, which a hot input into a resonant loop reaches. T1 rejects both kernels, because δ = 0 is one of its corners. On B, linearise-and-hope certifies 5 kernels with a witness.
4.3Soundness and coverage (H1, H3)
| set | kernels | with a witness | frozen check says safe, default knobs | … on a full grid | linearise-and-hope certifies | G1 certifies (H1) | no witness | G1 certifies (H3) |
|---|---|---|---|---|---|---|---|---|
| L, literature | 11 | 9 | — | 4 | 0 | 0 | 2 | 2 (100.0%) |
| G | 200 | 73 | 64 | 14 | 2 | 0 | 127 | 94 (74.0%) |
| B, blind | 200 | 87 | 75 | 25 | 5 | 0 | 113 | 64 (56.6%) |
H1 holds on all three sets: of 169 kernels with a witness, the pass certifies 0 (Table 2). H3 passes on G (94 of 127, 74.0%) and fails on the blind set (64 of 113, 56.6%), so the coverage claim is not confirmed. Every G and B certificate came from T1: T3's exact corners apply to almost no generated kernel, and where T3 passes on a grid it is not counted. On the literature set the pass certifies the one-pole and the clipped state-variable filter, the two filters without a witness; every other literature filter can stick inside its declared box, and none of those is certified. T1 takes 0.61 s per kernel at the median on G and 58.6 s at p95, in Python on an M2.
Why B falls short (exploratory, after B was scored). B allows bigger kernels (up to 8 states) and up to 4 saturators. Coverage drops with the saturator count: on B, 24 of 34 kernels with one saturator are certified, against 8 of 26 with 4. The unproved kernels split two ways. Some sit at the edge, where the cover does not close: the 18 such G kernels have a sampled radius of 0.94 to 0.98, and a tenfold cell budget closed none of them. The larger group on B is the sector certificate's blind spot. It must hold for every gain in each saturator's sector, chosen independently and held forever, so it also checks corners where one saturator passes signal at full gain while another is cut to zero. For 10 of 14 B kernels whose LMI is infeasible outright (3 of 4 on G), such a corner is unstable at a fixed knob setting, so no sector-only certificate can exist; yet the oracle finds no witness, because a real tanh cannot hold those gains apart. More saturators mean more such corners. Closing that gap needs a certificate that knows the saturator's shape, which is T3, and T3 does not yet count on generated kernels.
4.4The tanh Moog ladder (H2)
H2 fails as registered. Over the port's full declared cutoff range, up to g = 0.785 (fs/8), T3 certifies k ≤ 1.1406 for the whole box under any modulation (the figure's per-ceiling sweep gives 1.154 at that ceiling), short of Hélie's 5/3 (Figure 2). The cause is the port, not the method: the oracle finds the explicit filter sticking from k = 1.289 at fs/8, below 5/3, so no sound certificate can reach 5/3 over that range. For cutoff ceilings up to g = 0.5237, T3 certifies 5/3 automatically, from the kernel's matrices alone. The certificate it finds is Hélie-like: P comes out near zero and every qᵢ is positive, so V is essentially 2Σ qᵢ ln cosh(yᵢ), a sum of per-stage energies. At low cutoff a gap remains (k ≤ 2.652 certified against a first witness at 3.632); it is the same conservatism as a single quadratic energy on the linear ladder, so T3 loses little on top of Report 2.
4.5Forgetting the past (H4) and Float32
H4 passes on both sets: 94 of 94 certified G kernels and 58 of 64 certified B kernels also get a convergence certificate, and none fails the two-start test (0 and 0 failures). The high rate is partly structural. For tanh, soft, clamp and abs, slope and sector ranges are equal, so the convergence certificate is the same problem as the stability one; only kernels with a sin needed a separate run, because sin's slope range [−1, 1] is wider than its sector. On G all 24 such runs certified; on B, 10 of 16 did, and the other six are the B kernels without a convergence certificate. A convergence certificate means the filter's output depends on its input and modulation, not on where it started: no hysteresis, no hidden state from a click an hour ago.
| set | G1 certificates | matrices from Field | bound below the slack, Field | bound below the slack, all |
|---|---|---|---|---|
| G | 94 | 64 | 61 | 80 |
| B | 64 | 27 | 27 | 52 |
The Float32 bound holds on 80 of 94 G certificates and 52 of 64 B certificates (Table 3). The rest are "not proved in Float32", not unstable: their covers close with a slack of at most 1.2e-03, too little for the bound, a worst case over every entry scaled by the condition number of P. Report 2 measured the interpreter's P-norm directly at check points; this study used the bound only.
5Discussion
The step from linear to saturating loops costs little where the saturator acts like a gain in a known range, and it catches a failure the linear view hides. Sector certificates are enough for most small generated kernels, but the blind set shows where they run out: with more saturators, the sector box contains gain combinations no real saturator can hold, and some of them are unstable. They also cannot prove a ladder. Ladders need an energy function that knows the saturator's integral, which is what Hélie wrote by hand, and the pass finds it automatically for the Moog. The useful product finding is the windup case: a check that linearises saturators, which is what a careful author would try first, calls blowing-up kernels safe, and so does today's frozen check. The next step is the one both shortfalls point to: give T3, the shape-aware certificate, a cell cover so it counts on any kernel, then rescore a fresh blind set.
6Threats to validity
- What "certified" means. As in Report 2, T1 is exact at its LMI points and its float64 re-check, and the cover between points rests on a measured margin, not an interval bound. T3 on the Moog is exact per cutoff cell up to a numerical tolerance of 1e-9 that exists because the energy has exact null directions.
- T3 barely counts on generated kernels. Its exact corners need knob-affine terms and a knob-free C, which almost no generated kernel has. A cell cover for T3's form would let it count; it was not built.
- The oracle is one-sided. A kernel that can stick or grow in a way the oracle misses sits in H3's denominator. Its witnesses are knob-switching sequences with zero input; a failure that needs a particular input signal is not searched for.
- The blind-set analysis came after the score. The explanation for B's shortfall (sector corners, saturator count) was found after B was scored and is exploratory; no verdict was changed by it.
- H4's pass is mostly inherited. Where slope equals sector, G2 is G1's problem. The two-start test is the independent evidence.
- Who wrote the kernels. L was ported by the author; G and B come from one generator the author wrote. No real user kernels or shipped presets were scored.
- Matrices from Python. 73 G and 119 B kernels exceed Field's register cap and were scored on the Python model, with the set's largest measured error in their Float32 bound.
- Shapes outside the library. A saturator written any other way is out of scope; the gate rejects it, so this costs coverage, not soundness.
7Related work
Hélie's energy argument for the Moog ladder [2] is the hand proof H2 is scored against. Port-Hamiltonian schemes keep a circuit's passivity through discretisation [3]; they are built per circuit, and for the Moog the argument does not extend to time-varying resonance. Chowdhury's nonlinear biquads are stable by construction when slopes are at most 1 [4]. Time-varying linear filters, and the quadratic Lyapunov machinery this study extends, are covered in Report 2 and its references [8, 9, 1]. Lur'e systems with sector and slope-restricted nonlinearities are standard in control, as LMIs [5]. We found no compiler or audio tool that certifies user-written saturating loops; absence in a search is not proof of absence.
8Conclusion
A compiler can certify that a modulated Field kernel with saturators in its loop neither blows up nor sticks, from its code, soundly in every case we could test: no false certificate on 411 kernels. It does not yet certify enough of them; coverage held on the generated set and fell to 56.6% on the blind set, below the bar we set. The shortcut of linearising the saturators is unsound, and the failure is ordinary windup. For ladders, sector bounds are not enough, and a Lur'e-Lyapunov energy reaches the published hand proof where the filter itself allows it. The pass is a Python research tool; putting it in Infinite's compiler is a separate decision.
9Reproducibility
The study is in the Infinite repository under docs/research/saturating-loops/. scripts/kick-the-tires.sh reruns the locked code on a slice of G and B, re-dumps the literature filters from a dev build and runs the gate's negative test, comparing every verdict with the committed data. scripts/run_all.sh reruns every phase into data-rerun/ (several hours on an M2). ARTIFACT.md links each claim to its command, data file and tolerance. Raw data is never edited; every figure and table here is generated from it.
Appendix A. Rig bugs, and changes from the registered method
Method (owner, after phase 0). Sector-only certificates provably fail on two-stage tanh cascades, so the Lur'e-Lyapunov certificate (T3) became the main G1 method, with T1 kept as its baseline. On G and B every certificate came from T1.
H2 scoring range (owner, after phase 0, numbers seen). H2 is scored over the Moog port's full declared cutoff range, up to fs/8. The 0.524 crossover is reported as a finding and not used to pass H2.
Oracle, phase 0. The first stick search settled for 8192 samples from 0.01 and tried five repeat counts; it missed witnesses by up to 0.32 in k. Settling for 2¹⁷ samples from 0.3, with repeat counts from the orbit's rational rotation, fixed it before any score.
Cell budget. Report 2's cover ran with 20 000 cells, not 200 000, to fit the M2. The 18 G covers that did not close were rerun at 200 000; none closed.
T1 corners. Every corner, δ = 0 included, is held to strict decrease, which is more conservative than the non-strict rule in the registered method.
10References
- N. Soni (2026). Proven-stable modulation: automatic stability certificates for user-written filters. Infinite Research, Technical Report 2. infinitedevices.org/research/stable-modulation.html
- T. Hélie (2011). Lyapunov stability analysis of the Moog ladder filter and dissipativity aspects in numerical solutions. Proc. 14th Int. Conf. on Digital Audio Effects (DAFx-11), Paris, pp. 45–52. dafx.de/paper-archive/details/tCizMZrFjtFalx31fMNO4w
- M. Danish, S. Bilbao and M. Ducceschi (2021). Applications of port Hamiltonian methods to non-iterative stable simulations of the Korg35 and Moog 4-pole VCF. Proc. 24th Int. Conf. on Digital Audio Effects (DAFx20in21), Vienna, pp. 33–40. dafx.de/paper-archive/details/ojfUk0jbHziKwhyfdoWRYQ
- J. Chowdhury (2020). Stable structures for nonlinear biquad filters. Proc. 23rd Int. Conf. on Digital Audio Effects (DAFx2020), Vienna. dafx.de/paper-archive/details/9raXmWuilIJyqjkS4A3d8w
- S. Boyd, L. El Ghaoui, E. Feron and V. Balakrishnan (1994). Linear Matrix Inequalities in System and Control Theory. SIAM Studies in Applied Mathematics, vol. 15. web.stanford.edu/~boyd/lmibook/
- S. Diamond and S. Boyd (2016). CVXPY: a Python-embedded modeling language for convex optimization. Journal of Machine Learning Research, vol. 17, no. 83, pp. 1–5 (software version 1.9.3 used here). www.cvxpy.org
- P. J. Goulart and Y. Chen. Clarabel: an interior-point solver for conic programs with quadratic objectives. Software. clarabel.org
- J. Laroche (2007). On the stability of time-varying recursive filters. Journal of the Audio Engineering Society, vol. 55, no. 6, pp. 460–471. www.aes.org/e-lib/browse.cfm?elib=14168
- R. McClellan (2026). Stability analysis of time-varying virtual analog filters. Proc. 29th Int. Conf. on Digital Audio Effects (DAFx26), Cambridge, MA. www.dafx.de/paper-archive/2026/papers/DAFx26_paper_28.pdf
How to cite
@techreport{soni2026saturating,
author = {Naman Soni},
title = {Saturating loops: stability certificates for modulated filters with saturation in the feedback},
institution = {Infinite},
type = {Technical Report 3},
year = {2026},
note = {Version 1.0, pre-registered study, data and code at commit 3e5c5901},
url = {https://infinitedevices.org/research/saturating-loops.html}
}
Provenance
- commit
3e5c5901reproduces every number in this report- machine
- Apple M2, 8 cores, 8 GB RAM, macOS 27.2.1 arm64
- toolchain
- Apple clang version 21.0.0 (clang-2100.4.1.1), for the dev build that dumps A, B, C, D
- raw data
- phase0-L.json · phase0-b3.json · phase0-moog.json · phase0-t3.json · phase1-B.json · phase1-G-budget200k.json · phase1-G.json · phase2-compare.json · phase3-B.json · phase3-G.json · phase3-G.log · phase4-B-compare.json · phase4-B.log · phase5-corners.json · phase5-windup.json · provenance.json
- source
- docs/research/saturating-loops (README, ARTIFACT.md, scripts)