IP Library Granted Patent US 12670211
Granted Patent B2
US 12670211 · App. 19/039,607 · Granted Jun 30, 2026

Determining query complexity in video question answering

Inventors: Cristobal Eyzaguirre (Stanford, CA); Igor Vasiljevic (Chicago, IL); Achal Dave (San Francisco, CA); Jiajun Wu (Stanford, CA); Thomas Kollar (San Jose, CA); Juan Carlos Niebles (Mountain View, CA); Pavel Tokmakov (West Hollywood, CA)
Assignees: TOYOTA RESEARCH INSTITUTE, INC.; TOYOTA JIDOSHA KABUSHIKI KAISHA; THE BOARD OF TRUSTEES OF THE LELAND STANFORD JUNIOR UNIVERSITY
G06F16/7343G06F16/735
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12670211
App. No.
19/039,607
Granted
Jun 30, 2026
Kind
B2
Abstract

A method for determining a complexity of a natural language query includes converting a first natural language query into executable program code, the first natural language query being a query for a first video to be answered by one or more video question answering (VideoQA) models. The method also includes generating, via a complexity model, an abstract syntax tree (AST) based on the executable program code. The method further includes determining, via the complexity model, a complexity of the first natural language query based on quantity of subtrees, from a group of subtrees, that are present in the AST.

Claims (40)

1 . A method for determining a complexity of a natural language query, comprising:

converting a first natural language query into executable program code, the first natural language query being a query for a first video to be answered by one or more video question answering (VideoQA) models;

generating, via a complexity model, an abstract syntax tree (AST) based on the executable program code;

determining, via the complexity model, a complexity of the first natural language query based on a quantity of subtrees, from a group of subtrees, that are present in the AST;

generating, via a large language model, a group of queries associated with a second video based on a prompt and a natural language summary of the second video; and

selecting, via the complexity model, one or more queries of the group of queries, a respective complexity of each of the one or more queries being greater than or equal to a complexity threshold.

2 . The method of claim 1 , wherein the group of subtrees are subtrees that are common among a group of natural language queries.

3 . The method of claim 1 , wherein each subtree in the group of subtrees decreases a probability of the one or more VideoQA models correctly answering the first natural language query.

4 . The method of claim 1 , wherein:

determining the complexity further comprises encoding, via one-hot encoding, the AST into a vector based on the quantity of subtrees, from a group of subtrees, that are present in the AST;

the complexity model determines the complexity based on the vector.

5 . The method of claim 1 , further comprising generating the natural language summary via an image captioning model.

6 . The method of claim 1 , wherein the complexity is based on a likelihood of each of the one or more VideoQA models failing to answer the query.

7 . An apparatus for determining a complexity of a natural language query, comprising:

one or more processors; and

one or more memories coupled with the one or more processors and storing processor-executable code that, when executed by the one or more processors, is configured to cause the apparatus to:

convert a first natural language query into executable program code, the first natural language query being a query for a first video to be answered by one or more video question answering (VideoQA) models;

generate, via a complexity model, an abstract syntax tree (AST) based on the executable program code; and

determine, via the complexity model, a complexity of the first natural language query based on a quantity of subtrees, from a group of subtrees, that are present in the AST;

generate, via a large language model, a group of queries associated with a second video based on a prompt and a natural language summary of the second video; and

select, via the complexity model, one or more queries of the group of queries, a respective complexity of each of the one or more queries being greater than or equal to a complexity threshold.

8 . The apparatus of claim 7 , wherein the group of subtrees are subtrees that are common among a group of natural language queries.

9 . The apparatus of claim 7 , wherein each subtree in the group of subtrees decreases a probability of the one or more VideoQA models correctly answering the first natural language query.

10 . The apparatus of claim 7 , wherein:

execution of the processor-executable code to determine the complexity further causes the apparatus to encode, via one-hot encoding, the AST into a vector based on the quantity of subtrees, from a group of subtrees, that are present in the AST;

the complexity model determines the complexity based on the vector.

11 . The apparatus of claim 7 , wherein execution of the processor-executable code further causes the apparatus to generate the natural language summary via an image captioning model.

12 . The apparatus of claim 7 , wherein the complexity is based on a likelihood of each of the one or more VideoQA models failing to answer the query.

13 . A non-transitory computer-readable medium having program code recorded thereon for determining a complexity of a natural language query, the program code executed by one or more processors and comprising:

program code to convert a first natural language query into executable program code, the first natural language query being a query for a first video to be answered by one or more video question answering (VideoQA) models;

program code to generate, via a complexity model, an abstract syntax tree (AST) based on the executable program code; and

program code to determine, via the complexity model, a complexity of the first natural language query based on a quantity of subtrees, from a group of subtrees, that are present in the AST;

program code to generate, via a large language model, a group of queries associated with a second video based on a prompt and a natural language summary of the second video; and

program code to select, via the complexity model, one or more queries of the group of queries, a respective complexity of each of the one or more queries being greater than or equal to a complexity threshold.

14 . The non-transitory computer-readable medium of claim 13 , wherein the group of subtrees are subtrees that are common among a group of natural language queries.

15 . The non-transitory computer-readable medium of claim 13 , wherein each subtree in the group of subtrees decreases a probability of the one or more VideoQA models correctly answering the first natural language query.

16 . The non-transitory computer-readable medium of claim 13 , wherein:

the program code to determine the complexity further comprises program code to encode, via one-hot encoding, the AST into a vector based on the quantity of subtrees, from a group of subtrees, that are present in the AST;

the complexity model determines the complexity based on the vector.

17 . The non-transitory computer-readable medium of claim 13 , wherein the program code further comprises program code to generate the natural language summary via an image captioning model.