WSIT WSIT-RG-2031

WSIT Reference Guide — Multimodal Sleep Data Processing Engines

Covers ingestion, clock alignment, quality flags, task-specific fusion, label semantics, cross-device validation, and reconstructable outputs for multimodal sleep data.

1. Scope and processing objects

A multimodal sleep data processing engine is a software layer that organizes, quality-checks, transforms, analyzes, and exports multiple sleep-related data streams from the same night or adjacent observation periods on a traceable timeline. Inputs may include polysomnography (PSG) electroencephalography (EEG), electrooculography (EOG), electromyography (EMG), electrocardiography (ECG), airflow, respiratory effort, and oxygen saturation. They may also include wearable activity, photoplethysmography (PPG), or environmental records. Each combination supports different questions. The presence of multiple modalities alone does not establish better accuracy or replace PSG scoring and clinical interpretation.[2][3]

1.1 Distinction from adjacent products

Acquisition devices produce signals; archives store and retrieve them; a single sleep-stage or respiratory-event algorithm addresses one defined task. This entry concerns the processing chain connecting raw signals, event annotations, quality flags, derived features, model versions, and results so a reviewer can reconstruct a finding. An engine might include several models or might only perform conversion, synchronization, and quality control. Its actual deployment scope must be stated. The ability to import a format is not evidence that automatic interpretation has been validated.

1.2 Define the task before the output

Sleep stages are classes assigned to time epochs. Arousals, respiratory events, and limb movements have task-specific start and end times or definitions. Whole-night summaries are calculated from underlying results. These must not be collapsed into one undefined “sleep quality” score. Preserve the source time zone and time relative to recording start, epoch length, label system, unscored regions, and whether a person edited a result. The AASM Scoring Manual is the reference entry point for PSG and home sleep apnea test scoring rules; applicable detailed rules must be checked in the appropriate version.[2]

Processing objectTypical inputOutput meaning to retain
PSG stagingEEG, EOG, chin EMG, scoring annotationsLabel and start/end of each epoch, including unknown or unscorable state
Respiration and oxygenationAirflow, thoracoabdominal effort, SpO2, event annotationsEvent class and interval, signal availability, scoring-rule version
Wearable sleep observationActivity, PPG, device clock, optional diaryDevice estimate and confidence, without claiming PSG-equivalent labels
Across-night trendsNightly results and recording metadataDenominator, excluded nights, device and algorithm versions, comparability limits

2. Ingestion, channel dictionary, and timeline

2.1 Reading is more than concatenation

For each file, record provenance, device, lead or sensor location, unit, sample rate, filtering or earlier processing, recording bounds, and a checksum of the source file. EDF+ distinguishes uninterrupted EDF+C from discontinuous EDF+D recordings and gives annotations time semantics relative to file start. Treating a discontinuous file as a continuous stream can shift later events.[1] In SHHS, EDF signal files and XML staging/event annotations are separate, so successful waveform import does not prove successful label import.[3]

2.2 Align multiple clocks

Identify each time source: device local clock, UTC, file-header time, server receipt time, and manually logged lights-out time may disagree. Record time zone and daylight-saving changes, drift, restarts, and gaps. Estimate offsets from defensible synchronization points and correct in segments where necessary; do not stretch every file to the same duration. Resampling changes representation frequency but cannot recreate unobserved physiology. SHHS1 lists different nominal sample rates for EEG, EOG, respiratory channels, and oxygen saturation, while warning that some individual studies or signals depart from those initial settings. Verify each recording.[4]

Time or channel problemEvidence to inspectHandling and record
Different sample ratesHeader, sample count, recording durationPreserve original rate; choose task-specific resampling and log filtering
Cross-device offsetSync pulses, common events, device logsRecord offset estimate and error; avoid fine event fusion if unknown
Disconnect or restartEDF+D timing, logs, time jumpMark the gap as missing; do not compute continuous features across it
Inconsistent lead namesElectrode position, polarity, unit, mappingRetain source and canonical names; do not infer equivalence from similar strings
Different annotation originsLabel file, recording origin, relative timeAlign and manually sample-check event starts, ends, and boundaries

3. Quality control, segmentation, and missing data

3.1 Flag quality before extracting features

Check each channel for flat lines, saturation, steps, detached electrodes, motion contamination, and physiologically implausible values. Retain a visible quality mask. Corrupted PPG should not automatically discard readable EEG from the same interval, but an event result relying on several channels must show which were unavailable. Filtering, artifact handling, and normalization parameters must be reproducible. Statistics estimated from a test subject or future interval must not leak into training. A review screen should display raw and processed waveforms alongside quality flags and model results.

3.2 Epochs and unscored regions

Specify how window boundaries match label boundaries. Staging commonly uses fixed epochs, whereas an event detector may be evaluated by sample or start/end time. Do not silently convert an interval event into a full-epoch class. Sleep-EDF separates PSG from hypnogram files and uses the older Rechtschaffen and Kales stage scheme, including movement time and an unscored label. State mappings and unmappable cases before combining these with AASM labels.[5] PhysioNet/CinC Challenge 2018 encodes target, non-target, and unscored regions as 1, 0, and -1. Treating -1 as a negative changes the evaluation task.[6]

Data stateDefensible responseAvoid assuming
Brief artifact in one channelFlag interval, use a validated fallback channel or send for reviewA smoothed waveform proves that a real event disappeared
All key channels absentReturn “unable to interpret” with a reasonAnother modality silently supplies a clinically equivalent conclusion
Unknown or unscored labelExclude according to task and report the proportionIt means wake, no event, or a correct prediction
Different historical label rulesRecord versions, mapping, and sensitivity analysisEqually named classes have identical definitions
Device or firmware changeRecheck channels, timestamps, and quality distributionPreviously measured model performance still applies

4. Fusion and interpretable output

4.1 Choose the fusion stage

Early fusion feeds aligned raw streams or low-level features into a common model; it is sensitive to time error and missing channels. Intermediate fusion first encodes EEG, EOG, respiration, or PPG separately and then combines representations. Late fusion combines model outputs and may make channel contribution easier to display, but it cannot remove biases shared by the component models. The choice depends on the target, available channels, and latency, with no universally best structure. Compare each design with single-modality and simple-rule baselines, and remove one modality at a time to test its actual contribution. More channels do not automatically provide independent information.

4.2 Labels, confidence, and human review

Maintain separate label dictionaries for stages, arousals, and respiratory events, including scorer identity, rule version, and disagreement resolution. Provide model probabilities or calibrated confidence, quality state, and an abstention path. High uncertainty, absent channels, out-of-scope populations, and clinically unusual segments should enter review. Model attention weights can help locate a computational influence; they do not by themselves establish physiological causation or a diagnostic rationale.

5. Validation design and metrics

5.1 Prevent leakage across a person's nights

Split training, tuning, and final tests by participant. Repeated nights, renamed files from one device, and one person observed at several sites must stay in one split; when appropriate, add external tests by site or device. Report age, clinical mix, collection setting, lead configuration, label scheme, and exclusion rate. Distinguish “the engine can parse this file” from “it performs reliably in this population.” An inter-database sleep scoring study observed a difference between internal and external database performance. This motivates independent testing at a new site; its model results are not performance claims for the proposed engine.[7]

5.2 Report error for each task

For staging, report per-class recall, precision or F1, confusion matrix, and participant-level results. For event detection, define time tolerance, event overlap rules, false alarms per hour, and recall. For whole-night summaries, report error distributions and the share of uninterpretable nights. Give uncertainty intervals or participant-level spread and stratify by device, age, site, and missing modalities. Human labels are not absolute truth; record the scoring rules and scorer agreement behind both training and evaluation labels.

Validation sliceCheckMeaning if it fails
Participant and night isolationAll nights from one person stay in one split; no tuning on final testMetrics may contain person-specific leakage
Site and device transferTest new leads, hardware, firmware, and populations separatelyInternal accuracy cannot be transferred directly
Missing modalitiesMeasure interpretable fraction and error for each missing-channel patternFull-channel scores hide deployment gaps
Alignment errorInject controlled offsets and assess event/epoch boundariesFine fusion is fragile to clock uncertainty
Human-review benefitMeasure triggers, revisions, and review timeClaimed automation may overstate workflow benefit

6. Deployment, maintenance, and handover

6.1 Reconstructable pipeline

Deliver an interface and field dictionary, channel maps, alignment and quality logs, model and rule versions, label scheme, preprocessing parameters, input/output examples, failure states, and rollback plan. Link each night's source checksum, processing steps, manual edits, and final report so that results can be recomputed and differences explained. Configure health-data access, de-identification, and retention to the actual deployment requirements. Format compatibility alone does not establish authorization for clinical use.

After deployment, monitor missing inputs, clock offsets, channel quality, label distribution, manual revision rate, and subgroup performance. When a sensor, firmware, scoring rule, or model changes, rerun representative recordings and boundary cases before comparing versions. If the intended use is diagnosis or treatment decisions, determine the relevant regulatory, validation, and professional-review process separately. This guide addresses data handling and validation design.

6.2 Source-by-source scope

[1] EDF+ specification: supports file timing, continuous/discontinuous records, and annotations; it does not prove cross-device synchronization.

[2] AASM Scoring Manual overview: supports the scope of scoring tasks and technical specifications; consult the applicable full version for detailed rules.

[3] SHHS Polysomnography Introduction: supports an example of separate signal and annotation files and study quality procedures.

[4] SHHS1 Montage and Sampling Rate Information: supports channel and rate variation; initial project specifications are not measurements of every recording.

[5] Sleep-EDF Database Expanded: supports a separate hypnogram and historical label scheme, not a clinical performance claim.

[6] PhysioNet/CinC Challenge 2018: supports three label meanings for its specific arousal task, not a universal event definition.

[7] Inter-database validation of automatic sleep scoring: supports the need for external validation, not any measured result for this engine.

- This guide is a reference document under the World Sleep Industry Technology System (WSIT), intended for sleep industry professionals worldwide. It does not constitute certification, recommendation or endorsement of any product or service, and does not replace the laws, regulations or regulatory requirements applicable where a business operates. - Regulatory requirements for consumer electrical appliances vary across countries and regions. Product development, manufacturing, labeling, claims and sales must comply with the regulations applicable where a business operates. - Specific technical parameters, functions and instructions for use are subject to the product’s actual instruction manual and the currently effective regulations applicable where a business operates. © 2026 World Sleep Center. All rights reserved. [worldsleep.com](https://worldsleep.com) When citing this guide, include Document ID WSIT-RG-2031 and version V1.0.