SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.04369 · NAACL · 2021

Video-aided Unsupervised Grammar Induction

Kun Xu, Jiebo Luo, Dong Yu, Linfeng Song, Lifeng Jin, Songyang Zhang

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 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; 2 failures of our instrument; 3 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/2104.04369.json · badge: /api/ran/2104.04369.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
Sy-Zhang/MMC-PCFG canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
FunctionStatusWhere it lives
build_position_encoding Ran
ran; our contract draft was wrong, not the code
Sy-Zhang/MMC-PCFG/lib/model/vpcfg/position_encoding.py
code served (permissive licence) · get_code("ea9874d5c6513212")
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 PositionEmbeddingSine. 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 torch
import torch.nn as nn
from types import SimpleNamespace

torch.manual_seed(0)

class MockArgs:
    def __init__(self, position_embedding, sem_dim):
        self.position_embedding = position_embedding
        self.sem_dim = sem_dim

# Test with 'sine' position embedding
ARGS = {
    'args': MockArgs(position_embedding='sine', sem_dim=64)
}
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 PositionEmbeddingSine — a PositionEmbeddingSine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PositionEmbeddingSine 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
create_logger Ran
ran; our contract draft was wrong, not the code
Sy-Zhang/MMC-PCFG/lib/core/utils.py
code served (permissive licence) · get_code("96781da47e35c7a0")
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 tuple, ndim 1, 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 os
import logging
import time
from pathlib import Path
import tempfile

class MockConfig:
    def __init__(self):
        self.LOG_DIR = tempfile.gettempdir()
        self.DATASET = MockDataset()

class MockDataset:
    def __init__(self):
        self.NAME = 'test_dataset'

cfg = MockConfig()
cfg_name = '/path/to/config.yaml'
tag = 'train'

ARGS = {
    'cfg': cfg,
    'cfg_name': cfg_name,
    'tag': tag
}
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 tuple, ndim 1, dtype family float — a tuple 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
get_random_tree Ran
ran, honoured the contract we drafted
Sy-Zhang/MMC-PCFG/lib/model/vpcfg/utils.py
code served (permissive licence) · get_code("107edbd92e8c5dc7")
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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# The function takes three parameters: length, SHIFT, and REDUCE
# length: determines the size of the tree (tree will have 2*length-1 elements)
# SHIFT: a value appended to tree when shifting (default 0)
# REDUCE: a value appended to tree when reducing (default 1)

ARGS = {
    'length': 5,
    'SHIFT': 0,
    'REDUCE': 1
}
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 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
build_transformer Not yet run
unverified (harvested, no recorded run)
Sy-Zhang/MMC-PCFG/lib/model/vpcfg/transformer.py
code served (permissive licence) · get_code("302ec916d91b12a8")
How it ran

no invocation recorded.

extract_parse Not yet run
unverified (harvested, no recorded run)
Sy-Zhang/MMC-PCFG/lib/model/vpcfg/utils.py
code served (permissive licence) · get_code("50da18e5b27669e6")
How it ran

no invocation recorded.

extract_parses Not yet run
unverified (harvested, no recorded run)
Sy-Zhang/MMC-PCFG/lib/model/vpcfg/utils.py
code served (permissive licence) · get_code("b314016627dd28ea")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 5 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
build_transformer 32 other papers
2 dated earlier, 2 the same month, 28 later
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2103.12115 (2021-03)
End-to-End Trainable Multi-Instance Pose Estimation with Transformers
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
and 29 more not named here

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 investigate video-aided grammar induction, which learns a constituency parser from both unlabeled text and its corresponding video. Existing methods of multi-modal grammar induction focus on learning syntactic grammars from text-image pairs, with promising results showing that the information from static images is useful in induction. However, videos provide even richer information, including not only static objects but also actions and state changes useful for inducing verb phrases. In this paper, we explore rich features (e.g. action, object, scene, audio, face, OCR and speech) from videos, taking the recent Compound PCFG model (Kim et al., 2019) as the baseline. We further propose a Multi-Modal Compound PCFG model (MMC-PCFG) to effectively aggregate these rich features from different modalities. Our proposed MMC-PCFG is trained end-to-end and outperforms each individual modality and previous state-of-the-art systems on three benchmarks, i.e. DiDeMo, YouCook2 and MSRVTT, confirming the effectiveness of leveraging video information for unsupervised grammar induction.

For agents

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

get_harvested_code_for_paper("2104.04369")
get_code_for_paper("2104.04369")
have("2104.04369")

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

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

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

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

Connect an agent — have() is free.