arXiv:2610.24622eess.SPOct 2026

Manuscript Offprint

arXiv:2610.24622

Fluxion: A Differentiable DSP Runtime from Training GPU to Real-Time Edge

Matteo Spanio, Antonio Rodà

Matteo Spanio

Centro di Sonologia Computazionale (CSC)

Dept. of Information Engineering, University of Padova

Padova, Italy

spanio@dei.unipd.it

Antonio Rodà

Centro di Sonologia Computazionale (CSC)

Dept. of Information Engineering, University of Padova

Padova, Italy

roda@dei.unipd.it

Figure

Fig. 1. Architecture overview. A graph algebra over Fluxion's own numerical code is lowered to a training engine and a real-time engine; the autodiff graph, GPU code generation, and array interchange come from existing libraries. A trained graph is checked for stability and frozen into a versioned artifact, which a Raspberry Pi-class device checks again before crossfading it in.

Abstract—Native real-time audio engines meet audio deadlines but are hard to connect to machine-learning workflows, while tensor frameworks integrate with machine learning but process audio as offline batches without timing guarantees; runtime layers built on them inherit the host's scheduling and deployment footprint. This paper presents Fluxion, a Rust audio DSP runtime for cascaded second-order sections, FIR filters, and delay-line effects. Fluxion implements the parts that are specific to DSP: closed-form filter design, forward kernels, analytic adjoints for the recursion, and stability checks. It relies on existing libraries for the autodiff graph, GPU code generation (tested here on CUDA), and array interchange. One graph algebra is lowered to a differentiable training engine and to an allocation-free real-time engine; between them, a trained graph is checked for stability and frozen into a versioned artifact that an edge device checks again before playback. We compare Fluxion with six framework-hosted and native baselines under one float32 protocol. Among the systems that compute the exact recursion, Fluxion has the highest GPU throughput when data stays on the device and the highest throughput on most CPU workloads, while its CPU training step is slower than those of torchaudio and GRAFX. Its test suite checks the audio thread for allocations with an instrumented allocator, and we report measured latency tails. Fluxion is open source at https://github.com/matteospanio/fluxion.

Index Terms—audio DSP, DDSP, GPU computing, runtime systems, real-time audio, edge computing, Internet of Sounds

I. INTRODUCTION

Native real-time engines such as Faust [1], SuperCollider [2], and JUCE [3] run audio with low latency, but they are hard to connect to the machine-learning tools now common in audio research. Tensor frameworks such as torchaudio [4], [5], nnAudio [6], and GRAFX [7] work well with machine learning, but they treat audio as offline batches of tensors, with no streaming state and no latency bound. Trained tensor graphs can be deployed on edge devices through TFLite or ONNX Runtime, but a sample-recurrent filter reaches those runtimes only by unrolling.

TorchFX [8], our earlier system, and differentiable-DSP libraries such as FLAMO [9] and ADAC [10] build a runtime layer on top of a tensor framework. TorchFX, for example, records composition as a deferred graph, fuses second-order-section (SOS) cascades into single dispatches, and reuses the host's autograd. These layers remain limited by their host: the interpreter schedules the real-time path, so the latency tail can be measured but not bounded, and the Python and PyTorch stack weighs gigabytes, which makes edge deployment impractical.

We argue for a different division of work. A DSP runtime should own the parts that are specific to DSP: closed-form coefficient design, forward kernels, analytic adjoints for recursive filters, and the stability checks that decide whether a trained filter can be deployed. It should rent what general-purpose ML infrastructure already provides: the autodiff graph (Burn [11], PyTorch, or JAX), GPU code generation (CubeCL [12]), and zero-copy array interchange (DLPack [13]). Keeping the adjoints in the runtime lets several autodiff frameworks use them, and relying on existing libraries for the rest keeps the runtime small.

We present Fluxion, a Rust audio DSP runtime built this way (Fig. 1). A functional graph algebra (series |, parallel +, feedback ~, and named nodes) is lowered to two engines: a training engine that composes analytic vector-Jacobian products (VJPs), and a lock-free real-time engine that does not allocate on the audio thread. Feedback is not yet lowered to either engine, so our results cover cascades, FIRs, and delay-line effects. Filters are designed in double precision; the single-precision coefficients that run are checked for stability and frozen into a versioned artifact, which the real-time engine plays.

References (32)