Papers › Latent Diffusion for Neural Spiking Data

Latent Diffusion for Neural Spiking Data

27 Jun 2024arXiv:2407.08751archive 2025-07-28

Jaivardhan Kapoor, Auguste Schulz, Julius Vetter, Felix Pei, Richard Gao, Jakob H. Macke

Modern datasets in neuroscience enable unprecedented inquiries into the relationship between complex behaviors and the activity of many simultaneously recorded neurons. While latent variable models can successfully extract low-dimensional embeddings from such recordings, using them to generate realistic spiking data, especially in a behavior-dependent manner, still poses a challenge. Here, we present Latent Diffusion for Neural Spiking data (LDNS), a diffusion-based generative model with a low-dimensional latent space: LDNS employs an autoencoder with structured state-space (S4) layers to project discrete high-dimensional spiking data into continuous time-aligned latents. On these inferred latents, we train expressive (conditional) diffusion models, enabling us to sample neural activity with realistic single-neuron and population spiking statistics. We validate LDNS on synthetic data, accurately recovering latent structure, firing rates, and spiking statistics. Next, we demonstrate its flexibility by generating variable-length data that mimics human cortical activity during attempted speech. We show how to equip LDNS with an expressive observation model that accounts for single-neuron dynamics not mediated by the latent state, further increasing the realism of generated samples. Finally, conditional LDNS trained on motor cortical activity during diverse reaching behaviors can generate realistic spiking data given reach direction or unseen reach trajectories. In summary, LDNS simultaneously enables inference of low-dimensional latents and realistic conditional generation of neural spiking datasets, opening up further possibilities for simulating experimentally testable hypotheses.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2407.08751")

Code

Syntology Ran 14 of 22 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · honoured contract; 8 ran · our draft was wrong; 2 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: official repository: 18 samples from 1 repository, 10 ran; 4 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

mackelab/LDNS officialmentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

22 samples harvested; 14 ran; 1 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
8ran · our draft was wrong
2ran · fixture could not drive it
3ran
8unverified

Licence: 4 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from mackelab/LDNS. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Activation mackelab/LDNS/ldns/networks/blocks.py official repository ran · our draft was wrong MIT (permissive) · ae5bb489492e56d4 · report
DropoutNd mackelab/LDNS/ldns/networks/blocks.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 7b57689a78611e37 · report
Kernel mackelab/LDNS/ldns/networks/blocks.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 637ce76ea996d0da · report
SSMKernel mackelab/LDNS/ldns/networks/blocks.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 7b5ca9528f2d5fed · report
dplr mackelab/LDNS/ldns/networks/blocks.py official repository ran · our draft was wrong MIT (permissive) · 64f3b90fc3deaa09 · report
get_logger mackelab/LDNS/ldns/networks/blocks.py official repository ran · our draft was wrong MIT (permissive) · 0fa25f334c0ad357 · report
nplr mackelab/LDNS/ldns/networks/blocks.py official repository ran · our draft was wrong MIT (permissive) · a8f4e0bd6f8bebf5 · report
power mackelab/LDNS/ldns/networks/blocks.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 8e0326e9fa719a59 · report
rank_correction mackelab/LDNS/ldns/networks/blocks.py official repository ran · honoured contract MIT (permissive) · 3eab4e035dc5c1f0 · report
transition mackelab/LDNS/ldns/networks/blocks.py official repository ran · our draft was wrong MIT (permissive) · fe900ba398d10d9d · report
AutoEncoder mackelab/LDNS/ldns/networks/blocks.py official repository unverified MIT (permissive) · 3d1d5f57adee63ba · report
AutoEncoderBlock mackelab/LDNS/ldns/networks/blocks.py official repository unverified MIT (permissive) · dc835e940474f275 · report
FFTConv mackelab/LDNS/ldns/networks/blocks.py official repository unverified MIT (permissive) · 3a7289b23b9cff26 · report
SSMKernelDPLR mackelab/LDNS/ldns/networks/blocks.py official repository unverified MIT (permissive) · ab17757609d5a3a7 · report
SSMKernelDiag mackelab/LDNS/ldns/networks/blocks.py official repository unverified MIT (permissive) · 742bff484ed96eec · report
combination mackelab/LDNS/ldns/networks/blocks.py official repository unverified MIT (permissive) · 03eeb2985cde61ff · report
log_vandermonde_transpose_naive mackelab/LDNS/ldns/networks/blocks.py official repository unverified MIT (permissive) · 7cfca855faa8e8dc · report
ssm mackelab/LDNS/ldns/networks/blocks.py official repository unverified MIT (permissive) · 154cc10f3036f3c6 · report
cauchy_naive identical code first harvested elsewhere ran · our draft was wrong fingerprinted licence of this copy not recorded · b7d9d94554e93b1b · report
inv_transform identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · 26b8695dba83b816 · report
log_vandermonde_naive identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · e25911109ba29783 · report
param_transform identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · 6f7ad7d857dc0d1e · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections