NeurDB: On the Design and Implementation of an AI-powered Autonomous Database

Zhanhao Zhao, Shaofeng Cai, Haotian Gao, Hexiang Pan, Siqi Xiang, Naili Xing, Gang Chen, Beng Chin Ooi, Yanyan Shen, Yuncheng Wu, Meihui Zhang

Introduction

Modern database management systems (DBMS) face significant challenges due to dynamic data distributions and fluctuating workloads. While "learned" components have emerged to optimize performance, they often suffer from "drift"—where models become obsolete as underlying patterns change. NeurDB addresses this by moving beyond external AI integration, instead proposing a "deep fusion" where AI is holistically embedded into the database core to enable real-time adaptation.

System Architecture and Deep Fusion

NeurDB's architecture is built on an in-database AI ecosystem. Unlike traditional systems that treat AI as an external service, NeurDB redesigns the query executor to include native AI operators for training, inference, and fine-tuning.

NeurDB System Architecture

A key innovation is the AI Engine, which utilizes a dedicated Data Streaming Protocol to minimize data movement overhead between the storage engine and the AI runtime. By embedding AI directly, the system can access fine-grained internal metrics—such as buffer usage and lock contention—enabling it to detect and respond to drift as it happens. Furthermore, NeurDB extends SQL with keywords like PREDICT VALUE OF, making AI analytics transparent to developers.

Incremental Adaptation and Model Management

To handle drift efficiently, NeurDB employs a "layered model storage" approach. Rather than retraining models from scratch when data shifts, the system performs incremental fine-tuning on only the final layers of the neural network. This allows for rapid adaptation with minimal computational and storage costs, ensuring the database remains optimized even during sudden changes, such as e-commerce flash sales.

Fast-adaptive Learned Components

NeurDB applies its AI-native design to two critical database functions, utilizing the Filter-and-Refine Principle (FRP) to quickly eliminate unpromising strategies before performing resource-intensive optimization:

  1. Learned Concurrency Control (NeurDB(CC)): Uses Reinforcement Learning (RL) to decide whether to acquire a lock, block, or abort a transaction based on the current "contention state."
  2. Learned Query Optimizer: Employs a dual-module encoder/analyzer architecture using tree transformers and cross-attention to map candidate query plans to current system conditions.
Learned Concurrency Control and Query Optimization

Evaluation and Key Results

NeurDB was evaluated using real-world analytics tasks (Avazu for e-commerce, UCI Diabetes for healthcare) and synthetic benchmarks (YCSB, STATS). Key findings include:

  • Efficiency: NeurDB achieved up to 48.6% lower end-to-end latency and 3x higher training throughput compared to external AI integrations (e.g., PostgreSQL with an external runtime).
  • Drift Resilience: Incremental updates allowed NeurDB to converge faster and maintain lower loss values during data distribution swaps compared to static models.
  • Component Performance: The learned concurrency control outperformed state-of-the-art solutions like Polyjuice by up to 2.05x, while the query optimizer reduced average latency by up to 20.32% compared to other learned optimizers like Bao and Lero.

Conclusion and Future Work

NeurDB demonstrates that true database autonomy requires deep AI integration. By treating AI as a first-class citizen within the DBMS, NeurDB achieves superior adaptability and performance. Future research directions include exploring flexible model topologies that can dynamically adjust their own architecture and extending NeurDB into a disaggregated, cloud-native HTAP environment.

Summary updated

BibTeX
@inproceedings{zhao2025neurdb,
  author = {Zhanhao Zhao and Shaofeng Cai and Haotian Gao and Hexiang Pan and Siqi Xiang and Naili Xing and Gang Chen and Beng Chin Ooi and Yanyan Shen and Yuncheng Wu and Meihui Zhang},
  title = {{NeurDB: On the Design and Implementation of an AI-powered Autonomous Database}},
  booktitle = {CIDR},
  year = {2025},
}
Figure