The past decade has witnessed a rising proliferation in Multivariate Time Series (MTS) data, along with a plethora of applications in domains as diverse as IoT data analysis, medical informatics, and network security. Given the huge amount of MTS data, it is crucial to learn their representations effectively so as to facilitate underlying applications such as clustering and anomaly detection. For this purpose, different types of methods have been developed to represent time series data.
Traditional time series representation techniques, e.g., Discrete Fourier Transform (DCT)(Faloutsos et al., 1994), Discrete Wavelet Transform (DWT)(Chan and Fu, 1999), Piecewise Aggregate Approximation (PAA)(Keogh et al., 2001)
, etc., represent raw time series data based on specific domain knowledge/data properties and hence could be suboptimal for subsequent tasks given the fact that their objectives and feature extraction are decoupled.
More recent time series representation approaches, e.g., Deep Temporal Clustering Representation (DTCR) (Ma et al., 2019)
, Self-Organizing Map based Variational Auto Encoder (SOM-VAE)(Fortuin et al., 2018), etc., optimize the representation and the underlying task such as clustering in an end-to-end manner. These methods usually assume that time series under investigation are uniformly sampled with a fixed interval. This assumption, however, does not always hold in many applications. For example, within a multimodal IoT system, the sampling rates could vary for different types of sensors.
Unsupervised representation learning for irregularly sampled multivariate time series is a challenging task and there are several major hurdles preventing us from building effective models: i) the design of neural network architecture often employs a trial and error procedure which is time consuming and could cost a substantial amount of labor effort; ii) the irregularity in the sampling rates constitutes a major challenge against effective learning of time series representations and render most existing methods not directly applicable; iii) traditional unsupervised time series representation learning approach does not consider contrastive loss functions and consequently only can achieve suboptimal performance.
To tackle the aforementioned challenges, we propose an autonomous unsupervised representation learning approach for multivariate time series to represent irregularly sampled multivariate time series. TimeAutoML differs from traditional time series representation approaches in three aspects. First, the representation learning pipeline configuration and hyperparameter optimization are carried out automatically. Second, a negative sample generation approach is proposed to generate negative samples for contrastive learning. Finally, an auxiliary classification task is developed to distinguish normal time series from negative samples. In this way, the representation capability of TimeAutoML is greatly enhanced. We conduct extensive experiments on UCR time series datasets and UEA multivariate time series datasets. Our experiments demonstrate that the proposed TimeAutoML outperforms comparison algorithms on both clustering and anomaly detection tasks by a large margin, especially when time series data is irregularly sampled.
2 Related Work
Unsupervised Time Series Representation Learning
Time series representation learning plays an essential role in a multitude of downstream analysis such as classification, clustering, anomaly detection. There is a growing interest in unsupervised time series representation learning, partially because no labels are required in the learning process, which suits very well many practical applications. Unsupervised time series representation learning can be broadly divided into two categories, namely 1) multi-stage methods and 2) end-to-end methods. Multi-stage methods first learn a distance metric from a set of time series, or extract the features from the time series, and then perform downstream machine learning tasks based on the learned or the extracted features. Euclidean distance (ED) and Dynamic Time Warping (DTW) are the most commonly used traditional time series distance metrics. Although the ED is competitive, it is very sensitive to outliers in the time series. The main drawback of DTW is its heavy computational burden. Traditional time series feature extraction methods include Singular Value Decomposition (SVD), Symbolic Aggregate Approximation (SAX), Discrete Wavelet Transform (DWT)(Chan and Fu, 1999), Piecewise Aggregate Approximation (PAA)(Keogh et al., 2001), etc. Nevertheless, most of these traditional methods are for regularly sampled time series, so they may not perform well on irregularly sampled time series. In recent years, many new feature extraction methods and distance metrics are proposed to overcome the drawbacks mentioned above. For instance, Paparrizos and Gravano (2015); Petitjean et al. (2011)
combine the proposed distance metrics and K-Means algorithm to achieve clustering.Lei et al. (2019) first extracts sparse features of time series, which is not sensitive to outliers and irregular sampling rate, and then carries out the K-Means clustering. In contrast, end-to-end approaches learn the representation of the time series in an end-to-end manner without explicit feature extraction or distance learning (Fortuin et al., 2018; Ma et al., 2019). However, the aforementioned methods need to manually design the network architecture based on human experience which is time-consuming and costly. Instead, we propose in this paper a representation learning method which optimizes an AutoML pipeline and their hyperparameters in a fully autonomous manner. Furthermore, we consider negative sampling and contrastive learning in the proposed framework to effectively enhance the representation ability of the proposed neural network architecture.
Irregularly Sampled Time Series Learning
There exist two main groups of works regarding machine learning for irregularly sampled time series data. The first type of methods impute the missing values before conducting the subsequent machine learning tasks(Shukla and Marlin, 2019; Luo et al., 2018, 2019; Kim and Chi, 2018). The second type directly learns from the irregularly sampled time series. For instance, Che et al. (2018); Cao et al. (2018) propose a memory decay mechanism, which replaces the memory cell of RNN by the memory of the previous timestamp multiplied by a learnable decay coefficient when there are no sampling value at this timestamp. Rubanova et al. (2019)
combines RNN with ordinary differential equation to model the dynamic of irregularly sampled time series. Different from the previous works, TimeAutoML makes use of the special characteristics of RNN(Abid and Zou, 2018) and automatically configure a representation learning pipeline to model the temporal dynamics of time series.
Automatic Machine Learning (AutoML) aims to automate the time-consuming model development process and has received significant amount of research interests recently. Previous works about AutoML mostly emphasize on the domains of computer vision and natural language processing, including object detection(Ghiasi et al., 2019; Xu et al., 2019; Chen et al., ), semantic segmentation (Weng et al., 2019; Nekrasov et al., 2019; Bae et al., 2019), translation (Fan et al., 2020) and sequence labeling (Chen et al., 2018a)
. However, AutoML for time series learning is an underappreciated topic so far and the existing works mainly focus on supervised learning tasks, e.g., time series classification.Ukil and Bandyopadhyay
propose an AutoML pipeline for automatic feature extraction and feature selection for time series classification.van Kuppevelt et al. (2020) develops an AutoML framework for supervised time series classification, which involves both neural architecture search and hyperparameter optimization. Olsavszky et al. (2020) proposes a framework called AutoTS, which performs time series forecasting of multiple diseases. Nevertheless, to our best knowledge, no previous work has addressed unsupervised time series learning based on AutoML.
Summary of comparisons with related work
We next provide a comprehensive comparison between the proposed framework and other state-of-the-art methods, including (WaRTEm (Mathew et al., 2019), DTCR (Ma et al., 2019), USRLT (Franceschi et al., 2019) and BeatGAN (Zhou et al., 2019)), as shown in Table 1
. In particular, we emphasize on a total of seven features in the comparison, including data augmentation, negative sample generation, contrastive learning, selection of autoencoders, similarity metric selection, attention mechanism selection, and automatic hyperparameter search. TimeAutoML is the only method that has all the desired properties.
|Negative sample generation||✓||✓||✓||✓|
|Similarity metric selection||✓|
|Attention mechanism selection||✓|
|Automatic hyperparameter search||✓|
3 TimeAutoML Framework
3.1 Proposed AutoML Framework
Let denote a set of time series in which , where is the length of the time series . We aim to build an automated time series representation learning framework to generate task-aware representations that can support a variety of downstream machine learning tasks. In addition, we consider negative sample generation and contrastive self-supervised learning. The contrastive loss function focuses on building time series representations by learning to encode what makes two time series similar or different. The proposed TimeAutoML framework can automatically configure an representation learning pipeline with an array of functional modules, each of these modules is associated with a set of hyperparameters. We assume there are a total of modules and there are options for the functional module. Let
denote an indicating vector formodule, with the constraint ensuring that only a single option is chosen for each module. Let be the hyperparameters of option in module, where and are respectively the continuous and discrete hyperparameters. Let and denote the set of variables to optimize, i.e., and . We further let denote the corresponding objective function value. Please note that the objective function differs for different tasks. For anomaly detection, we use Area Under the Receiver Operating Curve (AUC) as objective function while we use the Normalized Mutual Information (NMI) as objective function for clustering. The optimization problem of automatic pipeline conﬁguration is shown below.
We solve problem (1
) by alternatively leveraging Thompson sampling and Bayesian optimization, which will be discussed as follows.
3.1.1 Pipeline Configuration
We first assume that the hyperparameters are fixed during the pipeline configuration. We aim at selecting the better module option to optimize objective function , we can delineate it as a problem:
where is the feasible set, i.e., and is a penalty term that makes sure fall in the feasible region.
Thompson sampling is utilized to tackle problem (2
). In every iteration, Thompson sampling assumes the sampling probability of every option in each module follows Beta distribution, and the one corresponding to the maximum sampling value in each module will be chosen to construct the pipeline. After that, Beta distribution of the chosen options will be updated according to the performance of the configured pipeline. Due to space limitation, more details about Thompson sampling and the search space for pipeline configuration are shown in AppendixB and Appendix C, respectively.
The representation learning pipeline consists of eight modules, namely data augmentation, auxiliary classification network, encoder, attention, decoder, similarity selection, estimation network and EM estimator, as elucidated in Figure1. The goal of data augmentation is to increase the diversity of samples. The auxiliary classification network aims at distinguishing the positive samples from generated negative samples, which will be discussed in detail in Section 3.2. And we combine encoder, attention, decoder and similarity selection together to generate the low-dimensional representation of the input time series. Given an input time series , we can generate the latent space representation , which is an concatenation of the output of and reconstruction error , as shown below:
refer to an encoder and a decoder, respectively. There are three options for the encoder and decoder, namely, Recurrent Neural Network (RNN), Long Short Term Memory (LSTM), Gated Recurrent Unit (GRU).
is a similarity function that characterizes the level of similarity between the original time series and the reconstructed one. Three possible similarity functions are considered in this paper, i.e., relative Euclidean distance, Cosine similarity, or concatenation of both.
After obtaining the latent space representation of the input time series, EM algorithm is then invoked to estimate the mean and convariance of GMM. Assuming there are mixture components in the GMM model, the mixture probability, mean, covariance for component in the GMM module can be expressed as , respectively. Assuming there are a total of samples, the key parameters of GMM can be calculated as follows:
where is the estimation network which is a multi-layer neural network, and is the mixture-component membership prediction vector. is the EM estimator which can estimate the mean and convariance of GMM via the EM algorithm. The entry of this vector represents the probability that belongs to the mixture component. The sample energy is given by,
The sample energy can be used to characterize the level of anomaly of an input time series, that is, the sample with high energy will be deemed as an unusual time series. It is worth noticing that TimeAutoML may suffer from the singularity problem as in GMM. In this case, the training algorithm may converge to a trivial solution if the covariance matrix is singular. We prevent this singularity problem by adding to the diagonal entries of the covariance matrices.
3.1.2 Hyperparameters Optimization
Once the representation learning pipeline is constructed, we then emphasize on optimizing the hyperparameters for the given pipeline. Here we make use of the Bayesian Optimization (BO) (Shahriari et al., 2015) to tackle this task, as given below,
where the set and denote respectively feasible region of the hyperparameters, and is the objective function given in problem (1). and are penalty terms that make sure the hyperparameters fall in the feasible region. Unlike random search (Bergstra and Bengio, 2012) and grid search (Syarif et al., 2016), BO is able to optimize hyperparameters more efficiently. More details about BO are discussed in Appendix A. Algorithm 1 depicts the main steps in TimeAutoML and more details are given in Appendix B.
3.2 Contrastive Self-supervised Loss
According to Zhou et al. (2019); Kieu et al. (2019); Yoon et al. (2019), the structure of the encoder has a direct impact on the representation learning performance. Take anomaly detection as an example, the semi-supervised anomaly detection methods (Pang et al., 2019; Ruff et al., 2019) assume that there are a few labeled anomaly samples in the training dataset, which is more effective in representation learning than unsupervised methods. Instead, the proposed contrastive self-supervised loss does not require any labeled anomaly samples. It uses generated negative samples as anomalies for model building. The goal is to allow the encoder to distinguish the positive samples from generated negative samples.
Given a normal time series , which is deemed as a positive sample. We then generate the negative sample by adding noise randomly over a few selected timestamps of , that is, where is the negative sample generation trick. In the experiment, the noise amplitude is randomly selected within the interval .
In the experiment, we generate one negative sample for each positive sample . The proposed contrastive self-supervised loss aims to distinguish the positive time series sample from the negative ones, which can be given as:
where and are respectively the latent space representations of positive samples and negative samples, represents the length of latent space representation. is the auxiliary classification network, and
are the outputs of the classifier.represents binary cross entropy and we label the positive time series and negative time series as 0 and 1, respectively. More details about the proposed self-supervised loss are shown in Figure 1, we can see that minimizing allows the encoder to distinguish the positive samples from the negative samples in the latent space, and consequently entails better latent space representations.
3.3 Overall Loss Function and Joint Optimization
Given a dataset with time series, for fixed pipeline configuration and hyperparameters, the neural network is trained by minimizing an overall loss function containing three parts:
where represents reconstruction error. is the sample energy function which represents the level of abnormality for a given sample. is the proposed contrastive self-supervised loss. and are two weighting factors governing the trade-off among these three parts.
The performance of the proposed time series representation learning framework has been assessed via two machine learning tasks, i.e., anomaly detection and clustering. The primary goal is to answer the following two questions in the experiment, 1) Effectiveness: can the proposed representation learning framework effectively model and capture the temporal dynamics of a time series? 2) Robustness: can TimeAutoML remain effective in the presence of irregularities in sampling rates and contaminated training data?
We first conduct experiments on a total of 85 UCR univariate time series datasets (Chen et al., 2015) to assess the anomaly detection performance. Next, we also assess the performance of the proposed TimeAutoML on a multitude of UEA multivariate time series datasets (Bagnall et al., 2018). We follow the method proposed in Chandola et al. (2008) to create the training, validation, and testing dataset. AUC (Area under the Receiver Operating Curve) is employed to evaluate the anomaly detection performance. For clustering, we carry out experiments on a total of 3 UCR univariate datasets and 2 UEA multivariate datasets. NMI (Normalized Mutual Information) is used to evaluate the clustering results.
For anomaly detection, the proposed TimeAutoML is compared with a set of state-of-the-art methods including latent ODE (Rubanova et al., 2019), Local Outlier Factor (LoF) (Breunig et al., 2000), Isolation Forest (IF) (Liu et al., 2008), One-Class SVM (OCSVM) (Schölkopf et al., 2001), GRU-AE (Malhotra et al., 2016), DAGMM (Zong et al., 2018) and BeatGAN (Zhou et al., 2019). For clustering, the baseline algorithms for comparison include K-means, GMM, K-means+DTW, K-means+EDR (Chen et al., 2005), K-shape (Paparrizos and Gravano, 2015), SPIRAL (Lei et al., 2019), DEC (Xie et al., 2016), IDEC (Guo et al., 2017), DTC (Madiraju et al., 2018), DTCR (Ma et al., 2019).
4.1 Anomaly detection
We present the AUC scores of the proposed TimeAutoML and other state-of-the-art anomaly detection methods for the 85 univariate time series datasets of UCR archive (Chen et al., 2015). Due to the space limitation, we choose a portion of the time series datasets and the corresponding anomaly detection results are summarized in Table 2. The anomaly detection results for the remaining datasets are summarized in Appendix D, Table A2, A3. It is seen that TimeAutoML achieves best anomaly detection performance over the majority of the UCR datasets no matter the time series are regularly or irregularly sampled. In addition, we evaluate the performance of TimeAutoML on a multitude of multivariate time series datasets from UEA archive (Bagnall et al., 2018).
We assess the anomaly detection performance when time series are irregularly sampled () and regularly sampled (), where is the irregular sampling rate representing the ratio of missing timestamps to all timestamps (Chen et al., 2018b). Table 2 presents the AUC scores of the proposed TimeAutoML and state-of-the-art anomaly detection methods on a selected group of UCR datasets and UEA datasets. We observe that the performance of BeatGAN severely degrades in the presence of irregularities in sampling rates since it is designed for fixed-length input vectors. We also notice that the proposed TimeAutoML exhibits superior performance over existing state-of-the-art anomaly detection methods in almost all cases for irregularly sampled time series. In addition, the negative sampling combined with the contrastive loss function can further boost the anomaly detection performance.
We investigate how the proposed TimeAutoML responds to contaminated training data when time series are irregularly sampled with the rate . AUC scores of the proposed TimeAutoML when training on contaminated data are presented in Appendix D, Table A4, A5. We observe that the anomaly detection performance of TimeAutoML slightly degrades when training data are contaminated. Next, we investigate how TimeAutoML responds to different irregular sampling rate, i.e., when varies from 0 to 0.7. The AUC scores of TimeAutoML and state-of-the-art anomaly detection methods on ECGFiveDays dataset are presented in Fig 3 and the results on other datasets are presented in Appendix D, Fig A1, A2. We notice that TimeAutoML performs well robustly across multiple irregular sampling rates.
In this section, we use a synthetic dataset to elucidate the underlying mechanism of TimeAutoML model for detecting time series anomalies. Figure 3 shows the latent space representation learned via TimeAutoML model from a synthetic dataset. In this dataset, smooth Sine curves are normal time series. The anomaly time series is created by adding noise to the normal time series over a short interval. It is evident from Figure 3 that the latent space representations of normal time series lie in a high density area that can be well characterized by a GMM; while the abnormal time series appears to deviate from the majority of the observations in the latent space. In short, the proposed encoder-decoder structure allows us to project the time series data in the original space onto vector representations in the latent space. In doing so, we can detect anomalies via clustering-based methods, e.g., GMM, and easily visualize as well as interpret the detected time series anomalies.
Apart from anomaly detection, TimeAutoML can be tailored for other machine learning tasks as well, e.g., multi-class clustering. In particular, the clustering process is carried out in the latent space via the GMM model, along with other modules in the pipeline.
We evaluate the effectiveness of TimeAutoML on three univariate time series datasets as well as two multivariate time series datasets. The NMI of TimeAutoML and state-of-the-art clustering methods are shown in Table 3. We observe that TimeAutoML generally achieves superior performance compared to baseline algorithms. This is because: i) it can automatically select the best module and hyperparameters; ii) the auxiliary classification task can enhance its representation capability.
Representation learning on irregularly sampled time series is an under-explored topic. In this paper we propose a TimeAutoML framework to carry out unsupervised autonomous representation learning for irregularly sampled multivariate time series. In addition, we propose a self-supervised loss function to get labels directly from the unlabeled data. Strong empirical performance has been observed for TimeAutoML on a plurality of real-world datasets. While tremendous efforts have been undertaken for time series learning in general, AutoML for time series representation learning is still in its infancy and we hope the findings in this paper will open up new venues along this direction and spur further research efforts.
- Autowarp: Learning a warping distance from unlabeled time series using sequence autoencoders. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pp. 10568–10578. Cited by: §2.
- Resource optimized neural architecture search for 3D medical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pp. 228–236. Cited by: §2.
- The uea multivariate time series classification archive, 2018. arXiv preprint arXiv:1811.00075. Cited by: §4, §4.1.
- Random search for hyper-parameter optimization. The Journal of Machine Learning Research 13 (1), pp. 281–305. Cited by: §3.1.2.
- LOF: Identifying density-based local outliers. In Proceedings of the 2000 ACM SIGMOD international conference on Management of data, pp. 93–104. Cited by: §4.
- BRITS: Bidirectional recurrent imputation for time series. In Advances in Neural Information Processing Systems, pp. 6775–6785. Cited by: §2.
- Efficient time series matching by wavelets. In ICDE, pp. 126–133. Cited by: §1, §2.
- Comparative evaluation of anomaly detection techniques for sequence data. In 2008 Eighth IEEE international conference on data mining, pp. 743–748. Cited by: §4.
- Recurrent neural networks for multivariate time series with missing values. Scientific reports 8 (1), pp. 1–12. Cited by: §2.
- Exploring shared structures and hierarchies for multiple NLP tasks. arXiv preprint arXiv:1808.07658. Cited by: §2.
- Robust and fast similarity search for moving object trajectories. In Proceedings of the 2005 ACM SIGMOD international conference on Management of data, pp. 491–502. Cited by: §4.
- Neural ordinary differential equations. In Advances in neural information processing systems, pp. 6571–6583. Cited by: §4.1.
- The UCR time series classification archive. Note: www.cs.ucr.edu/~eamonn/time_series_data/ Cited by: §4, §4.1.
-  DETNAS: Neural architecture search on object detection. Cited by: §2.
- Fast subsequence matching in time-series databases. In SIGMOD, pp. 419–429. Cited by: §1.
Searching better architectures for neural machine translation. IEEE/ACM Transactions on Audio, Speech, and Language Processing. Cited by: §2.
- SOM-VAE: Interpretable discrete representation learning on time series. In International Conference on Learning Representations, Cited by: §1, §2.
- Unsupervised scalable representation learning for multivariate time series. In Advances in Neural Information Processing Systems, pp. 4650–4661. Cited by: §2.
NAS-FPN: Learning scalable feature pyramid architecture for object detection.
Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 7036–7045. Cited by: §2.
- Improved deep embedded clustering with local structure preservation.. In IJCAI, pp. 1753–1759. Cited by: §4.
- Locally adaptive dimensionality reduction for indexing large time series databases. In SIGMOD, pp. 151–162. Cited by: §1, §2.
- Outlier detection for time series with recurrent autoencoder ensembles.. In IJCAI, pp. 2725–2732. Cited by: §3.2.
Temporal belief memory: imputing missing data during rnn training..
In Proceedings of the 27th International Joint Conference on Artificial Intelligence (IJCAI-2018), Cited by: §2.
- Similarity preserving representation learning for time series clustering. In International Joint Conference on Artificial Intelligence, Cited by: §2, §4.
- Isolation forest. In 2008 Eighth IEEE International Conference on Data Mining, pp. 413–422. Cited by: §4.
Multivariate time series imputation with generative adversarial networks. In Advances in Neural Information Processing Systems, pp. 1596–1607. Cited by: §2.
- E2GAN: End-to-end generative adversarial network for multivariate time series imputation. In Proceedings of the 28th International Joint Conference on Artificial Intelligence, pp. 3094–3100. Cited by: §2.
- Learning representations for time series clustering. In Advances in neural information processing systems, pp. 3781–3791. Cited by: §1, §2, §2, §4.
Deep temporal clustering: fully unsupervised learning of time-domain features. arXiv preprint arXiv:1802.01059. Cited by: §4.
- LSTM-based encoder-decoder for multi-sensor anomaly detection. arXiv preprint arXiv:1607.00148. Cited by: §4.
- Warping resilient time series embeddings. In Proceedings of the Time Series Workshop at ICML, Cited by: §2.
- Fast neural architecture search of compact semantic segmentation models via auxiliary cells. In Proceedings of the IEEE Conference on computer vision and pattern recognition, pp. 9126–9135. Cited by: §2.
- Time series analysis and forecasting with automated machine learning on a national ICD-10 database. International journal of environmental research and public health 17 (14), pp. 4979. Cited by: §2.
- Deep anomaly detection with deviation networks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 353–362. Cited by: §3.2.
- K-shape: Efficient and accurate clustering of time series. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data, pp. 1855–1870. Cited by: §2, §4.
- A global averaging method for dynamic time warping, with applications to clustering. Pattern Recognition 44 (3), pp. 678–693. Cited by: §2.
- Latent ordinary differential equations for irregularly-sampled time series. In Advances in Neural Information Processing Systems, pp. 5320–5330. Cited by: §2, §4.
- Deep semi-supervised anomaly detection. arXiv preprint arXiv:1906.02694. Cited by: §3.2.
- Estimating the support of a high-dimensional distribution. Neural computation 13 (7), pp. 1443–1471. Cited by: §4.
- Taking the human out of the loop: A review of bayesian optimization. Proceedings of the IEEE 104 (1), pp. 148–175. Cited by: Appendix A, §3.1.2.
- Interpolation-prediction networks for irregularly sampled time series. arXiv preprint arXiv:1909.07782. Cited by: §2.
SVM parameter optimization using grid search and genetic algorithm to improve classification performance. Telkomnika 14 (4), pp. 1502. Cited by: §3.1.2.
-  AutoSensing: Automated feature engineering and learning for classification task of time-series sensor signals. Cited by: §2.
Mcfly: automated deep learning on time series. SoftwareX 12, pp. 100548. Cited by: §2.
- NAS-UNET: Neural architecture search for medical image segmentation. IEEE Access 7, pp. 44247–44257. Cited by: §2.
Unsupervised deep embedding for clustering analysis. In International conference on machine learning, pp. 478–487. Cited by: §4.
- Auto-FPN: Automatic network architecture adaptation for object detection beyond classification. In Proceedings of the IEEE International Conference on Computer Vision, pp. 6649–6658. Cited by: §2.
- Time-series generative adversarial networks. In Advances in Neural Information Processing Systems, pp. 5508–5518. Cited by: §3.2.
- BeatGAN: Anomalous rhythm detection using adversarially generated time series.. In IJCAI, pp. 4433–4439. Cited by: §2, §3.2, §4.
Deep autoencoding gaussian mixture model for unsupervised anomaly detection. In International Conference on Learning Representations, Cited by: §4.
Appendix A Appendix A: Bayesian Optimization
Let denote the objective function. Given function values during the preceding iterations , we pick up the variable for sampling in the next iteration via solving the maxmization problem that involves the acquisition function i.e., expected improvement (EI) based on the postetior GP model.
Specifically, the objective function is assumed to follow a GP model (Shahriari et al., 2015) and can be expressed as , where represents the mean function. And represents the covariance matrix of , namely, , where is the kernel function. In particular, the poster probability of at iteration
is assumed to follow a Gaussian distribution with meanand covariance , given the observation function values :
where is a vector of covariance terms between and , and
denotes the noise variance. We choose the kenel function as ARD Matérn 5/2 kernel(Shahriari et al., 2015) in this paper:
where and are input vectors, , and are the GP hyperparameters which are determined by minimizing the negative log marginal likelihood :
Given the mean and covariance in (9), can be obtained via solving the following optimization problem:
Appendix B Appendix B: Detailed Version of TimeAutoML
It is seen that TimeAutoML consists of two main stages, i.e., pipeline configuration and hyperparameter optimization. In every iteration of TimeAutoML, Thompson sampling is utilized to refine the pipeline configuration at first. After that, Bayesian optimization is invoked to optimize the hyperparameters of the model. Finally, the Beta distribution of the chosen options will be updated according to the performance of the configured pipeline.
In the experiment, the upper limit to number of entire TimeAutoML iterations, BO iterations are set as 40 and 25 respectively. The Beta distribution priors are set respectively as and .
Appendix C Appendix C: Search Space: Options and Hyperparameters
|Data augmentation||Scaling||Continuous and discrete hyperparameters|
|EM Estimator||Gaussian Mixture Model||Discrete hyperparameters|
|Similarity Selection||Relative Euclidean distance||None|
Multi-layer feed-forward neural network
|Auxiliary Classification Network||Multi-layer feed-forward neural network||Discrete hyperparameters|
c.1 Data augmentation
Scaling: increasing or decreasing the amplitude of the time series. There are two hyperparametes, the number of data augmentation samples and the scaling size .
Shifting: cyclically shifting the time series to the left or right. There are two hyperparametes, the number of data augmentation samples and the shift size .
Time-warping: randomly “slowing down” some timestamps and “speeding up” some timestamps. For each timestamp to “speed up”, we delete the data value at that timestamp. For each timestamp to “slow down”, we insert a new data value just before that timestamp. There are two hyperparametes, the number of data augmentation samples and the number of time-warping timestamps .
For all encoders, i.e. RNN, LSTM, and GRU, there is only one hyperparameter, i.e., the size of the encoder hidden state. And we assume it is no larger than 32, i.e., .
Self-attention mechanism has been considered in this framework.
For all decoders, i.e. RNN, LSTM, and GRU, there is only one hyperparameter, i.e., the size of decoder hidden state . For univariate time series, we assume it is no larger than 32, i.e., . And we assume for multivariate time series, where represents the dimension of the multivariate time series.
c.5 EM Estimator
In this module, we provide a statistical model GMM to carry out latent space representation distribution estimation. There is one hyperparameter, the number of mixture-component of GMM. EM algorithm is used to estimate the key parameters of GMM.
c.6 Similarity selection
We offer three similarity functions for selection, including relative Euclidean distance, cosine similarity, or the concatenation of both.
c.7 Estimation Network
We utilize a multi-layer neural network as the estimation network in our pipeline. There are two hyperparameters to be optimized, i.e., the number of layers and the number of nodes in each layer , .
c.8 Auxiliary Classification Network
We utilize a multi-layer neural network as the auxiliary classification network in our pipeline. There are two hyperparameters to be optimized, i.e., the number of layers and the number of nodes in each layer , .
Appendix D Appendix D: Result
d.1 Anomaly Detection Performance for Univariate Time Series
d.2 Anomaly Detection Performance for Univariate Time Series (Contaminated Training Dataset)
d.3 Anomaly Detection Performance for Multivariate Time Series (Contaminated Training Dataset)
Appendix E Illustration of irregular sampling
We provides an illustrative example to demonstrate how TimeAutoML remain robust against the irregularities in the sampling rates. Both regularly and irregularly sampled time series () are presented in Figure A3. And for the purpose of illustration we assume the normal time series is a Sine curve. The anomalous time series is obtained via adding noise to the normal time series over a short time interval. The irregularly sampling rate is set as 0.5 in this example.
As evident from the figure, the unusual pattern of the anomalous time series preserves after the irregular sampling. And such unusual pattern appears to be different from the distortion caused by irregular sampling. Due to the special characteristics of TimeAutoML, e.g., embedded LSTM encoder and attention mechanism, it is capable of learning both the short term and long term correlations among the training time series and therefore can detect such unusual pattern even in the presence of irregularity in the sampling.