Skip to main content
QUICK REVIEW

[Paper Review] ML-AQP: Query-Driven Approximate Query Processing based on Machine Learning

Fotis Savva, Christos‐Nikolaos Anagnostopoulos|arXiv (Cornell University)|Mar 14, 2020
Data Quality and ManagementDecision Sciences6 citations
TL;DR

ML-AQP proposes a lightweight, query-driven machine learning system that predicts approximate aggregate query results using only previously executed queries and their answers, avoiding data access. It achieves up to 5 orders of magnitude faster response times with low error rates by training compact models on vectorized query representations and providing prediction intervals for error bounds.

ABSTRACT

As more and more organizations rely on data-driven decision making, large-scale analytics become increasingly important. However, an analyst is often stuck waiting for an exact result. As such, organizations turn to Cloud providers that have infrastructure for efficiently analyzing large quantities of data. But, with increasing costs, organizations have to optimize their usage. Having a cheap alternative that provides speed and efficiency will go a long way. Concretely, we offer a solution that can provide approximate answers to aggregate queries, relying on Machine Learning (ML), which is able to work alongside Cloud systems. Our developed lightweight ML-led system can be stored on an analyst's local machine or deployed as a service to instantly answer analytic queries, having low response times and monetary/computational costs and energy footprint. To accomplish this we leverage the knowledge obtained by previously answered queries and build ML models that can estimate the result of new queries in an efficient and inexpensive manner. The capabilities of our system are demonstrated using extensive evaluation with both real and synthetic datasets/workloads and well known benchmarks.

Motivation & Objective

  • To address the high cost and latency of exact query processing in cloud-based data warehouses by enabling fast, approximate results.
  • To reduce reliance on expensive cloud infrastructure during exploratory data analysis by shifting computation locally.
  • To provide a lightweight, low-footprint system that supports all aggregate functions, including MIN and MAX, which are often poorly handled by existing AQP methods.
  • To ensure prediction reliability through error bounds via quantile regression, even as data or query workloads evolve.
  • To eliminate the need for data access during training or inference, making the system privacy-preserving and efficient.

Proposed method

  • Queries are transformed into a custom vectorized representation that captures their structure and filtering conditions.
  • Machine learning models are trained on historical query-result pairs to learn the mapping from query patterns to aggregate results.
  • Simple, interpretable models (e.g., linear models) are used to ensure low memory footprint and fast training.
  • Prediction intervals are constructed using quantile regression to provide error guarantees on approximate answers.
  • The system supports incremental updates to both data and query workloads without retraining from scratch.
  • The approach is AF-agnostic, enabling support for any aggregate function, including SUM, AVG, COUNT, MIN, and MAX.

Experimental results

Research questions

  • RQ1Can a machine learning system trained solely on past query-result pairs provide fast and accurate approximate answers without accessing the underlying data?
  • RQ2How does the performance of such a system compare to existing AQP engines in terms of speed, accuracy, and resource usage?
  • RQ3Can the system maintain accuracy and low error bounds when data or query workloads change over time?
  • RQ4To what extent can the system generalize across diverse aggregate functions, including MIN and MAX, which are challenging for sampling-based AQP?
  • RQ5How does the training and inference overhead of this query-driven approach compare to data-driven ML-based AQP systems?

Key findings

  • ML-AQP achieves up to 5 orders of magnitude speedup in query response time compared to exact processing, with minimal computational cost.
  • On the BK-Austin dataset, ML-AQP achieved a Relative Absolute Error (RAE) of 3.9%, slightly outperforming NeuralCubes (3.88%) despite using simpler models.
  • On the BK-NYC dataset, ML-AQP achieved an RAE of 3.6%, outperforming NeuralCubes (4.25%) and demonstrating superior accuracy under similar conditions.
  • ML-AQP trains its models over 10 times faster than NeuralCubes, even on weaker hardware, due to its lightweight, query-centric approach.
  • The system supports all aggregate functions, including MIN and MAX, which are often poorly approximated by existing AQP techniques.
  • Prediction intervals generated via quantile regression provide reliable error bounds, enabling users to reason about the accuracy of approximate results.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.