SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2005.00200 · EMNLP · 2020

HERO: Hierarchical Encoder for Video+Language Omni-representation Pre-training

Yu Cheng, Zhe Gan, Yen-Chun Chen, Linjie Li, Jingjing Liu, Licheng Yu

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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; 2 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 2 failures of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2005.00200.json · badge: /api/ran/2005.00200.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
linjieli222/HERO canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
linjieli222/hero_video_feature_extractor community
Papers with Code archive
2 ran · 3 no recorded run
FunctionStatusWhere it lives
swish Ran
ran; our contract draft was wrong, not the code
linjieli222/HERO/model/layers.py
pointer only (licence: MIT) · get_code("0f786c407fb1ee4c")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, linjieli222/HERO, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

STConv3D Ran
ran on a synthesized input
linjieli222/hero_video_feature_extractor/mil-nce/model.py
code served (permissive licence) · get_code("43a229d4e3c68d02")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 5, dtype family float, shape (2, 4, 4, 5, 6) 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
import torch.nn as nn

INIT_ARGS = {
    'input_dim': 3,
    'output_dim': 4,
    'kernel_size': [3, 3, 3],
    'stride': 1,
    'padding': 1,
    'separable': False,
}

ARGS = {
    'input': torch.randn(2, 3, 4, 5, 6),
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 5, dtype family float, shape (2, 4, 4, 5, 6) — shape (2, 4, 4, 5, 6) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SelfGating Ran
ran on a synthesized input
linjieli222/hero_video_feature_extractor/mil-nce/model.py
code served (permissive licence) · get_code("8b37c80ce67e3097")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 5, dtype family float, shape (2, 4, 3, 5, 7) 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 as th
import torch.nn as nn

class SelfGating(nn.Module):

    def __init__(self, input_dim):
        super(SelfGating, self).__init__()
        self.fc = nn.Linear(input_dim, input_dim)

    def forward(self, input_tensor):
        """Feature gating as used in S3D-G.
      """
        spatiotemporal_average = th.mean(input_tensor, dim=[2, 3, 4])
        weights = self.fc(spatiotemporal_average)
        weights = th.sigmoid(weights)
        return weights[:, :, None, None, None] * input_tensor


INIT_ARGS = {
    'input_dim': 4
}

ARGS = {
    'input_tensor': th.randn(2, 4, 3, 5, 7)
}

if __name__ == '__main__':
    model = SelfGating(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Input shape: {ARGS['input_tensor'].shape}")
    print(f"Output shape: {output.shape}")
    print("SelfGating executed successfully")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 5, dtype family float, shape (2, 4, 3, 5, 7) — shape (2, 4, 3, 5, 7) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
compute_accuracies Ran
ran on a synthesized input
linjieli222/HERO/eval_videoQA.py
pointer only (licence: MIT) · get_code("29d0af7d06f51fd3")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, linjieli222/HERO, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

compute_accuracies Ran
ran on a synthesized input
linjieli222/HERO/eval_violin.py
pointer only (licence: MIT) · get_code("68545d5324dc298c")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, linjieli222/HERO, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

gelu Ran
ran, honoured the contract we drafted
linjieli222/HERO/model/layers.py
pointer only (licence: MIT) · get_code("29af270e862dd867")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, linjieli222/HERO, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

gelu_new Ran
ran, honoured the contract we drafted
linjieli222/HERO/model/layers.py
pointer only (licence: MIT) · get_code("de48fec0ec9764b0")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, linjieli222/HERO, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

load_partial_checkpoint Ran
ran on a synthesized input
linjieli222/HERO/model/modeling_utils.py
pointer only (licence: MIT) · get_code("c4a4d88af8bdc891")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, linjieli222/HERO, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

mask_logits Ran
ran on a synthesized input
linjieli222/HERO/model/modeling_utils.py
pointer only (licence: MIT) · get_code("247245b1fec40c1b")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, linjieli222/HERO, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

prune_linear_layer Ran
ran; our contract draft was wrong, not the code
linjieli222/HERO/model/modeling_utils.py
pointer only (licence: MIT) · get_code("57947ced49b189c3")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, linjieli222/HERO, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

InceptionBlock Not yet run
unverified (harvested, no recorded run)
linjieli222/hero_video_feature_extractor/mil-nce/model.py
code served (permissive licence) · get_code("cf99554537d72250")
How it ran

no invocation recorded.

S3D Not yet run
unverified (harvested, no recorded run)
linjieli222/hero_video_feature_extractor/mil-nce/model.py
code served (permissive licence) · get_code("de412728921bec03")
How it ran

no invocation recorded.

build_model Not yet run
unverified (harvested, no recorded run)
linjieli222/hero_video_feature_extractor/mil-nce/model.py
code served (permissive licence) · get_code("2a1f8712954c73f8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 9 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 4 the same month, 9 later) and 4 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
swish 206 other papers
35 dated earlier, 3 the same month, 167 later, 1 same year, order not determinable · 44 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1805.12114 (2018-05)
Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models
1809.01357 (2018-09)
Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference
and 203 more not named here
gelu 198 other papers
47 dated earlier, 5 the same month, 144 later, 2 same year, order not determinable · 32 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.10125 (2019-01)
Glyce: Glyph-vectors for Chinese Character Representations
and 195 more not named here
prune_linear_layer 29 other papers
8 dated earlier, 2 the same month, 18 later, 1 same year, order not determinable
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.08230 (2019-06)
Evaluating Protein Transfer Learning with TAPE
1906.08237 (2019-06)
XLNet: Generalized Autoregressive Pretraining for Language Understanding
and 26 more not named here
gelu_new 23 other papers
5 dated earlier, 1 the same month, 17 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1909.11942 (2019-09)
ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
1911.03631 (2019-11)
Hierarchical Graph Network for Multi-hop Question Answering
and 20 more not named here
InceptionBlock
brick of this paper's assembly: helper
1 other paper
1 later
2204.02968 (2022-04)
Temporal Alignment Networks for Long-term Video
STConv3D
brick of this paper's assembly: helper
1 other paper
1 later
2204.02968 (2022-04)
Temporal Alignment Networks for Long-term Video
SelfGating
brick of this paper's assembly: helper
1 other paper
1 later
2204.02968 (2022-04)
Temporal Alignment Networks for Long-term Video
compute_accuracies 1 other paper
1 later
2106.04632 (2021-06)
VALUE: A Multi-Task Benchmark for Video-and-Language Understanding Evaluation
compute_accuracies 1 other paper
1 later
2106.04632 (2021-06)
VALUE: A Multi-Task Benchmark for Video-and-Language Understanding Evaluation

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 present HERO, a novel framework for large-scale video+language omnirepresentation learning. HERO encodes multimodal inputs in a hierarchical structure, where local context of a video frame is captured by a Cross-modal Transformer via multimodal fusion, and global video context is captured by a Temporal Transformer. In addition to standard Masked Language Modeling (MLM) and Masked Frame Modeling (MFM) objectives, we design two new pre-training tasks: (i) Video-Subtitle Matching (VSM), where the model predicts both global and local temporal alignment; and (ii) Frame Order Modeling (FOM), where the model predicts the right order of shuffled video frames. HERO is jointly trained on HowTo100M and large-scale TV datasets to gain deep understanding of complex social dynamics with multi-character interactions. Comprehensive experiments demonstrate that HERO achieves new state of the art on multiple benchmarks over Text-based Video/Video-moment Retrieval, Video Question Answering (QA), Video-and-language Inference and Video Captioning tasks across different domains. We also introduce two new challenging benchmarks How2QA and How2R for Video QA and Retrieval, collected from diverse video content over multimodalities. 1

For agents

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

get_harvested_code_for_paper("2005.00200")
get_code_for_paper("2005.00200")
have("2005.00200")

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

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

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

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

Connect an agent — have() is free.