Skip to content
Back to skills

Neurodyn Eeg Neural Dynamics Pretrained

ASecurity

Use when inverting EEG into neural mass model parameters.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 3, 2026
testinggonodeawstestinggitperformance

Works with

  • cli

Security analysis

A100/100

Scanned October 3, 2026

npx -y skills add hiyenwong/ai_collection --skill neurodyn-eeg-neural-dynamics-pretrained --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Neurodyn Eeg Neural Dynamics Pretrained?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Neurodyn Eeg Neural Dynamics Pretrained
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hiyenwong-neurodyn-eeg-neural-dynamics-pretrained/badge)](https://www.skillsdirectory.com/skills/hiyenwong-neurodyn-eeg-neural-dynamics-pretrained)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: neurodyn-eeg-neural-dynamics-pretrained
description: Use when inverting EEG into neural mass model parameters.
category: ai_collection
---

# NeuroDyn-EEG — Interpretable EEG Pretraining via Neural-Dynamics Generative Priors

Source: arXiv:2609.36773 (Cui, Zhao, Lei, Yang, Cui, Zhang, Yan, Hong — Gnosis Neurodynamics / Tsinghua / Beijing Anding Hospital / UC Davis, 29 Sep 2026).

Use when: building EEG foundation models with physiological interpretability; inverting whole-brain neural-mass parameters from scalp EEG; simulation-based inference (SBI) with deterministic point estimation; disease biomarker discovery needing anatomically indexed case-control testing.

## Core idea

Instead of masked-reconstruction pretraining with unconstrained latents (LaBraM, CBraMod, BrainOmni), pretrain an inverse network on **synthetic (parameter, EEG) pairs** generated by a biophysical simulator. Every output unit is then an anatomically indexed (90 AAL regions × 11 JR parameter families) biophysical quantity — enabling FDR-corrected region×parameter hypothesis tests, not just classification.

## Pipeline (3 stages)

1. **Whole-brain forward simulator**: 90-node coupled dual-timescale Jansen-Rit NMM; sample physiologically bounded parameters → intracranial source activity → leadfield projection → 19-channel 10-20 scalp EEG (5 s @ 256 Hz).
2. **Deterministic inversion network** (2.43M params): multi-branch spatial-spectral architecture trained by supervised MAE regression on 10^6 synthetic pairs. Under the prior×simulator distribution, MAE-optimal point estimates converge to componentwise conditional medians (a posterior point summary) — cheaper than full neural posterior estimation (NPE/NLE) and avoids SBC calibration overhead.
3. **Evaluation**: parameter recovery (Pearson r), surrogate-noise stress tests (white/pink/EMG/EOG × SNR 30→−5 dB), inverse-forward closed loop on real EEG (PSD r, α-peak error, 1/f slope error, band PLV), clinical benchmarks, region-wise Welch t-tests with Benjamini-Hochberg FDR (q<0.001).

## Extended Jansen-Rit dual-branch NMM (per region i)

- Local circuit: pyramidal + excitatory + inhibitory populations; 6 second-order ODEs per branch; source signal y = v2 − v3 (slow) ⊕ v5 − v6 (fast), weighted by slow-branch weight ω_i.
- Two timescale branches (slow: τe1, τi1; fast: τe2, τi2) share connectivity C1–C4 and sigmoid params (S1=S4, S2=S5, S3=S6) → fewer free params, distinct synaptic kinetics.
- Sigmoid: S_k(u) = c1k·rmax / (1 + exp(β(θ − c2k·u))), (c11,c21)=(1,1), (c12,c22)=(Γ2,Γ1), (c13,c23)=(Γ4,Γ3), Γm = Cavg·Cm, Cavg=135.
- Interregional coupling: I_i(t) = μ_i + p̃_i(t) + Σ_{j≠i} K*_{ij}(t)·S̃1,j(y_j(t−d)); variance-normalized K* (Eq 2.5); fixed DTI structural matrix (88 subjects). Global delay d = (10 ms)·δs, δs~U(0,1).
- Fast-branch gains tied to time constants (Coronel-Oliveros 2026).

## Inversion network architecture

- **Scalp temporal branch**: 4 parallel 1D convs (k=3,5,7,9) + BN + LeakyReLU → concat; 2 dilated residual blocks; pooled → d_model=192 key-value memory.
- **Source-space branch**: Tikhonov pseudoinverse L⁺ ∈ R^{90×19} (ridge 1e-3) of leadfield L projects scalp → 90 source nodes; grouped convs encode per-node features + 32-dim learnable node embedding.
- **Spectral branch**: per-channel FFT log-magnitude → 64-dim global spectral feature.
- **Attention**: 2-layer node self-attention (+ global query token); 2-layer scalp→source cross-attention (node tokens query temporal memory).
- **Heads**: parameter-specific, weight-shared across 90 regions; sigmoid range constraints; inhibitory time constants constrained τia ∈ [max(τea, ℓ), min(h, 2.4·τea)]. Global head predicts δs from global token + spectral features.

## Parameter sampling (two-level truncated normal)

Sample-level latent location draw + conditionally independent regional draws with smaller parent dispersion → induces interregional dependence within each family. Inhibitory τ sampled conditionally on excitatory counterparts. Targets: {τe1, τi1, τe2, τi2, θ, β, rmax, C1–C4} × 90 + delay_scale. Loss: family-weighted MAE (Eq 5).

## Key results

- **Recovery** (sim test set): mean r=0.83; delay_scale 0.97, τe2/τi2 >0.92, C3/C4 ≈0.85; sigmoid params (θ, β, rmax) weakest 0.69–0.72 (identifiability limit).
- **Noise**: EOG most benign (r=0.81 @30 dB); pink/white/EMG drop to 0.58/0.54/0.53; @−5 dB EOG 0.28, pink 0.07. delay_scale most robust (0.89→0.55).
- **Closed loop (369 healthy)**: PLV δ 0.367 / θ 0.521 / α 0.679; 1–40 Hz log-PSD r=0.674 (PZ 0.734); α-peak error 0.50 Hz; 1/f slope error 1.57.
- **Clinical** (BACC): AD65 0.829 (best), PD31 0.733 (best; AUROC 0.822/AUCPR 0.863 best), MDD 0.927 (best; AUROC 0.980/AUCPR 0.984 best), TUAB 0.726 (moderate — biophysical generative constraint filters broadband non-physiological artifacts, so weak as generic anomaly detector).
- **Beats** LaBraM 5.8M / CBraMod 4.9M / BrainOmni 8.4M & 33M with only 2.43M params.
- **Case-control**: AD65 led by C1 (pyramidal→excitatory interneuron connectivity; 37/90 regions; DMN/limbic/cortico-thalamic — supports AD as disconnection syndrome); MDD led by θ (population firing threshold; 23/90 regions; prefrontal-limbic; E/I imbalance signature).

## Implementation checklist

1. Simulate coupled dual-branch JR on 90 AAL nodes (fixed DTI K; δs delay); RK/ODE solver on discrete grid.
2. Build leadfield: MNE template head model; K=10 nearest voxels per AAL centroid; forward matrix 19-ch.
3. Generate ≥10^6 pairs; train inversion net (MAE, weighted); enforce output range constraints in heads.
4. Validate: sim recovery → noise curves → real-EEG inverse-forward loop (PLV/PSD) → downstream linear-probe classification → FDR region×parameter t-tests.
5. Interpret cautiously: point estimates ≠ unique identifiability; JR params are macroscale effective quantities, NOT microscale GABA/synapse measurements.

## Pitfalls & lessons

- Posterior-free point estimation is a deliberate trade: full SBI posteriors cost too many simulations at 990-dim output; conditional-median point estimates suffice for group statistics.
- Sigmoid-family parameters (θ, β, rmax) are intrinsically weakly identifiable — expect r≈0.7 ceiling.
- 1/f pink noise is the worst enemy (broadband matches NMM spectra) — prefer artifact-aware preprocessing.
- Generative biophysical constraint is a feature AND a bug: filters artifacts (good for disease dynamics) but caps performance on artifact-detection tasks (TUAB).
- Same-signature failure mode: static models with dynamical twins — always pair static fitting with dynamical (avalanche/closed-loop) validation.

## Related skills
- neural-mass-models-unified (Rosetta Stone across NMM formalisms)
- ng-nmm-brain-dynamics (next-gen NMM gamma/PING)
- eeg-fm-audit-systematic-evaluation (EEG foundation model auditing)

Code: https://github.com/Gnosis-Neurodynamics/NeuroDyn-EEG

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…