SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1810.00821 · 2018

Variational Discriminator Bottleneck: Improving Imitation Learning, Inverse RL, and GANs by Constraining Information Flow

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; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 1 failure of our instrument; 4 no recorded run), measured 2026-11-23; 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/1810.00821.json · badge: /api/ran/1810.00821.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
reinforcement-learning-kr/lets-do-irl community (classifier label)
classifier basis not recorded on the link
5 ran · 4 no recorded run
akanimax/Variational_Discriminator_Bottleneck community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
actvn Ran
ran; our contract draft was wrong, not the code
akanimax/Variational_Discriminator_Bottleneck/source/vdb/Gan_networks.py
code served (permissive licence) · get_code("b065405787f332a5")
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 2, dtype family float, shape (2, 4) 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.functional as F

torch.manual_seed(0)

# Create a small input tensor for the actvn function
# The function takes a tensor x and applies leaky_relu activation
x = torch.randn(2, 4)

ARGS = {
    'x': x
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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_action Ran
ran on a synthesized input
reinforcement-learning-kr/lets-do-irl/mujoco/gail/utils/utils.py
code served (permissive licence) · get_code("b5a95d29758c57e3")
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 ndarray, ndim 2, dtype family float, shape (2, 4) 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 small tensor arguments for mu and std
mu = torch.randn(2, 4)
std = torch.ones(2, 4)

ARGS = {
    "mu": mu,
    "std": std
}
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 ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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_data_loader Ran
ran on a synthesized input
akanimax/Variational_Discriminator_Bottleneck/source/data_processing/DataLoader.py
code served (permissive licence) · get_code("4c285e4ad37fd444")
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 DataLoader. 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 torch.utils.data import Dataset

torch.manual_seed(0)

class DummyF2TDataset(Dataset):
    """Minimal F2T-like dataset for testing"""
    def __init__(self, num_samples=4):
        self.num_samples = num_samples
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        # Return a tuple of (input, target) as expected by DataLoader
        x = torch.randn(4)
        y = torch.randn(3)
        return (x, y)

dataset = DummyF2TDataset(num_samples=4)
batch_size = 2
num_workers = 0

ARGS = {
    "dataset": dataset,
    "batch_size": batch_size,
    "num_workers": num_workers
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
get_entropy Ran
ran on a synthesized input
reinforcement-learning-kr/lets-do-irl/mujoco/gail/utils/utils.py
code served (permissive licence) · get_code("f80db665bb06675c")
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
from torch.distributions import Normal

torch.manual_seed(0)

# Create small tensors for mu and std
# mu: mean of the distribution, shape (2, 4)
mu = torch.randn(2, 4)

# std: standard deviation of the distribution, shape (2, 4)
std = torch.abs(torch.randn(2, 4)) + 0.1  # ensure positive values

ARGS = {
    "mu": mu,
    "std": std,
}
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
get_gae Ran
ran on a synthesized input
reinforcement-learning-kr/lets-do-irl/mujoco/gail/train_model.py
code served (permissive licence) · get_code("e83aab097d98bcde")
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 2, 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

torch.manual_seed(0)

# Create small tensors for the function
batch_size = 2
rewards = [1.0, 0.5]
masks = [1.0, 1.0]
values = torch.tensor([[0.2], [0.3]], dtype=torch.float32)

# Create args object with required attributes
class Args:
    def __init__(self):
        self.gamma = 0.99
        self.lamda = 0.95

args = Args()

ARGS = {
    "rewards": rewards,
    "masks": masks,
    "values": values,
    "args": args
}
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 tuple, ndim 2, 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_reward Ran
ran on a synthesized input
reinforcement-learning-kr/lets-do-irl/mountaincar/maxent/maxent.py
code served (permissive licence) · get_code("ac908e366f291aaa")
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 uses:
# - feature_matrix.dot(theta) - needs a dot product method, works with numpy arrays
# - .reshape((n_states,)) - reshapes to 1D array
# - indexing with state_idx

# feature_matrix: should be a 2D array where dot product with theta gives n_states outputs
# theta: parameter vector
# n_states: integer for number of states
# state_idx: integer index into the reward array

n_states = 5
feature_dim = 3

# Create a feature matrix of shape (n_states, feature_dim)
feature_matrix = np.random.randn(n_states, feature_dim)

# Create theta parameter vector of shape (feature_dim,)
theta = np.random.randn(feature_dim)

# state_idx should be a valid index into the n_states dimension
state_idx = 2

ARGS = {
    "feature_matrix": feature_matrix,
    "theta": theta,
    "n_states": n_states,
    "state_idx": state_idx,
}
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
get_transform Ran
ran on a synthesized input
akanimax/Variational_Discriminator_Bottleneck/source/data_processing/DataLoader.py
code served (permissive licence) · get_code("e36470391de100a1")
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 Compose. 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.transforms import ToTensor, Normalize, Compose, Resize

torch.manual_seed(0)

# The function get_transform takes one optional parameter: new_size
# new_size should be either None or a tuple/int representing the size for Resize transform
# The function uses new_size to conditionally create a transform pipeline

# Test with new_size as a tuple (common for Resize)
new_size_value = (64, 64)

ARGS = {
    "new_size": new_size_value
}
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 Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
log_prob_density Ran
ran on a synthesized input
reinforcement-learning-kr/lets-do-irl/mujoco/gail/utils/utils.py
code served (permissive licence) · get_code("a2dbc3ebed006ccb")
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 2, dtype family float, shape (2, 1) 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 math

torch.manual_seed(0)

# The function expects:
# - x: a tensor that supports .pow() and operations with mu/std
# - mu: a tensor that supports .pow()
# - std: a tensor that supports .pow()
# All should be compatible for broadcasting and the result should support .sum(1, keepdim=True)

# Create small tensors with batch size 2 and feature dimension 4
x = torch.randn(2, 4)
mu = torch.randn(2, 4)
std = torch.abs(torch.randn(2, 4)) + 0.1  # ensure positive std values

ARGS = {
    "x": x,
    "mu": mu,
    "std": std
}
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 2, dtype family float, shape (2, 1) — shape (2, 1) 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
read_loss_log Ran
ran on a synthesized input
akanimax/Variational_Discriminator_Bottleneck/source/generate_loss_plots.py
code served (permissive licence) · get_code("d5151aa5668d7556")
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 ndarray, ndim 2, dtype family float, shape (4, 2) 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 tempfile
import os
import numpy as np

# Create a temporary loss.log file with sample data
temp_dir = tempfile.mkdtemp()
file_name = os.path.join(temp_dir, 'loss.log')

# Write sample loss data with two columns (iteration and loss value)
sample_data = np.array([
    [1, 0.5],
    [2, 0.45],
    [3, 0.40],
    [4, 0.35]
])

np.savetxt(file_name, sample_data, delimiter='\t')

ARGS = {
    'file_name': file_name,
    'delimiter': '\t'
}
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 ndarray, ndim 2, dtype family float, shape (4, 2) — shape (4, 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
expert_feature_expectations Not yet run
unverified (harvested, no recorded run)
reinforcement-learning-kr/lets-do-irl/mountaincar/maxent/maxent.py
code served (permissive licence) · get_code("9778db32c03260b1")
How it ran

no invocation recorded.

surrogate_loss Not yet run
unverified (harvested, no recorded run)
reinforcement-learning-kr/lets-do-irl/mujoco/vail/train_model.py
code served (permissive licence) · get_code("372226043ee94c22")
How it ran

no invocation recorded.

train_discrim Not yet run
unverified (harvested, no recorded run)
reinforcement-learning-kr/lets-do-irl/mujoco/gail/train_model.py
code served (permissive licence) · get_code("9d37eb48f1a728b9")
How it ran

no invocation recorded.

train_vdb Not yet run
unverified (harvested, no recorded run)
reinforcement-learning-kr/lets-do-irl/mujoco/vail/train_model.py
code served (permissive licence) · get_code("e048446774c5bd60")
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, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 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
actvn 6 other papers
6 later
1912.05237 (2019-12)
Towards Unsupervised Learning of Generative Models for 3D Controllable Image Synthesis
2002.11810 (2020-02)
On Leveraging Pretrained GANs for Generation with Limited Data
2203.13572 (2022-03)
A Visual Navigation Perspective for Category-Level Object Pose Estimation
and 3 more not named here
get_data_loader 5 other papers
4 dated earlier, 1 later
1511.06434 (2015-11)
Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
and 2 more not named here
get_transform 4 other papers
4 dated earlier
1511.06434 (2015-11)
Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
1710.10196 (2017-10)
Progressive Growing of GANs for Improved Quality, Stability, and Variation
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
and 1 more not named here
read_loss_log 3 other papers
2 dated earlier, 1 later
1511.06434 (2015-11)
Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks
1805.08318 (2018-05)
Self-Attention Generative Adversarial Networks
1903.06048 (2019-03)
MSG-GAN: Multi-Scale Gradients for Generative Adversarial Networks

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

Repositories linked to this paper

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

Abstract

Adversarial learning methods have been proposed for a wide range of applications, but the training of adversarial models can be notoriously unstable. Effectively balancing the performance of the generator and discriminator is critical, since a discriminator that achieves very high accuracy will produce relatively uninformative gradients. In this work, we propose a simple and general technique to constrain information flow in the discriminator by means of an information bottleneck. By enforcing a constraint on the mutual information between the observations and the discriminator's internal representation, we can effectively modulate the discriminator's accuracy and maintain useful and informative gradients. We demonstrate that our proposed variational discriminator bottleneck (VDB) leads to significant improvements across three distinct application areas for adversarial learning algorithms. Our primary evaluation studies the applicability of the VDB to imitation learning of dynamic continuous control skills, such as running. We show that our method can learn such skills directly from \emph{raw} video demonstrations, substantially outperforming prior adversarial imitation learning methods. The VDB can also be combined with adversarial inverse reinforcement learning to learn parsimonious reward functions that can be transferred and re-optimized in new settings. Finally, we demonstrate that VDB can train GANs more effectively for image generation, improving upon a number of prior stabilization methods.

For agents

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

get_harvested_code_for_paper("1810.00821")
get_code_for_paper("1810.00821")
have("1810.00821")

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

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

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

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

Connect an agent — have() is free.