← SciSim / Neuroscience
· · SciSim ·

Neural Oscillations & EEG Rhythms

🧠 Tier: Standard Undergraduate · Alpha · Beta · Gamma · Wilson-Cowan
Version:
§ 01
Interactive Simulation — Neural Oscillations & EEG Rhythms
E activity
0.10
I activity
0.10
Dom. freq
Hz
w_EE
12.0
Regime
Oscillatory
τ_E
10
ms
Sim Time
0
ms
Playback
EEG Band Preset
Wilson-Cowan Parameters
w_EE (E→E)12.0
w_EI (I→E)4.0
w_IE (E→I)13.0
w_II (I→I)11.0
τ_E (ms)10
τ_I (ms)10
I_E (external input)1.25
T sim (ms)2000
Overlays
§ 02
The Idea, Step by Step
▸ From a Stadium Wave to Brain Rhythms
START — an everyday picture (middle school)
Picture a stadium crowd doing "the wave." Nobody is in charge, yet a ripple sweeps around the bowl again and again at a steady pace. Your brain does something similar: billions of neurons nudge each other and settle into repeating rhythms. An EEG cap on the scalp hears the summed "roar" of those neurons, and that roar rises and falls in waves we call brain rhythms — slow ones during deep sleep, fast ones while you concentrate.
BUILD — two teams keep the beat (high school)
Two teams make the rhythm. Excitatory ($E$) neurons shout "fire!" to everyone, including a team of inhibitory ($I$) neurons. The $I$ team answers "quiet down," which hushes the $E$ team — until the hush fades, the $E$ team shouts again, and the cycle repeats. The time for one full shout–hush–shout loop sets the rhythm's frequency $f$. If the loop takes about $25$ ms, then $f \approx 1/0.025\,\text{s} = 40$ cycles per second, i.e. $40$ Hz — a "gamma" rhythm you make while paying close attention. A slower loop of about $120$ ms gives roughly $8$ Hz, the relaxed "alpha" rhythm.
DEEPEN — the precise rule (AP / intro-college)
The Wilson-Cowan model writes this as two equations for the population rates $E$ and $I$, each relaxing over a time constant $\tau$ toward a saturating sigmoid $S$ of its inputs. Whether the network actually oscillates is decided by the eigenvalues $\lambda$ of the linearised Jacobian $J$: when a complex pair acquires a positive real part, the steady state goes unstable and a limit cycle — a sustained rhythm — is born, a Hopf bifurcation. The frequency is $f = \mathrm{Im}(\lambda)/2\pi$. In the sim, the $\tau_E$ and $\tau_I$ sliders set how fast the loop runs (smaller $\tau$ gives higher frequency, toward gamma), while the coupling sliders $w_{IE}$ (E→I) and $w_{II}$ (I→I) decide whether you sit in a quiet steady state or cross into oscillation.

▸ Try This in the Sim Above

① Open the EEG Band Preset menu and switch from Alpha to Gamma — watch the Dom. freq readout climb from about $10$ Hz toward $40$ Hz. ② Slide $w_{IE}$ (E→I) upward: stronger excitatory drive onto inhibition pushes the network across the Hopf boundary, and a flat steady state starts to ring. ③ Drag $\tau_E$ and $\tau_I$ down together: the same circuit now cycles faster, sliding the rhythm from alpha toward gamma.

§ 03
Equation Derivation
▸ Wilson-Cowan Equations (1972)
$$\boxed{\tau_E \frac{dE}{dt} = -E + S_E(w_{EE}E - w_{EI}I + I_E)}$$ $$\boxed{\tau_I \frac{dI}{dt} = -I + S_I(w_{IE}E - w_{II}I + I_I)}$$

where S(x) = 1/(1+e^{−x}) is the sigmoid. E = excitatory population rate, I = inhibitory population rate. Oscillation frequency from Jacobian eigenvalues:

$$f = \frac{\text{Im}(\lambda)}{2\pi} \quad \text{where } \lambda = \frac{\text{Tr}(J) \pm \sqrt{\text{Tr}(J)^2 - 4\,\text{Det}(J)}}{2}$$
BandFrequencyBrain StateCircuit GeneratorFunction
Delta0.5–4 HzDeep sleepThalamocortical loopsMemory consolidation
Theta4–8 HzNavigation, REMHippocampal CA1/CA3Spatial coding, encoding
Alpha8–12 HzRelaxed, eyes closedThalamocorticalIdling, attention gating
Beta13–30 HzActive thinkingCortical E-I networksSensorimotor integration
Gamma30–80 HzCognitive processingFast PV interneuron E-IBinding, working memory
▸ Derivation Steps
STEP 1 — PING Mechanism for Gamma
Gamma oscillations (30–80 Hz) arise via PING (Pyramidal-Interneuron Network Gamma): pyramidal E cells drive fast PV interneurons → PV cells inhibit E cells (GABA_A, ~5 ms) → E cells recover and fire again. Cycle time ≈ 20 ms → 50 Hz. In Wilson-Cowan: increasing w_IE drives E→I feedback, producing gamma oscillations. τ_E = τ_I = 3–5 ms for gamma.
STEP 2 — Alpha as Thalamocortical Resonance
Alpha (8–12 Hz) arises from the thalamocortical loop: cortex → thalamic relay → inhibitory reticular nucleus (TRN) → back to cortex. Cycle time ~80–120 ms → 8–12 Hz. Alpha increases when eyes close because reduced visual input removes the drive that disrupted the thalamocortical rhythm. Alpha = "idling" — inversely correlated with local neural activity.
STEP 3 — Phase Plane of Wilson-Cowan
Fixed points: E-nullcline (sigmoid, dE/dt=0) and I-nullcline (sigmoid, dI/dt=0) intersect. If the fixed point lies on the unstable segment of either nullcline, the system undergoes Hopf bifurcation and oscillates. Increasing w_IE or decreasing w_II pushes the system toward oscillation. The oscillation frequency = Im(λ)/(2π) where λ are Jacobian eigenvalues.
STEP 4 — Theta-Gamma Coupling (Lisman & Idiart 1995)
Theta cycles (~167 ms at 6 Hz) contain ~6–7 gamma subcycles (~25 ms each). Each gamma cycle can hold one active memory item. Working memory capacity = number of gamma cycles per theta cycle = f_gamma/f_theta ≈ 40/6 ≈ 6–7 items. Miller's "magical number 7±2." MEG studies confirm that theta-gamma coupling strength correlates with working memory load and individual differences.
STEP 5 — FFT for Power Spectrum
Power spectrum P(f) = |FFT(E(t))|² / (N × fs). Apply Hann window before FFT to prevent spectral leakage. Band powers: delta = ∫_0.5^4 P(f)df, theta = ∫_4^8, alpha = ∫_8^12, beta = ∫_13^30, gamma = ∫_30^80. EEG band ratios (theta/alpha, gamma/alpha) indicate cognitive states. Non-stationary signals: use short-time FFT (STFT) with sliding windows.

▸ Worked Example — WC Oscillation Frequency

τ_E = τ_I = 10 ms, w_EE=10, w_EI=10, w_IE=7, w_II=6 (taking the sigmoid slope S′≈1 at the operating point). Linearised Jacobian:

$$J = \frac{1}{10}\begin{pmatrix}w_{EE}-1 & -w_{EI} \\ w_{IE} & -w_{II}-1\end{pmatrix} = \frac{1}{10}\begin{pmatrix}9 & -10 \\ 7 & -7\end{pmatrix}$$ $$\text{Tr}(J) = 0.2, \quad \text{Det}(J) = \frac{(9)(-7)-(-10)(7)}{100} = \frac{-63+70}{100} = 0.07 \Rightarrow \lambda = \frac{0.2 \pm \sqrt{0.04-0.28}}{2} = 0.1 \pm i\,\frac{\sqrt{0.24}}{2}$$ $$\text{Im}(\lambda) = \sqrt{0.24}/2 \approx 0.245 \;\text{ms}^{-1} \Rightarrow f = 0.245/(2\pi) \times 1000 \approx 39 \;\text{Hz (gamma)}$$

The real part $+0.1>0$ makes the steady state an unstable spiral, so the trajectory winds out to a limit cycle — a self-sustaining ≈39 Hz gamma rhythm. Oscillation requires a complex eigenvalue pair with $\text{Re}(\lambda)>0$ (the Hopf condition), which needs $\text{Det}(J)>0$ — i.e. strong enough E↔I feedback, not just recurrent excitation.

▸ References
[WC72]Wilson & Cowan — Excitatory and inhibitory interactions in localized populations, Biophys. J. 12:1–24, 1972
[Buz06]Buzsáki — Rhythms of the Brain, Oxford, 2006
[LI95]Lisman & Idiart — Storage of 7±2 short-term memories by oscillation, Science 267:1512, 1995
[Ger14]Gerstner et al. — Neuronal Dynamics, Cambridge, 2014. Ch. 13. neuronaldynamics.epfl.ch
§ 04
Frequently Asked Questions
🔬 SimulationWhat does the Wilson-Cowan tab show, and what determines oscillation frequency?
The Wilson-Cowan tab shows coupled E(t) and I(t) population firing rates. The network oscillates when the E-I fixed point lies on the unstable segment (Hopf bifurcation). The frequency is set by τ_E and τ_I: reducing both (faster cells) increases frequency toward gamma; increasing them slows toward alpha/theta. Increasing w_IE (E drives I harder) or decreasing w_II (less I self-inhibition) pushes toward oscillation. The Phase tab shows the E-I phase portrait with nullclines — the limit cycle is the closed orbit the trajectory follows.
Key takeaway: WC oscillations arise from Hopf bifurcation in the E-I loop. Frequency = Im(J eigenvalue)/(2π). τ sets the timescale; coupling strengths w set whether oscillation occurs.
🧠 ConceptualWhy does alpha power INCREASE when you close your eyes?
The classic 'Berger effect' (1929): open eyes → visual cortex receives retinal input → excitatory drive desynchronises thalamocortical loop. Closed eyes → no visual input → thalamocortical loop falls into its natural ~10 Hz resonant rhythm. More alpha = LESS local neural activity — alpha is the brain's 'idling rhythm.' The same logic applies to sensorimotor cortex: sitting still → high alpha/beta (idling); planning movement → alpha decreases (event-related desynchronisation, ERD). Alpha power is inversely correlated with attention and neural processing.
Key takeaway: More alpha = less activity. Alpha is the 'standby mode' that appears when a brain area is not processing. This counter-intuitive relationship makes alpha power the primary BCI control signal.
🌍 AppliedHow are neural oscillations used in BCIs and clinical EEG?
Clinical EEG: epilepsy diagnosis (3 Hz spike-wave in absence seizures = pathological thalamocortical oscillation), sleep staging (delta/spindles/alpha), encephalopathy (slowing toward theta/delta). Motor imagery BCIs (for ALS patients) use alpha/beta ERD over contralateral motor cortex — imagining hand movement reduces alpha/beta power, providing a control signal. ECoG records gamma power directly from cortex, enabling high-bandwidth speech decoding (single-phoneme resolution). Neurofeedback uses real-time EEG to train patients: increase alpha (relaxation), reduce theta/beta ratios (ADHD treatment).
Key takeaway: Neural oscillations are used in epilepsy diagnosis, sleep medicine, motor BCIs (alpha/beta ERD), speech BCIs (gamma ECoG), and neurofeedback. Each application exploits a specific frequency band linked to a neural state.
💡 Non-ObviousWhat is theta-gamma coupling, and why does it limit working memory to 7±2 items?
Theta-gamma coupling (Lisman & Idiart, 1995): gamma oscillations (~40 Hz) are nested within theta cycles (~6 Hz). Each theta cycle (~167 ms) contains ~6–7 gamma subcycles (~25 ms). Each gamma subcycle holds one active memory item. Working memory capacity = number of gamma cycles per theta cycle ≈ 6–7 items = Miller's '7±2.' MEG experiments confirm that theta-gamma coupling strength correlates with working memory load and individual capacity differences. This predicts that increasing theta frequency (faster theta) or decreasing gamma frequency should reduce memory capacity.
Key takeaway: Theta-gamma coupling creates temporal multiplexing: each gamma subcycle within a theta cycle holds one memory item. Capacity = f_gamma/f_theta ≈ 6–7 = Miller's magical number.
📐 ComputationalWhy is FFT with Hann windowing needed for neural oscillations?
Rectangular window FFT causes spectral leakage — sharp discontinuities at signal boundaries spread power to adjacent frequency bins, masking narrow peaks. The Hann window (w(n) = 0.5(1−cos(2πn/(N−1)))) tapers the signal at both ends, eliminating the rectangular truncation artefact. For neural oscillations: apply Hann window before FFT, zero-pad to next power of 2 for frequency resolution. Non-stationary signals (oscillations that wax and wane): use short-time FFT with overlapping windows or Morlet wavelet transform. Always specify window type and overlap when reporting spectral results.
Key takeaway: Apply Hann window before FFT to prevent spectral leakage. For non-stationary neural signals, use STFT with overlapping windows or wavelets.
🎓 DeepWhat is the neural field theory extension of Wilson-Cowan?
Wilson-Cowan describes point populations (no spatial extent). Neural field theory (Amari, 1977) extends this to spatially continuous cortical sheets: ∂E(x,t)/∂t = −E + ∫w(x−x')S(E(x',t))dx' + I. The convolution kernel w(x−x') encodes the connectivity pattern (typically Mexican-hat: local excitation + surround inhibition). Neural field theory predicts: travelling waves (seen in anaesthetic experiments), stationary bumps (working memory, spatial attention), and spiral waves (retinal spreading depression). The Turing instability analysis of the linearised field equation gives the spatial frequency of pattern formation.
Key takeaway: Neural field theory is Wilson-Cowan extended to space. It predicts travelling waves, attractor bumps (working memory), and pattern formation — all observable in cortex via EEG/ECoG.
🧠 ConceptualDoes the brain have a 'pacemaker' for oscillations?
Most EEG rhythms are emergent from network dynamics, not driven by a single pacemaker cell. Wilson-Cowan limit cycles arise from E-I network interactions — even if every cell is identical and fires irregularly, the population can oscillate. The one exception is the circadian rhythm (24-hour), which IS pacemaker-driven (suprachiasmatic nucleus). For EEG, the correct model is Kuramoto-type: many weakly coupled oscillators synchronising through mutual interactions. This distinction matters: disrupting E-I connectivity disrupts the oscillation (as DBS does for Parkinson's) — there is no single 'alpha clock neuron' to target.
Key takeaway: EEG oscillations are emergent Wilson-Cowan limit cycles, not pacemaker-driven. Disrupting network connectivity disrupts the oscillation — no single clock cell.
§ 04 Best Resources
§ 05
Misconceptions & Common Errors
Sub-block A — Conceptual Misconceptions
"EEG measures the action potentials (spikes) of individual neurons."
EEG measures local field potentials (LFPs) — the summed synaptic currents of thousands to millions of neurons. Action potentials are too brief (~1 ms) and desynchronised across neurons to produce measurable scalp EEG signals. The EEG primarily reflects slow dendritic EPSPs and IPSPs on apical dendrites of cortical pyramidal neurons, which are perpendicular to the cortical surface (open-field configuration, visible to scalp). Single-unit recordings (electrophysiology) measure APs; EEG measures population synaptic currents.
📖 Buzsáki — Rhythms of the Brain, Ch. 2; Nunez & Srinivasan — Electric Fields of the Brain
"Faster oscillations always indicate higher cognitive processing — slow oscillations are primitive."
This is false. Delta (0.5–4 Hz, the slowest) is critical for memory consolidation during sleep — the most sophisticated long-term memory process. Theta (4–8 Hz) underlies active hippocampal memory encoding and spatial navigation. Alpha idling indicates suppression, not processing. Gamma is associated with active sensory processing. There is no monotonic frequency-cognition relationship. Each band reflects a specific neural circuit at its characteristic timescale, and all are essential for cognition.
📖 Buzsáki — Rhythms of the Brain; Wang (2010) Physiol. Rev. 90:1195
"The Wilson-Cowan model describes individual neurons — E and I are single cell firing rates."
E and I are population mean firing rates representing the average activity of millions of excitatory and inhibitory neurons. The WC model is a mean-field model — valid for large-scale dynamics (EEG, fMRI), not single-neuron computation. It cannot describe spike timing, ISI distributions, or individual neuron response properties. For those, use spiking neuron models (HH, LIF). WC is to individual neuron models what Navier-Stokes is to individual molecule trajectories.
📖 Wilson & Cowan (1972); Gerstner et al. — Neuronal Dynamics, Ch. 12–13
Sub-block B — Numerical Errors
Applying FFT without windowing: rectangular window causes spectral leakage that masks oscillation peaks.
Apply Hann window before FFT: multiply the time series by w(n) = 0.5(1−cos(2πn/(N−1))). This eliminates the rectangular truncation artefact. Zero-pad to next power of 2 for frequency resolution. For non-stationary neural signals: use STFT with 50% overlap (spectrogram) or Morlet wavelet transform. Always report window type, size, and overlap. Never apply FFT to non-zero-mean signals without detrending — the DC component dominates the power spectrum.
🔍 Why: Beginners apply FFT directly; the rectangular window causes spectral leakage that smears peaks across adjacent bins, masking narrow resonances.
Confusing oscillation frequency with 1/τ_m: thinking τ_m = 10 ms → oscillation at 100 Hz.
The membrane time constant τ_m sets the decay rate of perturbations, not the oscillation frequency. Oscillation frequency = Im(Jacobian eigenvalue)/(2π), which depends on ALL parameters: τ_E, τ_I, w_EE, w_EI, w_IE, w_II. For the worked example: τ = 10 ms but f ≈ 39 Hz (gamma), not 1/τ = 100 Hz. With α parameters: τ = 10 ms → f ≈ 10 Hz (alpha). Use the Jacobian eigenvalue formula to compute oscillation frequency — not 1/τ.
🔍 Why: 1/τ is the exponential decay rate constant; oscillation frequency is determined by the imaginary part of the Jacobian eigenvalues, which also depends on the coupling weights.
§ 05 References