TRACE: A Generalizable Drift Detector for Streaming Data-Driven Optimization

Yuanting Zhong, Ting Huang, Xiaolin Xiao, Yue-Jiao Gong

Abstract

Streaming Data-Driven Optimization (SDDO) is essential for managing real-time systems like traffic flow and energy grids. However, these systems are frequently disrupted by "concept drift," where underlying data distributions shift unpredictably. Traditional drift detectors, largely optimized for classification tasks, struggle with the complex, real-valued landscapes of optimization problems and often fail to generalize across different tasks. This paper presents TRACE (TRAnsferable Concept-drift Estimator), a novel framework that redefines drift detection as a sequence modeling task. By processing statistical features of surrogate model errors through a dual-attention encoder, TRACE learns to recognize universal drift patterns. Our evaluation shows that TRACE significantly outperforms traditional methods in precision and robustness, enabling more reliable optimization in dynamic environments.

Introduction: The Challenge of Concept Drift in SDDO

In Streaming Data-Driven Optimization (SDDO), algorithms must continuously adapt to a stream of incoming data. A primary obstacle is concept drift—sudden or gradual changes in the data distribution that render previous optimization strategies obsolete. Without effective detection, optimizers risk overfitting to outdated information, leading to severe performance degradation.

TRACE contrasts with traditional detectors by learning transferable patterns from complex optimization landscapes rather than relying on raw features or discrete labels.

Existing drift detection methods typically rely on hand-crafted statistical rules designed for discrete classification labels. These methods often fail in SDDO because optimization landscapes are unbounded and continuous. Furthermore, traditional detectors lack transferability; a detector tuned for one dataset rarely performs well on another without significant reconfiguration.

The TRACE Framework

TRACE addresses these limitations by treating drift detection as a learnable sequence modeling problem. The architecture is composed of three integrated stages:

  1. Stream Tokenization: Rather than monitoring raw data, TRACE tracks the prediction errors of a surrogate model. It uses a sliding window to extract statistical features (mean, variance, quartiles), converting the error stream into a sequence of informative "tokens."
  2. Dual-Attention Encoder: This core component utilizes two specialized mechanisms:
  3. Global Multi-Head Self-Attention (G-MSA): Identifies long-range structural dependencies across the sequence.
  4. Context-Guided MSA (C-MSA): Compares recent data against a "context token" representing the stable environment, allowing the model to distinguish between noise and actual distributional shifts.
  5. Drift Classification Head: A pointer-like network that determines if a drift has occurred and identifies its precise location in the sequence.
The TRACE architecture features a pipeline from stream tokenization to dual-attention encoding (Global and Context) and a final classification head.

To demonstrate its utility, the authors also introduced TRACE-EA, an evolutionary algorithm that uses TRACE as a plug-and-play module to trigger knowledge transfer and model updates immediately upon drift detection.

Experimental Evaluation and Results

TRACE was evaluated against standard benchmarks (SDDObench, DBG, and GMPB) and real-world datasets (e.g., Electricity, Kddcup99).

Detection Performance

TRACE consistently outperformed established detectors such as ADWIN and KSWIN. It achieved higher precision and F1 scores, demonstrating a unique ability to minimize false alarms while maintaining high sensitivity to actual shifts. By training on diverse synthetic streams, TRACE acquired a generalized understanding of drift that transferred effectively to "Out-of-Distribution" (OOD) optimization tasks.

Optimization Robustness

When integrated into evolutionary algorithms, TRACE-EA significantly reduced the Dynamic Tracking Error ($E_{DT}$). It detected drifts faster than competing methods, allowing the optimizer to reset or adapt before performance plummeted. In real-world stream clustering tasks, TRACE-EA maintained superior clustering quality (lower DBI scores) and exhibited lower performance variance, proving its readiness for practical deployment.

Conclusion

TRACE represents a significant shift in drift detection for streaming optimization. By moving from fixed statistical tests to a learnable, attention-based architecture, it provides a transferable solution that adapts to diverse and unseen optimization landscapes. Future work will focus on reducing detection latency through adaptive windowing and exploring tighter integration between the detector and the optimizer's core logic.

Summary updated

Abstract

Many optimization tasks involve streaming data with unknown concept drifts, posing a significant challenge as Streaming Data-Driven Optimization (SDDO). Existing methods, while leveraging surrogate model approximation and historical knowledge transfer, are often under restrictive assumptions such as fixed drift intervals and fully environmental observability, limiting their adaptability to diverse dynamic environments. We propose TRACE, a TRAnsferable C}oncept-drift Estimator that effectively detects distributional changes in streaming data with varying time scales. TRACE leverages a principled tokenization strategy to extract statistical features from data streams and models drift patterns using attention-based sequence learning, enabling accurate detection on unseen datasets and highlighting the transferability of learned drift patterns. Further, we showcase TRACE's plug-and-play nature by integrating it into a streaming optimizer, facilitating adaptive optimization under unknown drifts. Comprehensive experimental results on diverse benchmarks demonstrate the superior generalization, robustness, and effectiveness of our approach in SDDO scenarios.
BibTeX
@inproceedings{zhong2026trace,
  author = {Yuanting Zhong and Ting Huang and Xiaolin Xiao and Yue-Jiao Gong},
  title = {{TRACE: A Generalizable Drift Detector for Streaming Data-Driven Optimization}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i34.40126},
}
Figure