Self-Enhancing Video Data Management System for Compositional Events with Large Language Models [Technical Report]
Enhao Zhang, Nicole Sullivan, Brandon Haynes, Ranjay Krishna, Magdalena Balazinska
TL;DR
VOCAL-UDF addresses the challenge of answering compositional video queries without a fixed set of modules by introducing a self-enhancing VDBMS that automatically generates new UDFs using large language models. It supports both program-based Python predicates and distilled-model lightweight vision models, validated via syntax and semantic checks, and refined through active learning to align with user intent. The approach yields significant F1 improvements across multiple datasets while reducing reliance on expensive, monolithic LLM queries, enabling more cost-effective and scalable video analytics. By unifying UDF definitions within a single framework and enabling on-demand module growth, VOCAL-UDF advances practical, domain-adaptive video querying with broad applicability in surveillance, education, and robotics.
Abstract
Complex video queries can be answered by decomposing them into modular subtasks. However, existing video data management systems assume the existence of predefined modules for each subtask. We introduce VOCAL-UDF, a novel self-enhancing system that supports compositional queries over videos without the need for predefined modules. VOCAL-UDF automatically identifies and constructs missing modules and encapsulates them as user-defined functions (UDFs), thus expanding its querying capabilities. To achieve this, we formulate a unified UDF model that leverages large language models (LLMs) to aid in new UDF generation. VOCAL-UDF handles a wide range of concepts by supporting both program-based UDFs (i.e., Python functions generated by LLMs) and distilled-model UDFs (lightweight vision models distilled from strong pretrained models). To resolve the inherent ambiguity in user intent, VOCAL-UDF generates multiple candidate UDFs and uses active learning to efficiently select the best one. With the self-enhancing capability, VOCAL-UDF significantly improves query performance across three video datasets.
