concord-model-wendling

4-population cortical column model with fast inhibition (Wendling et al., 2002)

Role in the system The primary model for seizure dynamics in Montage Concord. Extends the Jansen-Rit model with a fourth neural population (fast GABA-A inhibitory interneurons), enabling simulation of the full spectrum of EEG activity from normal background through to ictal seizure patterns. Takes a ParameterVector, integrates 10 ODEs using RK4, and produces a ModelOutput. Registered via entry_points as 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:

PropertySlow Dendritic InhibitionFast Somatic Inhibition
TargetPyramidal cell dendritesPyramidal cell soma
ReceptorGABA-A (slow component)GABA-A (fast component)
Time constant~20 ms (b = 50 s⁻¹)~2 ms (g = 500 s⁻¹)
EffectModulates overall excitabilityGates individual spikes
Model parameterB (amplitude)G (amplitude)
AbbreviationSDIFSI

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 elegance of the Wendling model You do not need to add complexity everywhere. One additional population, with the right connectivity, is enough to explain a fundamental feature of seizure dynamics. The entire interictal-to-ictal transition is controlled by just two parameters: B (slow inhibition strength) and G (fast inhibition strength).

The Four Populations

PopulationAbbr.TypeTargetsPSP KernelKey Param
Pyramidal cellsPYExcitatory (output) EI, SDI, FSI
Excitatory interneuronsEIExcitatory PYHe (A, a)A
Slow dendritic inhibitorySDIInhibitory (GABA-A slow) PY, FSIHi (B, b)B
Fast somatic inhibitoryFSIInhibitory (GABA-A fast) PYHg (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

IndexVariableDescription
0y0Excitatory PSP on pyramidal cells (from EI feedback)
1y1PSP on excitatory interneurons (from external input + PY)
2y2Slow inhibitory PSP on pyramidal cells (from SDI)
3y3Fast inhibitory PSP on pyramidal cells (from FSI)
4y4Slow inhibitory PSP on FSI (SDI → FSI cross-inhibition)
5–9y5–y9Time 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
The critical equation: Block 3 The sigmoid argument in block 3 is 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.

8-variable reduction Desroches et al. (2016) showed that y4 is proportional to y2 — both are driven by the same input S(C3·y0) through the same Hi kernel (B, b parameters), so y4 = (1/C4)·y2. The C6·y4 term can be replaced with (C6/C4)·y2, reducing the system to 8 variables. Concord implements the full 10-variable system for clarity and consistency with the literature, but this reduction preserves all dynamical features.

Connectivity Constants

All seven constants are derived from a single base value C = 135:

ConstantFormulaDefaultConnectionIn JR?
C1C135PY → EIYes
C20.8 · C108EI → PYYes
C30.25 · C33.75PY → SDIYes
C40.25 · C33.75SDI → PYYes
C50.3 · C40.5PY → FSINew
C60.1 · C13.5SDI → FSINew
C70.8 · C108FSI → PYNew

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

NameDefaultLowerUpperUnitsDescription
A5.02.010.0mVMax excitatory PSP amplitude
B25.01.050.0mVMax slow inhibitory PSP amplitude
G10.00.080.0mVMax fast inhibitory PSP amplitude
a100502001/sExcitatory rate constant (τ = 10 ms)
b50101001/sSlow inhibitory rate constant (τ = 20 ms)
g50010010001/sFast inhibitory rate constant (τ = 2 ms)
C13550500Global connectivity strength
e02.51.05.01/sHalf of maximum firing rate
v06.03.012.0mVPSP at half-maximal firing rate
r0.560.11.01/mVSigmoid steepness
p900500HzMean external input
sigma300100HzInput noise standard deviation
Differences from Jansen-Rit defaults A = 5.0 (vs 3.25 in JR), p = 90 Hz (vs 220 Hz), sigma = 30 Hz (vs 22 Hz). Most Wendling implementations use these higher excitatory gain and lower input values. The three new parameters are G = 10.0 mV, g = 500 s⁻¹, and note that G = 0 is a valid regime (type 6: no fast inhibition).

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.

TypeActivityABGDescription
1Normal background55015Broadband 1–7 Hz, no dominant peak. Strong slow inhibition keeps activity low.
2Sporadic spikes54015Occasional large-amplitude transients as slow inhibition weakens.
3Sustained spike-wave52515Regular 3–6 Hz spike-wave discharges. Classic interictal pattern.
4Slow rhythmic activity51015Alpha-like 8–13 Hz rhythm. Slow inhibition very weak.
5Low-voltage fast activity5525LVFA: 10–20 Hz, low amplitude. The seizure onset pattern.
6Slow quasi-sinusoidal51508–13 Hz with no fast inhibition (G = 0). Shows effect of absent GABA-A fast.
Clinical significance of Type 5 (LVFA) Low-voltage fast activity is consistently observed at seizure onset in temporal lobe epilepsy depth recordings. The Wendling model explains it mechanistically: when slow dendritic inhibition fails (B → low), fast somatic inhibition takes over (G remains high), producing rapid low-amplitude oscillations. This is the model's primary clinical contribution.

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.

25 mV spike-wave
10 mV
Live Wendling simulation (10-variable ODE, RK4, dt = 0.1 ms, downsampled to 512 Hz). Output signal = y1 − y2 − y3. A = 5.0 mV, p = 90 Hz, sigma = 30 Hz.

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).

Each point: 1.5 s simulation, 0.5 s transient discarded. Color = log(RMS amplitude). Markers show the six canonical regime parameter sets. The crosshair tracks the current slider position from the simulation above.

Comparison with Jansen-Rit

AspectJansen-RitWendling
Populations3 (PY, EI, II)4 (PY, EI, SDI, FSI)
State variables610
Inhibitory types1 (combined)2 (slow dendritic + fast somatic)
Connectivity constantsC1–C4C1–C7
Synaptic gainsA, BA, B, G
Time constantsa, ba, b, g
Outputy1 − y2y1 − y2 − y3
Regimes3 (noise, alpha, spikes)6 (background through ictal)
Seizure dynamicsLimited to spikesFull 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:

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

fnwendling_derivatives(y, t, p_input, A, B, G, a, b, g, C1, C2, C3, C4, C5, C6, C7, e0, v0, r) → ndarray

Compute derivatives of the 10-variable Wendling ODE system. Pure numerical function with no Model ABC knowledge.

ParameterDescription
yState vector, shape (10,). [y0..y4, y5..y9]
tCurrent time (kept for integrator interface)
p_inputInstantaneous external input (mean + noise sample)
A, B, GMax EPSP / slow IPSP / fast IPSP amplitude (mV)
a, b, gExcitatory / slow inh. / fast inh. time constants (1/s)
C1..C7Connectivity constants (derived from C)
e0, v0, rSigmoid parameters

model.py — Wendling

ABCWendling(Model)

Implements the Model ABC. Single-node cortical column producing seizure dynamics across six activity regimes.

ConstructorTypeDescription
dtfloatInternal integration time step in seconds. Default 1e-4 (0.1 ms).
propertyWendling.name → str

Returns "wendling".

fnWendling.default_parameters() → ParameterVector

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.

fnWendling.simulate(parameters, duration_s, fs, seed=None) → ModelOutput

Run the simulation and return a ModelOutput.

ParameterTypeDescription
parametersParameterVectorModel parameters (from default_parameters() or modified)
duration_sfloatSimulation duration in seconds
fsfloatOutput sampling rate in Hz
seedint | NoneRandom 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 seconds
  • node_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