SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.01065 · 2020

Memory-augmented Dense Predictive Coding for Video Representation Learning

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-21; 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/2008.01065.json · badge: /api/ran/2008.01065.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
TengdaHan/MemDPC canonical (classifier label)
classifier basis: census
9 ran · 4 no recorded run
FunctionStatusWhere it lives
calc_accuracy Ran
ran on a synthesized input
TengdaHan/MemDPC/utils/utils.py
code served (permissive licence) · get_code("d09bfd0a1223d58a")
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 0, dtype family float, shape () 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 output tensor: (B=2, N=4) - batch size 2, number of classes 4
output = torch.randn(2, 4)

# Create target tensor: (B=2,) - batch size 2
target = torch.tensor([1, 3])

ARGS = {
    "output": output,
    "target": target,
}
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 0, dtype family float, shape () — shape () 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
check_exists Ran
ran on a synthesized input
TengdaHan/MemDPC/process_data/src/write_csv.py
code served (permissive licence) · get_code("798674d07b9de57d")
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 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 glob
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_root = tempfile.mkdtemp()

# Create test directory structure
label = "action"
youtube_id = "dQw4w9WgXcQ"
time_start = 100
time_end = 200

dirname = '_'.join([youtube_id, '%06d' % time_start, '%06d' % time_end])
full_dirname = os.path.join(temp_root, label, dirname)
os.makedirs(full_dirname, exist_ok=True)

# Create some dummy .jpg files
for i in range(5):
    with open(os.path.join(full_dirname, f"frame_{i:04d}.jpg"), "w") as f:
        f.write("dummy")

# Create a row dict with required keys
row = {
    'youtube_id': youtube_id,
    'time_start': time_start,
    'time_end': time_end,
    'label': label
}

ARGS = {
    'row': row,
    'root': temp_root
}
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 list, ndim 1, dtype family float — 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
conv1x3x3 Ran
ran; our contract draft was wrong, not the code
TengdaHan/MemDPC/backbone/resnet_2d3d.py
code served (permissive licence) · get_code("931634839b156bde")
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 Conv3d. 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

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "bias": False,
}
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 Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
conv3x3x3 Ran
ran; our contract draft was wrong, not the code
TengdaHan/MemDPC/backbone/resnet_2d3d.py
code served (permissive licence) · get_code("87ddd63faa8e7182")
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 Conv3d. 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

torch.manual_seed(0)

ARGS = {
    'in_planes': 3,
    'out_planes': 64,
    'stride': 1,
    'bias': False
}
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 Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
denorm Ran
ran on a synthesized input
TengdaHan/MemDPC/utils/utils.py
code served (permissive licence) · get_code("58313a54c09c8841")
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 Normalize. 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
from torchvision import transforms

torch.manual_seed(0)

ARGS = {
    "mean": [0.485, 0.456, 0.406],
    "std": [0.229, 0.224, 0.225]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Normalize — a Normalize output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Normalize 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
downsample_basic_block Ran
ran; our contract draft was wrong, not the code
TengdaHan/MemDPC/backbone/resnet_2d3d.py
code served (permissive licence) · get_code("43c0211ff8dbca5f")
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) and returned Tensor, ndim 5, dtype family float, shape (2, 8, 2, 2, 2) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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.functional as F
from torch.autograd import Variable

torch.manual_seed(0)

# Create a small 5D tensor (batch_size=2, channels=4, depth=3, height=3, width=3)
# This matches the expected input for a 3D convolution operation
x = torch.randn(2, 4, 3, 3, 3)

# planes should be greater than the number of input channels (4)
# so that zero padding can be added
planes = 8

# stride for the pooling operation
stride = 2

ARGS = {
    "x": x,
    "planes": planes,
    "stride": stride
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 8, 2, 2, 2) — shape (2, 8, 2, 2, 2) 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
pil_loader Ran
ran, honoured the contract we drafted
TengdaHan/MemDPC/memdpc/dataset.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from YuemingJin/MTRCNet-CL, is pointer only (licence: NONE) · get_code("1df9a5ffd9b38c34")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from YuemingJin/MTRCNet-CL, 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. A run is recorded.

read_file Ran
ran on a synthesized input
TengdaHan/MemDPC/memdpc/dataset.py
code served (permissive licence) · get_code("38ccb62cde04dd54")
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 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 tempfile
import os

# Create a temporary file with some test content
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.txt")

with open(temp_file, 'w') as f:
    f.write("line one\n")
    f.write("  line two with spaces  \n")
    f.write("line three\n")

ARGS = {
    "path": temp_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 list, ndim 1, dtype family float — 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
resize_dim Ran
ran on a synthesized input
TengdaHan/MemDPC/process_data/src/resize_video.py
code served (permissive licence) · get_code("fd8f9e4ab0b9de96")
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 torch
import numpy as np

torch.manual_seed(0)

# The function takes three parameters: w (width), h (height), and target (target size)
# It resizes dimensions while maintaining aspect ratio
# All parameters are numeric (int or float)

ARGS = {
    "w": 800,
    "h": 600,
    "target": 256
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
calc_topk_accuracy Not yet run
unverified (harvested, no recorded run)
TengdaHan/MemDPC/utils/utils.py
code served (permissive licence) · get_code("b18133f9a7e073ff")
How it ran

no invocation recorded.

compute_TVL1 Not yet run
unverified (harvested, no recorded run)
TengdaHan/MemDPC/process_data/src/extract_ff.py
code served (permissive licence) · get_code("d88010436511c11b")
How it ran

no invocation recorded.

get_split Not yet run
unverified (harvested, no recorded run)
TengdaHan/MemDPC/process_data/src/write_csv.py
code served (permissive licence) · get_code("488a3f6281af3479")
How it ran

no invocation recorded.

select_resnet Not yet run
unverified (harvested, no recorded run)
TengdaHan/MemDPC/backbone/select_backbone.py
code served (permissive licence) · get_code("466b5e099bcd3d45")
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, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 6 later) and 6 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
pil_loader 28 other papers
11 dated earlier, 17 later
1702.00758 (2017-02)
HashNet: Deep Learning to Hash by Continuation
1805.07932 (2018-05)
Bilinear Attention Networks
1807.06587 (2018-07)
Deep Exemplar-based Colorization
and 25 more not named here
downsample_basic_block 15 other papers
9 dated earlier, 1 the same month, 5 later
1705.07750 (2017-05)
Quo Vadis, Action Recognition? A New Model and the Kinetics Dataset
1711.09577 (2017-11)
Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?
1908.01373 (2019-08)
Unsupervised Microvascular Image Segmentation Using an Active Contours Mimicking Neural Network
and 12 more not named here
calc_accuracy 2 other papers
1 dated earlier, 1 later
1909.04656 (2019-09)
Video Representation Learning by Dense Predictive Coding
2211.09224 (2022-11)
Are we certain it's anomalous?
conv1x3x3 2 other papers
1 dated earlier, 1 later
1909.04656 (2019-09)
Video Representation Learning by Dense Predictive Coding
2105.05226 (2021-05)
Home Action Genome: Cooperative Compositional Action Understanding
conv3x3x3 2 other papers
1 dated earlier, 1 later
1909.04656 (2019-09)
Video Representation Learning by Dense Predictive Coding
2105.05226 (2021-05)
Home Action Genome: Cooperative Compositional Action Understanding
get_split 2 other papers
1 dated earlier, 1 later
1909.04656 (2019-09)
Video Representation Learning by Dense Predictive Coding
2105.05226 (2021-05)
Home Action Genome: Cooperative Compositional Action Understanding
check_exists 1 other paper
1 dated earlier
1909.04656 (2019-09)
Video Representation Learning by Dense Predictive Coding

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-21.

Repositories linked to this paper

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

Abstract

The objective of this paper is self-supervised learning from video, in particular for representations for action recognition. We make the following contributions: (i) We propose a new architecture and learning framework Memory-augmented Dense Predictive Coding (MemDPC) for the task. It is trained with a predictive attention mechanism over the set of compressed memories, such that any future states can always be constructed by a convex combination of the condense representations, allowing to make multiple hypotheses efficiently. (ii) We investigate visual-only self-supervised video representation learning from RGB frames, or from unsupervised optical flow, or both. (iii) We thoroughly evaluate the quality of learnt representation on four different downstream tasks: action recognition, video retrieval, learning with scarce annotations, and unintentional action classification. In all cases, we demonstrate state-of-the-art or comparable performance over other approaches with orders of magnitude fewer training data.

For agents

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

get_harvested_code_for_paper("2008.01065")
get_code_for_paper("2008.01065")
have("2008.01065")

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

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

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

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

Connect an agent — have() is free.