SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.13407 · 2021

Manifold-constrained Gaussian process inference for time-varying parameters in dynamic systems

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 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 0 have no contract verdict; 3 failures of our instrument; 3 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/2105.13407.json · badge: /api/ran/2105.13407.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
canadasunyan/tvmagi canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
devectorize Ran
ran; our contract draft was wrong, not the code
canadasunyan/tvmagi/package/TVMAGI_HMC.py
code served (permissive licence) · get_code("481cc0af8df8391f")
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

torch.manual_seed(0)

# Construct small tensor shapes for distinct dimensions
xlatent_shape = (2, 3)  # 6 elements
theta_shape = (4,)      # 4 elements
sigma_shape = (2, 2)    # 4 elements
time_constant_param_dim = 3  # 3 additional scalar parameters

# Calculate total length needed for long_tensor
x_latent_dim = 6
theta_dim = 4
sigma_dim = 4
total_length = x_latent_dim + theta_dim + sigma_dim + time_constant_param_dim

# Create a long_tensor with the required length
long_tensor = torch.randn(total_length)

ARGS = {
    'long_tensor': long_tensor,
    'xlatent_shape': xlatent_shape,
    'theta_shape': theta_shape,
    'sigma_shape': sigma_shape,
    'time_constant_param_dim': time_constant_param_dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — 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
get_dim Ran
ran, violated the contract we drafted
canadasunyan/tvmagi/package/TVMAGI_HMC.py
code served (permissive licence) · get_code("2db5d627e7e8c629")
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 int, ndim 0, dtype family int, 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 numpy as np

torch.manual_seed(0)

# The function get_dim takes a tensor_shape parameter
# tensor_shape should be a sequence (tuple or list) representing dimensions
# The function calculates the total number of elements by multiplying all dimensions

# Test case 1: Empty shape
tensor_shape_1 = ()

# Test case 2: 1D shape
tensor_shape_2 = (5,)

# Test case 3: Multi-dimensional shape
tensor_shape_3 = (2, 3, 4)

# We'll use the multi-dimensional case as it tests the full logic
ARGS = {
    "tensor_shape": (2, 3, 4)
}
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 int, ndim 0, dtype family int, 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
to_band Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
canadasunyan/tvmagi/package/gpm.py
code served (permissive licence) · get_code("d01e8eff2a168c5d")
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. 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)

# Create a small square matrix for testing
matrix = torch.randn(4, 4)

# Define ARGS dict with all parameters
ARGS = {
    "matrix": matrix,
    "bandwidth": 30
}
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, shape (4, 4) — shape (4, 4) as a later run recorded it
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
xthetasigmallikTorch Ran
ran; our contract draft was wrong, not the code
canadasunyan/tvmagi/package/TV_MAGI.py
code served (permissive licence) · get_code("fef12812be650537")
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
from torch.sparse import FloatTensor

torch.manual_seed(0)

# Create minimal ODE function that takes (theta, xlatent, time_constant_param_ls)
class MinimalODE(nn.Module):
    def forward(self, theta, xlatent, time_constant_param_ls):
        # theta: [n_theta, theta_dim]
        # xlatent: [n, p_dim]
        # Returns: [n, p_dim] derivative
        n = xlatent.shape[0]
        pdim = xlatent.shape[1]
        return torch.randn(n, pdim).double()

# Dimensions
n = 2  # number of time points
pdimension = 4  # output dimension
thetadimension = 3  # theta dimension
n_theta_samples = 5  # number of theta samples

# Create tensors
xlatent = torch.randn(n, pdimension).double()
theta = torch.randn(n_theta_samples, thetadimension).double()
sigma = torch.tensor(1.0).double()
inferred_theta = torch.randn(thetadimension).double()
ydata = torch.randn(n, pdimension).double()
priorTemperature = torch.tensor([1.0, 1.0, 1.0]).double()

# Create time_constant_param_ls - a list that can be indexed
time_constant_param_ls = [1.0, 2.0]

# Create sparse covariance matrices for each dimension
CovAllDimensionsPyList = []
for dim in range(pdimension):
    # Create minimal sparse matrices
    indices = torch.tensor([[0, 1], [0, 1]]).long()
    values = torch.tensor([1.0, 1.0]).double()
    mphi = torch.sparse_coo_tensor(indices, values, (n, n))
    Kinv = torch.sparse_coo_tensor(indices, values, (n, n))
    Cinv = torch.sparse_coo_tensor(indices, values, (n, n))
    
    CovAllDimensionsPyList.append({
        'mphi': mphi,
        'Kinv': Kinv,
        'Cinv': Cinv
    })

# Create KinvthetaList - sparse matrices for each theta dimension
KinvthetaList = []
for theta_dim in range(thetadimension):
    indices = torch.tensor([[0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]).long()
    values = torch.tensor([1.0, 1.0, 1.0, 1.0, 1.0]).double()
    Kinv_theta = torch.sparse_coo_tensor(indices, values, (n_theta_samples, n_theta_samples))
    KinvthetaList.append(Kinv_theta)

# Create ODE function
fOdeTorch = MinimalODE()

ARGS = {
    'xlatent': xlatent,
    'theta': theta,
    'time_constant_param_ls': time_constant_param_ls,
    'sigma': sigma,
    'inferred_theta': inferred_theta,
    'ydata': ydata,
    'CovAllDimensionsPyList': CovAllDimensionsPyList,
    'fOdeTorch': fOdeTorch,
    'priorTemperature': priorTemperature,
    'KinvthetaList': KinvthetaList,
    'positive': 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 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
GPTrain Not yet run
unverified (harvested, no recorded run)
canadasunyan/tvmagi/package/gpm.py
code served (permissive licence) · get_code("4d8d5a544f9adbd7")
How it ran

no invocation recorded.

pointwisethetasigmallikTorch Not yet run
unverified (harvested, no recorded run)
canadasunyan/tvmagi/package/pointwise_MAGI.py
code served (permissive licence) · get_code("17c145320ce5116a")
How it ran

no invocation recorded.

vectorize Not yet run
unverified (harvested, no recorded run)
canadasunyan/tvmagi/package/TVMAGI_HMC.py
code served (permissive licence) · get_code("7830145d6e8c84b2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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.

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

Identification of parameters in ordinary differential equations (ODEs) is an important and challenging task when modeling dynamic systems in biomedical research and other scientific areas, especially with the presence of time-varying parameters. This article proposes a fast and accurate method, TVMAGI (Time-Varying MAnifold-constrained Gaussian process Inference), to estimate both time-constant and time-varying parameters in the ODE using noisy and sparse observation data. TVMAGI imposes a Gaussian process model over the time series of system components as well as time-varying parameters, and restricts the derivative process to satisfy ODE conditions. Consequently, TVMAGI completely bypasses numerical integration and achieves substantial savings in computation time. By incorporating the ODE structures through manifold constraints, TVMAGI enjoys a principled statistical construct under the Bayesian paradigm, which further enables it to handle systems with missing data or unobserved components. The Gaussian process prior also alleviates the identifiability issue often associated with the time-varying parameters in ODE. Unlike existing approaches, TVMAGI can be applied to general nonlinear systems without specific structural assumptions. Three simulation examples, including an infectious disease compartmental model, are provided to illustrate the robustness and efficiency of our method compared with numerical integration and Bayesian filtering methods.

For agents

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

get_harvested_code_for_paper("2105.13407")
get_code_for_paper("2105.13407")
have("2105.13407")

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

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

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

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

Connect an agent — have() is free.