Abstract
This paper presents an examination of State Space Models (SSM) and Koopman-based deep learning methods for modelling the dynamics of both linear and non-linear stiff strings. Through experiments with datasets generated under different initial conditions and sample rates, we assess the capacity of these models to accurately model the complex behaviours observed in string dynamics. Our findings indicate that our proposed Koopman-based model performs as well as or better than other existing approaches in non-linear cases for long-sequence modelling. We inform the design of these architectures with the structure of the problems at hand. Although challenges remain in extending model predictions beyond the training horizon (i.e., extrapolation), the focus of our investigation lies in the models' ability to generalise across different initial conditions within the training time interval. This research contributes insights into the physical modelling of dynamical systems (in particular those addressing musical acoustics) by offering a comparative overview of these and previous methods and introducing innovative strategies for model improvement. Our results highlight the efficacy of these models in simulating non-linear dynamics and emphasise their wide-ranging applicability in accurately modelling dynamical systems over extended sequences.
Introduction
Simulating the physical dynamics of vibrating strings is a cornerstone of musical acoustics and physical modeling. Traditionally, this involves solving complex Partial Differential Equations (PDEs) using numerical methods like finite differences. While highly accurate, these methods are computationally intensive, particularly for non-linear systems where string tension varies with displacement.
Recent research has explored deep learning alternatives, such as Fourier Neural Operators (FNOs), to learn these physics directly. However, these models often struggle with long sequences (e.g., thousands of audio samples), facing computational bottlenecks and training instabilities like vanishing or exploding gradients. This paper investigates State Space Models (SSMs) and Koopman-based architectures as more efficient, stable alternatives for modeling long-sequence string dynamics.
Methodology
The core of our investigation compares several neural architectures designed for temporal sequences, focusing on linear recurrence to handle long sequences efficiently.
Koopman-based Models
Koopman theory suggests that non-linear dynamics can be represented linearly in a higher-dimensional latent space. We propose a modified Koopman autoencoder ($\text{Koopman}_{\text{var}}$) that utilizes a Multi-Layer Perceptron (MLP) to encode the string state into this latent space. To account for non-linearities such as tension modulation, we introduce a time-varying component where a secondary MLP dynamically adjusts the system's eigenvalues at each time step based on the current state.
State Space Models and Parallelization
We also evaluate deep SSMs, specifically the Linear Recurrent Unit (LRU) and S5. These models, along with our Koopman approach, benefit from linear temporal evolution. This allows the use of "parallel scans," a technique that enables highly efficient recursive computation across the sequence. This bypasses the sequential bottlenecks of standard Recurrent Neural Networks (RNNs) and facilitates training on sequences of 4000 steps or more.
Experimental Setup
Models were evaluated on simulated datasets of a 1D nylon guitar string (tuned to B3).
- Datasets: Simulations included both linear stiff strings and non-linear tension-modulated strings.
- Sequence Length: 4000 time steps at sample rates of 4kHz and 16kHz.
- Initial Conditions: 1,000 distinct conditions using noise-like initial displacements to test generalization.
Results and Analysis
Our results demonstrate that linear recurrence is essential for stable long-sequence modeling. The proposed $\text{Koopman}_{\text{var}}$ model significantly outperformed other neural architectures on the non-linear dataset (16kHz), achieving a Relative Mean Absolute Error (RMAE) of 0.0720. In comparison, the LRU and S5 models achieved RMAEs of 0.1357 and 0.1721, respectively.
Notably, the $\text{Koopman}_{\text{var}}$ model is highly parameter-efficient, requiring only ~134,000 parameters, whereas SSMs and FNOs required between 300,000 and 640,000. Previous state-of-the-art FNO variants (FGRU, FRNN) failed to train on the full 4000-step sequences due to memory constraints, highlighting the superiority of the proposed linear-recurrent approaches for high-resolution audio tasks.
Discussion and Future Work
While the models generalize well to new initial conditions within the training horizon, temporal extrapolation remains a challenge. Beyond the 4000-step mark, neural predictions tend to diverge or decay prematurely. Future work will explore including initial velocity data to provide necessary phase information, conditioning models on physical parameters for multi-string simulation, and extending these architectures to 2D and 3D systems like drum membranes and room acoustics.
Summary updated