Skip to main content
QUICK REVIEW

[Paper Review] BlazeIt: Optimizing Declarative Aggregation and Limit Queries for Neural Network-Based Video Analytics

Daniel Kang, Peter Bailis|arXiv (Cornell University)|May 2, 2018
Advanced Image and Video Retrieval TechniquesComputer Science60 references28 citations
TL;DR

BlazeIt introduces a declarative query system for neural network-based video analytics that optimizes aggregation and limit queries using specialized neural networks as control variates and a prioritized search algorithm. It achieves up to 83× speedup over prior methods while maintaining accuracy guarantees, even with imperfect proxy models.

ABSTRACT

Recent advances in neural networks (NNs) have enabled automatic querying of large volumes of video data with high accuracy. While these deep NNs can produce accurate annotations of an object's position and type in video, they are computationally expensive and require complex, imperative deployment code to answer queries. Prior work uses approximate filtering to reduce the cost of video analytics, but does not handle two important classes of queries, aggregation and limit queries; moreover, these approaches still require complex code to deploy. To address the computational and usability challenges of querying video at scale, we introduce BlazeIt, a system that optimizes queries of spatiotemporal information of objects in video. BlazeIt accepts queries via FrameQL, a declarative extension of SQL for video analytics that enables video-specific query optimization. We introduce two new query optimization techniques in BlazeIt that are not supported by prior work. First, we develop methods of using NNs as control variates to quickly answer approximate aggregation queries with error bounds. Second, we present a novel search algorithm for cardinality-limited video queries. Through these these optimizations, BlazeIt can deliver up to 83x speedups over the recent literature on video processing.

Motivation & Objective

  • To address the high computational cost and complex imperative code required to deploy deep neural networks (DNNs) for large-scale video analytics.
  • To enable efficient, declarative querying of video data for aggregation and limit queries—classes not well-supported by prior approximate filtering techniques.
  • To provide exact answers or formal error bounds for aggregation and cardinality-limited queries without requiring full frame-level DNN inference.
  • To reduce the number of expensive DNN invocations through query-aware optimization, leveraging specialized neural networks as control variates and for frame prioritization.
  • To unify declarative query specification with end-to-end optimization, enabling non-expert users to express complex video analytics workloads via FrameQL.

Proposed method

  • Introduces FrameQL, a declarative SQL extension for video analytics that expresses spatiotemporal object information as a virtual relation.
  • Uses query-specific, specialized neural networks as control variates to reduce variance in approximate aggregation queries, enabling fewer DNN invocations with bounded error.
  • Applies a novel search algorithm that prioritizes frames likely to contain target events (e.g., frames with at least three cars) using proxy models, accelerating limit queries.
  • Employs a rule-based query optimizer that generates execution plans minimizing DNN calls while preserving accuracy guarantees.
  • Supports both aggregation and limit queries by extending specialization beyond binary detection to multi-class and counting workloads.
  • Integrates optimizations that are robust to inaccuracies in specialized NNs, ensuring correctness or bounded error regardless of proxy model quality.

Experimental results

Research questions

  • RQ1Can specialized neural networks be effectively repurposed as control variates to accelerate approximate aggregation queries in video analytics?
  • RQ2How can frame prioritization via proxy models improve the efficiency of cardinality-limited queries (e.g., LIMIT 10 frames with three cars) without sacrificing accuracy?
  • RQ3Can a declarative query language and optimizer be used to automatically generate efficient execution plans for complex video analytics workloads?
  • RQ4To what extent can query-specific optimizations reduce DNN inference cost while maintaining formal error bounds?
  • RQ5How do these optimizations compare in performance to prior systems like NoScope and approximate query processing, especially on frequent and rare object patterns?

Key findings

  • BlazeIt achieves up to 83× speedup over the state of the art in video analytics workloads, particularly for aggregation and limit queries.
  • The use of specialized neural networks as control variates reduces variance in aggregation estimates, allowing accurate results with significantly fewer DNN invocations.
  • The prioritized search algorithm for limit queries reduces the number of frames requiring full DNN inference by focusing on high-probability candidates, especially effective for rare events.
  • BlazeIt maintains formal accuracy guarantees even when specialized neural networks are inaccurate, due to the control variate and search-based design.
  • The system outperforms prior filtering-based approaches like NoScope and approximate query processing, especially in scenarios with high object frequency where filtering is inefficient.
  • FrameQL enables non-expert users to express complex video analytics queries declaratively, with end-to-end optimization handled automatically by the system.

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.