Multi-stable oscillations in cortical networks with two classes of inhibition.
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
Python · 170 lines · 4.5 KB · no license
- import numpy as np
- import matplotlib.pyplot as plt
- # Define the parameters
- N = 400
- dt = 0.02
- t_total = 100000 * dt
- time = np.arange(0, t_total, dt)
- tme = 20
- tmi = 10
- tms = 10
- taue = 2
- taui = 7.5
- taus = 15
- mue = 1.25
- mui = -0.5
- mus = -2
- dele = 0.1
- deli = 0.1
- dels = 0.1
- ampe = 2
- ampi = 0
- amps = 0
- wid = 60
- tone = 1000
- toni = 0
- tons = 0
- ld = 0.85
- gee = 1.5
- gei = 2
- ges = 4.25
- gie = 1
- gii = 0.5
- gis = 0
- gse = 2
- gsi = 0.5
- gss = 0
- # Initialize the matrices for the network
- def generate_normalized_matrix(N, sigma=2):
- X = np.linspace(0, 1, N)
- X = X[:, np.newaxis]
- M = np.exp(-(X - X.T) ** 2 / sigma**2)
- row_sums = M.sum(axis=1, keepdims=True)
- M_normalized = M / row_sums
- return M_normalized
- sigmae = 0.5
- sigmai = sigmas = 0.1
- Mee = generate_normalized_matrix(N, sigmae)
- Mei = generate_normalized_matrix(N, sigmai)
- Mes = generate_normalized_matrix(N, sigmas)
- Mie = generate_normalized_matrix(N, sigmae)
- Mii = generate_normalized_matrix(N, sigmai)
- Mis = generate_normalized_matrix(N, sigmas)
- Mse = generate_normalized_matrix(N, sigmae)
- Msi = generate_normalized_matrix(N, sigmai)
- Mss = generate_normalized_matrix(N, sigmas)
- # For the small limit cycle.
- ae = 1.196257
- be = 0.302558
- ai = 0.165609
- bi = -0.31882
- as_ = 0.069508 # 'as' is a Python keyword, so use 'as_' instead
- bs = -0.782826
- rand_e = np.tan(np.pi * np.random.rand(N) - np.pi / 2)
- rand_i = np.tan(np.pi * np.random.rand(N) - np.pi / 2)
- rand_s = np.tan(np.pi * np.random.rand(N) - np.pi / 2)
- v_e = be + ae * rand_e
- v_i = bi + ai * rand_i
- v_s = bs + as_ * rand_s
- qe = 2 * np.arctan(v_e)
- qi = 2 * np.arctan(v_i)
- qs = 2 * np.arctan(v_s)
- se = np.full(N, 0.358599)
- si = np.full(N, 0.084618)
- ss = np.full(N, 0.035599)
- # Given initial conditions for synaptic variables
- sebar = np.zeros(len(time)) # Assuming all start with the same initial condition
- sibar = np.zeros(len(time))
- ssbar = np.zeros(len(time))
- se_heatmap = np.zeros((len(time), N)) # For storing se values over time
- def bump(t):
- return (t > 0) & (t < wid)
- nstim = 200
- z = np.zeros(N)
- z[:nstim] = 1
- xie = np.tan(-np.pi / 2 + np.pi * np.random.rand(N))
- xii = np.tan(-np.pi / 2 + np.pi * np.random.rand(N))
- xis = np.tan(-np.pi / 2 + np.pi * np.random.rand(N))
- for j in range(1, len(time)):
- t = j * dt
- ie = ampe * bump(t - tone) * z
- ii = ampi * bump(t - toni) * z
- is_ = amps * bump(t - tons) * z
- qpe = qe + dt * (1 - np.cos(qe) + (1 + np.cos(qe)) * (mue + ie + gee * np.dot(Mee, se) - gie * np.dot(Mie, si) - ld * gse * np.dot(Mse, ss) + dele * xie)) / tme
- qpi = qi + dt * (1 - np.cos(qi) + (1 + np.cos(qi)) * (mui + ii + gei * np.dot(Mei, se) - gii * np.dot(Mii, si) - ld * gsi * np.dot(Msi, ss) + deli * xii)) / tmi
- qps = qs + dt * (1 - np.cos(qs) + (1 + np.cos(qs)) * (mus + is_ + ges * np.dot(Mes, se) - gis * np.dot(Mis, si) - gss * np.dot(Mss, ss) + dels * xis)) / tms
- fe = qpe > np.pi
- fi = qpi > np.pi
- fs = qps > np.pi
- se = (1 - dt / taue) * se + fe * tme / taue
- si = (1 - dt / taui) * si + fi * tmi / taui
- ss = (1 - dt / taus) * ss + fs * tms / taus
- se_heatmap[j] = se # Store the current se values
- sebar[j] = np.sum(se)/N #I thik the normal code and this one is different as here all the se entries are summed.
- sibar[j] = np.sum(si)/N
- ssbar[j] = np.sum(ss)/N
- qe = qpe - 2 * np.pi * fe
- qi = qpi - 2 * np.pi * fi
- qs = qps - 2 * np.pi * fs
- # # Plot the excitable variable `se` versus time
- # plt.figure(figsize=(10, 6))
- # plt.plot(time, sebar, label='se')
- # plt.title('sebar vs. Time')
- # plt.xlabel('Time')
- # plt.ylabel('se')
- # plt.legend()
- # plt.show()
- # # Plotting the heatmap for synaptic variable 'se'
- # plt.figure(figsize=(10, 8))
- # plt.imshow(se_heatmap.T, aspect='auto', origin='lower', cmap='viridis', extent=[0, time[-1], 0, N])
- # plt.colorbar(label='Synaptic variable se')
- # plt.xlabel('Time (s)')
- # plt.ylabel('Neuron index')
- # plt.title('200 is excited')
- # plt.show()
- fig, axs = plt.subplots(2, 1, figsize=(10, 14))
- # Plot the excitable variable `se` versus time on the first subplot
- axs[0].plot(time, sebar, label='se')
- axs[0].set_title('sebar vs. Time')
- axs[0].set_xlabel('Time')
- axs[0].set_ylabel('se')
- axs[0].legend()
- # Plotting the heatmap for synaptic variable 'se' on the second subplot
- cax = axs[1].imshow(se_heatmap.T, aspect='auto', origin='lower', cmap='viridis', extent=[0, time[-1], 0, N])
- fig.colorbar(cax, ax=axs[1], label='Synaptic variable se')
- axs[1].set_xlabel('Time (s)')
- axs[1].set_ylabel('Neuron index')
- axs[1].set_title('200 is excited')
- # Adjust layout to make space for titles and labels
- fig.tight_layout()
- # Show the combined figure
- plt.show()
Neuro_test.py at commit 9649bb1, no license · at the source
Overview
Abstract
In the classical view of cortical rhythms, interactions between excitatory pyramidal neurons (E) and inhibitory parvalbumin-expressing interneurons (I) are sufficient to generate gamma- and beta-band oscillations. However, it is now well established that multiple inhibitory interneuron subtypes exist and that they play important roles in the generation and modulation of these rhythms. In this paper, we develop a spiking network model consisting of populations of E, I, and an additional interneuron type, somatostatin-expressing neurons (S), which receive excitation from the E cells and inhibit both the E and I populations. The S cells are further modulated by a third inhibitory subtype, vasoactive intestinal peptide (VIP) neurons, which receive inputs from other cortical areas. We reduce the spiking network to a system of nine differential equations that describe the mean membrane potential, firing rate, and synaptic conductance for each population. Using this reduced model, we identify a wide range of parameters that exhibit multiple coexisting rhythms. Employing tools from nonlinear dynamics, we then explore the roles of the two classes of inhibition, as well as VIP modulation, in shaping the properties of these rhythms.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above.
Arnabds/Comp-Neuro-Research-Project-1--Multi-stable-oscillations-in-cortical-networks-with-two-classes
9649bb15f463465640ed526c71bb35cb9d7b47ec, 27 October 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
6 files
- code/
Neuro_test.py , Python, 170 lines - code/
lfp.ipynb , Jupyter, 556 lines - code/
lfp_big.ipynb , Jupyter, 317 lines - code/
lfp_small.ipynb , Jupyter, 316 lines - code/
lfpfresh.ipynb , Jupyter, 259 lines - README.md, Text, 330 lines
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
All codes will be available on GitHub (https://
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, 2 authors, 11 MeSH terms, 33 references.
Cite
This paper
Dey Sarkar, A., & Ermentrout, B. (2026). Multi-stable oscillations in cortical networks with two classes of inhibition. PLoS computational biology, 22(6), e1014391. https://
BibTeX
@article{deysarkar2026mu
author = {Dey Sarkar, Arnab and Ermentrout, Bard},
title = {{Multi-stable oscillations in cortical networks with two classes of inhibition}},
journal = {PLoS computational biology},
year = {2026},
month = jun,
volume = {22},
number = {6},
pages = {e1014391},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/
url = {https://
pmid = {42263113},
pmcid = {PMC13298994}
}
RIS
TY - JOUR
AU - Dey Sarkar, Arnab
AU - Ermentrout, Bard
TI - Multi-stable oscillations in cortical networks with two classes of inhibition
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/
VL - 22
IS - 6
SP - e1014391
SN - 1553-734X
PB - PLOS
DO - 10.1371/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1371/
"type": "article-journal",
"title": "Multi-stable oscillations in cortical networks with two classes of inhibition",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Dey Sarkar",
"given": "Arnab"
},
{
"family": "Ermentrout",
"given": "Bard"
}
],
"container-title-short":
"volume": "22",
"issue": "6",
"page": "e1014391",
"DOI": "10.1371/
"PMID": "42263113",
"PMCID": "PMC13298994",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
9
]
]
}
}
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.1014378 [code]
- A mean-field model of neural networks with PV and SOM interneurons reveals connectivity-based mechanisms of gamma oscillations.Journal: PLoS computational biologyIn common: SciPy, Matplotlib, NumPy, none (in silico), 9 references
- [2] doi:10.1038/s41586-025-09604-9 [code]
- Flexible perceptual encoding by discrete gamma events.Journal: NatureIn common: scikit-learn, pandas, SciPy, 2 other tools, 7 references
- [3] doi:10.7554/elife.95562 [code]
- Spatially targeted inhibitory rhythms differentially affect neuronal integration.Journal: eLifeIn common: scikit-learn, pandas, SciPy, 2 other tools, 6 references
- [4] doi:10.1371/journal.pcbi.1010942 [code]
- Theta-gamma phase amplitude coupling in a hippocampal CA1 microcircuit.Journal: PLoS computational biologyIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, none (in silico), 6 references
- [5] doi:10.1371/journal.pcbi.1013363 [code]
- The role of feedforward and feedback inhibition in modulating theta-gamma cross-frequency interactions in neural circuits.Journal: PLoS computational biologyIn common: scikit-learn, pandas, SciPy, 1 other tool, 5 references
- [6] doi:10.1038/s41467-026-71386-z [code]
- Planar, spiral, and concentric traveling waves distinguish behavioral states in human memory.Journal: Nature communicationsIn common: seaborn, scikit-learn, pandas, 3 other tools, author Bard Ermentrout
- [7] doi:10.1093/cercor/bhae405 [code]
- Reconciliation of weak pairwise spike-train correlations and highly coherent local field potentials across space.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: pandas, SciPy, Matplotlib, 1 other tool, none (in silico), 4 references
- [8] doi:10.1371/journal.pcbi.1010569 [code]
- Cross-scale excitability in networks of quadratic integrate-and-fire neurons.Journal: PLoS computational biologyIn common: none (in silico), 2 references, author Bard Ermentrout
- [9] doi:10.1038/s41598-023-34165-0 [code]
- Inhibitory neurons control the consolidation of neural assemblies via adaptation to selective stimuli.Journal: Scientific reportsIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, 4 references
- [10] doi:10.3389/fnsys.2023.1217170 [code]
- Beyond rhythm - a framework for understanding the frequency spectrum of neural activity.Journal: Frontiers in systems neuroscienceIn common: scikit-learn, pandas, SciPy, 2 other tools, 4 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 5 scripts, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:5cb3162dfa9ec032…
Add the badge to the code's README
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 -->
[](https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014391)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014391.svg
:target: https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014391
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014391"><img src="https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014391.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.
