SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.02636 · NeurIPS · 2021

Multimodal Neural Script Knowledge Models

Ali Farhadi, Rowan Zellers, Yejin Choi, Ximing Lu, Jack Hessel, ♥ Youngjae, Yu Jae, Sung Park, Jize Cao, Visual Reasoning

arXiv · PDF · Open in the Atlas

Code that ran

9 of 14 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; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 2 failures of our instrument; 5 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/2106.02636.json · badge: /api/ran/2106.02636.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
rowanz/merlot community (classifier label)
classifier basis not recorded on the link
9 ran · 5 no recorded run
FunctionStatusWhere it lives
absolute_distance Ran
ran on a synthesized input
rowanz/merlot/downstream/sort_story/score_permutations.py
code served (permissive licence) · get_code("62bc4892e2b51c64")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

# The function takes a 'story' parameter which is converted to a numpy array
# and compared element-wise to [0, 1, 2, 3, 4], then the mean absolute difference is computed.
# The story should be array-like with 5 elements to match the reference array.

story = [0.5, 1.2, 1.8, 3.1, 3.9]

ARGS = {
    "story": story
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
bytes_feature Ran
ran; our contract draft was wrong, not the code
rowanz/merlot/utils/data_utils.py
code served (permissive licence) · get_code("d682a9593710857e")
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 Feature. 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 tensorflow as tf

# bytes_feature expects a single parameter 'value' which should be bytes
# The function wraps it in tf.train.BytesList and then tf.train.Feature

ARGS = {
    "value": b"example_bytes_data"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Feature — a Feature output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Feature 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
cls_metric Ran
ran on a synthesized input
rowanz/merlot/downstream/vcr/modeling.py
code served (permissive licence) · get_code("27a244d81c36fbf6")
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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)

# Create small test tensors
batch_size = 2
num_classes = 4
num_flattened = 12  # batch_size * num_classes = 2 * 6, but we want distinct shape

# logits_flat: flattened logits tensor of shape (batch_size * something,)
# The function reshapes it to [batch_size, -1], so total elements must be divisible by batch_size
logits_flat = tf.constant(np.random.randn(batch_size * num_classes).astype(np.float32), dtype=tf.float32)

# targets: class indices of shape (batch_size,)
targets = tf.constant([0, 2], dtype=tf.int64)

ARGS = {
    'logits_flat': logits_flat,
    'targets': targets,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — 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
fixed_padding Ran
ran on a synthesized input
rowanz/merlot/utils/vision_transformer.py
code served (permissive licence) · get_code("4d045734e57cf54a")
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 EagerTensor, ndim 4, dtype family float, shape (2, 6, 5, 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 tensorflow as tf
import numpy as np

# Create a small batch of input tensors
# Shape: [B, H, W, C] = [2, 4, 3, 5]
batch_size = 2
height = 4
width = 3
channels = 5

inputs = tf.constant(
    np.random.randn(batch_size, height, width, channels).astype(np.float32)
)

kernel_size = 3

ARGS = {
    "inputs": inputs,
    "kernel_size": kernel_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 6, 5, 5) — shape (2, 6, 5, 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
get_shape_list Ran
ran on a synthesized input
rowanz/merlot/utils/model_utils.py
code served (permissive licence) · get_code("54e064e79cb0b5fd")
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 list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 tensorflow as tf
import six

# Set up TensorFlow eager execution for testing
tf.compat.v1.enable_eager_execution()

# Create a simple tensor with shape (2, 4, 3)
tensor = tf.constant([
    [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],
    [[13, 14, 15], [16, 17, 18], [19, 20, 21], [22, 23, 24]]
], dtype=tf.int32)

ARGS = {
    'tensor': tensor,
    'expected_rank': None,
    'name': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
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
int64_feature Ran
ran; our contract draft was wrong, not the code
rowanz/merlot/utils/data_utils.py
code served (permissive licence) · get_code("328d17201d9a0e68")
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 Feature. 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 tensorflow as tf

def int64_feature(value):
    return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))

ARGS = {
    "value": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Feature — a Feature output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Feature 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
int64_list_feature Ran
ran on a synthesized input
rowanz/merlot/utils/data_utils.py
code served (permissive licence) · get_code("f6d735872f4495ed")
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 Feature. 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 tensorflow as tf

# The function expects a 'value' parameter that will be passed to
# tf.train.Int64List(value=value). This should be an iterable of integers.

ARGS = {
    "value": [1, 2, 3, 4, 5]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Feature — a Feature output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Feature 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
reduce_rms Ran
ran on a synthesized input
rowanz/merlot/utils/optimization.py
pointer only (licence: MIT); the stored copy get_code serves, from rowanz/grover, is pointer only (licence: Apache-2.0) · get_code("2d64405efb57086c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from rowanz/grover, and Apache-2.0, as GitHub detects it on that repository, is in the permissive set, but a licence decision keeps the body a pointer: its licence file names an outside party, so it may cover vendored code rather than the repository owner's files (recorded as pointer:licence_names_third_party_corporation). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

spearman_acc Ran
ran on a synthesized input
rowanz/merlot/downstream/sort_story/score_permutations.py
code served (permissive licence) · get_code("1f05965c2f684e4d")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 scipy
import numpy as np

def spearman_acc(story):
    return scipy.stats.spearmanr(story, [0, 1, 2, 3, 4])[0]

# The function expects a sequence-like object that can be compared with [0, 1, 2, 3, 4]
# using scipy.stats.spearmanr. This computes the Spearman rank correlation coefficient.
# We need to provide a sequence of 5 numeric values.

story = [1.2, 2.3, 3.1, 4.5, 5.0]

ARGS = {
    "story": story
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
create_initializer Not yet run
unverified (harvested, no recorded run)
rowanz/merlot/utils/transformer.py
pointer only (licence: MIT); the stored copy get_code serves, from huawei-noah/Pretrained-Language-Model, is pointer only (licence: NONE) · get_code("e3981aa2fadfb2eb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from huawei-noah/Pretrained-Language-Model, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

gelu Not yet run
unverified (harvested, no recorded run)
rowanz/merlot/utils/model_utils.py
code served (permissive licence) · get_code("e1cd654e2fac4f34")
How it ran

no invocation recorded.

get_tpu_run_config Not yet run
unverified (harvested, no recorded run)
rowanz/merlot/utils/neat_config.py
code served (permissive licence) · get_code("8772475a675f1e62")
How it ran

no invocation recorded.

layer_norm Not yet run
unverified (harvested, no recorded run)
rowanz/merlot/utils/model_utils.py
code served (permissive licence) · get_code("1fda499c82a8193a")
How it ran

no invocation recorded.

score_permutation Not yet run
unverified (harvested, no recorded run)
rowanz/merlot/downstream/sort_story/score_permutations.py
code served (permissive licence) · get_code("e17cc4aa02dacfbf")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 1 later) and 9 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
create_initializer 9 other papers
8 dated earlier, 1 later · 6 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1905.12616 (2019-05)
Defending Against Neural Fake News
and 6 more not named here
bytes_feature 8 other papers
8 dated earlier
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1607.08022 (2016-07)
Instance Normalization: The Missing Ingredient for Fast Stylization
1609.05158 (2016-09)
Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network
and 5 more not named here
int64_feature 7 other papers
7 dated earlier
1607.08022 (2016-07)
Instance Normalization: The Missing Ingredient for Fast Stylization
1611.07810 (2016-11)
A dataset and exploration of models for understanding video data through fill-in-the-blank question-answering
1802.05591 (2018-02)
Towards End-to-End Lane Detection: an Instance Segmentation Approach
and 4 more not named here
int64_list_feature 5 other papers
5 dated earlier
1607.08022 (2016-07)
Instance Normalization: The Missing Ingredient for Fast Stylization
1803.10562 (2018-03)
ELEGANT: Exchanging Latent Encodings with GAN for Transferring Multiple Face Attributes
1812.00442 (2018-12)
Deep Cosine Metric Learning for Person Re-Identification
and 2 more not named here
reduce_rms 1 other paper
1 dated earlier
1905.12616 (2019-05)
Defending Against Neural Fake News

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

As humans, we understand events in the visual world contextually, performing multimodal reasoning across time to make inferences about the past, present, and future. We introduce MERLOT, a model that learns multimodal script knowledge by watching millions of YouTube videos with transcribed speech -in an entirely label-free, self-supervised manner. By pretraining with a mix of both framelevel (spatial) and video-level (temporal) objectives, our model not only learns to match images to temporally corresponding words, but also to contextualize what is happening globally over time. As a result, MERLOT exhibits strong out-of-the-box representations of temporal commonsense, and achieves state-ofthe-art performance on 12 different video QA datasets when finetuned. It also transfers well to the world of static images, allowing models to reason about the dynamic context behind visual scenes. On Visual Commonsense Reasoning, MERLOT answers questions correctly with 80.6% accuracy, outperforming stateof-the-art models of similar size by over 3%, even those that make heavy use of auxiliary supervised data (like object bounding boxes). Ablation analyses demonstrate the complementary importance of: 1) training on videos versus static images; 2) scaling the magnitude and diversity of the pretraining video corpus; and 3) using diverse objectives that encourage full-stack multimodal reasoning, from the recognition to cognition level.

For agents

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

get_harvested_code_for_paper("2106.02636")
get_code_for_paper("2106.02636")
have("2106.02636")

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

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

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

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

Connect an agent — have() is free.