Source-linked AI summary
Time Series Data Augmentation for Neural Networks by Time Warping with a Discriminative Teacher
Brian Kenji Iwana, Seiichi Uchida
TL;DR
Time-series classification datasets are often small, while many augmentation methods rely on random transformations. This paper proposes guided warping, which aligns a sample’s features to a reference’s timing and can use shape descriptors and a discriminative teacher. The authors report accuracy gains for VGG models, but no clear advantage for LSTMs.
Problem
Time-series classification datasets are often small, and existing random transformations may rely on assumptions that do not fit every dataset.
Source: §I · p. 1Method
Guided warping uses DTW alignment to transfer a sample’s features to a reference’s time steps, with shapeDTW and discriminative-teacher reference selection as extensions.
Source: §I · p. 2, §VII · p. 8Results
VGG accuracy increased by an average of 3-4% across guided warping methods, with DGW-sD highest overall; LSTMs showed no clear trend or advantage.
Source: D. Data Augmentation Comparison Results · p. 7Takeaways & Limitations
The authors recommend the proposed method for CNN-based architectures rather than LSTMs, for which time-domain augmentations tended not to improve results.
Source: D. Data Augmentation Comparison Results · p. 7
Abstract
from arXiv · showhide
Neural networks have become a powerful tool in pattern recognition and part of their success is due to generalization from using large datasets. However, unlike other domains, time series classification datasets are often small. In order to address this problem, we propose a novel time series data augmentation called guided warping. While many data augmentation methods are based on random transformations, guided warping exploits the element alignment properties of Dynamic Time Warping (DTW) and shapeDTW, a high-level DTW method based on shape descriptors, to deterministically warp sample patterns. In this way, the time series are mixed by warping the features of a sample pattern to match the time steps of a reference pattern. Furthermore, we introduce a discriminative teacher in order to serve as a directed reference for the guided warping. We evaluate the method on all 85 datasets in the 2015 UCR Time Series Archive with a deep convolutional neural network (CNN) and a recurrent neural network (RNN). The code with an easy to use implementation can be found at https://github.com/uchidalab/time_series_augmentation .
I. INTRODUCTION
Time-series classification datasets are small, motivating synthetic-data augmentation, while existing time-series methods often rely on random transformations that assume particular pattern properties. The introduction proposes guided warping, including shapeDTW and discriminative reference selection, and evaluates these methods alongside established augmentations.
I. INTRODUCTION
- Only 10 of 85 UCR datasets exceed 1,000 training samples, motivating augmentation for small time-series classification datasets.The largest, ElectricDevices, has 8,926 training samples; the passage contrasts these counts with much larger image datasets.Source: §I · p. 1
- Data augmentation expands training sets with synthetic patterns and has been shown to reduce overfitting and expand modeled decision boundaries.The passage describes it as a data-space solution for increasing model generalization ability.Source: §I · p. 1
- Time-series adaptations of image augmentations and random time warps carry assumptions that may not fit every dataset [15],,.The passage notes that time series have different properties from images and that random transformations assume patterns in the underlying dataset.Source: §I · p. 2
- Guided warping mixes patterns by using DTW to align a sample’s features to a reference’s time steps, with shapeDTW applying high-level shape descriptors for smoother alignment,,,,,.The contributions identify DTW-based warping as effective and shapeDTW as a way to maintain original sample features.Source: §I · p. 2
- A discriminative teacher selects a reference from a small sample batch based on separation between same-class and different-class patterns.The proposed teacher uses a nearest-centroid classifier on random samples; the paper contrasts this with random-reference selection.Source: §I · p. 2
- The evaluation covers all 85 datasets in the 2015 UCR Time Series Archive, comparing nine established and four proposed augmentations with temporal 1D VGG and LSTM networks.The passage identifies the dataset archive and both evaluation architectures.Source: §I · p. 2
II. RELATED WORK
Prior time-series augmentation includes random transformations, pattern mixing, and generative approaches. The section motivates guided warping as a way to reduce assumptions that can make transformations or existing pattern-mixing strategies unsuitable for some datasets.
II. RELATED WORK
- Random methods include jittering, rotation, slicing, permutation, scaling, magnitude warping, time warping, and frequency warping.Examples span wearable-sensor augmentation, construction-equipment activity recognition, acoustic recognition,, and window warping.Source: §II · p. 2
- Pattern mixing combines samples, including intra-class sound segments and DTW-based averaging methods such as DBA and wDBA,.Other approaches include randomly weighted DBA, averaging with sub-optimal time warping, and stochastic feature mapping.Source: §II · pp. 2–3
- Generative models and handcrafted mathematical models can require external training or domain-specific properties,,.The passage specifically notes these requirements for GANs and mathematical models, respectively.Source: §II · p. 3
- The proposed approach aims to use few assumptions because transformations such as jittering can create unnatural patterns and averaging similar patterns may not broaden the data distribution.The passage contrasts jittering on smooth 50words outlines with its fit to ECG data, and notes this limitation for wDBA.Source: §II · p. 3
III. GUIDED WARPING
The section introduces DTW as a way to align time-series elements despite temporal distortions. Its minimum-cost warping path maps time steps between sequences under a path constraint.
A. Dynamic Time Warping
- DTW nonlinearly matches time-series elements to align features and remove temporal distortions.It finds a minimum-cost path through an element-wise cost matrix using dynamic programming.Source: A. Dynamic Time Warping · p. 3
- The warping path maps the time steps of one series to those of another, with the path minimizing global cost under constraints.The cumulative-sum recurrence compares the local cost with three neighboring predecessor cells.Source: A. Dynamic Time Warping · p. 3
- This paper uses Euclidean distance as DTW’s local cost and selects the commonly used symmetric slope constraint, while allowing other DTW variants.The global distance in typical DTW is the cumulative value at D(I, J).Source: A. Dynamic Time Warping · p. 3
B. Guided Warping for Data Augmentation
Guided warping augments a training set by moving a sample’s features to the time steps of another same-class reference. The method uses DTW alignment rather than random time deformation.
B. Guided Warping for Data Augmentation
- Guided warping aims to create an augmented set whose training accuracy exceeds training on the original set alone, while keeping generated patterns near the original feature distribution.The paper cautions that excessive departure could add noise or produce illogical patterns.Source: B. Guided Warping for Data Augmentation · p. 3
- The method preserves a student series’ features while adopting the pace of an intra-class teacher series, whose local features and time steps come from the training data.DTW aligns the two series so sections of the student are warped in time to fit the reference.Source: B. Guided Warping for Data Augmentation · p. 3
- Tracing the minimum DTW path produces a series with the student’s feature values and the reference’s time steps; the process can use any two same-class training patterns.The figure depicts the red and blue series with gray element-alignment connections.Source: B. Guided Warping for Data Augmentation · p. 4, Figure 3 · p. 4
IV. IMPROVED TIME SERIES GENERATION WITH SHAPE DESCRIPTORS
The section replaces element-wise DTW matching with alignment of local shape descriptors. This is intended to preserve original pattern features and produce more natural warped series.
IV. IMPROVED TIME SERIES GENERATION WITH SHAPE DESCRIPTORS
- Strict element-wise DTW minimization can create jagged, abrupt paths, so the method instead aligns higher-level shape descriptors with shapeDTW.Each descriptor represents a subsequence centered on an element, with boundary padding using duplicated endpoint values.Source: §IV · p. 4
- ShapeDTW applies standard DTW to descriptor sequences, using distances between neighboring-point descriptors rather than raw elements.This yields a nonlinear alignment based on similarities between neighboring points.Source: §IV · p. 4
- Warping student features to the reference’s time steps with shapeDTW is reported to preserve original features and create more natural series than standard DTW.The figure’s boxed region marks an abnormal feature attributed to DTW’s overzealous path minimization.Source: §IV · p. 4, Figure 4 · p. 4
V. DISCRIMINATIVE TEACHER SELECTION
The section selects a discriminative training-set prototype as the guided-warping reference instead of choosing one at random. It describes the selection score and illustrates how reference choice affects generated patterns.
V. DISCRIMINATIVE TEACHER SELECTION
- The discriminative teacher is selected from a bootstrap sample of B ≪ N training patterns drawn with replacement, rather than chosen randomly as the warping reference.The paper uses a DTW- or shapeDTW-based nearest-centroid classifier to identify a discriminative prototype.Source: §V · p. 4, A. Formulation · p. 4
A. Formulation
- The selected reference maximizes the distance between positive and negative centroids, using the score h(b_m) rather than the prediction sign when ties are likely.The method samples same-class and different-class patterns as evenly as possible for selection.Source: A. Formulation · p. 4
- Random-reference methods RGW and SPAWNER can generate patterns outside the data distribution, while a discriminative teacher can direct warping toward useful patterns.The PCA visualization uses solid shapes for originals and hollow shapes for generated examples; shapeDTW helps both proposed methods maintain distribution consistency.Source: Figure 5 · p. 5
- The paper names random-reference methods RGW and RGW-sD, and discriminative-teacher methods DGW and DGW-sD, for the DTW and shapeDTW variants, respectively.The corresponding DTW variants are RGW-D and DGW-D.Source: A. Formulation · pp. 4–5
B. Visualization
The visualization compares generated patterns with originals and shows how guided-warping variants differ in their fit to the data distribution. The evaluation spans 85 UCR datasets across seven time-series types.
B. Visualization
- The visualization uses CBF, a dataset with only 30 samples; colors denote classes, with solid shapes for originals and hollow shapes for generated examples.Fig. 6 marks original series with blue dotted lines and generated series with red solid lines.Source: B. Visualization · p. 5, Figure 6 · p. 5
- Using a discriminative teacher can direct warping toward useful patterns, and DGW-sD balances distribution consistency with generating new patterns.Random-reference methods can produce patterns that do not fit the data, while wDBA ASD produces patterns too similar to existing examples.Source: B. Visualization · p. 5
- DGW-sD examples fit the dataset distribution while differing enough from originals to be useful, unlike overly similar wDBA or atypical SPAWNER examples.The contrast is especially visible when SPAWNER mixes two very different same-class patterns.Source: B. Visualization · p. 5
A. Datasets
- The evaluation includes all 85 datasets in the 2015 UCR Time Series Archive, spanning seven time-series types and training sets of 16–8,926 samples.Series lengths range from 24 to 2,709 time steps.Source: A. Datasets · p. 5
B. Augmentation Methods
The comparison includes conventional random transformations and pattern-mixing methods alongside random-reference and discriminative-teacher versions of guided warping using DTW or shapeDTW.
B. Augmentation Methods
- The comparison includes jittering, flipping, scaling, magnitude warping, and time warping as random transformations.Jittering adds Gaussian noise; scaling changes all magnitudes by a scalar, while magnitude and time warping use smooth cubic-spline curves.Source: B. Augmentation Methods · pp. 5–6
- Window slicing selects 90% of a series and interpolates it back to the original length, while window warping speeds up or slows a random 10% window.The window-warping factors are 2 or 0.5.Source: B. Augmentation Methods · p. 6
- SPAWNER averages two randomly selected, suboptimally aligned intra-class patterns and adds noise; wDBA averages six patterns weighted by their DTW distance to the medoid.The wDBA implementation uses the Average Selected with Distance version.Source: B. Augmentation Methods · p. 6
- Guided-warping variants select two intra-class patterns and warp one pattern’s features according to the other’s time steps, using either DTW or shapeDTW.The discriminative versions use a discriminative teacher as the reference; random versions select references randomly.Source: B. Augmentation Methods · p. 6
- Each augmentation method expands the training set to four times its original size, and the no-augmentation condition serves as a baseline.DTW-based methods use a symmetric slope constraint and a warping window of 10% of the original series length.Source: B. Augmentation Methods · pp. 5–6
C. Evaluation Settings
Each dataset and augmentation condition is trained and tested with separate temporal VGG and LSTM models for 10,000 iterations. The VGG uses 1D convolutions, while its block count varies with series length.
C. Evaluation Settings
- Separate networks are trained and tested for each dataset and augmentation technique, with 10,000 training iterations for comparison against no augmentation.The evaluation uses a temporal VGG and an LSTM.Source: C. Evaluation Settings · p. 6
- The VGG adapts the architecture to time series with 1D convolutions and max pooling, followed by two 4,096-node fully connected layers and an output layer.Fully connected layers use dropout probability 0.5; layers use ReLU except the softmax output.Source: C. Evaluation Settings · p. 6
- Fig. 7 compares no augmentation with the proposed method using VGG, with each point representing a dataset and point shapes indicating dataset type.Source: Figure 7 · p. 7
- Because dataset sequence lengths differ, the VGG uses a varying number of convolutional blocks to prevent excessive pooling, keeping the final max-pooling output between 5 and 12 time steps.Source: C. Evaluation Settings · p. 7
- The LSTM has two layers of 100 cells each and uses Nadam with an initial learning rate of 0.001 and batch size 32.Its learning rate is reduced by 0.1 upon a training-accuracy plateau.Source: C. Evaluation Settings · p. 7
D. Data Augmentation Comparison Results
With VGG, guided warping improves accuracy on most datasets, with DGW-sD highest overall; results show no clear advantage for the proposed method with an LSTM.
D. Data Augmentation Comparison Results
- Guided-warping methods raise VGG accuracy by an average of 3–4%, and DGW-sD has the highest overall results.DGW-sD gains are 9.5% for Simulated, 6.2% for Image outline, and 5.1% for Device time series; ECG slightly degrades and Sensor improvements are insignificant.Source: D. Data Augmentation Comparison Results · p. 7
- For LSTM, the proposed method shows no clear trend or advantage, and time-domain augmentations tend not to improve trained LSTM models.The authors recommend the proposed method more for CNN-based architectures, noting that RNNs are designed to combat time distortions.Source: D. Data Augmentation Comparison Results · p. 7
- With VGG, DGW-sD improves accuracy most on image-outline, device, and simulated datasets; Symbols, OliveOil, and ShapeletSim have the largest gains over no augmentation.The authors note that maintaining symbol shape structure may matter, and that moving embedded shapelets in time could help generalization on ShapeletSim.Source: D. Data Augmentation Comparison Results · p. 7
E. Model Accuracy Comparison
Among reported comparisons, only COTE and ST had better results than the proposed augmentation with VGG. The conclusion presents guided warping as an augmentation method usable with any classifier and describes extensions using shapeDTW and discriminative teachers.
E. Model Accuracy Comparison
- Only COTE and ST had better results than the proposed augmentation with VGG among the reported comparison methods.The authors frame the method as a state-of-the-art augmentation approach usable with any classifier, rather than as a bid to achieve the best overall results.Source: E. Model Accuracy Comparison · p. 7
VII. CONCLUSION
- Guided warping uses a DTW warping path to give a generated pattern the first series’ local features and the second series’ time-step properties.Source: §VII · p. 8
- ShapeDTW preserves relationships between neighboring elements, while using the most discriminative batch sample as teacher further improves results and directs augmentation toward useful references.Source: §VII · p. 8
- Future work will apply guided warping to new applications and models and further explore its properties and characteristics.Source: §VII · p. 8