Reinforced Approximate Exploratory Data Analysis

Shaddy Garg, Subrata Mitra, Tong Yu, Yash Gadhia, Arjun Kashettiwar

Abstract

Exploratory data analytics (EDA) is a sequential decision-making process where analysts choose subsequent queries based on previous results. To maintain low latency on massive datasets, systems often execute queries on data samples. However, different sampling strategies introduce varying approximation errors that can mislead analysts—a phenomenon termed "intent divergence." We present APPROXEDA, a Deep Reinforcement Learning (DRL) framework that dynamically selects optimal sampling strategies to preserve analysis flow while minimizing latency. Evaluations on real-world datasets demonstrate that our approach maintains high insight recall and reduces median latency by up to 90%.

Introduction

Interactive Exploratory Data Analysis (EDA) relies on a tight feedback loop between the analyst and the data. When datasets grow too large for real-time processing, downsampling becomes necessary. The primary risk of sampling in this context is not just numerical error, but the potential to alter the analyst's trajectory. If a sample hides a significant trend or introduces a spurious one, the analyst may pursue a "false path," leading to incorrect conclusions. Current systems typically employ static sampling (e.g., 10% uniform), which fails to account for the specific context of a query or the analyst's underlying intent.

The APPROXEDA Framework

APPROXEDA addresses the sampling challenge by treating it as a sequential decision problem. The framework consists of three core components: intent identification, a DRL agent, and a multi-faceted reward function.

Intent Identification

Since analyst goals are rarely explicit, the system uses a Bi-Term Model (BTM) to analyze historical query sequences. This represents the user's "intent" as a latent probability distribution over various analysis topics, allowing the system to understand the context of the current session.

DRL Agent and Workflow

We utilize an Advantage Actor-Critic (A2C) agent to navigate the trade-off between speed and accuracy. The agent's state space includes query history, current results, accumulated latency, and the inferred intent distribution. From an action space of 29 sampling configurations (including Stratified, Cluster, and Diversity-based sampling), the agent selects the strategy most likely to preserve the analysis flow.

The APPROXEDA framework overview, illustrating the transition from full data EDA to sampled EDA guided by a DRL policy network.

Reward Function

The agent is optimized using a reward function $R_t$ that balances three objectives:

  1. Latency Reward: Incentivizes smaller samples to maximize system responsiveness.
  2. Intent Reward: Penalizes strategies that cause the sampled results to diverge from the intent distribution produced by the full dataset.
  3. Termination Reward: Ensures that the final insights at the end of a session match the ground truth results.

Experimental Evaluation

The framework was evaluated using three real-world datasets—Flights (5.2M records), Housing (324k records), and Income (426k records). To simulate realistic human behavior, we utilized the ATENA simulator, which generates query sequences based on established human analysis patterns.

Key Results

APPROXEDA achieved a median sequence-level latency reduction of nearly 90% compared to full-data execution. Crucially, it outperformed standard baselines like BlinkDB in maintaining "intent preservation." By strategically choosing samples based on the query type (e.g., using stratified sampling for specific 'Group By' operations), the system ensured that analysts remained on the same discovery path they would have taken with the full dataset.

Recall performance across different intents for the Housing and Income datasets, showing the system's ability to maintain high insight accuracy.

As shown in the performance metrics, the system maintains high recall for final insights across various intent categories. This suggests that the RL agent successfully learns which sampling strategies are "good enough" to lead the user to the correct final conclusions without the overhead of processing the entire dataset.

Conclusion

APPROXEDA is the first framework to consider the impact of sampling on the interactive flow of EDA. By treating intent as a latent variable and using DRL to optimize sample selection, the system provides a robust solution for large-scale interactive analytics. Future work will explore "intent-shift" scenarios where users change goals mid-session and address the cold-start challenges associated with new, unseen datasets.

Summary updated

Abstract

Exploratory data analytics (EDA) is a sequential decision making process where analysts choose subsequent queries that might lead to some interesting insights based on the previous queries and corresponding results. Data processing systems often execute the queries on samples to produce results with low latency. Different downsampling strategy preserves different statistics of the data and have different magnitude of latency reductions. The optimum choice of sampling strategy often depends on the particular context of the analysis flow and the hidden intent of the analyst. In this paper, we are the first to consider the impact of sampling in interactive data exploration settings as they introduce approximation errors. We propose a Deep Reinforcement Learning (DRL) based framework which can optimize the sample selection in order to keep the analysis and insight generation flow intact. Evaluations with real datasets show that our technique can preserve the original insight generation flow while improving the interaction latency, compared to baseline methods.
BibTeX
@inproceedings{garg2023reinforced,
  author = {Shaddy Garg and Subrata Mitra and Tong Yu and Yash Gadhia and Arjun Kashettiwar},
  title = {{Reinforced Approximate Exploratory Data Analysis}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=Y_18Gy3F8Fk},
}
Figure