[Paper Review] Time Series as Images: Vision Transformer for Irregularly Sampled Time Series
ViTST converts irregularly sampled multivariate time series into line-graph images and finetunes a pre-trained vision transformer for classification, achieving state-of-the-art results and robustness to missing data.
Irregularly sampled time series are increasingly prevalent, particularly in medical domains. While various specialized methods have been developed to handle these irregularities, effectively modeling their complex dynamics and pronounced sparsity remains a challenge. This paper introduces a novel perspective by converting irregularly sampled time series into line graph images, then utilizing powerful pre-trained vision transformers for time series classification in the same way as image classification. This method not only largely simplifies specialized algorithm designs but also presents the potential to serve as a universal framework for time series modeling. Remarkably, despite its simplicity, our approach outperforms state-of-the-art specialized algorithms on several popular healthcare and human activity datasets. Especially in the rigorous leave-sensors-out setting where a portion of variables is omitted during testing, our method exhibits strong robustness against varying degrees of missing observations, achieving an impressive improvement of 42.8% in absolute F1 score points over leading specialized baselines even with half the variables masked. Code and data are available at https://github.com/Leezekun/ViTST
Motivation & Objective
- Motivate a simple, universal approach to irregularly sampled time series by visualizing data as images.
- Leverage pre-trained vision transformers to model temporal dynamics and cross-variable relationships in line-graph images.
- Demonstrate state-of-the-art performance and robustness on healthcare and human activity datasets.
- Show applicability to both irregular and regular time series, highlighting versatility as a general framework.
Proposed method
- Convert multivariate irregular time series into a single RGB image by plotting each variable's line graph in a grid layout.
- Use line graphs with consistent scales per variable and color-coding to distinguish variables.
- Finetune a pre-trained vision transformer (Swin Transformer) on the resulting images for classification.
- Optionally incorporate static demographic/text features by encoding them with a RoBERTa encoder and concatenating with image embeddings.
- Evaluate under leave-sensors-out settings to test robustness to missing variables.
![Figure 1: An illustration of our approach ViTST. The example is from a healthcare dataset P12 [ 12 ] , which provides the irregularly sampled observations of 36 variables for patients (we only show 4 variables here for simplicity). Each column in the table is an observation of a variable, with the o](https://ar5iv.labs.arxiv.org/html/2303.12799/assets/x1.png)
Experimental results
Research questions
- RQ1Can vision transformers trained on natural images effectively classify irregularly sampled time series when inputs are visualized as line-graph images?
- RQ2Does the ViTST framework provide robustness to missing observations and maintain performance across healthcare and activity datasets?
- RQ3How do grid layouts, image resolutions, and plotting details affect performance?
- RQ4Is the method competitive when applied to regular time series data and when static features are included?
Key findings
- ViTST achieves 89.2% AUROC and 53.1% AUPRC on P19, and 85.1% AUROC and 51.1% AUPRC on P12, outperforming state-of-the-art irregular-time-series methods.
- On the PAM dataset, ViTST reaches 95.8% accuracy, 96.2% precision, 96.1% recall, and 96.5% F1 score.
- ViTST outperforms leading baselines by 2.2–7.3 percentage points in AUROC/accuracy metrics across datasets.
- Under leave-sensors-out conditions, ViTST maintains strong performance and surpasses baselines by up to 42.8% in F1 score.
- Pre-trained vision transformers (ViT/Swin) provide substantial gains over training-from-scratch, indicating effective transfer from natural images to line-graph time series images.
- Ablation shows robustness to plotting variations; color-coding and per-variable line graphs are important for performance.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.