SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1606.04934 · 2016

Improving Variational Inference with Inverse Autoregressive Flow

Max Welling, Diederik Kingma, Xi Chen

arXiv · PDF · Open in the Atlas

Code that ran

15 of 23 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 11 have no contract verdict; 1 failure of our instrument; 8 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/1606.04934.json · badge: /api/ran/1606.04934.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
openai/iaf canonical (classifier label)
classifier basis: census
6 ran · 6 no recorded run
altosaar/variational-autoencoder community
Papers with Code archive
6 ran · 0 no recorded run
SourangshuGhosh/VariationalAutoencoder community
Papers with Code archive
2 ran · 0 no recorded run
Daniil-Selikhanovych/h-vae community
Papers with Code archive
1 ran · 2 no recorded run
FunctionStatusWhere it lives
IATransform Ran
ran on a synthesized input · constructed an object; no result was computed
Daniil-Selikhanovych/h-vae/gaussians/api/models.py
pointer only (licence: NONE) · get_code("111516f840a372c1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Daniil-Selikhanovych/h-vae 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.

InverseAutoregressiveFlow Ran
ran on a synthesized input
altosaar/variational-autoencoder/flow.py
code served (permissive licence) · get_code("91b99b3fed147f56")
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 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
import torch
import torch.nn as nn
from torch.nn import functional as F

class MaskedLinear(nn.Module):
    """Linear layer with some input-output connections masked."""

    def __init__(self, in_features, out_features, mask, context_features=None, bias=True):
        super().__init__()
        self.linear = nn.Linear(in_features, out_features, bias)
        self.register_buffer('mask', mask)
        if context_features is not None:
            self.cond_linear = nn.Linear(context_features, out_features, bias=False)

    def forward(self, input, context=None):
        output = F.linear(input, self.mask * self.linear.weight, self.linear.bias)
        if context is None:
            return output
        else:
            return output + self.cond_linear(context)

def create_input_order(input_size, input_order='left-to-right'):
    """Returns a degree vectors for the input."""
    if input_order == 'left-to-right':
        return np.arange(start=1, stop=input_size + 1)
    elif input_order == 'right-to-left':
        return np.arange(start=input_size, stop=0, step=-1)
    elif input_order == 'random':
        ret = np.arange(start=1, stop=input_size + 1)
        np.random.shuffle(ret)
        return ret

def create_degrees(input_size, hidden_units, input_order='left-to-right', hidden_degrees='equal'):
    input_order = create_input_order(input_size, input_order)
    degrees = [input_order]
    for units in hidden_units:
        if hidden_degrees == 'random':
            degrees.append(np.random.randint(low=min(np.min(degrees[-1]), input_size - 1), high=input_size, size=units))
        elif hidden_degrees == 'equal':
            min_degree = min(np.min(degrees[-1]), input_size - 1)
            degrees.append(np.maximum(min_degree, np.ceil(np.arange(1, units + 1) * (input_size - 1) / float(units + 1)).astype(np.int32)))
    return degrees

def create_masks(degrees):
    """Returns a list of binary mask matrices enforcing autoregressivity."""
    return [inp[:, np.newaxis] <= out for inp, out in zip(degrees[:-1], degrees[1:])] + [degrees[-1][:, np.newaxis] < degrees[0]]

import types as _types
masks = _types.SimpleNamespace(**{n: globals()[n] for n in ['create_degrees', 'create_input_order', 'create_masks'] if n in globals()})

class MADE(nn.Module):
    """Implements MADE: Masked Autoencoder for Distribution Estimation.

    Follows https://arxiv.org/abs/1502.03509

    This is used to build MAF: Masked Autoregressive Flow (https://arxiv.org/abs/1705.07057).
    """

    def __init__(self, num_input, num_outputs_per_input, num_hidden, num_context):
        super().__init__()
        self._m = []
        degrees = masks.create_degrees(input_size=num_input, hidden_units=[num_hidden] * 2, input_order='left-to-right', hidden_degrees='equal')
        self._masks = masks.create_masks(degrees)
        self._masks[-1] = np.hstack([self._masks[-1] for _ in range(num_outputs_per_input)])
        self._masks = [torch.from_numpy(m.T) for m in self._masks]
        modules = []
        self.input_context_net = MaskedLinear(num_input, num_hidden, self._masks[0], num_context)
        self.net = nn.Sequential(nn.ReLU(), MaskedLinear(num_hidden, num_hidden, self._masks[1], context_features=None), nn.ReLU(), MaskedLinear(num_hidden, num_outputs_per_input * num_input, self._masks[2], context_features=None))

    def forward(self, input, context=None):
        hidden = self.input_context_net(input, context)
        return self.net(hidden)

class InverseAutoregressiveFlow(nn.Module):
    """Inverse Autoregressive Flows with LSTM-type update. One block.

    Eq 11-14 of https://arxiv.org/abs/1606.04934
    """

    def __init__(self, num_input, num_hidden, num_context):
        super().__init__()
        self.made = MADE(num_input=num_input, num_outputs_per_input=2, num_hidden=num_hidden, num_context=num_context)
        self.sigmoid_arg_bias = nn.Parameter(torch.ones(num_input) * 2)
        self.sigmoid = nn.Sigmoid()
        self.log_sigmoid = nn.LogSigmoid()

    def forward(self, input, context=None):
        m, s = torch.chunk(self.made(input, context), chunks=2, dim=-1)
        s = s + self.sigmoid_arg_bias
        sigmoid = self.sigmoid(s)
        z = sigmoid * input + (1 - sigmoid) * m
        return (z, -self.log_sigmoid(s))

INIT_ARGS = {
    'num_input': 4,
    'num_hidden': 6,
    'num_context': 5
}

ARGS = {
    'input': torch.randn(2, 4),
    'context': torch.randn(2, 5)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
InverseAutoregressiveFlow Ran
ran on a synthesized input · constructed an object; no result was computed
SourangshuGhosh/VariationalAutoencoder/flow.py
code served (permissive licence) · get_code("f23eaa93ae898d36")
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 an instance of its own class, InverseAutoregressiveFlow: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np

torch.manual_seed(0)

# Set up the arguments for InverseAutoregressiveFlow
num_input = 4
num_hidden = 8
num_context = 3

ARGS = {
    "num_input": num_input,
    "num_hidden": num_hidden,
    "num_context": num_context,
}
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 InverseAutoregressiveFlow — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a InverseAutoregressiveFlow 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
MADE Ran
ran on a synthesized input · constructed an object; no result was computed
altosaar/variational-autoencoder/flow.py
code served (permissive licence) · get_code("2c38022d1eff04ff")
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 an instance of its own class, MADE: the run constructed the object and did not call it, so no result was computed. 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
import torch
import torch.nn as nn
from torch.nn import functional as F

torch.manual_seed(0)
np.random.seed(0)

# Set up the MADE parameters
num_input = 4
num_outputs_per_input = 2
num_hidden = 8
num_context = 3

ARGS = {
    'num_input': num_input,
    'num_outputs_per_input': num_outputs_per_input,
    'num_hidden': num_hidden,
    'num_context': num_context
}
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 MADE — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MADE 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
MADE Ran
ran on a synthesized input · constructed an object; no result was computed
SourangshuGhosh/VariationalAutoencoder/flow.py
code served (permissive licence) · get_code("c5e5f0062d0ecc95")
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 an instance of its own class, MADE: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    'num_input': 4,
    'num_output': 8,
    'num_hidden': 6,
    'num_context': 3,
}
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 MADE — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MADE 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
MaskedLinear Ran
ran on a synthesized input · constructed an object; no result was computed
altosaar/variational-autoencoder/flow.py
code served (permissive licence) · get_code("d9d78083d81ea57e")
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 an instance of its own class, MaskedLinear: the run constructed the object and did not call it, so no result was computed. 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)

# Define the mask tensor: shape (out_features, in_features)
# Using distinct sizes: out_features=5, in_features=4
mask = torch.randint(0, 2, (5, 4), dtype=torch.float32)

# Define input tensor: shape (batch_size, in_features)
# batch_size=2, in_features=4
input_tensor = torch.randn(2, 4)

# Define context tensor: shape (batch_size, context_features)
# batch_size=2, context_features=3
context_tensor = torch.randn(2, 3)

ARGS = {
    'in_features': 4,
    'out_features': 5,
    'mask': mask,
    'context_features': 3,
    'bias': True,
}
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 MaskedLinear — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MaskedLinear 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
assign_to_gpu Ran
ran on a synthesized input
openai/iaf/tf_utils/common.py
code served (permissive licence) · get_code("6b2a8f1c93d0b071")
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 function. 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 tensorflow as tf

# The function assign_to_gpu takes two parameters:
# - gpu: an integer specifying which GPU to use
# - ps_dev: a string specifying the parameter server device

# Looking at the function body, it returns a closure _assign that:
# 1. Takes an op (which can be a tf.NodeDef or an object with a .node_def attribute)
# 2. Checks if op.node_def.op == 'Variable'
# 3. Returns either ps_dev or a GPU device string

# Create a minimal mock NodeDef-like object for testing
class MockNodeDef:
    def __init__(self, op_type='MatMul'):
        self.op = op_type

class MockOp:
    def __init__(self, op_type='MatMul'):
        self.node_def = MockNodeDef(op_type)

# Define the arguments
ARGS = {
    'gpu': 0,
    'ps_dev': '/device:CPU:0'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_degrees Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
altosaar/variational-autoencoder/flow.py
code served (permissive licence) · get_code("8e18f9a0f8d910fd")
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. 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

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

# Create arguments for create_degrees function
ARGS = {
    'input_size': 5,
    'hidden_units': [8, 6],
    'input_order': 'left-to-right',
    'hidden_degrees': 'equal'
}
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 — a list 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
create_input_order Ran
ran, honoured the contract we drafted
altosaar/variational-autoencoder/flow.py
code served (permissive licence) · get_code("1a6accce5cb73c1a")
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 1, dtype family int, shape (5,) 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 numpy as np

# Test with different input sizes and orders
ARGS = {
    'input_size': 5,
    'input_order': 'left-to-right'
}
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 1, dtype family int, shape (5,) — shape (5,) 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
create_masks Ran
ran, violated the contract we drafted
altosaar/variational-autoencoder/flow.py
code served (permissive licence) · get_code("a66337f8e2cf39a3")
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 3, 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 expects a list of degree arrays
# It uses zip to iterate through consecutive pairs and performs comparisons
# The degrees appear to be 1D arrays that are compared element-wise

# Create small degree sequences for masking
# degrees should be a list of numpy arrays, where each array contains degree values
degrees = [
    np.array([0, 1, 2, 3]),
    np.array([1, 2, 3, 4]),
    np.array([2, 3, 4, 5]),
    np.array([0, 1, 2, 3])
]

ARGS = {
    "degrees": degrees
}
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 3, 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
gaussian_diag_logps Ran
ran, honoured the contract we drafted
openai/iaf/tf_utils/distributions.py
code served (permissive licence) · get_code("82124a12b25ebdcd")
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 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 numpy as np
import tensorflow as tf

# Set random seeds for reproducibility
np.random.seed(0)
tf.random.set_seed(0)

# Create small tensors for testing
batch_size = 2
dim = 4

# mean: shape (batch_size, dim)
mean = tf.constant(np.random.randn(batch_size, dim), dtype=tf.float32)

# logvar: shape (batch_size, dim)
logvar = tf.constant(np.random.randn(batch_size, dim), dtype=tf.float32)

# sample: optional, can be None or a tensor of same shape as mean
sample = tf.constant(np.random.randn(batch_size, dim), dtype=tf.float32)

ARGS = {
    "mean": mean,
    "logvar": logvar,
    "sample": sample
}
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 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
group Ran
ran on a synthesized input
openai/iaf/graphy/png.py
code served (permissive licence) · get_code("9ebdf8a2db9d5205")
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 2, 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

# The function `group(s, n)` takes a sequence `s` and groups it into tuples of size `n`
# by zipping together n iterators over the sequence.
# It requires:
# - s: an iterable/sequence
# - n: an integer representing the group size

# Create a simple sequence - a list of integers
s = [1, 2, 3, 4, 5, 6]

# Create the group size
n = 2

ARGS = {
    "s": s,
    "n": n
}
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 2, 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
isarray Ran
ran on a synthesized input
openai/iaf/graphy/png.py
code served (permissive licence) · get_code("c6a19115e975d601")
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 bool, 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.

from array import array

ARGS = {
    'x': array('i', [1, 2, 3, 4])
}
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 bool, 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
my_deconv2d Ran
ran on a synthesized input
openai/iaf/tf_utils/layers.py
code served (permissive licence) · get_code("36cc303023093ab1")
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 4, dtype family float, shape (2, 3, 16, 16) 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

# Set up input tensor x with shape (batch, channels, height, width) in PyTorch convention
# which will be (2, 4, 8, 8) - batch=2, channels=4, height=8, width=8
batch_size = 2
input_channels = 4
input_height = 8
input_width = 8

# Create input tensor x in TensorFlow format (batch, height, width, channels)
# but we'll transpose it to (batch, channels, height, width) first then let the function handle it
x = tf.constant(np.random.randn(batch_size, input_channels, input_height, input_width), dtype=tf.float32)

# Create filters tensor for conv2d_transpose
# Shape should be (filter_height, filter_width, output_channels, input_channels)
# We need filters.get_shape()[2] to give us the output channels we want
# Let's use output_channels = 3
filter_height = 3
filter_width = 3
output_channels = 3
filters = tf.constant(np.random.randn(filter_height, filter_width, output_channels, input_channels), dtype=tf.float32)

# Create strides
# strides[0] is typically 1 (batch), strides[1] is for channels (typically 1)
# strides[2] and strides[3] are for height and width spatial dimensions
# Using stride of 2 for spatial dimensions
strides = [1, 1, 2, 2]

ARGS = {
    'x': x,
    'filters': filters,
    'strides': strides
}
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 4, dtype family float, shape (2, 3, 16, 16) — shape (2, 3, 16, 16) 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
split Ran
ran on a synthesized input
openai/iaf/tf_utils/common.py
code served (permissive licence) · get_code("575cf7ef0fce2c37")
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. 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 tensorflow as tf
import numpy as np

# Create a small TensorFlow tensor with shape (2, 12, 4)
# We'll split along dimension 1, so we need the size at that dim to match sum of split_sizes
x = tf.constant(np.random.randn(2, 12, 4).astype(np.float32))

# Split dimension 1 (size 12) into chunks of sizes [4, 5, 3]
split_dim = 1
split_sizes = [4, 5, 3]

ARGS = {
    "x": x,
    "split_dim": split_dim,
    "split_sizes": split_sizes
}
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 list — a list 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
BaseModel Not yet run
unverified (harvested, no recorded run)
Daniil-Selikhanovych/h-vae/gaussians/api/models.py
pointer only (licence: NONE) · get_code("14c28be8b267f631")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Daniil-Selikhanovych/h-vae 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. No invocation recorded.

IAF Not yet run
unverified (harvested, no recorded run)
Daniil-Selikhanovych/h-vae/gaussians/api/models.py
pointer only (licence: NONE) · get_code("e3388277ee1073f6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Daniil-Selikhanovych/h-vae 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. No invocation recorded.

discretized_logistic Not yet run
unverified (harvested, no recorded run)
openai/iaf/tf_utils/distributions.py
code served (permissive licence) · get_code("7d849f5989cfd552")
How it ran

no invocation recorded.

find_trainable_variables Not yet run
unverified (harvested, no recorded run)
openai/iaf/tf_utils/common.py
code served (permissive licence) · get_code("909cf81b1c39b724")
How it ran

no invocation recorded.

logsumexp Not yet run
unverified (harvested, no recorded run)
openai/iaf/tf_utils/distributions.py
code served (permissive licence) · get_code("ce0ecda2d9784fab")
How it ran

no invocation recorded.

read_cifar10 Not yet run
unverified (harvested, no recorded run)
openai/iaf/tf_utils/cifar10_data.py
code served (permissive licence) · get_code("d819a40e3b285378")
How it ran

no invocation recorded.

to_raster Not yet run
unverified (harvested, no recorded run)
openai/iaf/graphy/graphics.py
code served (permissive licence) · get_code("82475f7d6cb98089")
How it ran

no invocation recorded.

tostring Not yet run
unverified (harvested, no recorded run)
openai/iaf/graphy/png.py
code served (permissive licence) · get_code("6721c3082df99f37")
How it ran

no invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 23 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 1 later) and 19 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
assign_to_gpu 3 other papers
1 dated earlier, 2 later
1602.02410 (2016-02)
Exploring the Limits of Language Modeling
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2004.13922 (2020-04)
Revisiting Pre-trained Models for Chinese Natural Language Processing
BaseModel
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
1505.05770 (2015-05)
Variational Inference with Normalizing Flows
find_trainable_variables 1 other paper
1 dated earlier
1602.02410 (2016-02)
Exploring the Limits of Language Modeling
gaussian_diag_logps 1 other paper
1 dated earlier
1511.06349 (2015-11)
Generating Sentences from a Continuous Space

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

The framework of normalizing flows provides a general strategy for flexible variational inference of posteriors over latent variables. We propose a new type of normalizing flow, inverse autoregressive flow (IAF), that, in contrast to earlier published flows, scales well to high-dimensional latent spaces. The proposed flow consists of a chain of invertible transformations, where each transformation is based on an autoregressive neural network. In experiments, we show that IAF significantly improves upon diagonal Gaussian approximate posteriors. In addition, we demonstrate that a novel type of variational autoencoder, coupled with IAF, is competitive with neural autoregressive models in terms of attained log-likelihood on natural images, while allowing significantly faster synthesis.

For agents

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

get_harvested_code_for_paper("1606.04934")
get_code_for_paper("1606.04934")
have("1606.04934")

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

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

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

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

Connect an agent — have() is free.