SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2007.05426 · 2020

Variational Inference with Continuously-Indexed Normalizing Flows

arXiv · PDF · Open in the Atlas

Code that ran

6 of 12 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 5 have no contract verdict; 1 failure 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/2007.05426.json · badge: /api/ran/2007.05426.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
anthonycaterini/cif-vi canonical (classifier label)
classifier basis: census
6 ran · 6 no recorded run
FunctionStatusWhere it lives
binarize Ran
ran on a synthesized input
anthonycaterini/cif-vi/cif/metrics.py
code served (permissive licence) · get_code("f07338c77c98e2a7")
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

torch.manual_seed(0)

# Create a small tensor with positive values
# The function divides by max(x) and applies bernoulli sampling
x = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                   [0.5, 1.5, 2.5, 3.5]])

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_loader Ran
ran on a synthesized input
anthonycaterini/cif-vi/cif/datasets/loaders.py
code served (permissive licence) · get_code("51f878c58b289379")
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
import torch.utils.data as data

torch.manual_seed(0)

# Create a simple dataset class that has a .to() method
class SimpleDataset(data.Dataset):
    def __init__(self):
        self.data = torch.randn(8, 4)
        self.labels = torch.randint(0, 2, (8,))
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        return self.data[idx], self.labels[idx]
    
    def to(self, device):
        self.data = self.data.to(device)
        self.labels = self.labels.to(device)
        return self

# Create dataset instance
dset = SimpleDataset()

# Set up arguments
ARGS = {
    "dset": dset,
    "device": "cpu",
    "batch_size": 2,
    "drop_last": 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 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_loaders Ran
ran on a synthesized input
anthonycaterini/cif-vi/cif/datasets/loaders.py
code served (permissive licence) · get_code("2b5ed06aec1d27b3")
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 dict. 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.utils.data as data

torch.manual_seed(0)

# Create minimal dataset classes that support .to(device)
class DummyDataset(data.Dataset):
    def __init__(self, size=8, num_classes=10):
        self.size = size
        self.num_classes = num_classes
        self.device = torch.device('cpu')
        self.data = torch.randn(size, 3, 4, 4)
        self.labels = torch.randint(0, num_classes, (size,))
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        return self.data[idx], self.labels[idx]
    
    def to(self, device):
        self.device = device
        self.data = self.data.to(device)
        self.labels = self.labels.to(device)
        return self

# Create dummy train, valid, test datasets
train_dset = DummyDataset(size=8, num_classes=10)
valid_dset = DummyDataset(size=4, num_classes=10)
test_dset = DummyDataset(size=4, num_classes=10)

# Mock the get_image_datasets and get_dummy_datasets functions
def get_image_datasets(dataset, data_root, make_valid_loader, valid_fraction):
    return train_dset, valid_dset, test_dset

def get_dummy_datasets():
    return train_dset, valid_dset, test_dset

# Inject these into the module namespace for the function to use
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'get_image_datasets', get_image_datasets)
setattr(current_module, 'get_dummy_datasets', get_dummy_datasets)

ARGS = {
    'dataset': 'dummy-mog',
    'device': torch.device('cpu'),
    'data_root': '/tmp/dummy',
    'make_valid_loader': True,
    'train_batch_size': 2,
    'valid_batch_size': 2,
    'test_batch_size': 2,
    'valid_fraction': 0.2
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_mlp Ran
ran; our contract draft was wrong, not the code
anthonycaterini/cif-vi/cif/models/components/networks.py
code served (permissive licence) · get_code("3508c00acbc73d66")
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 Sequential. 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 = {
    "num_input_channels": 4,
    "hidden_channels": [8, 16],
    "num_output_channels": 3,
    "activation": nn.ReLU,
    "log_softmax_outputs": 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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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_resnet Ran
ran on a synthesized input
anthonycaterini/cif-vi/cif/models/components/networks.py
code served (permissive licence) · get_code("2e2b3a2ccfe1ccdc")
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 ScaledTanh2dModule. 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 = {
    "num_input_channels": 3,
    "hidden_channels": [16, 32],
    "num_output_channels": 4
}
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 ScaledTanh2dModule — a ScaledTanh2dModule output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ScaledTanh2dModule 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
metrics Ran
ran on a synthesized input
anthonycaterini/cif-vi/cif/metrics.py
code served (permissive licence) · get_code("6ec56da05c30193f")
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 dict. 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)

class MinimalDensity(nn.Module):
    """Minimal density model that implements elbo method."""
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(12, 1)
    
    def elbo(self, x_samples):
        """
        Takes x_samples and returns dict with 'elbo' key.
        x_samples shape: (batch_size, 3, 2, 2) or (batch_size, 12) after binarize
        """
        # Flatten if needed
        batch_size = x_samples.shape[0]
        x_flat = x_samples.reshape(batch_size, -1)
        
        # Compute elbo scores
        elbo_scores = self.linear(x_flat)
        
        return {'elbo': elbo_scores}

# Create instances
density = MinimalDensity()

# Create input tensor with shape (batch=2, channels=3, height=2, width=2)
# This will trigger binarize since len(x.shape) == 4
x = torch.rand(2, 3, 2, 2) * 10.0

num_elbo_samples = 3

ARGS = {
    'density': density,
    'x': x,
    'num_elbo_samples': num_elbo_samples
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_bijection_density Not yet run
unverified (harvested, no recorded run)
anthonycaterini/cif-vi/cif/models/factory.py
code served (permissive licence) · get_code("f68d3ca2ef56683e")
How it ran

no invocation recorded.

get_density_recursive Not yet run
unverified (harvested, no recorded run)
anthonycaterini/cif-vi/cif/models/factory.py
code served (permissive licence) · get_code("997f745784e135fb")
How it ran

no invocation recorded.

get_raw_image_tensors Not yet run
unverified (harvested, no recorded run)
anthonycaterini/cif-vi/cif/datasets/image.py
code served (permissive licence) · get_code("7afc1ac28a44c62a")
How it ran

no invocation recorded.

get_train_valid_image_datasets Not yet run
unverified (harvested, no recorded run)
anthonycaterini/cif-vi/cif/datasets/image.py
code served (permissive licence) · get_code("354173e07a726475")
How it ran

no invocation recorded.

get_vi_density Not yet run
unverified (harvested, no recorded run)
anthonycaterini/cif-vi/cif/models/factory.py
code served (permissive licence) · get_code("cd60bb09d5e5f288")
How it ran

no invocation recorded.

image_tensors_to_supervised_dataset Not yet run
unverified (harvested, no recorded run)
anthonycaterini/cif-vi/cif/datasets/image.py
code served (permissive licence) · get_code("8192d86ee3c8701f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 11 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
get_mlp 1 other paper
1 later
2402.12238 (2024-02)
MGF: Mixed Gaussian Flow for Diverse Trajectory Prediction

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

Continuously-indexed flows (CIFs) have recently achieved improvements over baseline normalizing flows on a variety of density estimation tasks. CIFs do not possess a closed-form marginal density, and so, unlike standard flows, cannot be plugged in directly to a variational inference (VI) scheme in order to produce a more expressive family of approximate posteriors. However, we show here how CIFs can be used as part of an auxiliary VI scheme to formulate and train expressive posterior approximations in a natural way. We exploit the conditional independence structure of multi-layer CIFs to build the required auxiliary inference models, which we show empirically yield low-variance estimators of the model evidence. We then demonstrate the advantages of CIFs over baseline flows in VI problems when the posterior distribution of interest possesses a complicated topology, obtaining improved results in both the Bayesian inference and surrogate maximum likelihood settings.

For agents

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

get_harvested_code_for_paper("2007.05426")
get_code_for_paper("2007.05426")
have("2007.05426")

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

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

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

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

Connect an agent — have() is free.