Skip to content

How should I adapt strict amplitude threshold for large‑scale pediatric epilepsy pretraining (seizure detection downstream)? #30

Description

@eulerleibniz

Hi CBraMod team, thank you for this excellent work!

I’m planning to pretrain a CBraMod‑like model from scratch on a massive pediatric epilepsy corpus (EMU recordings) and would appreciate your guidance on the preprocessing strategy.

🔹 My data

  • Source: Pediatric Epilepsy Monitoring Unit
  • Size: >2,000 patients, each with ≥48 hours of EEG (larger than TUEG)
  • Content: Many seizure events, frequent interictal epileptiform discharges (spikes, BIRDS) — but not fully annotated
  • Downstream task: Seizure detection (and possibly classification of other clinically important events)

🔹 The concern
The original preprocessing pipeline discards a 30‑second segment if any absolute amplitude > 100 µV is present.
In my dataset, almost all seizures and many clinically relevant patterns exceed 100 µV. I Believe, using this threshold would:

  • Remove nearly every seizure the model should learn to detect.
  • Waste the very information that makes this dataset valuable.

🔹 My current approach
I’ve implemented two modifications:

  1. Pre‑filtering: Instead of the amplitude threshold, I use this check to reject a segment:

    • if all channels have std < 1 µV (flat signal)
    • if multiple channels have std > 100 µV (excessive noise).
  2. Normalization: Replaced /100 with RevIN (Reversible Instance Normalization).
    Each sample is normalized per‑channel to zero mean and unit variance before the model, then denormalized back to µV for the reconstruction loss.

🔹 My questions

  1. In your experience, would pretraining with this changes produce better representations for seizure detection compared to the original strict pipeline?
  2. Did you ever experiment with larger amplitude ranges or alternative normalizations (e.g., instance norm, non‑linear compression) during pretraining? If so, did they help or hurt downstream clinical tasks?
  3. If the model is trained on data which doesn't include specific set of patterns such as seizures, how can we hope it can be used to detect such patterns?

Thank you very much for your time and for sharing this work — it’s an invaluable starting point for clinical EEG foundation models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions