Threshold Moving for Online Class Imbalance Learning with Dynamic Evolutionary Cost Vector

Peijia Qin, Shuxian Li, Xiaoqun Liu, Zubin Zheng, Siang Yew ChongTMLR 2024

Abstract

Existing online class imbalance learning methods fail to achieve optimal performance because their assumptions about enhancing minority classes are hard-coded in model parameters. To learn the model for the performance measure directly instead of using heuristics, we introduce a novel framework based on a dynamic EA called Online Evolutionary Cost Vector (OECV). By bringing the threshold moving method from the cost-sensitive learning paradigm and viewing the cost vector as a hyperparameter, our method transforms the online class imbalance issue into a bi-level optimization problem. The lower layer utilizes a base online classifier for rough prediction, and the upper layer refines the prediction using a threshold moving cost vector learned via a dynamic evolutionary algorithm (EA). OECV benefits from both the efficiency of online learning methods and the high performance of EA, as demonstrated in empirical studies against state-of-the-art methods on thirty datasets. Additionally, we show the effectiveness of the EA component in the ablation study by comparing OECV to its two variants, OECV-n and OECV-ea, respectively. This work reveals the superiority of incorporating EA into online imbalance classification tasks, while its potential extends beyond the scope of the class imbalance setting and warrants future research attention.

The Challenge of Online Class Imbalance

In real-world data streams—such as fraud detection or sensor monitoring—classes are often heavily imbalanced, with minority events (e.g., fraud) being significantly rarer than majority ones. Traditional online learning methods struggle with this imbalance for two primary reasons. First, they often rely on "hard-coded" heuristics, such as inverse class-size weighting, which may not align with specific performance goals. Second, critical metrics like G-mean or F1-score are non-differentiable, making them difficult to optimize using standard gradient-based techniques.

Illustration of concept drift and boundary refinement in online class imbalance learning.

Furthermore, these streams are dynamic; the underlying data distribution can change over time, a phenomenon known as concept drift. As shown in the figure above, a classifier must not only handle imbalance but also adapt its decision boundaries as the relationship between features and classes evolves.

The OECV Framework: A Bi-Level Approach

To address these issues, we propose the Online Evolutionary Cost Vector (OECV) framework. OECV employs a bi-level optimization strategy that decouples the base classification from the imbalance handling.

The OECV framework architecture, showcasing the bi-level optimization and the dynamic evolutionary algorithm.

As illustrated in the framework diagram, OECV consists of:

  • The Lower Layer (The Worker): A standard online classifier (e.g., a Multilayer Perceptron) that processes incoming samples $X_t$ to produce initial probabilistic predictions.
  • The Upper Layer (The Refiner): This layer applies Threshold Moving. It uses a cost vector to weight the probabilistic outputs, effectively shifting the decision boundary to favor the minority class without retraining the base model.

Dynamic Evolution for Optimal Costs

The core innovation of OECV is the use of a dynamic Evolutionary Algorithm (EA) to find the optimal cost vector. Instead of relying on fixed formulas, OECV evolves a population of candidate cost vectors. These candidates are evaluated against a fixed-size buffer $\mathcal{B}$ of recent samples. To ensure the EA has sufficient data for the minority class, we employ an oversampling technique to augment the buffer.

To handle concept drift, the algorithm maintains population diversity by injecting "prior knowledge" (cost vectors based on current class ratios) into the population. This allows the EA to quickly adapt when the data distribution shifts, as evidenced by increased fitness variance during drift periods.

Experimental Evaluation

OECV was evaluated across 30 datasets, including 10 real-world streaming benchmarks (e.g., Airlines, Electricity) and 20 offline datasets converted into streams.

  • Superior Performance: OECV achieved the top G-mean performance on 14 datasets and ranked second on 8 others, maintaining a superior average rank of 1.967 compared to state-of-the-art competitors like AI-WSELM and BEDCOE.
  • Ablation Study: Comparisons with variants (OECV-n and OECV-ea) confirmed that the evolutionary process is the primary driver of performance, rather than just the buffer or oversampling components.
  • Efficiency: By optimizing only a small cost vector rather than the entire model, OECV remains computationally efficient enough for high-velocity data streams.

Limitations and Future Work

While OECV is highly effective, it faces challenges in "many-class" scenarios where the cost vector's dimensionality increases. Additionally, the reliance on a sample buffer may pose constraints for memory-limited edge devices. Future research will explore handling label noise—which can be amplified by oversampling—and extending the framework to multi-class imbalance problems.

Summary updated

BibTeX
@article{qin2024threshold,
  author = {Peijia Qin and Shuxian Li and Xiaoqun Liu and Zubin Zheng and Siang Yew Chong},
  title = {{Threshold Moving for Online Class Imbalance Learning with Dynamic Evolutionary Cost Vector}},
  journal = {Accepted by TMLR},
  year = {2024},
  url = {https://openreview.net/forum?id=EIPnUofed9},
}
Figure