SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2107.11350 · ICLR · 2021

Heteroscedastic Temporal Variational Autoencoder for Irregular Time Series

Benjamin Marlin, Satya Narayan

arXiv · PDF · Open in the Atlas

Code that ran

7 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 3 failures of our instrument; 5 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/2107.11350.json · badge: /api/ran/2107.11350.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
reml-lab/hetvae canonical (classifier label)
classifier basis: classifier_2025
7 ran · 5 no recorded run
FunctionStatusWhere it lives
TVAE Ran
ran on a synthesized input · constructed an object; no result was computed
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("2f16079278f49e9b")
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, TVAE: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# Build minimal encoder and decoder modules that satisfy the interface
class MinimalEncoder(nn.Module):
    def __init__(self, input_dim, num_heads, query_size):
        super().__init__()
        self.input_dim = input_dim
        self.num_heads = num_heads
        self.query_size = query_size
    
    def forward(self, query, context_x, value, mask):
        # query: (num_ref_points,)
        # context_x: (batch, num_context, 1)
        # value: (batch, num_context, input_dim)
        # mask: (batch, num_context, input_dim)
        batch_size = value.size(0)
        num_context = value.size(1)
        # Return shape: (batch, num_heads, input_dim, 2)
        return torch.randn(batch_size, self.num_heads, self.input_dim, 2)

class MinimalDecoder(nn.Module):
    def __init__(self, latent_dim, num_heads, input_dim):
        super().__init__()
        self.latent_dim = latent_dim
        self.num_heads = num_heads
        self.input_dim = input_dim
    
    def forward(self, target_x, query, z):
        # target_x: (batch * num_sample, num_ref_points)
        # query: (num_ref_points,)
        # z: (batch * num_sample, seqlen, latent_dim)
        batch_num_sample = z.size(0)
        seqlen = z.size(1)
        # Return shape: (batch * num_sample, seqlen, hidden_dim)
        return torch.randn(batch_num_sample, seqlen, 128)

# Create instances of encoder and decoder
input_dim = 4
latent_dim = 3
nhidden = 128
num_heads = 2
width = 64
num_ref_points = 5

encoder = MinimalEncoder(input_dim, num_heads, num_ref_points)
decoder = MinimalDecoder(latent_dim, num_heads, input_dim)

ARGS = {
    'input_dim': input_dim,
    'nhidden': nhidden,
    'latent_dim': latent_dim,
    'num_heads': num_heads,
    'width': width,
    'num_ref_points': num_ref_points,
    'std': 0.1,
    'is_constant': False,
    'is_bounded': True,
    'is_constant_per_dim': False,
    'elbo_weight': 1.0,
    'mse_weight': 0.0,
    'norm': True,
    'mixing': 'concat',
    'device': 'cpu'
}
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 TVAE — 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 TVAE 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
TimeEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("24b292c4ff8a93c7")
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, TimeEmbedding: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 = {
    'embed_time': 8,
    'arg': 'periodic',
    'dim': 4,
    'device': 'cpu'
}
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 TimeEmbedding — 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 TimeEmbedding 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
UnTAN Ran
ran on a synthesized input · constructed an object; no result was computed
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("dd7e7878c7a4be03")
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, UnTAN: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 math

torch.manual_seed(0)

ARGS = {
    'input_dim': 4,
    'nhidden': 8,
    'embed_time': 16,
    'num_heads': 4,
    'intensity': True,
    'union_tp': torch.randn(2, 3),
    'dropout': 0.1,
    'no_mix': 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 UnTAN — 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 UnTAN 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_normal_pdf Ran
ran; our contract draft was wrong, not the code
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("bfeee97524b11b09")
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 numpy as np

torch.manual_seed(0)

# Create small tensors with distinct sizes for different dimensions
batch_size = 2
dim = 4

x = torch.randn(batch_size, dim)
mean = torch.randn(batch_size, dim)
logvar = torch.randn(batch_size, dim)
mask = torch.ones(batch_size, dim)

ARGS = {
    "x": x,
    "mean": mean,
    "logvar": logvar,
    "mask": mask,
}
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 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
mean_absolute_error Ran
ran; our contract draft was wrong, not the code
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("9db761ccc70429be")
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

torch.manual_seed(0)

# Create small tensors for the function
# orig and pred should have the same shape for subtraction
# mask should be broadcastable with them
orig = torch.randn(2, 4)
pred = torch.randn(2, 4)
mask = torch.ones(2, 4)

ARGS = {
    "orig": orig,
    "pred": pred,
    "mask": mask,
}
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
mean_squared_error Ran
ran, honoured the contract we drafted
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("d1afa8b9e642d738")
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
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors for the mean_squared_error function
# The function expects:
# - orig: original values tensor
# - pred: predicted values tensor
# - mask: binary mask tensor (same shape as orig and pred)

batch_size = 2
dim = 4

orig = torch.randn(batch_size, dim)
pred = torch.randn(batch_size, dim)
mask = torch.ones(batch_size, dim)

ARGS = {
    "orig": orig,
    "pred": pred,
    "mask": mask
}
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
normal_kl Ran
ran; our contract draft was wrong, not the code
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("01efe1f42dca1548")
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)

# The function normal_kl computes KL divergence between two normal distributions.
# It takes 4 parameters: mu1, lv1, mu2, lv2
# All are used in arithmetic operations (exp, division, subtraction, etc.)
# They should be tensors of compatible shapes for broadcasting

# Create small tensors with batch size 2 and dimension 4
mu1 = torch.randn(2, 4)
lv1 = torch.randn(2, 4)
mu2 = torch.randn(2, 4)
lv2 = torch.randn(2, 4)

ARGS = {
    "mu1": mu1,
    "lv1": lv1,
    "mu2": mu2,
    "lv2": lv2,
}
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
Gaussian Not yet run
unverified (harvested, no recorded run)
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("3591ea5fef885b5f")
How it ran

no invocation recorded.

HeTVAE Not yet run
unverified (harvested, no recorded run)
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("ab72ddaa12f6fc85")
How it ran

no invocation recorded.

HeTVAE_DET Not yet run
unverified (harvested, no recorded run)
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("2383929594fc7f24")
How it ran

no invocation recorded.

LossInfo Not yet run
unverified (harvested, no recorded run)
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("b09c58545c350ba1")
How it ran

no invocation recorded.

mog_log_pdf Not yet run
unverified (harvested, no recorded run)
reml-lab/hetvae/src/vae_models.py
code served (permissive licence) · get_code("f2c4bac49450d2ea")
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 (1 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
normal_kl
brick of this paper's assembly: helper
4 other papers
1 dated earlier, 3 later
2102.02248 (2021-02)
Reduced-order Model for Fluid Flows via Neural Ordinary Differential Equations
2202.12373 (2022-02)
Learning Proper Orthogonal Decomposition of Complex Dynamics Using Heavy-ball Neural ODEs
2312.06015 (2023-12)
Speeding up astrochemical reaction networks with autoencoders and neural ODEs
and 1 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-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

Irregularly sampled time series commonly occur in several domains where they present a significant challenge to standard deep learning models. In this paper, we propose a new deep learning framework for probabilistic interpolation of irregularly sampled time series that we call the Heteroscedastic Temporal Variational Autoencoder (HeTVAE). HeTVAE includes a novel input layer to encode information about input observation sparsity, a temporal VAE architecture to propagate uncertainty due to input sparsity, and a heteroscedastic output layer to enable variable uncertainty in output interpolations. Our results show that the proposed architecture is better able to reflect variable uncertainty through time due to sparse and irregular sampling than a range of baseline and traditional models, as well as recent deep latent variable models that use homoscedastic output layers. 1

For agents

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

get_harvested_code_for_paper("2107.11350")
get_code_for_paper("2107.11350")
have("2107.11350")

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

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

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

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

Connect an agent — have() is free.