Accelerating Queries over Unstructured Data with ML

Daniel KangCIDR 2021

Abstract

Querying massive unstructured datasets, such as video repositories, using high-fidelity "oracle" methods—heavy deep neural networks (DNNs) or human annotators—is computationally and financially prohibitive. While recent systems have introduced "proxy models" (smaller, cheaper ML models) to filter data, these approaches often lack the statistical rigor required for scientific research and fail to share computational effort across different queries. This paper introduces MEME, a system designed to accelerate queries over unstructured data by using proxy models as sampling guides. MEME provides strict statistical guarantees and utilizes task-agnostic indexing to enable work-sharing across diverse query types.

Introduction

As the volume of unstructured data like video and text continues to explode, the bottleneck for analysis has shifted from data collection to data processing. Extracting structured insights—such as identifying specific animal behaviors in ecological footage—typically requires "oracle methods." These methods are accurate but slow and expensive. To mitigate these costs, researchers have turned to proxy models to approximate oracle behavior and filter out irrelevant data.

However, current proxy-based systems suffer from two critical limitations. First, they rely on ad-hoc confidence thresholds that do not provide formal statistical guarantees, making them unsuitable for scientific applications where error margins must be known. Second, these systems are often specialized; a proxy trained for one query cannot easily be repurposed for another, leading to redundant computation. MEME addresses these gaps by reframing the role of proxy models from absolute filters to intelligent sampling guides.

The MEME System Architecture

MEME introduces a novel approach to query processing and indexing for unstructured data, focusing on two primary technical pillars: statistical reliability and computational efficiency.

1. Achieving Statistical Guarantees via Sampling

Rather than treating a proxy model's output as ground truth, MEME uses proxy scores to intelligently sample data for evaluation by the expensive oracle. This methodology allows the system to provide mathematical guarantees on query accuracy (e.g., ensuring 80% recall with 95% confidence).

To handle rare events—a common challenge in large datasets—MEME employs importance sampling. By using proxy scores to prioritize the most relevant records for oracle review, the system can efficiently locate sparse data points without exhaustive scanning. The resulting confidence intervals over precision and recall ensure that the final output meets the rigorous standards required for scientific publication.

2. Task-Agnostic Indexing and Work Sharing

To overcome the inefficiency of training new proxies for every query, MEME implements a task-agnostic indexing strategy. The system clusters unstructured data records based on similarity and caches a subset of oracle-evaluated samples.

Because this clustering and caching process is not tied to a specific query, the resulting proxy scores can be reused across a variety of downstream tasks. For example, the same underlying index can accelerate approximate selection (finding specific frames), aggregation (counting occurrences), and limit queries (finding a specific number of examples). This architecture allows the system to amortize the cost of oracle evaluations across multiple research questions.

Case Study: Ecological Monitoring

The development of MEME is driven by real-world requirements in biological research. A primary testbed involves a dataset of approximately 200 camera-days of field videos collected by Stanford biologists to study hummingbird feeding patterns. In this context, the "oracle" might be a human expert or a high-end DNN identifying specific species or behaviors. MEME allows researchers to query this massive dataset for rare feeding events with the speed of a proxy model but the statistical certainty of a manual audit.

Key Insights

  • Proxies as Guides, Not Oracles: The most effective use of cheap ML models is not to replace the oracle, but to guide where the oracle should look. This hybrid approach maintains the speed of ML while preserving the ground-truth reliability of the primary data source.
  • The Necessity of Rigor: For scientific applications, ad-hoc thresholds are insufficient. MEME demonstrates that it is possible to integrate formal statistical bounds into the query pipeline without sacrificing performance.
  • Generalized Indexing for Unstructured Data: Traditionally, video indexing was viewed as a task-specific problem. MEME shows that by clustering data and caching samples, we can build generalized indices that serve diverse, unanticipated future queries.

Limitations and Future Work

Currently, MEME is optimized for batch queries over static, archival datasets. While highly effective for post-hoc scientific analysis, the current architecture is not yet designed for real-time streaming data.

Future research is focused on extending MEME’s sampling and indexing algorithms to handle live data streams. A primary target for this evolution is real-time wildfire detection, where the ability to provide statistically guaranteed answers in a streaming environment could significantly improve early warning systems.

Summary updated

BibTeX
@inproceedings{kang2021accelerating,
  author = {Daniel Kang},
  title = {{Accelerating Queries over Unstructured Data with ML}},
  booktitle = {CIDR},
  year = {2021},
}
Figure