SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1804.01523 · 2018

Stochastic Adversarial Video Prediction

arXiv · PDF · Open in the Atlas

Code that ran

10 of 16 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, 1 violated it and 6 have no contract verdict; 3 failures of our instrument; 6 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/1804.01523.json · badge: /api/ran/1804.01523.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
alexlee-gk/video_prediction canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
Bonennult/video_prediction community (classifier label)
classifier basis not recorded on the link
6 ran · 5 no recorded run
MIT-Omnipush/video-prediction reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
0 ran · 1 no recorded run
FunctionStatusWhere it lives
cem Ran
ran on a synthesized input
Bonennult/video_prediction/video_prediction/cem.py
code served (permissive licence) · get_code("dcd8505989cde89e")
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. 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 numpy as np

def simple_objective(thetas):
    """
    Objective function that takes a batch of theta vectors and returns scores.
    thetas shape: (batch_size, theta_dim)
    Returns: either scores array or (scores, arg_scores) tuple
    """
    # Simple quadratic objective: minimize sum of squares
    scores = np.sum(thetas ** 2, axis=1)
    return scores

def objective_with_args(thetas):
    """
    Objective function that returns both scores and additional arguments.
    """
    scores = np.sum(thetas ** 2, axis=1)
    # Return auxiliary data with same batch dimension
    arg_scores = {
        'extra_info': np.random.randn(thetas.shape[0], 2),
        'metadata': np.arange(thetas.shape[0])
    }
    return (scores, arg_scores)

# Setup parameters
theta_dim = 4
batch_size = 8
n_iters = 3

# Initial mean and covariance
theta_mean = np.zeros(theta_dim)
theta_cov = np.eye(theta_dim)

ARGS = {
    'f': simple_objective,
    'theta_mean': theta_mean,
    'theta_cov': theta_cov,
    'batch_size': batch_size,
    'n_iters': n_iters,
    'elite_frac': 0.25,
    'n_elite_min': 2,
    'ret_best': True,
    'verbose': False
}
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 tuple — a tuple output has no array shape of its own; none is 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
charbonnier_loss Ran
ran on a synthesized input
Bonennult/video_prediction/video_prediction/losses.py
code served (permissive licence) · get_code("0c7e34f278f8d941")
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 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 tensorflow as tf
import numpy as np

# Create a small tensor as input
# The function takes x and computes charbonnier loss
# x should be a TensorFlow tensor
x = tf.constant(np.random.randn(2, 4).astype(np.float32))

# epsilon is a small constant for numerical stability
epsilon = 0.001

ARGS = {
    "x": x,
    "epsilon": epsilon,
}
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 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
l1_loss Ran
ran on a synthesized input
Bonennult/video_prediction/video_prediction/losses.py
code served (permissive licence) · get_code("8893afc8452805c9")
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 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 tensorflow as tf
import numpy as np

# Create small prediction and target tensors
pred = tf.constant([[1.0, 2.0, 3.0, 4.0],
                    [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

target = tf.constant([[1.5, 2.5, 3.5, 4.5],
                      [5.5, 6.5, 7.5, 8.5]], dtype=tf.float32)

ARGS = {
    "pred": pred,
    "target": target
}
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 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
l2_loss Ran
ran on a synthesized input
Bonennult/video_prediction/video_prediction/losses.py
code served (permissive licence) · get_code("f9288c89552d4580")
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 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 tensorflow as tf
import numpy as np

# Create small TensorFlow tensors for pred and target
# Using distinct dimensions: batch=2, features=4
pred = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
target = tf.constant([[1.5, 2.5, 3.5, 4.5], [5.5, 6.5, 7.5, 8.5]], dtype=tf.float32)

ARGS = {
    "pred": pred,
    "target": target
}
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 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
load_metrics Ran
ran; our contract draft was wrong, not the code
alexlee-gk/video_prediction/scripts/evaluate.py
code served (permissive licence) · get_code("5815eb5ba521e8cb")
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 ndarray, ndim 2, dtype family float, shape (3, 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 csv
import tempfile
import os
import numpy as np

# Create a temporary CSV file with the expected format
temp_dir = tempfile.mkdtemp()
prefix_fname = os.path.join(temp_dir, 'test_metrics')

# Write a sample CSV file with tab delimiter
# Format: header row, then data rows with first column (index), data columns, and last column (to be excluded)
csv_content = [
    ['index', 'metric1', 'metric2', 'metric3', 'extra'],
    ['0', '1.5', '2.3', '3.1', 'ignore'],
    ['1', '4.2', '5.1', '6.7', 'ignore'],
    ['2', '7.3', '8.9', '9.2', 'ignore'],
]

with open('%s.csv' % prefix_fname, 'w', newline='') as csvfile:
    writer = csv.writer(csvfile, delimiter='\t', quotechar='|')
    writer.writerows(csv_content)

ARGS = {
    'prefix_fname': prefix_fname
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 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
mean_squared_error_np Ran
ran on a synthesized input
Bonennult/video_prediction/video_prediction/metrics.py
code served (permissive licence) · get_code("537f14f6c82b799a")
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

# Construct arguments for mean_squared_error_np

# Create small numpy arrays with distinct dimensions
true = np.array([[1.0, 2.0, 3.0, 4.0],
                 [5.0, 6.0, 7.0, 8.0]])

pred = np.array([[1.1, 1.9, 3.2, 3.8],
                 [5.2, 5.8, 7.1, 7.9]])

# keep_axis can be None, an integer, or a list of integers
keep_axis = None

ARGS = {
    "true": true,
    "pred": pred,
    "keep_axis": keep_axis
}
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
merge_hparams Ran
ran; our contract draft was wrong, not the code
alexlee-gk/video_prediction/scripts/evaluate.py
code served (permissive licence) · get_code("7f866643ac8b4ba5")
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 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 torch
import numpy as np

torch.manual_seed(0)

# The function merge_hparams takes two hyperparameter arguments and merges them
# It handles None, single values, and lists/tuples
# The function doesn't call any methods on the hparams objects, just checks types and concatenates

# Create some simple hyperparameter objects
hparam_obj_1 = {"learning_rate": 0.001, "batch_size": 32}
hparam_obj_2 = {"weight_decay": 0.0001}

# Test case 1: both are dicts (single objects, not lists)
hparams0_case1 = hparam_obj_1
hparams1_case1 = hparam_obj_2

# Test case 2: one is None, one is a list
hparams0_case2 = None
hparams1_case2 = [{"optimizer": "adam"}, {"scheduler": "cosine"}]

# Test case 3: both are lists
hparams0_case3 = [{"param1": 1}, {"param2": 2}]
hparams1_case3 = [{"param3": 3}]

# Use case 1 for ARGS
ARGS = {
    "hparams0": hparams0_case1,
    "hparams1": hparams1_case1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
peak_signal_to_noise_ratio_np Ran
ran on a synthesized input
Bonennult/video_prediction/video_prediction/metrics.py
code served (permissive licence) · get_code("4c64121181ecb7d0")
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

# Create small test arrays for true and pred
true = np.random.randn(2, 4, 5, 6)  # batch=2, varying spatial dims
pred = np.random.randn(2, 4, 5, 6)  # same shape as true

# keep_axis can be None or a list/int of axes to keep
keep_axis = None

ARGS = {
    "true": true,
    "pred": pred,
    "keep_axis": keep_axis,
}
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
schedule_sampling Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
MIT-Omnipush/video-prediction/svg/train_svg_lp.py
pointer only (licence: NONE) · get_code("6beba365e8c55ed7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, MIT-Omnipush/video-prediction 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.

should Ran
ran, violated the contract we drafted
MIT-Omnipush/video-prediction/svg/train_svg_lp.py
pointer only (licence: NONE) · get_code("c7792bb07554a763")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, MIT-Omnipush/video-prediction 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.

bilinear_interp Not yet run
unverified (harvested, no recorded run)
Bonennult/video_prediction/video_prediction/models/dvf_model.py
code served (permissive licence) · get_code("a3b82c6547cef66d")
How it ran

no invocation recorded.

foldl Not yet run
unverified (harvested, no recorded run)
Bonennult/video_prediction/video_prediction/functional_ops.py
code served (permissive licence) · get_code("b0294c8d3f824240")
How it ran

no invocation recorded.

image_warp Not yet run
unverified (harvested, no recorded run)
Bonennult/video_prediction/video_prediction/flow_ops.py
code served (permissive licence) · get_code("b85af650535732ac")
How it ran

no invocation recorded.

kl_criterion Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from edenton/svg
pointer only; the stored copy get_code serves, from edenton/svg, is pointer only (licence: NONE) · get_code("1353b420a1f9ed3f")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for 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. No invocation recorded.

noise Not yet run
unverified (harvested, no recorded run)
Bonennult/video_prediction/video_prediction/models/mocogan_model.py
code served (permissive licence) · get_code("02fded9160d71360")
How it ran

no invocation recorded.

structural_similarity_np Not yet run
unverified (harvested, no recorded run)
Bonennult/video_prediction/video_prediction/metrics.py
code served (permissive licence) · get_code("e967d584d808f959")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 15 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
kl_criterion 1 other paper
1 dated earlier
1802.07687 (2018-02)
Stochastic Video Generation with a Learned Prior

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

Being able to predict what may happen in the future requires an in-depth understanding of the physical and causal rules that govern the world. A model that is able to do so has a number of appealing applications, from robotic planning to representation learning. However, learning to predict raw future observations, such as frames in a video, is exceedingly challenging -- the ambiguous nature of the problem can cause a naively designed model to average together possible futures into a single, blurry prediction. Recently, this has been addressed by two distinct approaches: (a) latent variational variable models that explicitly model underlying stochasticity and (b) adversarially-trained models that aim to produce naturalistic images. However, a standard latent variable model can struggle to produce realistic results, and a standard adversarially-trained model underutilizes latent variables and fails to produce diverse predictions. We show that these distinct methods are in fact complementary. Combining the two produces predictions that look more realistic to human raters and better cover the range of possible futures. Our method outperforms prior and concurrent work in these aspects.

For agents

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

get_harvested_code_for_paper("1804.01523")
get_code_for_paper("1804.01523")
have("1804.01523")

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

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

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

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

Connect an agent — have() is free.