Contextual Dependency Vision Transformer for spectrogram-based multivariate time series analysis

Document Type


Publication Title



Multivariate time series (MTS) analysis plays an important role in various real-world applications. Existing Transformer-based methods address this problem based on hierarchical semantic representations across different scales. However, most of them ignore exploiting the helpful multiple temporal and variable relationships within the hierarchical semantic representations. To this end, this paper proposes a novel method named Contextual Dependency Vision Transformer (CD-ViT), which generates multi-grained semantic information based on spectrogram and explores mutual dependencies between multi-variable and multi-temporal representations. CD-ViT contains two key modules, i.e., the Hierarchical Variable-dependency Transformer (HVT) module and the Bidirectional Temporal-dependency Interaction (BTI) module. Specifically, the HVT module progressively establishes mutual dependencies between multiple variables, from fine to coarse scales, with shared parameters. The BTI module employs two bidirectional flows to fuse multi-temporal tokens through zoom-in and zoom-out operations. Comprehensive experiments on widely used datasets, including UEA, Olszewski, UCI, MIMIC III, and ETT, demonstrate that the proposed approach achieves significant improvement on three popular tasks, i.e., classification, regression, and forecasting. The code is available at



Publication Date



Hierarchical vision-style transformer, Multi-temporal dependency, Multi-variables dependency, Multivariate times series analysis, Spectrogram-based contextual interaction, Harmonic analysis, Multivariant analysis, Semantics, Spectrographs, Time series analysis


IR Deposit conditions:

OA version (pathway b) Accepted version

24 month embargo

License: CC BY-NC-ND

Must link to publisher version with DOI