SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.08276 · CVPR · 2021

NExT-QA: Next Phase of Question-Answering to Explaining Temporal Actions

Tat-Seng Chua, Angela Yao, Junbin Xiao, Xindi Shang

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2105.08276.json · badge: /api/ran/2105.08276.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
doc-doc/NExT-QA canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
load_file Ran
ran, honoured the contract we drafted
doc-doc/NExT-QA/utils.py
code served (permissive licence) · get_code("e649c25c10f968ce")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned DataFrame. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import os
import tempfile
import pandas as pd

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a test CSV file
csv_file = os.path.join(temp_dir, 'test.csv')
df = pd.DataFrame({'col1': [1, 2, 3], 'col2': [4, 5, 6]})
df.to_csv(csv_file, index=False)

# Create a test JSON file
json_file = os.path.join(temp_dir, 'test.json')
test_data = {'key1': 'value1', 'key2': [1, 2, 3]}
with open(json_file, 'w') as f:
    json.dump(test_data, f)

# Create a test TXT file
txt_file = os.path.join(temp_dir, 'test.txt')
with open(txt_file, 'w') as f:
    f.write('line1\n')
    f.write('line2\n')
    f.write('line3\n')

ARGS = {
    'filename': csv_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
padding_mask Ran
ran; our contract draft was wrong, not the code
doc-doc/NExT-QA/networks/q_v_transformer.py
code served (permissive licence) · get_code("5e25b5dfb19e34d9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes two sequence tensors and performs batch matrix multiplication
# after unsqueezing them. The tensors need to be 2D (batch_size, seq_len)
# so they can be unsqueezed to 3D for bmm operation.

# Create small batch tensors with distinct dimensions
batch_size = 2
seq_len_q = 4
seq_len_k = 3

# seq_q: (batch_size, seq_len_q) - will be unsqueezed to (batch_size, seq_len_q, 1)
seq_q = torch.tensor([[1, 0, 1, 1],
                      [0, 1, 0, 1]], dtype=torch.float32)

# seq_k: (batch_size, seq_len_k) - will be unsqueezed to (batch_size, seq_len_k, 1)
seq_k = torch.tensor([[1, 0, 1],
                      [0, 1, 0]], dtype=torch.float32)

ARGS = {
    "seq_q": seq_q,
    "seq_k": seq_k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
padding_mask_embedded Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
doc-doc/NExT-QA/networks/q_v_transformer.py
code served (permissive licence) · get_code("591a68fc919f3dda")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects two tensors that can be batched matrix multiplied
# seq_q: (batch, seq_len_q, embedding_dim)
# seq_k: (batch, seq_len_k, embedding_dim)
# The result of bmm will be (batch, seq_len_q, seq_len_k)
# Then .eq(0) checks if each element equals 0

seq_q = torch.randn(2, 3, 4)  # batch=2, seq_len_q=3, embedding_dim=4
seq_k = torch.randn(2, 5, 4)  # batch=2, seq_len_k=5, embedding_dim=4

ARGS = {
    "seq_q": seq_q,
    "seq_k": seq_k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
padding_mask_k Ran
ran; our contract draft was wrong, not the code
doc-doc/NExT-QA/networks/gcn.py
code served (permissive licence) · get_code("784d83b86ef3420a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create seq_q with shape (batch=2, q_len=3, q_feat=4)
# Some values are 0 (padding), some are non-zero
seq_q = torch.tensor([
    [[1.0, 2.0, 3.0, 4.0],
     [1.0, 2.0, 3.0, 4.0],
     [0.0, 0.0, 0.0, 0.0]],
    [[1.0, 2.0, 3.0, 4.0],
     [0.0, 0.0, 0.0, 0.0],
     [0.0, 0.0, 0.0, 0.0]]
])

# Create seq_k with shape (batch=2, k_len=5, k_feat=4)
# Some values are 0 (padding), some are non-zero
seq_k = torch.tensor([
    [[1.0, 2.0, 3.0, 4.0],
     [1.0, 2.0, 3.0, 4.0],
     [1.0, 2.0, 3.0, 4.0],
     [0.0, 0.0, 0.0, 0.0],
     [0.0, 0.0, 0.0, 0.0]],
    [[1.0, 2.0, 3.0, 4.0],
     [1.0, 2.0, 3.0, 4.0],
     [0.0, 0.0, 0.0, 0.0],
     [0.0, 0.0, 0.0, 0.0],
     [0.0, 0.0, 0.0, 0.0]]
])

ARGS = {
    "seq_q": seq_q,
    "seq_k": seq_k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
padding_mask_q Ran
ran; our contract draft was wrong, not the code
doc-doc/NExT-QA/networks/gcn.py
code served (permissive licence) · get_code("1d75807b764af41c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors with distinct dimensions
# seq_q: (batch=2, q_len=3, q_feat=4)
# seq_k: (batch=2, k_len=5, k_feat=4)

seq_q = torch.randn(2, 3, 4)
seq_k = torch.randn(2, 5, 4)

# Set some rows to zero to create padding
seq_q[0, 2, :] = 0
seq_q[1, 1:, :] = 0
seq_k[0, 3:, :] = 0
seq_k[1, 4, :] = 0

ARGS = {
    "seq_q": seq_q,
    "seq_k": seq_k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 5) — shape (2, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
padding_mask_transformer Ran
ran; our contract draft was wrong, not the code
doc-doc/NExT-QA/networks/q_v_transformer.py
code served (permissive licence) · get_code("18dee9c987b1ddb8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects:
# - seq_q: a tensor with at least 2 dimensions, used with .size(1)
# - seq_k: a tensor with at least 2 dimensions, used with .eq(0), .unsqueeze(1), .expand()
# Both should have compatible batch dimensions for the expand operation

seq_q = torch.randint(1, 10, (2, 4))  # batch_size=2, seq_len_q=4
seq_k = torch.randint(0, 5, (2, 3))   # batch_size=2, seq_len_k=3, includes 0s for padding

ARGS = {
    "seq_q": seq_q,
    "seq_k": seq_k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pkload Ran
ran; our contract draft was wrong, not the code
doc-doc/NExT-QA/utils.py
code served (permissive licence) · get_code("d90d68789e4723ae")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import os.path as osp
import pickle as pkl
import tempfile

# Create a temporary pickle file with some test data
temp_dir = tempfile.mkdtemp()
test_file = osp.join(temp_dir, "test_data.pkl")

# Write some test data to the pickle file
test_data = {"key": "value", "numbers": [1, 2, 3, 4, 5]}
with open(test_file, 'wb') as fp:
    pkl.dump(test_data, fp)

ARGS = {
    "file": test_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 7 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 7 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
padding_mask_k 4 other papers
4 later · 1 only as an assembly brick
2204.14198 (2022-04)
Flamingo: a Visual Language Model for Few-Shot Learning
2205.14895 (2022-05)
From Representation to Reasoning: Towards both Evidence and Commonsense Reasoning for Video Question-Answering
2206.02349 (2022-06)
Invariant Grounding for Video Question Answering
and 1 more not named here
padding_mask_q 4 other papers
4 later · 1 only as an assembly brick
2204.14198 (2022-04)
Flamingo: a Visual Language Model for Few-Shot Learning
2205.14895 (2022-05)
From Representation to Reasoning: Towards both Evidence and Commonsense Reasoning for Video Question-Answering
2206.02349 (2022-06)
Invariant Grounding for Video Question Answering
and 1 more not named here
load_file 2 other papers
2 later
2112.06197 (2021-12)
Video as Conditional Graph Hierarchy for Multi-Granular Question Answering
2205.14895 (2022-05)
From Representation to Reasoning: Towards both Evidence and Commonsense Reasoning for Video Question-Answering
pkload 2 other papers
2 later
2112.06197 (2021-12)
Video as Conditional Graph Hierarchy for Multi-Granular Question Answering
2205.14895 (2022-05)
From Representation to Reasoning: Towards both Evidence and Commonsense Reasoning for Video Question-Answering
padding_mask 1 other paper
1 later
2205.14895 (2022-05)
From Representation to Reasoning: Towards both Evidence and Commonsense Reasoning for Video Question-Answering
padding_mask_embedded 1 other paper
1 later
2205.14895 (2022-05)
From Representation to Reasoning: Towards both Evidence and Commonsense Reasoning for Video Question-Answering
padding_mask_transformer 1 other paper
1 later
2205.14895 (2022-05)
From Representation to Reasoning: Towards both Evidence and Commonsense Reasoning for Video Question-Answering

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We introduce NExT-QA, a rigorously designed video question answering (VideoQA) benchmark to advance video understanding from describing to explaining the temporal actions. Based on the dataset, we set up multi-choice and open-ended QA tasks targeting causal action reasoning, temporal action reasoning, and common scene comprehension. Through extensive analysis of baselines and established VideoQA techniques, we find that top-performing methods excel at shallow scene descriptions but are weak in causal and temporal action reasoning. Furthermore, the models that are effective on multi-choice QA, when adapted to open-ended QA, still struggle in generalizing the answers. This raises doubt on the ability of these models to reason and highlights possibilities for improvement. With detailed results for different question types and heuristic observations for future works, we hope NExT-QA will guide the next generation of VQA research to go beyond superficial description towards a deeper understanding of videos.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2105.08276")
get_code_for_paper("2105.08276")
have("2105.08276")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2105.08276.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2105.08276.svg)](https://syntology.ai/paper/2105.08276)

Connect an agent — have() is free.