concord-model-wendling
4-population cortical column model with fast inhibition (Wendling et al., 2002)
concord.models:wendling.
For a conceptual introduction to neural mass models, post-synaptic potentials, and the sigmoid function, see Neural Mass Models (background reading). This page assumes familiarity with the Jansen-Rit model.
Why a Fourth Population?
When depth electrodes record a seizure onset in temporal lobe epilepsy, the most common pattern is low-voltage fast activity (LVFA) — a sudden drop in signal amplitude followed by rapid oscillations at 15–25 Hz. This is the electrographic signature of seizure onset, visible on nearly every SEEG recording of temporal lobe seizures.
The 3-population Jansen-Rit model cannot reproduce LVFA. It has only one type of inhibition, so it can produce either normal alpha rhythms or large epileptiform spikes — but not the low-amplitude, high-frequency pattern seen at seizure onset. To explain LVFA, you need to separate inhibition into two distinct mechanisms.
Two Types of Inhibition in Real Cortex
Real cortical circuits contain (at least) two distinct populations of inhibitory interneurons that differ in where they connect and how fast they act:
| Property | Slow Dendritic Inhibition | Fast Somatic Inhibition |
|---|---|---|
| Target | Pyramidal cell dendrites | Pyramidal cell soma |
| Receptor | GABA-A (slow component) | GABA-A (fast component) |
| Time constant | ~20 ms (b = 50 s⁻¹) | ~2 ms (g = 500 s⁻¹) |
| Effect | Modulates overall excitability | Gates individual spikes |
| Model parameter | B (amplitude) | G (amplitude) |
| Abbreviation | SDI | FSI |
The Seizure Mechanism
Wendling's key insight (2002): the transition to seizure involves a selective impairment of slow dendritic inhibition while fast somatic inhibition remains intact or even increases. When slow inhibition weakens (B decreases), pyramidal cells become more excitable. But fast inhibition (G) is still active — and because it operates on a much faster timescale, it produces rapid oscillations rather than the large-amplitude spikes you get when all inhibition fails.
There is also a critical cross-inhibition pathway: slow inhibitory interneurons (SDI) normally suppress fast inhibitory interneurons (FSI). When SDI weaken, FSI are disinhibited — they become more active, producing even stronger fast inhibition. This is the "inhibition of inhibition" pathway, mediated by connectivity constant C6.
The Four Populations
| Population | Abbr. | Type | Targets | PSP Kernel | Key Param |
|---|---|---|---|---|---|
| Pyramidal cells | PY | Excitatory (output) | EI, SDI, FSI | — | — |
| Excitatory interneurons | EI | Excitatory | PY | He (A, a) | A |
| Slow dendritic inhibitory | SDI | Inhibitory (GABA-A slow) | PY, FSI | Hi (B, b) | B |
| Fast somatic inhibitory | FSI | Inhibitory (GABA-A fast) | PY | Hg (G, g) | G |
Pyramidal cells (PY) are the main output neurons. The summed post-synaptic potentials on their membrane is what the electrode measures. They project to all three interneuron populations.
Excitatory interneurons (EI) receive input from pyramidal cells and feed excitation back — a positive feedback loop that amplifies activity. Identical to the Jansen-Rit excitatory population.
Slow dendritic inhibitory interneurons (SDI) receive input from pyramidal cells and send slow inhibition back to pyramidal dendrites. They also inhibit FSI interneurons (the cross-inhibition pathway). Correspond to the single inhibitory population in Jansen-Rit.
Fast somatic inhibitory interneurons (FSI) — the new population — receive excitation from pyramidal cells and inhibition from SDI. They project fast inhibition to pyramidal cell bodies. Their 2 ms time constant is fast enough to gate individual spikes, producing rapid oscillations when active.
Circuit Diagram
graph TD INPUT(["External input p(t)"]) EXC["Excitatory Interneurons\n(EI — amplify signal)"] PYR["**Pyramidal Cells**\n(output: y1 − y2 − y3)"] SDI["Slow Dendritic Inhibitory\n(SDI — GABA-A slow)"] FSI["Fast Somatic Inhibitory\n(FSI — GABA-A fast)"] INPUT -->|"p(t)"| EXC PYR -->|"C1"| EXC EXC -->|"C2 · excitatory"| PYR PYR -->|"C3"| SDI SDI -->|"C4 · slow inhibitory"| PYR PYR -->|"C5"| FSI SDI -.->|"C6 · cross-inhibition"| FSI FSI -->|"C7 · fast inhibitory"| PYR style EXC fill:#0a3d1a,stroke:#4ade80,color:#4ade80 style PYR fill:#162450,stroke:#5b8dee,color:#5b8dee style SDI fill:#3d0a0a,stroke:#f87171,color:#f87171 style FSI fill:#2a1850,stroke:#a78bfa,color:#a78bfa style INPUT fill:#1a3a3a,stroke:#2dd4bf,color:#2dd4bf
The dashed C6 arrow is the cross-inhibition pathway: SDI interneurons inhibit FSI interneurons. When SDI weaken (B decreases), FSI are disinhibited and become more active. This is the mechanism behind low-voltage fast activity at seizure onset.
PSP Kernels
Each population's synaptic response is modeled as a second-order linear system — an impulse response that converts incoming firing rate pulses into smooth post-synaptic potentials. The Wendling model has three kernels (vs two in Jansen-Rit):
# Excitatory PSP kernel (same as Jansen-Rit)
h_e(t) = A · a · t · exp(-a·t) A = 5.0 mV, a = 100 s⁻¹ (τ = 10 ms)
# Slow inhibitory PSP kernel (same as Jansen-Rit)
h_i(t) = B · b · t · exp(-b·t) B = 25.0 mV, b = 50 s⁻¹ (τ = 20 ms)
# Fast inhibitory PSP kernel (NEW in Wendling)
h_g(t) = G · g · t · exp(-g·t) G = 10.0 mV, g = 500 s⁻¹ (τ = 2 ms)
The amplitude parameter (A, B, or G) controls how large the voltage response is. The rate constant (a, b, or g) controls how fast it rises and decays. Note that hg is 10x faster than he and 25x faster than hi — fast enough to track individual spikes rather than smoothing over them.
The sigmoid function S(v) = 2·e0 / (1 + exp(r·(v0 - v))) is identical to Jansen-Rit, converting membrane potential to firing rate. Already implemented in concord-models-utils.
The Equations
State Variables
| Index | Variable | Description |
|---|---|---|
| 0 | y0 | Excitatory PSP on pyramidal cells (from EI feedback) |
| 1 | y1 | PSP on excitatory interneurons (from external input + PY) |
| 2 | y2 | Slow inhibitory PSP on pyramidal cells (from SDI) |
| 3 | y3 | Fast inhibitory PSP on pyramidal cells (from FSI) |
| 4 | y4 | Slow inhibitory PSP on FSI (SDI → FSI cross-inhibition) |
| 5–9 | y5–y9 | Time derivatives of y0–y4 (velocities) |
ODE System (10 equations)
# Position derivatives (linking to velocities)
dy0/dt = y5
dy1/dt = y6
dy2/dt = y7
dy3/dt = y8
dy4/dt = y9
# Block 0: Excitatory feedback → pyramidal cells (He kernel)
# PY receives net input: excitatory minus both inhibitory PSPs
dy5/dt = A·a·S(y1 - y2 - y3) - 2a·y5 - a²·y0
# Block 1: External input + pyramidal → excitatory interneurons (He kernel)
dy6/dt = A·a·(p(t) + C2·S(C1·y0)) - 2a·y6 - a²·y1
# Block 2: Pyramidal → slow inhibitory → pyramidal (Hi kernel)
dy7/dt = B·b·C4·S(C3·y0) - 2b·y7 - b²·y2
# Block 3: Fast inhibitory → pyramidal (Hg kernel)
# FSI receive excitation from PY (C5·y0) minus cross-inhibition from SDI (C6·y4)
dy8/dt = G·g·C7·S(C5·y0 - C6·y4) - 2g·y8 - g²·y3
# Block 4: Slow inhibitory → fast inhibitory cross-inhibition (Hi kernel)
# Same pyramidal input as block 2 but without C4 scaling
dy9/dt = B·b·S(C3·y0) - 2b·y9 - b²·y4
# Output signal (simulated SEEG)
output = y1 - y2 - y3
S(C5·y0 - C6·y4) — FSI interneurons
receive excitation from pyramidal cells (C5·y0) minus inhibition from SDI
(C6·y4). This is the "inhibition of inhibition" pathway. When SDI weaken
(B decreases → y4 shrinks), the subtractive term diminishes, FSI receive more net
excitation, and fast inhibition increases — producing low-voltage fast activity.
The output signal y1 - y2 - y3 represents the net post-synaptic potential
on pyramidal cell membranes: excitatory input from EI (y1) minus slow inhibition from
SDI (y2) minus fast inhibition from FSI (y3). Compare with Jansen-Rit's y1 - y2,
which lacks the fast inhibitory subtraction.
Connectivity Constants
All seven constants are derived from a single base value C = 135:
| Constant | Formula | Default | Connection | In JR? |
|---|---|---|---|---|
| C1 | C | 135 | PY → EI | Yes |
| C2 | 0.8 · C | 108 | EI → PY | Yes |
| C3 | 0.25 · C | 33.75 | PY → SDI | Yes |
| C4 | 0.25 · C | 33.75 | SDI → PY | Yes |
| C5 | 0.3 · C | 40.5 | PY → FSI | New |
| C6 | 0.1 · C | 13.5 | SDI → FSI | New |
| C7 | 0.8 · C | 108 | FSI → PY | New |
These ratios are confirmed by Chong et al. (2011, Appendix B), Desroches et al. (2016), and all surveyed implementations. Note that C3 = C4 (symmetric slow inhibitory loop) and C2 = C7 (equal gain for excitatory feedback and fast inhibitory output).
Parameters
| Name | Default | Lower | Upper | Units | Description |
|---|---|---|---|---|---|
| A | 5.0 | 2.0 | 10.0 | mV | Max excitatory PSP amplitude |
| B | 25.0 | 1.0 | 50.0 | mV | Max slow inhibitory PSP amplitude |
| G | 10.0 | 0.0 | 80.0 | mV | Max fast inhibitory PSP amplitude |
| a | 100 | 50 | 200 | 1/s | Excitatory rate constant (τ = 10 ms) |
| b | 50 | 10 | 100 | 1/s | Slow inhibitory rate constant (τ = 20 ms) |
| g | 500 | 100 | 1000 | 1/s | Fast inhibitory rate constant (τ = 2 ms) |
| C | 135 | 50 | 500 | Global connectivity strength | |
| e0 | 2.5 | 1.0 | 5.0 | 1/s | Half of maximum firing rate |
| v0 | 6.0 | 3.0 | 12.0 | mV | PSP at half-maximal firing rate |
| r | 0.56 | 0.1 | 1.0 | 1/mV | Sigmoid steepness |
| p | 90 | 0 | 500 | Hz | Mean external input |
| sigma | 30 | 0 | 100 | Hz | Input noise standard deviation |
The Six Dynamical Regimes
The signature result of Wendling (2002): by varying only B (slow inhibition) and G (fast inhibition) while holding A constant, the model transitions through six distinct EEG activity patterns. This reproduces the full spectrum from normal background to seizure activity.
| Type | Activity | A | B | G | Description |
|---|---|---|---|---|---|
| 1 | Normal background | 5 | 50 | 15 | Broadband 1–7 Hz, no dominant peak. Strong slow inhibition keeps activity low. |
| 2 | Sporadic spikes | 5 | 40 | 15 | Occasional large-amplitude transients as slow inhibition weakens. |
| 3 | Sustained spike-wave | 5 | 25 | 15 | Regular 3–6 Hz spike-wave discharges. Classic interictal pattern. |
| 4 | Slow rhythmic activity | 5 | 10 | 15 | Alpha-like 8–13 Hz rhythm. Slow inhibition very weak. |
| 5 | Low-voltage fast activity | 5 | 5 | 25 | LVFA: 10–20 Hz, low amplitude. The seizure onset pattern. |
| 6 | Slow quasi-sinusoidal | 5 | 15 | 0 | 8–13 Hz with no fast inhibition (G = 0). Shows effect of absent GABA-A fast. |
Interactive Simulation
Drag the B and G sliders to explore the six dynamical regimes. The simulation runs the full 10-variable Wendling ODE system in your browser using RK4 integration. Use the preset buttons to jump to each regime from the table above.
B–G Parameter Space
This map sweeps the (B, G) parameter plane and shows how the model's output character changes. Each pixel is a short simulation; the color encodes the RMS amplitude of the output signal. The six regime points from the table above are overlaid as markers. This reproduces the signature figure from Wendling (2002, Figure 10).
Comparison with Jansen-Rit
| Aspect | Jansen-Rit | Wendling |
|---|---|---|
| Populations | 3 (PY, EI, II) | 4 (PY, EI, SDI, FSI) |
| State variables | 6 | 10 |
| Inhibitory types | 1 (combined) | 2 (slow dendritic + fast somatic) |
| Connectivity constants | C1–C4 | C1–C7 |
| Synaptic gains | A, B | A, B, G |
| Time constants | a, b | a, b, g |
| Output | y1 − y2 | y1 − y2 − y3 |
| Regimes | 3 (noise, alpha, spikes) | 6 (background through ictal) |
| Seizure dynamics | Limited to spikes | Full interictal-to-ictal transition |
The first three equation blocks (y0, y1, y2) are structurally identical to Jansen-Rit, except that the pyramidal input sigmoid changes from S(y1 − y2) to S(y1 − y2 − y3) — the subtraction of the fast inhibitory PSP.
Implementation Notes
The Wendling model is well-established in the computational neuroscience literature, but unlike the Jansen-Rit model, no canonical reference implementation exists. Key findings from cross-referencing six implementations:
-
The Virtual Brain (TVB) does not have a Wendling model.
TVB's
ZetterbergJansen(12 state variables, 5 gamma constants) descends from Zetterberg et al. (1978) — a different extension of the Jansen-Rit lineage that models stellate cells and includes inhibitory self-feedback. It is not the Wendling model. - Integration method: most community implementations use Euler or Euler-Maruyama. Concord uses RK4 (more accurate), consistent with the Jansen-Rit implementation.
- g parameter: the standard value is 500 s⁻¹ (τ = 2 ms). One implementation (Carvalho et al. 2021, PLOS Comp Biol) uses g = 350 — this is a deliberate modification for coupled population analysis, not the standard.
- All implementations agree on: the ODE structure, connectivity constant ratios (C1–C7), sigmoid function, and output equation (y1 − y2 − y3).
Package Structure
concord-model-wendling/
src/concord_model_wendling/
__init__.py exports Wendling
equations.py pure derivative function (10 ODEs)
model.py Wendling class implementing Model ABC
equations.py
Compute derivatives of the 10-variable Wendling ODE system. Pure numerical function with no Model ABC knowledge.
| Parameter | Description |
|---|---|
| y | State vector, shape (10,). [y0..y4, y5..y9] |
| t | Current time (kept for integrator interface) |
| p_input | Instantaneous external input (mean + noise sample) |
| A, B, G | Max EPSP / slow IPSP / fast IPSP amplitude (mV) |
| a, b, g | Excitatory / slow inh. / fast inh. time constants (1/s) |
| C1..C7 | Connectivity constants (derived from C) |
| e0, v0, r | Sigmoid parameters |
model.py — Wendling
Implements the Model ABC. Single-node cortical column producing seizure dynamics across six activity regimes.
| Constructor | Type | Description |
|---|---|---|
| dt | float | Internal integration time step in seconds. Default 1e-4 (0.1 ms). |
Returns "wendling".
Returns a ParameterVector with 12 named parameters, their default values, and bounds. See the Parameters table above.
Connectivity constants are derived from C: C1 = C, C2 = 0.8C, C3 = 0.25C, C4 = 0.25C, C5 = 0.3C, C6 = 0.1C, C7 = 0.8C.
Run the simulation and return a ModelOutput.
| Parameter | Type | Description |
|---|---|---|
| parameters | ParameterVector | Model parameters (from default_parameters() or modified) |
| duration_s | float | Simulation duration in seconds |
| fs | float | Output sampling rate in Hz |
| seed | int | None | Random seed for reproducibility |
The returned ModelOutput contains:
data— shape (1, n_samples): the simulated signal (y1 − y2 − y3)state_variables— dict with keys "y0" through "y9", each shape (1, n_samples)time_axis— time stamps in secondsnode_labels— ["node_0"]
Entry Point Registration
In pyproject.toml:
[project.entry-points."concord.models"]
wendling = "concord_model_wendling:Wendling"
This allows concord-fit (and other discovery tools) to find the model without hard imports.
See Python Entry Points for how discovery works.
Usage Example
from concord_model_wendling import Wendling
model = Wendling()
params = model.default_parameters()
# Simulate 3 seconds at 1024 Hz — default is Type 3 (spike-wave)
result = model.simulate(params, duration_s=3.0, fs=1024.0, seed=42)
signal = result.data[0, :]
# Switch to Type 5: low-voltage fast activity (seizure onset)
p_B = params.names.index("B")
p_G = params.names.index("G")
params.values[p_B] = 5.0 # weaken slow inhibition
params.values[p_G] = 25.0 # strengthen fast inhibition
lvfa = model.simulate(params, duration_s=3.0, fs=1024.0, seed=42)
# Switch to Type 1: normal background
params.values[p_B] = 50.0 # strong slow inhibition
params.values[p_G] = 15.0 # moderate fast inhibition
normal = model.simulate(params, duration_s=3.0, fs=1024.0, seed=42)
References
- Wendling, F., Bartolomei, F., Bellanger, J.J. & Chauvel, P. (2002). Epileptic fast activity can be explained by a model of impaired GABAergic dendritic inhibition. European Journal of Neuroscience, 15(9), 1499-1508. doi:10.1046/j.1460-9568.2002.01985.x
- Wendling, F., et al. (2005). Interictal to ictal transition in human temporal lobe epilepsy: insights from a computational model of intracerebral EEG. Clinical Neurophysiology, 116(9), 2039-2053. doi:10.1016/j.clinph.2005.04.011
- Desroches, M., et al. (2016). Slow-fast analysis of a neural mass model with slow inhibition. Opera Medica et Physiologica, 2(3-4), 228-234. doi:10.20388/OMP2016.003.0034
- Chong, M.S., et al. (2011). Bifurcation analysis of the Wendling neural mass model. IFAC World Congress. doi:10.3182/20110828-6-IT-1002.03065 [Appendix B: complete connectivity constants]
- Jansen, B.H. & Rit, V.G. (1995). Electroencephalogram and visual evoked potential generation in a mathematical model of coupled cortical columns. Biological Cybernetics, 73(4), 357-366. doi:10.1007/BF00199471
- Carvalho, V.R., et al. (2021). Probing the Wendling neural mass model dynamics with coupled populations. PLOS Computational Biology. doi:10.1371/journal.pcbi.1009643