Optimizing Deep Learning Inference Metrics For Multivariate Time Series
Authors:   , Pantiskas Leonardos 
Published: July 2024

The impressive performance that artificial intelligence has demonstrated in a diverse collection of problem-solving and analysis tasks, has led to the increasing adoption of machine and deep learning models for addressing real-world applications. One of the domains where this has happened is time series analysis, with tasks such as forecasting and classification being tackled by machine and deep learning models. Concurrently, the Internet-of-Things era has brought numerous use cases with multiple input sources, such as sensors, rendering the data in these cases in a format referred to as multivariate time series data.
The combination of the concepts mentioned above has brought a widespread deployment of models on real-world multivariate time series analysis pipelines. This in turn has necessitated the optimization of metrics that relate to the inference phase of these models. These metrics can go beyond the typical measurement of the performance of the models on the analysis task, and can relate, for instance, to their execution on the computational environments found in these pipelines. A principal set of these metrics are the accuracy of the models, their explainability, the latency of their inference phase, and the data bandwidth required for the task.
This thesis presents our investigation and proposals on how to address the gaps and improve the state of the art regarding these metrics during inference, specifically for the multivariate time series modality. The various approaches that we propose are presented in five chapters, with each chapter principally addressing a single metric, while discussing, where applicable, the impact of the solution on other metrics as well.
First, we address the explainability metric and present TACN, a Temporal Attention Convolutional Network multivariate forecasting model that can output predictions for multiple variables, while providing, during inference, the importance of each input timestep of a variable for each forecasted step. This helps to add interpretability to the black-box Temporal Convolutional Network model which is used as a base, and is achieved by combining the base model with an attention module. This importance of input steps can be visualized in an intuitive way, and studying it across all test samples can help practitioners to extract insights about the general model behavior as well. Second, we address the accuracy metric, by following a data-based approach and rethinking the preprocessing of multivariate time series datasets before their propagation to the models. We examine different preprocessing methods across different combinations of the timesteps and channels dimensions, and we empirically evaluate their effect on the accuracy of recent machine and deep learning models. The conclusion is that this data-based approach can indeed increase their accuracy. Third, we focus on the latency metric, by designing LightWaveS, a classification framework that builds on recent state-of-the-art models with fast training phase, and aims to achieve an optimized inference as well. It combines feature extraction based on wavelet theory and hierarchical feature selection, resulting in a fast inference phase with only a limited decrease in accuracy compared to state-of-the-art methods. Finally, we direct our attention to the bandwidth metric and we propose two frameworks, CHARLEE and RELEVANT, that operate on an edge device and try to limit the amount of data that need to be sent to a remote, cloud model for classification. CHARLEE extends the early classification paradigm of univariate time series to the multivariate time series modality, while RELEVANT adopts a more flexible filtering approach of channel exclusion and reinclusion across time. We determine that both of these methods show promising potential and outperform the conventional early-exit paradigm in multiple datasets, successfully reducing the amount of data that needs to be transferred to a final model.