tsai XCM
XCM classifies multivariate time series with parallel per-variable and temporal convolutions built for Grad-CAM.
Time series · 21 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Time series
- Parameters
- 328.6K
- Operations
- 21
- Framework
- PyTorch
- Recurrent
- No
- Published
- Mathematics (arXiv 2020)
- Cited by
- 144 (as of 18 October 2026)
- Authors
- Kevin Fauvel, Tao Lin, Véronique Masson and others
- Source
- GitHub: timeseriesAI/tsai
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m10715
- Graph hash
- b953a744ab12b797a62443ff344a8d2bdfb3cc4c981385ac39eb6b3846ad70fa
- Skeleton hash
- 84028b8980fb8d8126a1a45e56e80238753ce054d72ca0278e360853d24c5412
- Architecture hash
- ec644e6f5aeee30d958d0ad19b45ccf97742dd649b605d27a76bc4688a0c1815
- Diagram SHA-256
- a195816b16d21a0896a2b2a7bec51966a183fe2641c0c79f8b10863b8a367328
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
XCM is an eXplainable Convolutional neural network for multivariate time series (MTS) classification. It is a compact convolutional network that extracts information relative to the observed variables and time directly from the input data. The motivation is that the current state-of-the-art MTS classifier is a heavyweight deep learning approach that outperforms the second-best MTS classifier only on large datasets and cannot provide faithful explanations.
XCM extracts information relative to the observed variables with 2D convolution filters whose kernel size is Window Size × 1, where Window Size is a hyperparameter specifying the time window size. In parallel, 1D convolution filters slide over the time axis only and capture the interaction between the different time series. The upper 2D part is one convolutional block converted to one feature map with a 1 × 1 convolution filter to reduce the number of parameters. The convolutional block contains a convolution layer followed by a batch normalization layer and a ReLU activation layer. The lower part is the same as the upper part, except that the 2D convolution filters are replaced by 1D. The output feature maps from the two parts are concatenated into a feature map of dimensions T × (D + 1). A 1D global average pooling is then applied and classification is performed with a softmax layer. Global average pooling followed by softmax reduces the number of parameters and improves the generalization ability of the network compared to fully connected layers. The 2D and 1D convolution filters are fully padded, so the output feature maps can be analyzed with Grad-CAM without altering the precision of the explanations through upsampling. Grad-CAM can output two types of attribution maps from the architecture: one related to observed variables and another related to time.
XCM outperforms the state-of-the-art MTS classifiers on both the large and small public UEA datasets. It also outperforms both the sequential variant XCM-Seq and MTEX-CNN on average on the UEA datasets (rank: 2.3, XCM-Seq: 5.0, MTEX-CNN: 7.2). The reference implementation uses 128 feature maps in both the 2D and 1D convolution layers. Window Size is expressed as a percentage of the total size of the MTS, from 20% to 100%.
Key idea. XCM's key contribution is extracting features relative to the observed variables and timestamps in parallel and directly from the input data, improving on the sequential design of MTEX-CNN. A compact architecture enhances generalization ability, and the design allows precise identification of the observed variables and timestamps of the input data that are important for predictions.
- xcm
- explainable convolutional neural network
- multivariate time series classification
- mts classification
- grad-cam
- attribution maps
- faithful explanations
- 2d convolution
- 1d convolution
- global average pooling
- window size
- uea datasets
- tsai
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{fauvel2021xcmexplainableconvolutionalneural,
title={XCM: An Explainable Convolutional Neural Network for Multivariate Time Series Classification},
author={Kevin Fauvel and Tao Lin and Véronique Masson and Élisa Fromont and Alexandre Termier},
year={2021},
eprint={2009.04796},
archivePrefix={arXiv},
primaryClass={cs.LG},
doi={https://doi.org/10.3390/math9233137},
url={https://arxiv.org/abs/2009.04796},
}