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.
Reward Function
The agent is optimized using a reward function $R_t$ that balances three objectives:
- Latency Reward: Incentivizes smaller samples to maximize system responsiveness.
- Intent Reward: Penalizes strategies that cause the sampled results to diverge from the intent distribution produced by the full dataset.
- 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.
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