OSCR

Combining sampling and attractor dynamics in spiking models of head direction systems.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Jupyter notebook · 57 lines · 1.9 KB · GPL-3.0

  1. # %% [markdown]
  2. # # Combining Sampling Methods with Attractor Dynamics in Spiking Models of Head-Direction Systems
  3. # ## by Vojko Pjanovic, Jacob Zavatone-Veth, Paul Masset, Sander Keemink & Michele Nardin.
  4. #
  5. # Code written by Vojko Pjanovic and Michele Nardin.
  6. #
  7. # This notebook includes the code for Fig. 1 panels B and C.
  8. # %% [markdown]
  9. # ## Panel B:
  10. # #### For increasing noise levels on the encoding of the angular velocity, the posterior distribution 𝑃 (𝜔𝑡 |𝝈𝑡 ) will show more and more uncertainty.
  11. #
  12. # The posterior over Poisson spikes is a Gumbel distribution:
  13. # $P(\omega_t | \sigma_t) \propto e^{-e^{\beta \omega_t}}e^{\beta \omega_t \sigma_t}$
  14. # %%
  15. import numpy as np
  16. import matplotlib.pyplot as plt
  17. # plot pdf of gumbel distribution
  18. omega = 1
  19. np.random.seed(0)
  20. for beta in [0.5, 1, 3]:
  21. kernel = np.random.poisson(np.exp(beta*omega))
  22. x = np.linspace(-3,5,1000)
  23. plt.figure(figsize=(2,2))
  24. y = np.exp(beta*kernel*x - np.exp(beta*x))
  25. plt.plot(x,y)
  26. plt.axis('off')
  27. plt.title(f'beta={beta}, kernel={kernel}')
  28. plt.show()
  29. # %% [markdown]
  30. #
  31. # ## Panel C:
  32. # #### Estimating true density and statistics through sampling (colorful arrows: samples, grey line: samples histogram, blue line: true distribution).
  33. # %%
  34. # sample 20 samples from gumbel distribution with beta = 1
  35. # then plot these samples as small arrows, each of different color, on the x axis
  36. np.random.seed(13)
  37. samples = np.random.gumbel(0,1,12)
  38. plt.figure(figsize=(2,2))
  39. # plot pdf first
  40. x = np.linspace(-3,5,1000)
  41. y = np.exp(-x - np.exp(-x))
  42. plt.plot(x,y,label='true density')
  43. plt.plot(np.linspace(-3,5,1000),np.zeros(1000),'k')
  44. for i,sample in enumerate(samples):
  45. plt.arrow(sample,-0.11,0,0.1,color=plt.cm.viridis(i/len(samples)),head_width=0.1,head_length=0.01,label='sample '+str(i))
  46. plt.axis('off')
  47. # plot the hist
  48. plt.hist(samples,bins=np.linspace(-3,5,8),density=True,color='k',histtype='step',label='samples hist.',alpha=0.5)
  49. plt.show()

Figure1_v2.ipynb at commit 45a30d4, under GPL-3.0 · at the source

Overview

Authors: Vojko Pjanovic1,2, Jacob A. Zavatone-Veth3, Paul Masset4,5, Sander W. Keemink2, Michele Nardin1
  1. Janelia Research Campus, Howard Hughes Medical Institute, Ashburn, Virginia, United States of America
  2. Department of Machine Learning and Neural Computing, Donders Institute for Brain, Cognition and Behaviour, Radboud University, Nijmegen, Netherlands
  3. Society of Fellows and Center for Brain Science, Harvard University, Cambridge, Massachusetts, United States of America
  4. Department of Psychology, McGill University, Montréal, Québec, Canada
  5. Mila - Quebec Artificial Intelligence Institute, Montréal, Québec, Canada
Journal: PLoS computational biology, volume 22, issue 7, article e1014577
Dates: received 25 February 2026; accepted 14 July 2026; published online 30 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pcbi.1014577 · PMID 42531351 · PMCID PMC13450861 · OpenAlex W7171810198
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: computational modeling (no new data) (modality), mouse (organism), computational (subfield)
Methods: Single-unit activity, calcium imaging
MeSH: Action Potentials*, Head Movements*, Models, Neurological*, Animals, Computational Biology, Computer Simulation, Mice, Nerve Net, Neurons, Uncertainty (* major topic)
Journal subjects: Computer and Information Sciences, Neural Networks, Biology and Life Sciences, Neuroscience, Cell Biology, Cellular Types, Animal Cells, Neurons, Cellular Neuroscience, Physiology, Electrophysiology, Membrane Potential, Action Potentials, Neurophysiology, Network Analysis, Physical Sciences, Mathematics, Probability Theory, Statistical Distributions, Cognitive Science, Cognitive Psychology, Perception, Sensory Perception, Psychology, Social Sciences, Physics, Classical Mechanics, Motion, Velocity, Anatomy, Nervous System, Neuroanatomy, Neural Pathways, Medicine and Health Sciences
Topic: Neurobiology and Insect Physiology Research (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Funding: Howard Hughes Medical Institute (N.A); Harvard Society of Fellows (Junior Fellowship) (N.A); Canada First Research Excellence Fund (through the Healthy Brains, Healthy Lives initiative at McGill University) (N.A); Natural Sciences and Engineering Research Council of Canada (NSERC) (RGPIN-2025-05676, DGECR-2025-00255); Fonds de Recherche du Québec (FRQ) (CB-365865); Sloan Research Fellowship (Not specified)
Citations: not cited yet (Europe PMC); 88 references in the paper

Abstract

Neural populations can maintain stable representations of navigation-related variables while integrating uncertain sensory signals. Experimental evidence showed that the precision of head-direction (HD) representations in flies and mice depends on the reliability of sensory cues, highlighting the influence of input uncertainty in attractor-based neural circuits. How do neural dynamics maintain stability while computing under uncertainty? Here, we propose a spiking neural network that unifies two principles — stability through attraction and uncertainty through fluctuation — and reinterpret the HD circuit as an uncertainty-aware integrator rather than a deterministic compass. Specifically, the network uses sampling-based probabilistic inference, where a neural population represents input uncertainty by rapidly fluctuating among likely hypotheses about the world while preserving a stable representation of head direction along an attractor manifold. This formulation suggests why a classical HD “bump” becomes less precise, namely due to rapid fluctuations, reflecting the uncertainty in angular velocity inputs. Our implementation yields experimentally testable predictions: correlated subthreshold voltage fluctuations, multi-timescale nonlinear interaction patterns, and characteristic statistics of bump movement. By combining probabilistic inference with attractor dynamics within one single circuit, our framework suggests how neural populations across species can represent an estimate and its uncertainty through fluctuations while maintaining stability, which could be a general principle for uncertainty-aware computation in noisy biological systems.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above.

michnard/sampl_attract_HD

License: GPL-3.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 45a30d440031ce4e728226ee64a2ebb7d79a6de8, 20 January 2026
Languages: Jupyter (4), Python (1)
Size: 8 files, 5 scripts
Software Heritage: not archived
Found in: “Data Availability”
Holds: README, license file, 4 notebooks
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (5 files), Matplotlib (4 files), SciPy (3 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
7 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 5 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data Availability

The code to generate the simulations and reproduce the analyses in the main figures is available at https://github.com/michnard/sampl_attract_HD.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 10 MeSH terms, 6 funders, 79 references.

Cite

This paper

Pjanovic, V., Zavatone-Veth, J. A., Masset, P., Keemink, S. W., & Nardin, M. (2026). Combining sampling and attractor dynamics in spiking models of head direction systems. PLoS computational biology, 22(7), e1014577. https://doi.org/10.1371/journal.pcbi.1014577

BibTeX

@article{pjanovic2026combining,
author = {Pjanovic, Vojko and Zavatone-Veth, Jacob A. and Masset, Paul and Keemink, Sander W. and Nardin, Michele},
title = {{Combining sampling and attractor dynamics in spiking models of head direction systems}},
journal = {PLoS computational biology},
year = {2026},
month = jul,
volume = {22},
number = {7},
pages = {e1014577},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/journal.pcbi.1014577},
url = {https://doi.org/10.1371/journal.pcbi.1014577},
pmid = {42531351},
pmcid = {PMC13450861}
}

RIS

TY - JOUR
AU - Pjanovic, Vojko
AU - Zavatone-Veth, Jacob A.
AU - Masset, Paul
AU - Keemink, Sander W.
AU - Nardin, Michele
TI - Combining sampling and attractor dynamics in spiking models of head direction systems
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/07/30
VL - 22
IS - 7
SP - e1014577
SN - 1553-734X
PB - PLOS
DO - 10.1371/journal.pcbi.1014577
UR - https://doi.org/10.1371/journal.pcbi.1014577
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pcbi.1014577",
"type": "article-journal",
"title": "Combining sampling and attractor dynamics in spiking models of head direction systems",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Pjanovic",
"given": "Vojko"
},
{
"family": "Zavatone-Veth",
"given": "Jacob A."
},
{
"family": "Masset",
"given": "Paul"
},
{
"family": "Keemink",
"given": "Sander W."
},
{
"family": "Nardin",
"given": "Michele"
}
],
"container-title-short": "PLoS Comput Biol",
"volume": "22",
"issue": "7",
"page": "e1014577",
"DOI": "10.1371/journal.pcbi.1014577",
"PMID": "42531351",
"PMCID": "PMC13450861",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pcbi.1014577",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
30
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1371/journal.pcbi.1014432 [code]
Spiking neurons as predictive controllers of linear systems.
Journal: PLoS computational biology
In common: SciPy, Matplotlib, NumPy, computational, computational modeling (no new data), 4 references
[2] doi:10.1038/s41467-026-74460-8 [code]
Spike-based alignment learning solves the weight transport problem.
Journal: Nature communications
In common: SciPy, Matplotlib, NumPy, computational modeling (no new data), 4 references
[3] doi: [code]
Limit-Cycle Proliferation Under Parametric Delayed Feedback in a Conductance-Based Neuron: Bifurcation Landscape, Orbit Catalog, and Capacity Analysis
Journal: Entropy (Basel, Switzerland)
In common: SciPy, Matplotlib, NumPy, computational modeling (no new data), 4 references
[4] doi:10.1126/sciadv.aeh7220 [code]
Central complex representations of self-movement are sufficient to compute wind direction in flight.
Journal: Science advances
In common: SciPy, Matplotlib, NumPy, 4 references
[5] doi:10.1038/s41586-026-10827-7 [code]
A vector-based strategy for olfactory navigation in Drosophila.
Journal: Nature
In common: SciPy, Matplotlib, NumPy, 4 references
[6] doi:10.1038/s41467-026-75924-7 [code]
Data-driven reduced modeling of neural dynamics.
Journal: Nature communications
In common: SciPy, Matplotlib, NumPy, computational modeling (no new data), 3 references
[7] doi:10.1038/s42256-026-01254-4 [code]
Neural sampling from cognitive maps enables goal-directed imagination and planning.
Journal: Nature machine intelligence
In common: Matplotlib, NumPy, computational modeling (no new data), 3 references
[8] doi:10.1038/s41586-026-10735-w [code]
Distributed control circuits across a brain-and-cord connectome.
Journal: Nature
In common: SciPy, Matplotlib, NumPy, 3 references
[9] doi: [code]
Going deeper with morphologically detailed neural networks by simulation-based gradient propagation
Journal: Frontiers in computational neuroscience
In common: SciPy, Matplotlib, NumPy, computational, computational modeling (no new data), 2 references
[10] doi:10.1371/journal.pcbi.1014585 [code]
Decoding behavior with minimal and interpretable agent models.
Journal: PLoS computational biology
In common: SciPy, Matplotlib, NumPy, computational modeling (no new data), mouse, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.