Papers
Topics
Authors
Recent
Search
2000 character limit reached

Evo-TFS: Evolutionary Time Series Oversampling

Updated 10 January 2026
  • Evo-TFS is an evolutionary oversampling technique that uses strongly typed genetic programming to generate synthetic minority time series by preserving both time-domain and frequency-domain features.
  • It integrates Dynamic Time Warping and Discrete Fourier Transform in its fitness function to produce diverse and structurally realistic sequences that enhance imbalanced classification performance.
  • Empirical evaluations on UCR archive datasets demonstrate its superior F1-score and G-Mean compared to traditional methods, validating its practical applicability.

Evo-TFS is an evolutionary oversampling approach tailored for imbalanced time series classification. It utilizes strongly typed genetic programming (STGP) to generate synthetic minority sequences that are simultaneously close to real data in both time and frequency domains. By integrating time-domain (dynamic time warping) and frequency-domain (discrete Fourier transform) characteristics into its fitness function, Evo-TFS addresses key shortcomings of traditional interpolative oversamplers, producing diverse and structurally realistic sequences that improve downstream classification performance (Pei et al., 3 Jan 2026).

1. Background and Motivation

Imbalanced time series classification problems arise when one or more classes—the "minority"—are underrepresented in a labeled dataset D={(x1,y1),,(xn,yn)}D = \{ (x_1, y_1), \ldots, (x_n, y_n) \}, where xiRTx_i \in \mathbb{R}^T and yiC={1,,M}y_i \in C = \{1,\dots, M\}. For a class jj, the imbalance ratio is defined as IRj=maxkNk/NjIR_j = \max_{k} N_k / N_j, where NjN_j is the count of class jj samples. High IRIR values (IR1IR \gg 1) bias standard classifiers toward the majority class and hinder the recognition of minorities, which are often of greater practical interest.

Traditional oversampling methods such as SMOTE and its variants interpolate linearly in the feature space. While fast, these methods disregard intrinsic temporal order and rhythms, resulting in synthetic series that fail to preserve salient autocorrelations and frequency content. Even time-aware approaches like T-SMOTE, which constrain interpolation to the time domain, do not systematically enforce spectral realism; they typically miss preserving dominant frequencies or phase relationships in the data.

2. Evo-TFS Algorithmic Structure

Evo-TFS adopts strongly typed genetic programming to "grow" synthetic time series directly. Each individual in the evolving population is a tree-structured function composed of:

  • Terminals: Subseries SRLS \in \mathbb{R}^L, extracted from original data via a length-LL sliding window (all SS collected into a pool S\mathcal{S}), and random floating-point constants sampled from [1,1][-1,1].
  • Functions: Protected element-wise arithmetic (++, -, ×\times, ÷\div with x÷01x \div 0 \to 1), and the "Connect" operator, which concatenates three length-LL arrays into a length-$3L$ sequence.
  • Tree layers: Input \to Smelt (arithmetic) \to Connect \to full output sequence.

The GP process follows:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Procedure GP_Generate(x*, S, pop_size, G, p_c, p_m, α, σ):
  # x*: target minority sequence
  # S: terminal pool (subseries + constants)
  P  InitializePopulation(pop_size, max_depth=10, terminals=S, functions={+,-,*,/,Connect})
  For gen in 1..G:
    EvaluateFitness(P, x*, α, σ)
    E  SelectElites(P, E=2)
    P_new  E
    While |P_new| < pop_size:
      p  TournamentSelect(P, k=3)
      p  TournamentSelect(P, k=3)
      if rand()<p_c:
        (c, c)  TypePreservingCrossover(p,p)
      else:
        (c,c)  (Clone(p), Clone(p))
      if rand()<p_m: c  TypeConstrainedMutation(c, max_depth=10)
      if rand()<p_m: c  TypeConstrainedMutation(c, max_depth=10)
      P_new += {c, c}
    P  P_new
  end for
  return TopK(P, k_out)
EndProcedure

Operators include ramped half-and-half initialization, k-tournament selection (k=3k = 3), subtree crossover (rate pcp_c), type-constrained mutation (rate pmp_m), and elitism (E=2E = 2).

3. Fitness Evaluation

Each candidate synthetic sequence y^RT\hat{y} \in \mathbb{R}^T is evaluated against target minority sample xx^*. Fitness is a convex combination of time-domain and frequency-domain similarity measures:

For x={v1,,vT}x = \{v_1, \ldots, v_T\} and y^={y^1,,y^T}\hat{y} = \{\hat{y}_1, \ldots, \hat{y}_T\}:

D(i,j)=viy^j,C(i,j)=D(i,j)+min{C(i1,j),C(i,j1),C(i1,j1)}D(i,j) = |v_i - \hat{y}_j|, \quad C(i,j) = D(i,j) + \min \{C(i-1, j), C(i, j-1), C(i-1, j-1)\}

with C(1,1)=D(1,1)C(1,1) = D(1,1), and DDTW(x,y^)=C(T,T)D_{DTW}(x, \hat{y}) = C(T, T).

  • DFT (Discrete Fourier Transform) Distance

X[k]=n=0T1x(n)ej2πkn/T,Y^[k]=n=0T1y^(n)ej2πkn/TX[k] = \sum_{n=0}^{T-1} x(n)e^{-j2\pi kn/T}, \quad \hat{Y}[k] = \sum_{n=0}^{T-1} \hat{y}(n) e^{-j2\pi kn/T}

The DFT distance:

DDFT(x,y^)=k=0T1(X[k]Y^[k])2+k=0T1(arg(X[k])arg(Y^[k]))2D_{DFT}(x, \hat{y}) = \sqrt{ \sum_{k=0}^{T-1} (|X[k]| - |\hat{Y}[k]|)^2 + \sum_{k=0}^{T-1} (\arg(X[k]) - \arg(\hat{Y}[k]))^2 }

  • Combined Fitness (with Gaussian RBF)

Q(d)=exp(d22σ2)Q(d) = \exp\left(-\frac{d^2}{2\sigma^2}\right)

Fitness(x,y^)=αQ(DDTW(x,y^))+(1α)Q(DDFT(x,y^))\mathrm{Fitness}(x^*, \hat{y}) = \alpha Q(D_{DTW}(x^*,\hat{y})) + (1-\alpha) Q(D_{DFT}(x^*,\hat{y}))

Default parameters are α=0.5\alpha = 0.5, σ=10\sigma = 10.

4. Synthetic Sample Generation Workflow

Sample generation is parallelized:

  • For NgN_g required synthetic samples, NpN_p processes are launched.
    • If IR>2IR > 2, NpN_p equals the number of minority samples (one GP process per sample).
    • If IR<2IR < 2, Np=NgN_p = N_g; the minority samples nearest to their class centroid Xc\mathbf{X}_c (elementwise mean) are targeted.

Each process generates its quota of synthetic sequences by evolving a GP population for G=50G = 50 generations using defined rates (pc=0.8p_c = 0.8, pm=0.2p_m = 0.2). Elitism (E=2E = 2) ensures preservation of top individuals per generation. The final outputs across all processes are trimmed to NgN_g and merged with the original training set. Diversity is fostered by evolutionary operators and multi-start generation.

The implementation uses the DEAP Python library for GP, sliding window subseries extraction, and FFT caching for efficiency. The computational complexity per run is O(Nppop_sizeG(T2+TlogT))O(N_p \cdot \mathrm{pop\_size} \cdot G \cdot (T^2 + T \log T)).

5. Experimental Protocol

Evo-TFS was assessed on twelve UCR archive datasets, covering two-class and three-class time series problems (e.g., ShapeletSim, ECG200, Ham, ItalyPowerDemand, ScreenType, Yoga, Computers). Training sets were resampled to yield imbalance ratios IR[2.0,38.8]IR \in [2.0, 38.8].

Baselines included:

  • SMOTE
  • ADASYN
  • Borderline-SMOTE1/2
  • T-SMOTE (time-aware)
  • Diffusion-TS (latent diffusion model-based oversampler)

Downstream classifiers consisted of:

  • 1D-CNN (three convolutional layers plus fully connected output, acting on raw time series)
  • Random Forest trained on frequency-domain features (FFT magnitudes and phases)

Each oversampling method produced a balanced training set. Classifiers were trained and evaluated on fixed test data, with each setup repeated across 30 random seeds. Performance was quantified using F1-score, G-Mean, and AUC. Statistical significance was assessed using Wilcoxon signed-rank tests with Holm–Bonferroni correction at α=0.05\alpha=0.05.

6. Empirical Results

Time-domain classification (1D-CNN, F1 & G-Mean):

  • Evo-TFS attained the highest or second-highest F1-score on 10/12 datasets and G-Mean on 9/12.
  • Pairwise win/tie/loss counts over all datasets for F1 and G-Mean, respectively: 49/15/8 and 38/29/5, when compared to all baselines.

Frequency-domain classification (Random Forest on FFT features):

  • Evo-TFS led on F1 and G-Mean in 6/12 datasets each.
  • F1 wins/ties/losses: 34/19/19; G-Mean: 34/28/10.

Ablation studies:

  • Removing either DTW (α=0\alpha = 0) or DFT (α=1\alpha = 1) components in the fitness function degraded performance on selected datasets, confirming the complementary role of time- and frequency-domain criteria.

Sensitivity to α\alpha:

  • F1/G-Mean variation for α{0.3,0.5,0.7}\alpha \in \{0.3, 0.5, 0.7\} was less than 1% over four datasets, indicating robustness to the combination weight.

Data visualization and synthetic sample analysis:

  • t-SNE plots for ScreenType and Yoga datasets revealed that classical interpolative oversamplers (SMOTE/ADASYN) yielded linear modes, while T-SMOTE and Diffusion-TS clustered near originals. Evo-TFS filled boundary regions, yielding more evenly spread minority samples.
  • The Uniformity Index UU (mean absolute local DTW density difference between classes) was lowest for Evo-TFS across K{5,10,15}K \in \{5,10,15\}.

A plausible implication is that Evo-TFS's construction strategy enhances synthetic sample diversity and class-boundary coverage while retaining temporal and spectral realism.

7. Discussion and Implications

Evo-TFS introduces an evolutionary paradigm for time series oversampling, characterized by two main advances: enforcement of both temporal dynamics (via DTW) and spectral characteristics (via DFT) during sequence generation. This dual-domain optimization surpasses the constraints of linear interpolation-based synthetic sample generation, capturing features essential to minority class identification.

The resulting performance gains are evident across both deep learning and classical classifier pipelines, suggesting broad applicability for imbalanced sequence domains. The primary limitation is computational cost, which exceeds that of interpolation approaches. However, due to the independent nature of GP parallelization across target samples, wall-clock time can be mitigated with sufficient computational resources.

Evo-TFS represents a principled, STGP-based framework for imbalanced time series oversampling, with demonstrated superiority to classical and recent methods on established benchmarks (Pei et al., 3 Jan 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Evo-TFS.