NeurBench: Benchmarking Learned Database Components with Data and Workload Drift Modeling

Zhanhao Zhao, Haotian Gao, Naili Xing, Lingze Zeng, Meihui Zhang, Gang Chen, Manuel Rigger, Beng Chin Ooi · OpenReview

Abstract

Learned database components, which deeply integrate machine learning into their design, have been extensively studied in recent years. Given the dynamism of databases, where data and workloads continuously drift, it is crucial for learned database components to remain effective and efficient in the face of data and workload drift. Adaptability, therefore, is a key factor in assessing their practical applicability. However, existing benchmarks for learned database components either overlook or oversimplify the treatment of data and workload drift, failing to evaluate learned database components across a broad range of drift scenarios. This paper presents NeurBench, a new benchmark suite that applies measurable and controllable data and workload drift to enable systematic performance evaluations of learned database components. We quantify diverse types of drift by introducing a key concept called the drift factor. Building on this formulation, we propose a drift-aware data and workload generation framework that effectively simulates real-world drift while preserving inherent correlations. We employ NeurBench to evaluate state-of-the-art learned query optimizers, learned indexes, and learned concurrency control within a consistent experimental process, providing insights into their performance under diverse data and workload drift scenarios.

Introduction

Database systems are increasingly replacing traditional heuristics with Machine Learning (ML) models to optimize queries, index data, and manage concurrency. However, databases are inherently dynamic environments where users frequently insert new data, delete old records, and alter query patterns—a phenomenon known as drift.

Most learned components are trained on static snapshots. When the underlying data distribution or workload shifts, these models can become "stale," leading to suboptimal query plans or inefficient indexing. Existing benchmarks often oversimplify drift or ignore complex correlations between data attributes. NeurBench addresses this gap by providing a systematic, controllable, and realistic framework to measure how well learned components adapt to environmental changes.

The NeurBench Framework

NeurBench is designed to evaluate the adaptability of learned database components through a structured pipeline that transforms real-world data and workloads into diverse drift scenarios.

Overview of the NeurBench framework, showing the end-to-end pipeline from real data to performance evaluation of drifted components.

The framework consists of a drift-aware generator that produces synthetic data and workloads based on a specified intensity of change. These "drifted" artifacts are then used to train or initialize learned database components, which are subsequently evaluated by a performance evaluator against various drift scenarios.

Methodology: Modeling and Generating Drift

The core innovation of NeurBench lies in its ability to generate controllable drift while preserving the intricate internal correlations of the original data.

The Drift Factor ($d$)

To quantify drift, NeurBench introduces a unified metric, the drift factor ($d$), ranging from 0 (no drift) to 1 (total shift). This factor is calculated based on the Jensen-Shannon (JS) divergence between the original and drifted distributions, allowing researchers to precisely calibrate the intensity of the drift they wish to test.

Guided Diffusion Modeling

NeurBench utilizes a Denoising Diffusion Probabilistic Model (DDPM) to generate high-fidelity drifted data. This process involves two primary modules:

  • Diffuser: Learns the original data/workload distribution.
  • Drifter: Provides guidance during the generation process to ensure the output meets the required drift factor.
The training architecture for the Diffuser and Drifter modules, illustrating how drift is controlled during the diffusion process.

By combining these modules, NeurBench generates new datasets that satisfy specific drift requirements while maintaining the complex attribute correlations (e.g., the relationship between user age and balance) found in the source data. Additionally, an agent-based selection mechanism ensures that generated drift follows a plausible historical progression.

Experimental Evaluation

The authors evaluated NeurBench using several real-world datasets, including IMDB (for complex query optimization), CH-Benchmark (for mixed transactional and analytical workloads), and others like Facebook and Shopper.

Key Results

  • Generator Accuracy: NeurBench's generator maintained significantly lower correlation error compared to existing state-of-the-art synthesis tools when generating drifted data.
  • Query Optimization: Under severe drift ($d=0.5$), execution times for some learned optimizers skyrocketed. Notably, ranking-based models (like Lero) showed better resilience than regression-based models.
  • Index Performance: Throughput for certain learned indexes, such as LIPP, dropped by over 80% in specific drift scenarios, highlighting structural vulnerabilities.
  • Concurrency Control: Fast-adaptation algorithms like CCaaLF were shown to converge to optimal throughput significantly faster than older learned models after a workload shift.

Insights and Discussion

The evaluation revealed several critical insights for the development of future learned database components:

  • Ranking vs. Regression: In query optimization, models that rank plans are more stable under drift than those predicting absolute execution times.
  • The PostgreSQL Baseline: A striking finding was that traditional optimizers like PostgreSQL often outperformed learned models once significant drift was introduced, as the ML models were misled by outdated training data.
  • Structural Sensitivity: Homogeneous index structures are more sensitive to drift than heterogeneous ones that separate navigation from data storage.

Conclusion and Future Work

NeurBench provides a necessary tool for assessing the practical applicability of learned database components. While currently focused on in-memory structures and marginal distributions, future work will extend the benchmark to disk-resident storage and more complex multi-dimensional joint distributions. Furthermore, the insights gained from NeurBench can help develop automated "early warning systems" to trigger model retraining before performance degradation occurs.

Summary updated

BibTeX
@misc{zhao2025neurbench,
  author = {Zhanhao Zhao and Haotian Gao and Naili Xing and Lingze Zeng and Meihui Zhang and Gang Chen and Manuel Rigger and Beng Chin Ooi},
  title = {{NeurBench: Benchmarking Learned Database Components with Data and Workload Drift Modeling}},
  year = {2025},
  eprint = {2503.13822},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.13822},
}
Figure