OSCR

When can neuronal activity-dependent homeostatic plasticity maintain circuit-level properties?

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

2 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 2 matches
  1. [1] § Results › Optimization of homeostatic mechanisms ↔ mainsimulateADHP.cpp, lines 1 to 53 · score 0.54 · activity dependent homeostatic, lower bound, ADHP mechanism, biases, plasticity, perturbations · block oscr:b:BRPGV34E24HV9-M · Report a mismatch
  2. [2] § Results › Optimization of homeostatic mechanisms ↔ mainADHPevol.cpp, lines 58 to 87 · score 0.53 · sliding window duration, upper bound, clipped, width, neuron, ADHP · block oscr:b:W1QVC5BD9HY4M-Z · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

C++ · 239 lines · 8.6 KB · BSD-2-Clause · 1 match

  1. // --------------------------------------------------------------
  2. // Track the parameters and states of CTRNNs as they undergo
  3. // Activity-Dependent Homeostatic Plasticity
  4. // Record pyloric fitness before and after plasticity
  5. //
  6. // Run this script from the directory of the evolved pyloric circuit
  7. // which you are perturbing/measuring, and specify the ADHP mechanism
  8. // you want to test. If you don't want ADHP to be active (just to test
  9. // pyloricness), then choose the nullADHP.dat file. Only the parameters
  10. // indicated by your ADHP mechanism (first line) can be perturbed in the test.
  11. // Ensure that the ./res.dat file specifies ranges (step doesn't matter)
  12. // for each parameter that should be explored (lines read in order of plasticpars.dat)
  13. //
  14. // Test one specific point by setting num_ICs to 1 and the upper and lower bounds
  15. // of the ranges in res.dat to the values you want
  16. //
  17. // --------------------------------------------------------------
  18. #include "TSearch.h"
  19. #include "CTRNN.h"
  20. #include "random.h"
  21. #include "pyloric.h"
  22. // Simulation parameters
  23. const double TransientDuration = 50; //Seconds to equilibrate before measuring pyloricness and activating ADHP
  24. double PlasticDuration = 10000; //Seconds with ADHP running before re-measuring pyloricness (set to 0 if just measuring pyl)
  25. const bool trackoutputs = true;
  26. const int trackoutputsinterval = 1; //Track neural outputs for every X trials
  27. const bool trackparams = false;
  28. const int trackparamsinterval = 1; //Track biases for every X trials
  29. const int trackingstepinterval = 2; //make the tracking files smaller by only recording every Xth step (though all steps are integrated)
  30. const int num_ICs = 1; //how many initial points?
  31. //Input Files
  32. char Nfname[] = "./pyloriccircuit.ns";
  33. // char HPfname[] = "./0/bestind.dat";
  34. //null ADHP option
  35. char HPfname[] = "../../nullADHP.dat";
  36. char rangefname[] = "../../res.dat";
  37. //Output Files
  38. char Fitnessesfname[] = "./fit.dat"; //fitness of every point before and after regulation
  39. char ICsfname[] = "./ics.dat"; //full parameters of every point before and after regulation
  40. char biastrackfname[] = "./parstrack.dat"; //track all plastic parameters throughout the run (if trackparams==true)
  41. char statestrackfname[] = "./statestrack.dat"; //track all three neural output timeseries throughout the run (if trackoutputs==true)
  42. // Nervous system params
  43. const int N = 3;
  44. int CTRNNVectSize = N*N + 2*N;
  45. int paramboundVectSize = 2*(CTRNNVectSize - N);
  46. void GenPhenMapping(TVector<double> &gen, TVector<double> &phen, TVector<double> &parambounds)
  47. {
  48. int k = 1;
  49. // Time-constants
  50. for (int i = 1; i <= N; i++) {
  51. phen(k) = MapSearchParameter(gen(k), .1, 2); // Time constants cannot be perturbed or regulated
  52. k++;
  53. }
  54. int param_idx = 1;
  55. // Bias
  56. for (int i = 1; i <= N; i++) {
  57. phen(k) = MapSearchParameter(gen(k), parambounds(param_idx), parambounds(param_idx+1));
  58. k++;
  59. param_idx += 2;
  60. }
  61. // Weights
  62. for (int i = 1; i <= N; i++) {
  63. for (int j = 1; j <= N; j++) {
  64. phen(k) = MapSearchParameter(gen(k), parambounds(param_idx), parambounds(param_idx+1));
  65. k++;
  66. param_idx += 2;
  67. }
  68. }
  69. }
  70. int main(){
  71. // Create files to hold data
  72. ofstream fitnesses;
  73. fitnesses.open(Fitnessesfname);
  74. ofstream ICsfile;
  75. ICsfile.open(ICsfname);
  76. ofstream biastrack;
  77. biastrack.open(biastrackfname);
  78. ofstream statestrack;
  79. statestrack.open(statestrackfname);
  80. CTRNN Circuit(3);
  81. // Set circuit parameters (start with the given pyloric solution)
  82. ifstream ifs;
  83. ifs.open(Nfname);
  84. if (!ifs) {
  85. cerr << "File not found: " << Nfname << endl;
  86. exit(EXIT_FAILURE);
  87. }
  88. ifs >> Circuit;
  89. ifs.close();
  90. ifstream rangefile;
  91. rangefile.open(rangefname);
  92. if (!rangefile) {
  93. cerr << "File not found: " << rangefname << endl;
  94. exit(EXIT_FAILURE);
  95. }
  96. // Set the proper HP parameters
  97. ifstream HPifs;
  98. HPifs.open(HPfname);
  99. if (!HPifs) {
  100. cerr << "File not found: " << HPfname << endl;
  101. exit(EXIT_FAILURE);
  102. }
  103. Circuit.SetHPPhenotype(HPifs,StepSize);
  104. HPifs.close();
  105. bool ADHPon = false;
  106. TVector<double> parambounds(1,paramboundVectSize); //vector to hold all ranges
  107. if (Circuit.plasticitypars.Sum()>0){ //gets from the ADHP bestind.dat file
  108. ADHPon = true;
  109. int bound_idx = 1;
  110. // Read in specified Ranges
  111. for (int i=1;i<=Circuit.plasticitypars.UpperBound();i++){
  112. if (Circuit.plasticitypars(i) == 1){
  113. int step_throwaway;
  114. rangefile >> parambounds(bound_idx);
  115. rangefile >> parambounds(bound_idx+1);
  116. rangefile >> step_throwaway;
  117. }
  118. bound_idx += 2;
  119. }
  120. }
  121. else {PlasticDuration = 0;} //if no ADHP, then forego the plastic period
  122. rangefile.close();
  123. // Generate random circuit parameters within the allowed ranges
  124. TVector<double> genotype(1,CTRNNVectSize);
  125. TVector<double> phenotype(1,CTRNNVectSize);
  126. for (int i = 0;i<num_ICs;i++){
  127. long randomseed = static_cast<long>(time(NULL));
  128. // long randomseed = 123456789; //if need repeats or direct compare
  129. RandomState rs(randomseed+pow(i,2));
  130. for (int j = 1; j <= genotype.Size(); j++)
  131. {genotype[j] = rs.UniformRandom(-1,1);} //generate random genotype
  132. GenPhenMapping(genotype,phenotype,parambounds); //map into proper ranges (or to specific values)
  133. //use only the generated parameters that you need
  134. int k = 1;
  135. //check for biases
  136. for(int j=1; j<=N; j++){
  137. if (Circuit.plasticitypars[k]==1){
  138. Circuit.SetNeuronBias(j,phenotype(k+N)); //start after time constants
  139. }
  140. k++;
  141. }
  142. //check for weights
  143. for (int j=1; j<=N; j++){
  144. for (int l=1; l<=N; l++){
  145. if (Circuit.plasticitypars[k]==1){
  146. Circuit.SetConnectionWeight(j,l,phenotype(k+N)); //started after time constants
  147. }
  148. k++;
  149. }
  150. }
  151. //prepare circuit for run
  152. Circuit.RandomizeCircuitOutput(0.5,0.5);
  153. Circuit.WindowReset();
  154. // Run for transient without ADHP
  155. int tstep = 0;
  156. for(double t=0;t<TransientDuration;t+=StepSize){
  157. Circuit.EulerStep(StepSize,false);
  158. if (trackoutputs && (i%trackoutputsinterval==0) && (tstep % trackingstepinterval==0)){
  159. for (int j = 1; j <= Circuit.size; j++){
  160. statestrack << Circuit.NeuronOutput(j) << " ";
  161. }
  162. statestrack << endl;}
  163. tstep ++;
  164. }
  165. // Record initial parameters
  166. ICsfile << Circuit.taus << " " << Circuit.biases << " ";
  167. for(int j = 1; j <= N; j ++){
  168. for(int k=1;k<=N;k++){
  169. ICsfile << Circuit.ConnectionWeight(j,k) << " ";
  170. }
  171. }
  172. ICsfile << endl;
  173. // Run with HP for a time if ADHP is turned on
  174. for(double t=0;t<PlasticDuration;t+=StepSize){
  175. if (trackparams && (i%trackparamsinterval==0) && (tstep % trackingstepinterval == 0)){
  176. for(int j = 1; j<= Circuit.plasticitypars.Sum(); j++){
  177. biastrack << Circuit.ArbDParam(j) << " "; //record only the parameters that are changing throughout the run
  178. }
  179. biastrack << endl;
  180. }
  181. if (trackoutputs && (i%trackoutputsinterval==0) && (tstep % trackingstepinterval==0)){
  182. for (int j = 1; j <= Circuit.size; j++){
  183. statestrack << Circuit.NeuronOutput(j) << " ";
  184. }
  185. statestrack << endl;}
  186. Circuit.EulerStep(StepSize,true);
  187. tstep ++;
  188. }
  189. if (trackparams && (i%trackparamsinterval==0)) {biastrack << endl;}
  190. if (trackoutputs && (i%trackoutputsinterval==0)) {statestrack << endl;}
  191. // Record again, after HP
  192. ICsfile << Circuit.taus << " " << Circuit.biases << " ";
  193. for(int j = 1; j <= N; j ++){
  194. for(int k=1;k<=N;k++){
  195. ICsfile << Circuit.ConnectionWeight(j,k) << " ";
  196. }
  197. }
  198. ICsfile << endl << endl;
  199. // Test for Pyloricness (HP remains on if it was on during plastic period)
  200. double fit = PyloricPerformance(Circuit,true);
  201. fitnesses << fit << endl << endl;;
  202. // fitnesses << Circuit.rhos << endl << endl; //proxy for whether HP is satisfied at the end, or whether it just ran into a boundary or is in a limit cycle
  203. }
  204. fitnesses.close();
  205. ICsfile.close();
  206. biastrack.close();
  207. statestrack.close();
  208. return 0;
  209. }

mainsimulateADHP.cpp at commit 393a5cc, under BSD-2-Clause · at the source

Overview

Authors: Lindsay J Stolting1, Randall D Beer1
  1. Cognitive Science Department and Program in Neuroscience, Indiana University, Bloomington, IN 47401 USA
Institutions: Indiana University Bloomington (United States); Indiana University (United States)
Journal: Journal of computational neuroscience, volume 54, issue 2, pages 365-391
Dates: received 8 February 2026; accepted 27 April 2026; published online 13 May 2026; in print 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1007/s10827-026-00936-7 · PMID 42126467 · PMCID PMC13233920 · OpenAlex W7161026767
Open access: hybrid, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: computational modeling (no new data) (modality), none (in silico) (organism), systems (subfield)
Methods: Machine learning, Single-unit activity, calcium imaging, Smoothing, state filtering, decompositions, Connectivity
Keywords: Activity-dependent homeostatic plasticity, Pyloric network, Circuit dynamics, Central pattern generators
MeSH: Homeostasis*, Models, Neurological*, Nerve Net*, Neuronal Plasticity*, Neurons*, Action Potentials, Animals, Computer Simulation, Ganglia, Invertebrate, Pylorus (* major topic)
Topic: Neurobiology and Insect Physiology Research (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 102 references in the paper

Abstract

Neural circuits are remarkably robust to perturbations that threaten their function. Activity-dependent homeostatic plasticity (ADHP) is a stabilizing mechanism that supports robustness by tuning neuronal ion conductances to combat chronic over- or under-activity. Its restorative capacity has been demonstrated in the pyloric circuit of the crustacean stomatogastric ganglion, whose neurons must burst in a specific order to coordinate digestive muscles. After disruption by physical and pharmacological manipulations, this circuit reliably recovers not only the activity levels of constituent neurons, but also the proper burst order. But how could ADHP, operating only on local information about each neuron’s average activity, maintain higher-order circuit properties? We explored this question in a computational model of the pyloric pattern generator. We first optimized a set of pyloric-like networks, then optimized ADHP mechanisms for each network to restore its pyloric character after parametric perturbations. This was possible for some networks and impossible for others, so we aimed to explain this disparity. We found that successful homeostatic regulators target average neural activity levels which happen to occur only among pyloric circuits and not among non-pyloric ones, within the set of reachable circuit configurations. Therefore, in subsets of parameter space where such dissociation is possible, activity carries indirect information about burst order, which ADHP can exploit to maintain pyloricness. Other subsets, whose pyloric averages are inseparable from non-pyloric ones, cannot be perfectly regulated. This separability property may explain differences in recovery capacity across perturbations and across individuals.

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

Repositories

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

Zenodo 18509900

License: bsd-2-clause-netbsd
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Code Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (2 files), NumPy (2 files)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
18 files

ljstolting/adhp-maintains-pyloricness

License: BSD-2-Clause
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 393a5cc2481d2342d881d05ec8964c3aed43b4f8, 16 June 2026
Languages: C++ (9), C/C++ (5), Jupyter (2)
Size: 2,221 files, 16 scripts
Software Heritage: not archived
Found in: the Zenodo archive record
Holds: README, license file, 2 notebooks
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (2 files), NumPy (2 files)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
18 files

Code Availability

C++ and Python code required to reproduce all data is publicly available on Zenodo at https://doi.org/10.5281/zenodo.18509900

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

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:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 32 scripts, each with its path and the digest of its content;
  • 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • 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 Statement

All code required to reproduce these simulations is publicly available on Zenodo at https://doi.org/10.5281/zenodo.18509900

C++ and Python code required to reproduce all data is publicly available on Zenodo at https://doi.org/10.5281/zenodo.18509900

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 2, 28 September 2026

  • Publisher: n/a → Springer Science+Business Media
  • Funding: added Eli Lilly and Company; Lilly Endowment

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 4 keywords, 10 MeSH terms, 99 references.

Cite

This paper

Stolting, L. J., & Beer, R. D. (2026). When can neuronal activity-dependent homeostatic plasticity maintain circuit-level properties? Journal of computational neuroscience, 54(2), 365-391. https://doi.org/10.1007/s10827-026-00936-7

BibTeX

@article{stolting2026when,
author = {Stolting, Lindsay J and Beer, Randall D},
title = {{When can neuronal activity-dependent homeostatic plasticity maintain circuit-level properties?}},
journal = {Journal of computational neuroscience},
year = {2026},
month = may,
volume = {54},
number = {2},
pages = {365--391},
publisher = {Springer Science+Business Media},
issn = {0929-5313},
doi = {10.1007/s10827-026-00936-7},
url = {https://doi.org/10.1007/s10827-026-00936-7},
pmid = {42126467},
pmcid = {PMC13233920}
}

RIS

TY - JOUR
AU - Stolting, Lindsay J
AU - Beer, Randall D
TI - When can neuronal activity-dependent homeostatic plasticity maintain circuit-level properties?
T2 - Journal of computational neuroscience
J2 - J Comput Neurosci
PY - 2026
DA - 2026/05/13
VL - 54
IS - 2
SP - 365
EP - 391
SN - 0929-5313
PB - Springer Science+Business Media
DO - 10.1007/s10827-026-00936-7
UR - https://doi.org/10.1007/s10827-026-00936-7
LA - en
ER -

CSL-JSON

{
"id": "10.1007/s10827-026-00936-7",
"type": "article-journal",
"title": "When can neuronal activity-dependent homeostatic plasticity maintain circuit-level properties?",
"container-title": "Journal of computational neuroscience",
"author": [
{
"family": "Stolting",
"given": "Lindsay J"
},
{
"family": "Beer",
"given": "Randall D"
}
],
"container-title-short": "J Comput Neurosci",
"volume": "54",
"issue": "2",
"page": "365-391",
"DOI": "10.1007/s10827-026-00936-7",
"PMID": "42126467",
"PMCID": "PMC13233920",
"ISSN": "0929-5313",
"publisher": "Springer Science+Business Media",
"URL": "https://doi.org/10.1007/s10827-026-00936-7",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
13
]
]
}
}

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.7554/elife.72875 [code]
Minimal requirements for a neuron to coregulate many properties and the implications for ion channel correlations and robustness.
Journal: eLife
In common: 30 references
[2] doi:10.1073/pnas.2222016120 [code]
Gating of homeostatic regulation of intrinsic excitability produces cryptic long-term storage of prior perturbations.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: Matplotlib, NumPy, 19 references
[3] doi:10.1371/journal.pcbi.1011212 [code]
Biological complexity facilitates tuning of the neuronal parameter space.
Journal: PLoS computational biology
In common: 17 references
[4] doi:10.7554/elife.76579 [code]
Mapping circuit dynamics during function and dysfunction.
Journal: eLife
In common: systems, 15 references
[5] doi:10.1073/pnas.2219049120 [code]
Neuronal morphology enhances robustness to perturbations of channel densities.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: 15 references
[6] doi:10.1016/j.isci.2022.104919 [code]
Repeated applications of high potassium elicit long-term changes in a motor circuit from the crab, &lt;i&gt;Cancer borealis&lt;/i&gt;.
Journal: iScience
In common: systems, 15 references
[7] doi:10.7554/elife.105842 [code]
Relative timescale of channel voltage dependence and channel density regulation impacts assembly and recovery of activity.
Journal: eLife
In common: 13 references
[8] doi:10.7554/elife.74363 [code]
Reciprocally inhibitory circuits operating with distinct mechanisms are differently robust to perturbation and modulation.
Journal: eLife
In common: systems, 13 references
[9] doi:10.7554/elife.98844 [code]
I<sub>h</sub> block reveals separation of timescales in pyloric rhythm response to temperature changes in <i>Cancer borealis</i>.
Journal: eLife
In common: 13 references
[10] doi:10.1371/journal.pcbi.1014177 [code]
Activity-dependent neuromodulation and calcium homeostasis cooperate to produce robust and modulable neuronal function.
Journal: PLoS computational biology
In common: none (in silico), computational modeling (no new data), 13 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.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1007/s10827-026-00936-7.svg)](https://openscicode.org/badge/doi/10.1007/s10827-026-00936-7)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1007/s10827-026-00936-7.svg
   :target: https://openscicode.org/badge/doi/10.1007/s10827-026-00936-7
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1007/s10827-026-00936-7"><img src="https://openscicode.org/badge/doi/10.1007/s10827-026-00936-7.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

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