Manuscript Offprint

arXiv:2608.22804

Contrastive Representation-Guided Genetic Minority Oversampling for Imbalanced Time-Series Classification

Wenbin Pei, Yunrong Hao, Zhen Liu, Guan Wang, Bing Xue, Yiu-Ming Cheung, Qiang Zhang

Wenbin Pei, Yunrong Hao, Zhen Liu, Guan Wang, Bing Xue, Fellow, IEEE, Yiu-Ming Cheung, Fellow, IEEE, and Qiang Zhang, Senior Member, IEEE

Abstract—Real-world time-series classification tasks often exhibit class imbalance, which can be extremely severe in some applications. To avoid training biased classifiers on imbalanced data, sampling is one of the most popular data pre-processing techniques because of its classifier-agnostic nature. However, due to the complex temporal dependencies in original time-series data and the scarcity of minority-class samples, existing sampling methods, including interpolation-based oversampling methods and deep learning-based generative models, usually suffer from limited generalization and poor diversity when generating new time-series samples. This paper proposes a Frequency-domain representation-guided Multi-tree Genetic Programming-based oversampling approach (FreMGP) to imbalanced time-series classification, where each individual represents a set of synthetic samples for the minority class. A frequency-domain class-discriminative representation module based on contrastive learning is also developed, guiding the evolutionary search toward high-quality synthetic time-series samples. Experiments on imbalanced time-series datasets demonstrate that FreMGP outperforms existing oversampling methods and consistently improves the performance of different classifiers, including both general machine learning and deep learning models.

This work was supported in part by the National Key Research and Development Program of China under grant 2024YFA1012700, the National Natural Science Foundation of China under grants 62206041, 12371516 and U21A20491, and the NSFC-Liaoning Province United Foundation under grant U1908214, the 111 Project under grant D23006, the Liaoning Revitalization Talents Program under grant XLYC2008017, and China University Industry-University-Research Innovation Fund under grants 2022IT174, Natural Science Foundation of Liaoning Province under grant 2023-BSBA-030, and an Open Fund of National Engineering Laboratory for Big Data System Computing Technology under grant SZU-BDSC-OF2024-09. (Corresponding author: Zhen Liu.)

Wenbin Pei and Yunrong Hao are with the School of Computer Science and Technology, Dalian University of Technology, Dalian 116024, China; Key Laboratory of Social Computing and Cognitive Intelligence (Dalian University of Technology), Ministry of Education, Dalian 116024, China (email: peiwenbin@dlut.edu.cn; haoyunrong@mail.dlut.edu.cn).

Zhen Liu is with the College of Computing and Data Science, Nanyang Technological University, Singapore (e-mail: zhen.liu@ntu.edu.sg).

Guan Wang is with the School of Mechanics and Aerospace Engineering, Dalian University of Technology, Dalian 116024, China (e-mail: guanwang@dlut.edu.cn).

Bing Xue is with the School of Engineering and Computer Science, Victoria University of Wellington, PO Box 600, Wellington 6140, New Zealand (emails: bing.xue@ecs.vuw.ac.nz).

Yiu-Ming Cheung is with the Department of Computer Science, Hong Kong Baptist University, Hong Kong, SAR, China (e-mail: ymc@comp.hkbu.edu.hk).

Qiang Zhang is with the School of Computer Science and Technology, Dalian University of Technology, Dalian 116024, China; Key Laboratory of Social Computing and Cognitive Intelligence (Dalian University of Technology), Ministry of Education, Dalian 116024, China; and also with the National and Local Joint Engineering Laboratory of Computer Aided Design, Dalian University, Dalian 116622, China (e-mail: zhangq@dlut.edu.cn).

Index Terms—Imbalanced Time-Series Classification, Sampling, Multi-Tree Strongly-typed Genetic Programming, Representation Learning.

I. INTRODUCTION

Many real-world applications generate substantial amounts of time-series data. To make sense of such data, time-series classification (TSC) has emerged as an important machine learning task that aims to assign predefined labels to sequential data based on its temporal patterns [1]. To date, numerous classification algorithms, e.g., Hydra [2] and spectral-aware reservoir computing (SARC) [3], have been proposed for TSC, while most of them implicitly assume a balanced data distribution across different classes. However, in many applications, such as fault detection [4], medical diagnosis [5], and economics [6], time-series data is naturally imbalanced, posing a challenge to conventional TSC algorithms. Note that data imbalance can bias classifiers toward the majority class and weaken their ability to recognize minority-class samples that usually are of particular interest [7].

Data sampling [8] is one of the most popular techniques to address the class imbalance issue due to its classifier-agnostic nature. To rebalance data distribution, traditional interpolation-based oversampling methods, such as the synthetic minority over-sampling technique (SMOTE) [9] and its variants [8], [10], generate a number of synthetic samples by interpolating between minority-class samples and their neighbors. However, as these sampling methods were developed for tabular imbalanced data rather than time-series data, they are unable to capture the complex temporal patterns inherent in time series [11]. In the literature, to handle imbalanced time-series data, the temporal-oriented synthetic minority oversampling technique (T-SMOTE) [11] incorporates temporal characteristics during sample generation. Nevertheless, it still depends on local interpolation, which may limit the ability to preserve discriminative local variations [12] and frequency-domain characteristics in time series [13]. Furthermore, deep learning-based generative models, such as generative adversarial networks (GANs) [14], variational autoencoders (VAEs) [15], and diffusion-based models [16], have demonstrated their effectiveness in generating time-series data. Despite their strong data modeling capabilities, these methods typically demand a large number of training samples to accurately learn the complex temporal dependencies in time-series data [17]. Unfortunately, from a practical perspective, this is not always workable because time-series samples in the minority class are usually scarce, resulting in limited generalization and poor diversity when generating new data [17], [18].

Genetic programming (GP) offers a solution for generating data [19], [20]. Unlike black-box generative models, GP individuals are tree-structured, combining function and terminal nodes to form diverse mathematical expressions, each of which can be regarded as a time-series sample. More importantly, GP automatically learns complex transformations from the learned time-series data, allowing it to produce synthetic time-series samples that preserve the intricate temporal dependencies essential for time-series classification. However, it remains challenging for GP to generate high-quality, diverse time-series data when only a limited number of minority-class samples are available in an imbalanced time-series classification (ITSC) task. Therefore, it is necessary to investigate the potential of GP for oversampling time series in ITSC. In this paper, we propose a Frequency-domain representation-guided Multi-tree Genetic Programming-based oversampling approach (FreMGP), which learns a frequency-domain class-discriminative representation space and uses it to guide the evolutionary oversampling process. Moreover, FreMGP adopts a multi-tree GP representation, where each individual generates a set of synthetic samples for one minority class rather than a single sample.

The main contributions of this paper are summarized as follows:

  • We design a frequency-domain contrastive representation learning module. It uses prototype-guided contrastive learning to construct a class-discriminative representation space. This provides a reliable representation space for evaluating the quality of generated synthetic samples.

  • We design a novel multi-tree GP structure, for which both the terminal set and the function set are specifically designed, to represent frequency-domain time-series samples for oversampling. This enables a set of synthetic minority-class samples to be generated within a single GP individual, making it easy to evaluate the overall diversity of the generated sample set.

  • We develop a representation-guided two-stage fitness evaluation method and corresponding genetic operators. The fitness function evaluates generated samples in the learned representation space and considers both the similarity to existing minority-class samples and the diversity of the generated sample set. This fitness function guides the evolutionary search toward samples that are close to the minority-class region in the learned representation space while ensuring sufficient diversity of the generated samples.

References (59)

  • Deep learning for time series classification and extrinsic regression: A current survey
  • Hydra: Competing convolutional kernels for fast and accurate time series classification (opens the publisher in a new tab)
  • Spectral-aware reservoir computing for fast and accurate time series classification
  • Class-imbalanced time series anomaly detection method based on cost-sensitive hybrid network
  • Classification of imbalanced ECGs through segmentation models and augmented by conditional diffusion model
  • Financial risk assessment of imbalanced data based on nonlinear causal time-series network
  • Mitigating data imbalance in time series classification based on counterfactual minority samples augmentation
  • A survey on imbalanced learning: latest research, applications and future directions
  • SMOTE: Synthetic minority over-sampling technique
  • SMOTE for learning from imbalanced data: Progress and challenges, marking the 15-year anniversary
  • T-SMOTE: Temporal-oriented synthetic minority oversampling technique for imbalanced time series classification
  • Data augmentation techniques in time series domain: A survey and taxonomy
  • Time series data augmentation for deep learning: A survey
  • GT-GAN: General purpose time series synthesis with generative adversarial networks
  • TimeVAE: A variational auto-encoder for multivariate time series generation (opens arXiv in a new tab)
  • Diffusion-TS: Interpretable diffusion for general time series generation
  • Time series generation under data scarcity: A unified generative modeling approach
  • Deep generative approaches for oversampling in imbalanced data classification problems: A comprehensive review and comparative analysis
  • DG-SMOTE: A distance-angle-based genetic synthetic minority over-sampling technique for unbalanced data learning
  • Evo-TFS: Evolutionary time-frequency domain-based synthetic minority oversampling approach to imbalanced time series classification
  • Representation learning: A review and new perspectives
  • A simple framework for contrastive learning of visual representations
  • Momentum contrast for unsupervised visual representation learning
  • Supervised contrastive learning
  • TimeSiam: A pre-training framework for siamese time-series modeling
  • CoST: Contrastive learning of disentangled seasonal-trend representations for time series forecasting
  • Generating redundant features with unsupervised multi-tree genetic programming
  • Strongly typed genetic programming
  • Auto-adaptive multilayer perceptron for univariate time series classification
  • Random forests for time series
  • A novel non-parametric method for time series classification based on k-nearest neighbors and dynamic time warping barycenter averaging
  • Deep learning for time series classification: a review
  • Parkinsons detection from gait time series classification using modified metaheuristic optimized long short term memory
  • A cost-sensitive attention temporal convolutional network based on adaptive top-k differential evolution for imbalanced time-series classification
  • Recurrence and self-attention vs the Transformer for time-series classification: A comparative study
  • The foundations of cost-sensitive learning
  • A study of the behavior of several methods for balancing machine learning training data
  • Borderline-SMOTE: A new over-sampling method in imbalanced data sets learning
  • ADASYN: Adaptive synthetic sampling approach for imbalanced learning
  • Grouping-based oversampling in kernel space for imbalanced data classification
  • Boundary-focused generative adversarial networks for imbalanced and multimodal time series
  • An algorithm for the machine calculation of complex Fourier series
  • Neural collapse inspired feature-classifier alignment for few-shot class-incremental learning
  • A tale of two classes: Adapting supervised contrastive learning to binary imbalanced datasets
  • Frequency-domain MLPs are more effective learners in time series forecasting
  • Borderline over-sampling for imbalanced data classification
  • Improving imbalanced learning through a heuristic oversampling method based on k-means and SMOTE
  • Integrated oversampling for imbalanced time series classification
  • Minority oversampling for imbalanced time series classification
  • CSMOTE: Contrastive synthetic minority oversampling for imbalanced time series classification
  • Long short-term memory
  • Attention is all you need
  • Mamba: Linear-Time Sequence Modeling with Selective State Spaces
  • DEAP: Evolutionary algorithms made easy
  • Imbalanced-learn: A Python toolbox to tackle the curse of imbalanced datasets in machine learning
  • Accuracy, precision, recall, F1-score, or MCC? empirical evidence from advanced statistics, ML, and XAI for evaluating business predictive models
  • The receiver operating characteristic curve accurately assesses imbalanced datasets
  • Statistical comparisons of classifiers over multiple data sets
  • A simple sequentially rejective multiple test procedure