Source-linked AI summary
Fast and Accurate Time Series Classification with WEASEL
Patrick Schäfer, Ulf Leser
TL;DR
Time series classification needs methods that remain accurate on very large collections of long sensor series. WEASEL constructs discriminative feature vectors from time-series windows, achieving strong accuracy and speed across benchmark and smart-grid datasets. Its current scope is limited to univariate series with fixed sampling rates.
Problem
Time series classification methods have struggled to combine sufficient accuracy with scalability for very large datasets containing very long series.
Method
WEASEL uses supervised, class-discriminative symbolic features from normalized variable-length windows, combining Fourier coefficients, information-gain discretization, unigrams, and bigrams.
Results
Across 87 datasets, WEASEL was consistently among the best and fastest methods, while competitors were either much slower at similar quality or much worse at similar speed.
Takeaways & Limitations
WEASEL is applicable to domains with very high runtime and quality constraints and remains competitive with methods that are either slower or less accurate.
Takeaways & Limitations
WEASEL currently handles only univariate time series and assumes fixed sampling rates, with multivariate and varying-rate extensions left for future work.
Abstract
from arXiv · showhide
Time series (TS) occur in many scientific and commercial applications, ranging from earth surveillance to industry automation to the smart grids. An important type of TS analysis is classification, which can, for instance, improve energy load forecasting in smart grids by detecting the types of electronic devices based on their energy consumption profiles recorded by automatic sensors. Such sensor-driven applications are very often characterized by (a) very long TS and (b) very large TS datasets needing classification. However, current methods to time series classification (TSC) cannot cope with such data volumes at acceptable accuracy; they are either scalable but offer only inferior classification quality, or they achieve state-of-the-art classification quality but cannot scale to large data volumes. In this paper, we present WEASEL (Word ExtrAction for time SEries cLassification), a novel TSC method which is both scalable and accurate. Like other state-of-the-art TSC methods, WEASEL transforms time series into feature vectors, using a sliding-window approach, which are then analyzed through a machine learning classifier. The novelty of WEASEL lies in its specific method for deriving features, resulting in a much smaller yet much more discriminative feature set. On the popular UCR benchmark of 85 TS datasets, WEASEL is more accurate than the best current non-ensemble algorithms at orders-of-magnitude lower classification and training times, and it is almost as accurate as ensemble classifiers, whose computational complexity makes them inapplicable even for mid-size datasets. The outstanding robustness of WEASEL is also confirmed by experiments on two real smart grid datasets, where it out-of-the-box achieves almost the same accuracy as highly tuned, domain-specific methods.
1. INTRODUCTION
Time series classification must handle increasingly long series and large sensor-driven datasets without sacrificing accuracy. WEASEL addresses this scalability–accuracy tension with discriminative feature construction and strong benchmark performance.
- Time series classification assigns a concrete time series to one of predefined classes using training examples.
- Sensor-driven applications often involve very many and very long time series, making non-scalable classifiers impractical despite their accuracy.
- Millions of customers and frequent measurements can require several millions of device-profile classifications per hour, each using thousands of measurements.
- Existing methods trade off quality and scalability: high-accuracy classifiers can have bi-quadratic complexity, while fast methods perform much worse.
- WEASEL uses class-aware discretization, variable-length windows, word order, and statistical feature selection to construct discriminative features.
- On 85 UCR collections, WEASEL outperforms core classifiers in accuracy while remaining among the fastest, and is multiple orders-of-magnitude faster than COTE.
2. RELATED WORK
Related TSC methods compare whole series or features extracted from local substructures. Bag-of-patterns methods discretize windows into words, while ensembles combine multiple classifiers for high accuracy.
- Whole-series methods compare entire time series, but typically work well for short series and fail for noisy or long series.
- Dynamic Time Warping has O(n^2) computational complexity for time series of length n.
- Shapelet methods classify using distances to representative subsequences, with Shapelet Transform identified as the most accurate shapelet approach in a recent evaluation.
- Bag-of-patterns methods represent time-series substructures as discrete features and build feature-count histograms for classification.
- BOP-SAX uses fixed-length windows and SAX discretization, SAX-VSM adds tf-idf and class-level vectors, and TSBF uses random windows with a supervised codebook.
- Ensembles aggregate diverse core classifiers through methods such as bagging or majority voting, with COTE based on 35 core TSC methods.
3. TIME SERIES, BOP, AND SFA
The paper represents time series through bag-of-patterns processing: overlapping windows become discrete words and word-count features. SFA adds normalization and truncated Fourier-based dimensionality reduction before discretization.
- SFA: The method follows the bag-of-patterns approach and uses truncated Fourier transformations as the first feature-generation step.
- The method targets sensor-generated univariate time series with a fixed sampling rate.
- Bag-of-Patterns model: Figure 3 depicts overlapping windows, window-to-word discretization, and word counts in the transformation to a bag-of-patterns model.
- Bag-of-Patterns model: Bag-of-patterns processing extracts windows, transforms them into discrete words, counts the words, and classifies the resulting feature vectors.
- SFA: SFA normalizes each window to standard deviation 1, then applies a truncated Fourier transform retaining the first l < w coefficients.
4. WEASEL
WEASEL addresses scalability and discrimination challenges in time series classification by combining supervised symbolic feature generation with a compact bag-of-patterns representation. It uses multiple window lengths, local word order, and feature selection before classification.
- Challenges: WEASEL targets noisy, long, high-volume sensor time series where existing methods often trade classification accuracy for scalability.The paper identifies noise, scalability, variable lengths and offsets, and unknown characteristic substructures as key challenges.
- Supervised symbolic representation: ANOVA F-test selection and information-gain binning make Fourier approximation and quantization class-discriminative rather than dataset-independent.The F-test retains coefficients whose distributions separate classes, while information gain chooses purer class partitions.
- Feature construction: Bigrams preserve local order, while joining features from multiple window lengths captures patterns with different durations in one feature vector.These choices increase the feature space, motivating subsequent feature selection.
- Feature selection: An aggressive Chi-Squared test filters irrelevant features after WEASEL constructs its broad feature representation.The stated goal is to reduce dimensionality without negatively impacting classification accuracy.
- Pipeline: WEASEL builds on bag-of-patterns by extracting normalized sliding windows of different lengths and converting Fourier approximations into discrete words.Its pipeline uses supervised symbolic representation, a bag-of-patterns model, and machine-learning classification.
- Empirical behavior: In the illustrated comparison, discriminative words produce fewer distinct words and reveal a class-specific feature that enables separation by a later classifier.The example contrasts SFA words with WEASEL’s discriminative words and their logistic-regression weighting.
5. EVALUATION
Across the 85-dataset UCR benchmark and smart-grid datasets, WEASEL combines competitive or state-of-the-art accuracy with substantially lower runtimes. Its supervised representation, bigrams, and multiple window lengths support discriminative features and robust performance across domains.
- Benchmark accuracy: WEASEL is the most accurate core classifier on average ranks across the 85 UCR benchmark datasets.It is significantly better than BOSS, Shapelet Transform, and Elastic Ensemble, while statistically similar to COTE.
- Scalability: 16–24 CPU hours of training and 38ms average prediction make WEASEL one to two orders of magnitude faster than other core classifiers.The comparison covers 45 core UCR datasets and includes feature extraction and selection in runtime measurements.
- Accuracy and runtime: WEASEL matches COTE’s average accuracy while running two orders of magnitude faster for single prediction.Average single-prediction runtime is 38ms, including preprocessing.
- Accuracy by dataset and domain: WEASEL remains competitive across domains, with 36 wins against six core classifiers and at most 5% below the best classifier on 69 datasets.It has 48.6% wins for sensor-reading datasets and the highest win percentage for sensor readings, synthetic, and image-outline datasets.
- Design decisions: Combining supervised symbolic representation, bigrams, and multiple window lengths improves accuracy over the standard bag-of-patterns model.The single-window approach is least accurate, while the combined extensions significantly improve average ranks.
- Smart-grid use cases: On two smart-grid datasets, WEASEL achieves 92% and 91.8% accuracy with prediction times of 10 and 100ms.Its train times are comparable to DTW CV and lower than other high-accuracy classifiers; the approach was not specially adapted for the domain.
6. CONCLUSION AND FUTURE DIREC-TION
WEASEL combines competitive accuracy with high speed through an engineered feature space. The authors report broad performance across 87 datasets while identifying limits for multivariate and irregularly sampled time series.
- Conclusion: WEASEL uses statistical feature selection, word co-occurrences, and supervised symbolic representation to generate discriminative words.These choices assign high weights to characteristic, variable-length time-series substructures.
- Conclusion: Across 87 datasets, WEASEL is consistently among the best and fastest methods.Competitors are either similarly accurate but slower, or similarly fast but less accurate.
- Future Direction: WEASEL currently handles only univariate time series, while extensions to multivariate data require further validation.A simple concatenation of dimensions showed promising initial results but remains insufficiently validated.
- Future Direction: The method assumes fixed sampling rates and does not yet adequately handle time series with varying sampling rates.Future work aims to extend WEASEL to such data.
BOSS
The referenced figures cover load-monitoring use cases for the PLAID and ACS-F1 datasets. They compare accuracy with prediction and training time across the two datasets.
- PLAID: For PLAID, the figures relate accuracy to prediction time and train time.The two panels separately identify prediction-runtime and training-time comparisons.
- ACS-F1: For ACS-F1, the figures relate accuracy to prediction time and train time.The two panels separately identify prediction-runtime and training-time comparisons.
- Use Cases: The load-monitoring use cases are PLAID and ACS-F1.These datasets are identified in the figure title.