Abstract
Time series data often contains highly coupled patterns such as trends, seasonality, and transient bursts, which are difficult to disentangle using traditional 1D modeling approaches. We present SpecAR-Net, a novel architecture that transforms 1D time series into 2D spectrograms via Short-Time Fourier Transform (STFT) to analyze them in a unified time-frequency space. SpecAR-Net utilizes multi-scale complex-valued convolutions to simultaneously process amplitude and phase information, alongside a temporal order-preserving (TOP) constraint to maintain global sequential dependencies. Our evaluation across five major time-series tasks—classification, anomaly detection, imputation, and forecasting—demonstrates that SpecAR-Net consistently achieves state-of-the-art performance with high parameter efficiency.
Introduction
Time series analysis is fundamental to various domains, yet modeling these sequences remains challenging due to the high degree of coupling between long-term trends, seasonal cycles, and high-frequency variations. Traditional architectures like RNNs, CNNs, and Transformers face specific limitations: RNNs struggle with gradient issues, CNNs have restricted receptive fields, and Transformers can lose local temporal dependencies during point-wise attention. While recent frequency-domain models have shown promise, they often fail to capture the joint evolution of time and frequency. SpecAR-Net addresses this by treating time series as 2D spectrograms, enabling the extraction of features that exist simultaneously in both domains.
Methodology
The core of SpecAR-Net is the SpecAR-Block, which processes data through three integrated stages:
- Time-Frequency Transformation (TFT): Using STFT, the model converts 1D inputs into 2D complex-valued spectrograms. This expansion into a higher-dimensional space makes periodic and transient patterns easier to isolate.
- Multi-Scale Complex Convolutions: SpecAR-Net employs complex-valued convolutions to process both signal amplitude and phase. To maintain efficiency, it uses parallel branches with varying dilation rates rather than large kernels, capturing multi-resolution patterns without a significant parameter overhead.
- Temporal Order Preserving (TOP) Constraint: To prevent the loss of global temporal structure during frequency analysis, a TOP loss regularizer is introduced, ensuring the learned representations respect the sequential "arrow of time."
Experimental Evaluation
SpecAR-Net was rigorously tested against established state-of-the-art (SoTA) models, including TimesNet, FEDformer, and DLinear, across a wide range of benchmarks including the UEA archive, industrial anomaly detection datasets, and the M4 forecasting dataset.
Key Results
- Classification: SpecAR-Net achieved a leading average accuracy of 74.7%, outperforming TimesNet (73.6%) and Flowformer (73.0%).
- Forecasting: In long-term forecasting (ILI dataset), the model reduced Mean Squared Error (MSE) to 2.051, a notable improvement over previous benchmarks.
- Anomaly Detection: The model reached a top F1-score of 86.45% on industrial sensor data.
Discussion and Conclusion
A key insight of this work is the importance of phase information, preserved here through complex convolutions, which is critical for signal alignment. By treating time series as 2D "images," SpecAR-Net efficiently extracts joint time-frequency features. While highly effective, the model's performance is currently sensitive to the STFT window length, a hyperparameter that requires tuning for specific tasks. Future research may explore adaptive windowing or Wavelet-based alternatives to further enhance multi-resolution flexibility. Overall, SpecAR-Net provides a robust and parameter-efficient framework for complex time-series analysis.
Summary updated