1. Scope and input modalities
1.1 The output must be a reviewable event
An apnea-hypopnea event detection algorithm marks candidate intervals in sleep recordings, including start and end times, type, supporting signals, scoring rule, signal quality and review state. It may help technologists and physicians with initial scoring or review. Detecting an event, calculating an AHI or REI, and diagnosing OSA are different levels of claim. AASM identifies its scoring manual as the reference for PSG and HSAT scoring and requires qualified physician review of home-test raw data.[1][5]
This entry concerns apnea and hypopnea events themselves. Snore detection, an isolated SpO2 fall, sleep staging and a single risk score are not interchangeable with respiratory events. Without reliable respiratory effort, a flow trace alone should not produce a definite central or obstructive label. Without EEG arousal data, an algorithm cannot claim to have measured EEG arousal.[2][4]
1.2 PSG, HSAT and other data sources
Available inputs determine which scoring rule can be implemented. Product documentation should name sensors, sampling rates, raw-trace access, synchronization error, intended population, adult or pediatric rules, diagnostic or treatment setting, and whether the software is for research, assisted scoring or clinical use.[1][7]
| Source | Evidence often available | Limitation to disclose |
|---|---|---|
| Multichannel PSG | Flow, effort, SpO2, EEG and sleep time | Scoring version and human review still matter |
| Common HSAT channels | Flow, effort, SpO2 and monitoring time | Without EEG, do not apply an arousal criterion or true sleep time |
| PAP device record | Device flow and treatment state | Device events are not direct substitutes for diagnostic PSG events |
| Single audio or oximetry signal | Snore or desaturation lead | Cannot fully classify apneas and hypopneas on its own |
2. Scoring rules and event pipeline
2.1 Signals, alignment and analyzable time
The pipeline begins with raw airflow, nasal pressure, thermal flow, thoracoabdominal effort, SpO2 and any EEG arousal annotations. For each channel preserve device source, sample rate, filters, gain, clock, dropout intervals and resampling method. Oxygen changes can lag a flow change; cross-channel matching needs a prespecified time window rather than post hoc movement of labels to improve agreement. Leaks, mouth breathing, probe loss, motion artifacts and treatment-device changes should mark uninterpretable intervals, which must be reported with the usable denominator and performance results.[2][7]
First detect reduced-flow candidates; then check duration, amplitude and the accompanying evidence required by the selected rule; finally resolve adjacency, overlap, duplicate counts and type. Reviewers should be able to replay waveforms and thresholds at each step rather than receive only a final count.[1][2]
2.2 Adult examples and version locking
In the publicly available 2012 AASM adult-rule update, apnea involves a flow-signal fall of at least 90% for at least 10 seconds with additional rule conditions. An adult hypopnea example involves at least a 30% fall for at least 10 seconds together with either at least 3% desaturation or an EEG arousal. AASM also describes an acceptable 4% desaturation criterion without arousal. Event counts from the two hypopnea definitions must not be merged as one result. Pediatric and PAP titration rules must not simply inherit the adult diagnostic definition.[2][3]
Deployment should lock the actually applicable current manual version, adult or pediatric pathway, permitted alternative sensors and 3% plus arousal versus 4% reporting definition. AASM's arousal-based scoring position notes that counting only prominent oxygen drops can miss arousal-related events. A system without EEG must disclose that capability gap.[1][4]
2.3 Type, numerator and denominator
Obstructive, central and mixed apnea classification depends on effort during the event. SpO2 nadir, snore loudness or a total score cannot substitute for effort evidence. When effort belts fail or signals conflict, output “untyped / review needed” and preserve the visible trace. Further hypopnea subtyping likewise depends on local rules and available signals.[2][8]
PSG AHI is generally calculated per hour of sleep, whereas HSAT without reliable sleep staging uses monitoring time for REI. Even with an identical event numerator, a different denominator changes the index. Reports should show apnea and hypopnea counts, rule-specific numerators, valid time, denominator, uninterpretable intervals and human edits. A negative, inconclusive or technically inadequate HSAT still follows the clinical pathway for further evaluation; the algorithm must not label it “OSA excluded.”[5][6][10]
3. Reference labels and performance
3.1 A reference score is not an infallible truth
For reference sets, document scorer qualifications, blinding, rule version, raw traces, event boundaries and types. Prespecify dual review and adjudication for disputed boundaries, hypopneas and central versus obstructive classifications. One technologist's label is not absolute truth. An AASM inter-scorer study found substantial disagreement for particular respiratory-event types and hypopneas, so model-human agreement should be interpreted alongside human-human agreement.[8]
Test data should include event-free breathing, subtle hypopneas, brief artifacts, posture changes, REM/NREM, PAP leak and missing signals. Split training, tuning and testing by patient rather than segment. Disclose devices, acquisition conditions, disease spectrum and population limits. Adjacent segments from the same person must not populate both training and test sets.[7][9]
3.2 Report both event and patient levels
Fix event-matching tolerance or temporal overlap, thresholds, exclusions and abstentions before testing. Overall accuracy is diluted by abundant event-free time; AHI correlation alone can hide wrong event timing or type.[8][9]
| Evaluation level | Report at least | Error that can be hidden |
|---|---|---|
| Event level | Sensitivity, positive predictive value, type confusion, boundary error and false alarms per hour | One long event split or two events merged |
| Record level | AHI/REI bias, rule definition, valid denominator and errors near category boundaries | Similar index despite different event locations |
| Usability level | Invalid-signal fraction, abstention, human edits and review time | Good results only on clean recordings |
Stratify by PSG/HSAT, sensor, age, sex, severity, comorbidities and institution. Claims about children, cardiopulmonary disease or a particular home device need independent samples for those settings; an adult single-center PSG test does not automatically generalize.[6][7][9]
4. Clinical integration and ongoing control
4.1 Artifacts, low confidence and human review
The algorithm should abstain from a definite event type on poor-quality segments. A timeline should show flow, effort, SpO2, arousal and their offsets. Qualified reviewers need to add or remove events, edit boundaries and types, and record reasons. After review, retain the original algorithm output, model version, scoring rule, editor and time. AASM statements on HSAT and AI place automatic analysis within professional review workflows.[5][7]
Distinguish a poor-quality night, an effort-belt dropout and missing EEG as “cannot classify,” “cannot apply arousal criterion” or “record may be inadequate.” Do not fill missing data with “no event.” Physicians must be able to return to raw traces rather than only a summary plot.
4.2 Drift and intended population
Separate training, tuning and independent testing by patient and site. External validation should cover new devices, centers and disease mixes. Joint FDA, Health Canada and MHRA good machine learning practice principles emphasize representative data, independent test sets, clinically relevant testing and post-deployment monitoring. Recheck affected event- and record-level performance when a model, preprocessing step, sensor or scoring rule changes.[9]
After release, monitor uninterpretable intervals, human edits, classification errors and device-specific bias. Define when to suspend automatic output and return to manual scoring. Device status and intended-use claims require assessment under each market's rules; this guide does not replace registration or local validation.[7][9]
5. End-to-end acceptance
5.1 Test boundary cases across the whole pipeline
Use de-identified or synthetic PSG/HSAT segments and whole nights to check input, rule, trace replay, human edits and final report. Save expected behavior and observed difference for every case.
| Test case | Expected behavior | Acceptance condition |
|---|---|---|
| Flow fall with EEG arousal but no major oxygen fall | Check hypopnea under a supported adult 3%/arousal rule | A 4% count stays separate |
| Flow fall while effort belt is lost | Candidate may be detected but central/obstructive type is withheld | Quality flag and human review route exist |
| False SpO2 fall after probe loss | Do not pair artifact into a hypopnea automatically | Raw trace, invalid interval and reason are traceable |
| HSAT with long waking periods and no EEG | Use a stated monitoring-time source and REI | REI is not labeled PSG AHI |
| Technologist changes boundary or removes duplicate | Recalculate count, index and report | Original output, editor and rule version remain |
Acceptance reports should specify test population and devices, rule version, event matching, stratified performance, abstention, physician review and unresolved differences. Passing supports only the validated use and environment; it is not a claim of independent diagnosis for every population.[6][7][9]
6. Sources and scope
6.1 Scoring and clinical sources
[1] AASM, Scoring Manual: landing page for PSG and HSAT scoring; confirm the applicable version at deployment.
[2] AASM, Rules for Scoring Respiratory Events in Sleep, 2012: adult apnea, hypopnea and effort-related rule update.
[3] AASM, Clarification of Hypopnea Scoring Criteria: adult 3%/arousal and 4% definitions.
[4] AASM, Polysomnography Should Include Arousal-Based Scoring: reporting of arousal-related events.
[5] AASM, Clinical Use of a Home Sleep Apnea Test, 2018: HSAT raw data and physician review.
[6] AASM, Diagnostic Testing for Adult OSA, 2017: diagnostic pathway after negative or inadequate HSAT.
6.2 Labeling and model governance
[7] AASM, Artificial Intelligence in Sleep Medicine, 2020: independent testing, intended population and physician review.
[8] AASM, Inter-scorer Reliability Program: Respiratory Events, 2014: human agreement and disagreement for event scoring.
[9] FDA, Health Canada and MHRA, Good Machine Learning Practice Guiding Principles, 2021: representative data, independent testing and post-deployment monitoring.
[10] Effect of Manual Editing of Total Recording Time in HSAT: original study of monitoring-time and sleep-time denominator differences.
These sources support scoring, clinical workflow and validation boundaries. They do not establish diagnostic performance for a particular algorithm.