Skip to main content
QUICK REVIEW

[Paper Review] Approximate Query Processing using Deep Generative Models

Saravanan Thirumuruganathan, Shohedul Hasan|arXiv (Cornell University)|Mar 24, 2019
Advanced Database Systems and QueriesComputer Science45 references14 citations
TL;DR

This paper proposes a deep generative modeling approach for Approximate Query Processing (AQP) that trains a lightweight variational autoencoder (VAE) on data to learn its underlying distribution, enabling fast, client-side sampling for interactive data exploration. The method achieves high accuracy with low latency by generating synthetic samples on-demand, mitigating model bias via rejection sampling and improving accuracy through model ensembles, outperforming prior methods in scalability and real-time responsiveness on large datasets.

ABSTRACT

Data is generated at an unprecedented rate surpassing our ability to analyze them. The database community has pioneered many novel techniques for Approximate Query Processing (AQP) that could give approximate results in a fraction of time needed for computing exact results. In this work, we explore the usage of deep learning (DL) for answering aggregate queries specifically for interactive applications such as data exploration and visualization. We use deep generative models, an unsupervised learning based approach, to learn the data distribution faithfully such that aggregate queries could be answered approximately by generating samples from the learned model. The model is often compact - few hundred KBs - so that arbitrary AQP queries could be answered on the client side without contacting the database server. Our other contributions include identifying model bias and minimizing it through a rejection sampling based approach and an algorithm to build model ensembles for AQP for improved accuracy. Our extensive experiments show that our proposed approach can provide answers with high accuracy and low latency.

Motivation & Objective

  • To enable low-latency, interactive data exploration by shifting AQP computation to the client side using compact deep generative models.
  • To address model bias in deep generative models used for AQP through a rejection sampling-based mitigation technique.
  • To improve query accuracy by constructing optimal model ensembles using dynamic programming for partitioned data.
  • To demonstrate scalability and efficiency of the approach on large real-world datasets, enabling on-demand sampling without server access.
  • To provide a practical, lightweight alternative to traditional sampling-based AQP that supports arbitrary aggregate queries with high fidelity.

Proposed method

  • Train a variational autoencoder (VAE) on the full dataset to learn a low-dimensional latent representation that approximates the true data distribution.
  • Generate synthetic samples from the trained VAE to answer aggregate queries (e.g., AVG, SUM, COUNT) without accessing the original data.
  • Apply rejection sampling to reduce model bias by filtering out low-likelihood samples that deviate from the true data distribution.
  • Use dynamic programming to identify optimal partitions of the data for training multiple VAEs, forming an ensemble that improves overall estimation accuracy.
  • Implement vectorized sampling in PyTorch to enable fast, scalable generation of large synthetic sample sets in fractions of a second.
  • Integrate the model into AQP pipelines to support arbitrary, ad-hoc aggregate queries on any subset of attributes with minimal latency.

Experimental results

Research questions

  • RQ1Can deep generative models like VAEs be effectively used to approximate complex data distributions for interactive AQP in data exploration?
  • RQ2How can model bias in deep generative models be minimized to ensure accurate aggregate estimates in AQP?
  • RQ3What is the optimal strategy for partitioning data and training multiple generative models to improve AQP accuracy?
  • RQ4Can the proposed model-based AQP approach scale to large datasets and deliver low-latency responses on the client side?
  • RQ5How does the performance of the proposed method compare to existing sampling-based and synopsis-based AQP techniques in terms of accuracy and efficiency?

Key findings

  • The proposed VAE-based AQP approach achieves high accuracy on aggregate queries, with estimation errors significantly lower than baseline sampling methods.
  • Rejection sampling effectively reduces model bias, improving the fidelity of synthetic samples and resulting in more accurate aggregate estimates.
  • Model ensembles trained using dynamic programming for optimal partitioning yield measurable improvements in estimation accuracy across diverse query types.
  • Sampling from the trained VAE model is highly efficient, with generation times of a few hundred milliseconds even for large sample sizes (e.g., 1M tuples), enabling real-time responsiveness.
  • The VAE model is compact (a few hundred KBs), making it feasible to deploy on client devices and enabling fully offline AQP without server interaction.
  • The approach scales efficiently to large datasets, with training completed in minutes on a single GPU, in contrast to hours required by prior methods like MSPN.

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.