Abstract
Time series data are often obtained only within a limited time range due to interruptions during observation process. To classify such partial time series, we need to account for 1) the variable-length data drawn from 2) different timestamps. To address the first problem, existing convolutional neural networks use global pooling after convolutional layers to cancel the length differences. This architecture suffers from the trade-off between incorporating entire temporal correlations in long data and avoiding feature collapse for short data. To resolve this tradeoff, we propose Adaptive Multi-scale Pooling, which aggregates features from an adaptive number of layers, i.e., only the first few layers for short data and more layers for long data. Furthermore, to address the second problem, we introduce Temporal Encoding, which embeds the observation timestamps into the intermediate features. Experiments on our private dataset and the UCR/UEA time series archive show that our modules improve classification accuracy especially on short data obtained as partial time series.
Introduction
In real-world scenarios, such as tracking particles in moving liquids or monitoring industrial sensors, time series data is rarely "perfect." Observations are frequently interrupted, resulting in fragmented data of varying lengths that start at different timestamps. This phenomenon, termed partial Time Series Classification (pTSC), poses a significant challenge for standard deep learning architectures.
Standard Convolutional Neural Networks (CNNs) typically struggle with pTSC due to a fundamental trade-off regarding the Receptive Field (RF). A deep CNN with a large RF is necessary to capture long-term temporal correlations in extended sequences. However, when applied to short sequences, these deep models require heavy padding, which can contaminate the feature space and lead to "feature collapse." Conversely, shallow models with small RFs handle short sequences well but fail to capture the global context of longer data. Furthermore, most existing models ignore the absolute timing of a fragment, losing vital context about where a specific observation fits within a larger process.
Methodology
To address these challenges, this research introduces two novel modules that can be integrated into standard 1D-CNN architectures: Adaptive Multi-scale Pooling (AMSpool) and Temporal Encoding (TE).
Adaptive Multi-scale Pooling (AMSpool)
AMSpool resolves the RF-length trade-off by adaptively selecting features from different network depths based on the input length. Rather than forcing every input through the entire depth of the network, AMSpool utilizes features from early layers (small RF) for short sequences and aggregates features from deeper layers (large RF) for longer sequences. These multi-scale features are then processed by a Recurrent Module (LSTM) to produce a fixed-length vector for final classification, ensuring that the feature extraction process is always aligned with the scale of the input data.
Temporal Encoding (TE)
Inspired by positional encoding in Transformer architectures, TE embeds the absolute timestamp of each observation directly into the model. By concatenating time-dependent vectors to the raw input data, the model learns to distinguish between identical patterns that may have different meanings depending on when they occur. For example, in a rotating liquid container, a specific movement pattern might indicate an anomaly at the start of the process but be considered normal behavior toward the end.
Masking-Aware Layers
To ensure the model only learns from valid data points, the researchers implemented masking within the Global Average Pooling (GAP) and Batch Normalization layers. This effectively ignores padded regions during calculations, preventing zero-padding from biasing the learned representations.
Experimental Evaluation
The proposed framework was evaluated on two distinct datasets:
- Private Trajectory Dataset: A real-world application involving the detection of foreign matter (anomalies) versus air bubbles (normal) in liquid vaccines. These trajectories are often fragmented due to occlusions or tracking failures.
- UCR/UEA Time Series Archive: A standard public benchmark. The researchers simulated pTSC conditions by randomly cropping sequences from various univariate and multivariate datasets (e.g., Crop, ElectricDevices, InsectWingbeat).
Key Results and Insights
- Performance on Short Data: The proposed AMSCNN-te model demonstrated a significant accuracy boost on the trajectory dataset, improving balanced accuracy on short sequences from a baseline of 84.8% to 89.5%.
- Statistical Significance: Using the Steel-Dwass test, the improvements on short and middle-length data were confirmed to be statistically significant ($p < 0.001$).
- Robustness Across Benchmarks: On the UCR/UEA archive, the model consistently outperformed standard ResNet baselines, particularly on datasets where the input length was comparable to or shorter than the model's default receptive field.
- The Importance of RF-Length Matching: The results confirm that a fixed architecture is inherently biased toward specific input lengths. By truncating the feature extraction before the RF exceeds the input length, the model prevents the degradation caused by excessive padding.
Limitations and Future Work
While the modules significantly improve performance on fragmented data, they introduce certain trade-offs:
- Computational Complexity: The masking processes and the additional LSTM layer in AMSpool increase computational overhead. In tests, inference time increased from 2.2ms in the baseline to 9.5ms.
- Long Sequence Optimization: In some instances, the model performed slightly worse than fixed-length CNNs on very long sequences, suggesting that further refinement is needed to handle long-term temporal correlations without losing the benefits of the adaptive pooling.
Conclusion
By introducing Adaptive Multi-scale Pooling and Temporal Encoding, this research provides a robust framework for handling the complexities of partial Time Series Classification. The approach allows a single model to remain accurate across variable lengths and timestamps, making it highly suitable for real-world applications where data continuity cannot be guaranteed.
Summary updated