Introduction
State-Space Models (SSMs) like S4 have revolutionized how deep learning handles long sequences by utilizing the "HiPPO" initialization, which allows models to retain information across thousands of time steps. However, S4's original "diagonal-plus-low-rank" (DPLR) structure is mathematically complex and computationally heavy.
To simplify implementation and improve efficiency, researchers developed purely diagonal versions like S4D and S5. However, the HiPPO matrix is "non-normal" and exponentially ill-conditioned, making its exact diagonalization an ill-posed problem where tiny numerical errors lead to massive instabilities. S4D and S5 sidestep this by simply discarding the low-rank part of the HiPPO matrix. This paper argues that this truncation leads to weak convergence: while the models work well on smooth data, they fail catastrophically when faced with high-frequency noise or non-smooth inputs.
Methodology: Perturb-then-Diagonalize (PTD)
To resolve the ill-posed diagonalization problem, the authors propose the Perturb-then-Diagonalize (PTD) framework. Instead of trying to diagonalize the ill-conditioned HiPPO matrix $A_H$ directly or discarding parts of it, they solve for a nearby matrix that is mathematically well-behaved.
The PTD process involves:
- Controlled Perturbation: Finding a small perturbation matrix $E$ such that the new matrix $\tilde{A}_H = A_H + E$ is well-conditioned for diagonalization.
- Optimization: Solving a soft-constrained optimization problem to find $E$. This balances the trade-off between "closeness" to the original HiPPO matrix (minimizing $\|E\|$) and the numerical stability of the resulting eigenvectors.
- Approximate Diagonalization: Initializing diagonal SSMs that are "strongly" connected to the theoretical benefits of the HiPPO framework without the associated numerical nightmares.
Key Insights: The "Spike" Problem and Convergence
A critical finding of the paper is the "Spike" problem. The authors demonstrate that discarding the low-rank part of the HiPPO matrix (as seen in S4D) causes the model's transfer function to develop massive, unstable spikes at high frequencies. This makes the model hypersensitive to specific types of noise.
The authors prove that while S4D converges to S4 for smooth inputs, it diverges for non-smooth ones. PTD, by contrast, provides a much more uniform approximation across all frequencies. By intentionally perturbing the matrix to improve the condition number, PTD acts as a form of regularization that prevents the model from overfitting to the specific numerical artifacts of the HiPPO initialization.
Results and Robustness
The models were evaluated on the Long-Range Arena (LRA) benchmark (consisting of ListOps, Text, Retrieval, Image, Pathfinder, and Path-X), Sequential CIFAR-10 for robustness testing, and Speech Commands.
The S5-PTD model achieved state-of-the-art performance, with an average accuracy of 87.61% on the LRA benchmark, outperforming both the original S5 and S4D models.
Beyond raw accuracy, the PTD models demonstrated superior robustness. In tests with Fourier-mode noise, S4D's accuracy dropped significantly (sometimes below 30%) when noise hit its "spike" frequencies. In contrast, S4-PTD remained stable, maintaining high accuracy across the entire frequency spectrum. Because the final model is purely diagonal, it successfully retains the speed and parallelization benefits of S4D/S5 while gaining the robustness of the more complex S4.
Limitations and Future Work
Finding the optimal perturbation $E$ requires solving an optimization problem via gradient descent during the initialization phase. While this only happens once before training, it adds a small amount of pre-computation time. Additionally, the hyperparameter $\gamma$, which controls the perturbation-stability trade-off, requires careful tuning. Future work may explore applying the PTD methodology to other non-normal architectures beyond SSMs, such as specific types of Recurrent Neural Networks (RNNs).
Summary updated