Skip to content

EEGlass

EEGlass
Open the Demo

To make clinical diagnoses more understandable, we present a visual interactive dashboard on top of the efficient xEEG classifier network architecture, which puts a special emphasis on explainibility of the model and outcome. This dataset and model focusses on Alzheimer’s Disease (AD) and Frontotemporal Dementia (FTD), every step in the classification is presented in a visual and understandable way, on top of an integrated EEG database viewer.

EEGlass

To make clinical diagnoses more understandable, we present EEGlass, a visual interactive dashboard on top of the efficient xEEGNet classifier network architecture, which puts a special emphasis on explainability of the model and outcome. This dataset and model focuses on Alzheimer’s Disease (AD) and Frontotemporal Dementia (FTD); every step in the classification is presented in a visual and understandable way, on top of an integrated Electroencephalography (EEG) database viewer.

EEGlass Preview

The Model

xEEGNet is a fully interpretable classifier with only Fβ‹…(C+L+2)=168F \cdot (C + L + 2) = 168 trainable parameters. For a subject kk: C=19C = 19 channels Vc(t)V_c(t), N=Lβ‹…fs=500N = L \cdot f_s = 500 samples (L=4L = 4 s, fs=125f_s = 125 Hz).

1. Bandpass filters (F=7F = 7 fixed FIR filters Ξ΄,ΞΈ,Ξ±,Ξ²1,Ξ²2,Ξ²3,Ξ³\delta, \theta, \alpha, \beta_1, \beta_2, \beta_3, \gamma):

Wc,f(t)=Filterf[Vc(t)]W_{c,f}(t) = \mathrm{Filter}_f\left[V_c(t)\right]

2. Spatial mixing with learned weights wc,fw_{c,f}:

Xf(t)=βˆ‘c=1Cwc,fWc,f(t)X_f(t) = \sum_{c=1}^{C} w_{c,f} W_{c,f}(t)

3. Batch norm + band power (square, average, log):

Z^f=10log⁑10(1N1βˆ‘i=0N1βˆ’1Xf(ti)2)\hat{Z}_f = 10 \log_{10}\left(\frac{1}{N_1} \sum_{i=0}^{N_1 - 1} X_f(t_i)^2\right)

4. Linear classifier (M∈RLΓ—FM \in \mathbb{R}^{L \times F}, L=3L = 3 classes):

Ω=MZ^∈RL,y=arg⁑max⁑(Ω)\mathbf{\Omega} = M \hat{\mathbf{Z}} \in \mathbb{R}^{L}, \qquad \mathbf{y} = \arg\max(\mathbf{\Omega})

Ml,fZ^fM_{l,f} \hat{Z}_f gives the signed per-band class contribution shown in the dashboard.

In short: fixed bandpass filters β†’\rightarrow learned spatial mixing β†’\rightarrow bandpower β†’\rightarrow linear classifier. Every intermediate value has a direct physical meaning, so clinicians inspect architecture-intrinsic evidence rather than post-hoc saliency maps.

Supported Dimensionality Reductions

PCA, t-SNE and UMAP projections, selectable in all embedding views (PCA is the default).

Example Use-Case

As an example workflow, a user can start with a new participant by selecting a typical point in the window embedding (R2) to see the predicted output. The Total Band Power panel immediately shows how typical this window's band powers are for the patient, and whether the (e.g. alpha) bands align more with the healthy or AD/FTD cohort (R3). The Scalp View and Band Activations panel make explicit which channels and bands drove the prediction (R1).

Inspecting the raw signal, the user can judge for themselves whether the window looks atypical, where, for each patient and time window individually, the topomap, band activations, and total band power panel indicate which channels and bandpowers are worth a closer look (the corresponding bandpass filter can also be applied to the time-series view), directing the user to the most interesting aspects and making comparison easy while keeping them in control.

Contribute

Combination of all frontend and backend utilities, and baseline for xEEG dashboard development.

To install dependencies:

uv install
bun install

If uv version is newer, use:

uv sync

To start a development server:

uv run fastapi dev backend/app.py --reload-dir backend/
bun dev

To format code:

ruff format
prettier -w .

Also useful: ruff check --fix --unsafe-fixes.


Docker Deployment

Build and start the full stack:

docker compose up --build

The compose setup starts three services:

  • dataset-downloader: downloads and extracts the configured dataset into the datasets Docker volume, then exits.
  • backend: starts only after dataset-downloader completed successfully. It serves the API on http://localhost:8000.
  • frontend: serves the UI on http://localhost:3000.

The default dataset is large. docker-compose.yml also contains a commented smaller dataset URL (only 5 patients instead of 88) that can be swapped into DATASET_URL to test the download flow without downloading the full 4.2 GB dataset.