Analysis of Long Range Dependency Understanding in State Space Models
Srividya Ravikumar, Abhinav Anand, Shweta Verma, Mira Mezini
TL;DR
This work addresses the interpretability gap in structured state-space models by examining how architecture shapes long-range dependency modeling in diagonalized S4D kernels on a real-world vulnerability-detection task. It introduce a kernel-interpretability framework that analyzes S4D kernels in both time and frequency domains across six architectures using the ReVeal dataset. The findings show that standalone S4D learns mainly short-range dependencies, while incorporating a State Memory Replay (SMR) block yields long-range, low-pass kernels and the best performance (F1 = $88.03$), highlighting the value of hybrid CNN–SSM designs. The study provides actionable insights for designing more effective SSM-based models for code analysis and similar long-sequence tasks.
Abstract
Although state-space models (SSMs) have demonstrated strong performance on long-sequence benchmarks, most research has emphasized predictive accuracy rather than interpretability. In this work, we present the first systematic kernel interpretability study of the diagonalized state-space model (S4D) trained on a real-world task (vulnerability detection in source code). Through time and frequency domain analysis of the S4D kernel, we show that the long-range modeling capability of S4D varies significantly under different model architectures, affecting model performance. For instance, we show that the depending on the architecture, S4D kernel can behave as low-pass, band-pass or high-pass filter. The insights from our analysis can guide future work in designing better S4D-based models.
