Introduction
State-Space Models (SSMs) like S4 and Mamba have emerged as powerful tools for sequence modeling, particularly for capturing long-range dependencies. These models typically rely on the HiPPO framework, which projects input history onto a set of basis functions—usually global, smooth polynomials like Legendre or Fourier series. While effective for periodic or smooth data, these bases struggle with "real-world" signals containing non-stationary features, sharp transients, or localized spikes. In such cases, standard SSMs often produce "ringing" artifacts (the Gibbs phenomenon) or smear critical details across time.
The WaLRUS Framework
To address these limitations, we introduce WaLRUS (Wavelets for Long-range Representation Using SSMs), built upon the SaFARi (State-Space Models for Frame-Agnostic Representation) framework. Unlike HiPPO, which requires specific orthogonal bases, SaFARi allows the construction of SSMs from arbitrary "frames," including redundant and non-orthogonal ones.
WaLRUS utilizes Daubechies wavelets (specifically D22) as its underlying frame. Wavelets are mathematically optimized for local analysis due to their compact support, allowing them to capture both time and frequency information simultaneously.
The architecture supports two primary variants:
- Scaled-WaLRUS (WaveS): Compresses the entire input history into a fixed-length representation.
- Translated-WaLRUS (WaveT): Employs a sliding window to emphasize recent history, effectively acting as a forgetting mechanism.
A key technical contribution is the demonstration that even with redundant wavelet frames, the resulting state matrix $A$ remains stably diagonalizable. This ensures that WaLRUS maintains the $O(L)$ computational efficiency and parallelizability characteristic of modern SSMs.
Experimental Evaluation
WaLRUS was evaluated against traditional Legendre and Fourier-based SSMs across several challenging benchmarks, including the M4 Forecasting competition, Speech Commands audio data, and a synthetic Wavelet Benchmark Collection featuring mathematical singularities like spikes and blocks.
Key Results
WaLRUS demonstrated significant improvements in reconstruction accuracy and feature preservation. In the M4 and Speech datasets, the Scaled-WaLRUS variant achieved the lowest Mean Squared Error (MSE) in over 95% of test cases.
As shown in the comparison above, WaLRUS excels at resolving adjacent spikes that appear as a single blurred feature in Legendre-based models. Furthermore, in specialized peak detection tasks, WaLRUS maintained a near-zero miss rate (0% to 0.27%), whereas Legendre and Fourier models missed up to 6.4% and 29.7% of peaks, respectively. By avoiding the oscillations that occur when Fourier or polynomial methods approximate sharp edges, WaLRUS provides a much more faithful representation of non-stationary data.
Conclusion
By replacing global polynomials with localized wavelets, WaLRUS provides a multi-resolution upgrade to State-Space Models. It effectively eliminates ringing artifacts and improves the representation of sharp transients without sacrificing computational efficiency. This work suggests that integrating multi-scale, localized frames is a promising direction for the next generation of sequence models.
Summary updated