SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1902.01950 · 2019

Meta-Amortized Variational Inference and Learning

arXiv · PDF · Open in the Atlas

Code that ran

9 of 15 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 8 have no contract verdict; 0 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/1902.01950.json · badge: /api/ran/1902.01950.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
mhw32/meta-inference-public community (classifier label)
classifier basis not recorded on the link
9 ran · 6 no recorded run
FunctionStatusWhere it lives
bernoulli_log_pdf Ran
ran on a synthesized input
mhw32/meta-inference-public/src/utils.py
code served (permissive licence) · get_code("935f9b08c5b2c894")
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 1, dtype family float, shape (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 torch

torch.manual_seed(0)

# x: ground truth input - Bernoulli samples (0 or 1)
# Shape: (batch_size, feature_dim)
x = torch.bernoulli(torch.full((2, 4), 0.5))

# mu: Bernoulli distribution parameters
# Shape: (batch_size, feature_dim)
mu = torch.sigmoid(torch.randn(2, 4))

ARGS = {
    "x": x,
    "mu": mu,
}
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 1, dtype family float, shape (2,) — shape (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
build_exponential_distributions Ran
ran on a synthesized input
mhw32/meta-inference-public/src/datasets/expfam.py
code served (permissive licence) · get_code("0f52f0bad48aaa18")
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 torch
import numpy as np
from torch.utils.data import TensorDataset

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

ARGS = {
    "num_dist": 3,
    "num_samples": 10,
    "rate": None,
    "prior": 5
}
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 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
build_meta_datasets Ran
ran on a synthesized input
mhw32/meta-inference-public/src/datasets/utils.py
code served (permissive licence) · get_code("e05a1775fe390b6c")
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 3, dtype family float, shape (2, 3, 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 numpy as np

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

class SimpleDataset:
    """Minimal dataset class that supports __getitem__ and __len__"""
    def __init__(self, data):
        self.data = data
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, index):
        return self.data[index]

# Create a simple dataset with small tensors
# Each item is a tensor of shape (4,) - 4 features
dataset_tensors = [torch.randn(4) for _ in range(10)]
dataset = SimpleDataset(dataset_tensors)

ARGS = {
    "dataset": dataset,
    "num_dist": 2,
    "num_elements": 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 Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
check_integrity Ran
ran, violated the contract we drafted
mhw32/meta-inference-public/src/datasets/norb.py
pointer only (licence: MIT); the stored copy get_code serves, from xiaoboxia/T-Revision, is pointer only (licence: NONE) · get_code("fac9904f665a5702")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from xiaoboxia/T-Revision, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

gaussian_log_pdf Ran
ran on a synthesized input
mhw32/meta-inference-public/src/utils.py
code served (permissive licence) · get_code("1c991e5a54fe3983")
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 1, dtype family float, shape (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 torch
import numpy as np

torch.manual_seed(0)

# Create small tensors for the function parameters
batch_size = 2
dim = 4

# x: samples from gaussian - shape (batch_size, dim)
x = torch.randn(batch_size, dim)

# mu: mean of distribution - shape (batch_size, dim)
mu = torch.randn(batch_size, dim)

# logvar: log variance of distribution - shape (batch_size, dim)
logvar = torch.randn(batch_size, dim)

ARGS = {
    'x': x,
    'mu': mu,
    'logvar': logvar
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (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
load_json Ran
ran on a synthesized input
mhw32/meta-inference-public/src/utils.py
code served (permissive licence) · get_code("6712587e99c8ae0b")
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 json
import tempfile
import os

# Create a temporary JSON file with valid content
temp_dir = tempfile.mkdtemp()
temp_json_file = os.path.join(temp_dir, "test.json")

with open(temp_json_file, 'w') as f:
    json.dump({"key": "value", "number": 42, "list": [1, 2, 3]}, f)

ARGS = {
    "f_path": temp_json_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
rotate_transform Ran
ran on a synthesized input
mhw32/meta-inference-public/src/datasets/mnist.py
code served (permissive licence) · get_code("2d98356638272e36")
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 torch
from PIL import Image
import numpy as np

torch.manual_seed(0)

# The rotate_transform function takes an angle parameter
# It returns a function that rotates an image using torchvision.transforms.functional.rotate
# The angle should be a numeric value (int or float)

ARGS = {
    "angle": 45
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — 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
sample_minibatch Ran
ran on a synthesized input
mhw32/meta-inference-public/src/datasets/utils.py
code served (permissive licence) · get_code("1a0f6c311384d31f")
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 3, dtype family float, shape (2, 3, 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 numpy as np

torch.manual_seed(0)

# Create a small dataset class that supports __getitem__ and __len__
class SimpleDataset:
    def __init__(self, num_samples=10, tensor_shape=(4,)):
        self.num_samples = num_samples
        self.tensor_shape = tensor_shape
        # Create some dummy tensors
        self.data = [torch.randn(tensor_shape) for _ in range(num_samples)]
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, index):
        # Return tuple of (tensor, label) to test the tuple handling
        return (self.data[index], index)

# Instantiate the dataset
dataset = SimpleDataset(num_samples=10, tensor_shape=(4,))

# Define the arguments
ARGS = {
    "dataset": dataset,
    "batch_size": 2,
    "sample_size": 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 Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
sample_minibatch_from_cache Ran
ran on a synthesized input
mhw32/meta-inference-public/src/datasets/utils.py
code served (permissive licence) · get_code("df8d5718e67ec582")
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 4, dtype family float, shape (2, 3, 4, 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 torch
import numpy as np

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

# Create a small cache as a numpy array
# The function uses: len(cache), cache[indexes]
# So cache needs to support len() and numpy-style indexing
cache = np.random.randn(10, 4, 3).astype(np.float32)  # 10 items, each shape (4, 3)

batch_size = 2
sample_size = 3

ARGS = {
    "cache": cache,
    "batch_size": batch_size,
    "sample_size": sample_size,
}
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 3) — shape (2, 3, 4, 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
build_gaussian_distributions Not yet run
unverified (harvested, no recorded run)
mhw32/meta-inference-public/src/datasets/expfam.py
code served (permissive licence) · get_code("76e176a31eaf932a")
How it ran

no invocation recorded.

build_lognormal_distributions Not yet run
unverified (harvested, no recorded run)
mhw32/meta-inference-public/src/datasets/expfam.py
code served (permissive licence) · get_code("f825b288e9867dbb")
How it ran

no invocation recorded.

load_many_rotated_mnist Not yet run
unverified (harvested, no recorded run)
mhw32/meta-inference-public/src/datasets/mnist.py
code served (permissive licence) · get_code("1caa0883319031dd")
How it ran

no invocation recorded.

load_norb Not yet run
unverified (harvested, no recorded run)
mhw32/meta-inference-public/src/datasets/norb.py
code served (permissive licence) · get_code("028287b30d63951d")
How it ran

no invocation recorded.

load_norb_numpy Not yet run
unverified (harvested, no recorded run)
mhw32/meta-inference-public/src/datasets/norb.py
code served (permissive licence) · get_code("bdccbb2b75c70306")
How it ran

no invocation recorded.

load_rotated_mnist Not yet run
unverified (harvested, no recorded run)
mhw32/meta-inference-public/src/datasets/mnist.py
code served (permissive licence) · get_code("7d9d81540e82954a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 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 14 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
check_integrity 5 other papers
5 later
1903.12648 (2019-03)
Overcoming Catastrophic Forgetting with Unlabeled Data in the Wild
1906.00189 (2019-06)
Are Anchor Points Really Indispensable in Label-Noise Learning?
2106.10891 (2021-06)
Open-set Label Noise Can Improve Robustness Against Inherent Label Noise
and 2 more not named here

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

Despite the recent success in probabilistic modeling and their applications, generative models trained using traditional inference techniques struggle to adapt to new distributions, even when the target distribution may be closely related to the ones seen during training. In this work, we present a doubly-amortized variational inference procedure as a way to address this challenge. By sharing computation across not only a set of query inputs, but also a set of different, related probabilistic models, we learn transferable latent representations that generalize across several related distributions. In particular, given a set of distributions over images, we find the learned representations to transfer to different data transformations. We empirically demonstrate the effectiveness of our method by introducing the MetaVAE, and show that it significantly outperforms baselines on downstream image classification tasks on MNIST (10-50%) and NORB (10-35%).

For agents

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

get_harvested_code_for_paper("1902.01950")
get_code_for_paper("1902.01950")
have("1902.01950")

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

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

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

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

Connect an agent — have() is free.