Skip to content

MediaBrain-SJTU/CoFormer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(ICDM2023) Compatible Transformer for Irregularly Sampled Multivariate Time Series

Paper

image

Abstract

Abstract—To analyze multivariate time series, most previous methods assume regular subsampling of time series, where the interval between adjacent measurements and the number of samples remain unchanged. Practically, data collection systems could produce irregularly sampled time series due to sensor failures and interventions. However, existing methods designed for regularly sampled multivariate time series cannot directly handle irregularity owing to misalignment along both temporal and variate dimensions. To fill this gap, we propose Compatible Transformer (CoFormer), a transformer-based encoder to achieve comprehensive temporal-interaction feature learning for each individual sample in irregular multivariate time series. In CoFormer, we view each sample as a unique variatetime point and leverage intra-variate/inter-variate attentions to learn sample-wise temporal/interaction features based on intravariate/inter-variate neighbors. With CoFormer as the core, we can analyze irregularly sampled multivariate time series for many downstream tasks, including classification and prediction. We conduct extensive experiments on 3 real-world datasets and validate that the proposed CoFormer significantly and consistently outperforms existing methods.

Environment

Python >= 3.9, and ensure your python, cuda, torch and dgl are compatible versions.

Usage

You can use the codes under /preprocess folder to preprocess the data. Initial raw data and split index can be downloaded from Raindrop. You should prepare the PTdict_list.npy or PTdict_list6.npy for preprocess, and the processed data is saved at a specified path, which is also the data root of the dataset. You can also download from preprocessed to get the preprocessed data and split index.

Run train_medical.py can both train and test CoFormer. --split parameter specifies the train/test split index, --data_root parameter specifies the data root, where the .npy files are saved, --dataset parameter specifies the dataset type, including p19, p12 and pam.

Cite

If you find CoFormer is useful for your research, please consider citing this paper:

@article{wei2023compatible,
  title={Compatible Transformer for Irregularly Sampled Multivariate Time Series},
  author={Wei, Yuxi and Peng, Juntong and He, Tong and Xu, Chenxin and Zhang, Jian and Pan, Shirui and Chen, Siheng},
  journal={arXiv preprint arXiv:2310.11022},
  year={2023}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages