SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.14853 · 2021

Targeted Neural Dynamical Modeling

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 3 have no contract verdict; 1 failure of our instrument; 1 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/2110.14853.json · badge: /api/ran/2110.14853.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
henniglab/tndm canonical (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
henniglab/tndm_paper canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
gaussian_kldiv_loss Ran
ran on a synthesized input
henniglab/tndm/tndm/losses/gaussian_kldiv_loss.py
code served (permissive licence) · get_code("bbc8c44eb1abe94f")
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
import tensorflow_probability as tfp
import numpy as np

def gaussian_kldiv_loss(prior_variance):
    """
    Input format: (g_?, mean_?, logvar_?)
    """
    mean_getter = lambda x: x[1]
    logvar_getter = lambda x: x[2]

    @tf.function
    def loss_fun(g_x):
        mean_r = mean_getter(g_x)
        logvar_r = logvar_getter(g_x)
        dist_prior = tfp.distributions.Normal(0.0, tf.sqrt(prior_variance), name='RelevantPriorNormal')
        dist_posterior = tfp.distributions.Normal(mean_r, tf.exp(0.5 * logvar_r), name='RelevantPosteriorNormal')
        return tf.reduce_sum(tfp.distributions.kl_divergence(dist_prior, dist_posterior, allow_nan_stats=False, name=None))
    return loss_fun

# Create valid arguments for the function
prior_variance_value = tf.constant(1.0, dtype=tf.float32)

ARGS = {
    "prior_variance": prior_variance_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow, tensorflow_probability — 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
gaussian_loglike_loss Ran
ran on a synthesized input
henniglab/tndm/tndm/losses/gaussian_loglike_loss.py
code served (permissive licence) · get_code("14b244c04ab7ae02")
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

def gaussian_loglike_loss(sigma=1.0):
    sigma = tf.convert_to_tensor(sigma, dtype=tf.float32)

    @tf.function
    def loss_fun(y_true, y_pred):
        beh = tf.cast(y_pred, dtype=tf.float32)
        targets = tf.cast(y_true, dtype=tf.float32)
        mse = 0.5 * tf.reduce_sum(tf.keras.backend.square(targets - beh))
        return mse
    return loss_fun

# Construct the loss function
loss_function = gaussian_loglike_loss(sigma=1.0)

# Create small dummy data for testing
y_true = tf.constant([[1.0, 2.0, 3.0, 4.0],
                       [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

y_pred = tf.constant([[1.1, 2.1, 3.1, 4.1],
                       [5.1, 6.1, 7.1, 8.1]], dtype=tf.float32)

# Test the loss function
result = loss_function(y_true, y_pred)

ARGS = {
    "sigma": 1.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
jsonify_dict Ran
ran; our contract draft was wrong, not the code
henniglab/tndm_paper/run_tndm_double.py
code served (permissive licence) · get_code("d2936861d02d8de0")
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) 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

# Construct a hyperparameter dictionary with various types including booleans
d = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'use_dropout': True,
    'use_batch_norm': False,
    'num_epochs': 100,
    'optimizer': 'adam',
    'activation': 'relu',
    'shuffle_data': True,
    'early_stopping': False,
    'weight_decay': 1e-5
}

ARGS = {
    'd': d
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
poisson_loglike_loss Ran
ran on a synthesized input
henniglab/tndm/tndm/losses/poisson_loglike_loss.py
code served (permissive licence) · get_code("7b8d39fb7374553a")
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
import numpy as np

# The function takes a timestep parameter which is used in the loss function
# It should be a scalar value (float or int) that represents a time interval
timestep_value = 0.5

# Create the ARGS dictionary
ARGS = {
    "timestep": timestep_value
}
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 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
covariance_loss Not yet run
unverified (harvested, no recorded run)
henniglab/tndm/tndm/losses/covariance_loss.py
code served (permissive licence) · get_code("b5af07c153c9cd34")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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, 0 later) and 4 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
jsonify_dict 1 other paper
1 dated earlier
1908.07896 (2019-08)
Enabling hyperparameter optimization in sequential autoencoders for spiking neural data

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

Latent dynamics models have emerged as powerful tools for modeling and interpreting neural population activity. Recently, there has been a focus on incorporating simultaneously measured behaviour into these models to further disentangle sources of neural variability in their latent space. These approaches, however, are limited in their ability to capture the underlying neural dynamics (e.g. linear) and in their ability to relate the learned dynamics back to the observed behaviour (e.g. no time lag). To this end, we introduce Targeted Neural Dynamical Modeling (TNDM), a nonlinear state-space model that jointly models the neural activity and external behavioural variables. TNDM decomposes neural dynamics into behaviourally relevant and behaviourally irrelevant dynamics; the relevant dynamics are used to reconstruct the behaviour through a flexible linear decoder and both sets of dynamics are used to reconstruct the neural activity through a linear decoder with no time lag. We implement TNDM as a sequential variational autoencoder and validate it on simulated recordings and recordings taken from the premotor and motor cortex of a monkey performing a center-out reaching task. We show that TNDM is able to learn low-dimensional latent dynamics that are highly predictive of behaviour without sacrificing its fit to the neural data.

For agents

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

get_harvested_code_for_paper("2110.14853")
get_code_for_paper("2110.14853")
have("2110.14853")

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

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

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

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

Connect an agent — have() is free.