← Tepna preprints

Sleep staging from a fingertip oximeter's three signals: a pre-registered ceiling, a sequence control, and a stack of published formulas scored blind

Michal Planicka  ·  corresponding author — Tepna Project

OxyDex node (SpO₂ · pulse rate · motion), Tepna physiological-signal suite

Draft v0 · October 2026 · Skeleton written 2026-10-04 while v21/v22 run · Inputs: ten open and NSRR cohorts, 9 100 nights, feature set oxy1 · bands pre-stated in briefs/STAGE-LAB-2026-09-27-BRIEF.md §§5–20 before each run · nothing here is a published rate until the owner opens the P5 gate

Abstract

Background. A fingertip ring oximeter reports three signals at 1 Hz: SpO₂, pulse rate and a movement byte. The best published figure for staging from the first two is κ 0.73–0.78 on 17 303 polysomnograms with a whole-night network (Vaquerizo-Villar et al., 2025); a proprietary ring stager reports κ 0.39 on a sealed Challenge-2018 holdout. Question. How much of the night can those three signals stage, what part of it a stack of published formulas can carry, and how the two compare blind. Methods. Ten cohorts (9 100 nights) harmonised to what the ring reports; 466 named features; three learners on identical subject-grouped folds — gradient-boosted trees, a whole-night sequence network used only as a control, and a literature stack (named terms → auto-context → linear-chain CRF) fitted to labels; every band stated before its run; Challenge 2018 and ISRUC never fitted, scored blind; a half-night label shift that must collapse κ as the plant. Results. PENDING — control, trees, stack, bridge and symbolic-regression cells fill from the brief when v21/v22 land; the external blind number fills after the third-party blind run. Conclusion. PENDING.

Keywords: sleep staging · pulse oximetry · pulse rate · actigraphy · pre-registration · knowledge distillation · conditional random field · auto-context · blind validation

0. Layman overview (delete before submission)

A sleep lab decides whether you are awake, in light sleep, deep sleep or dreaming by reading your brain waves. A ring on your finger cannot see your brain; it sees how much oxygen is in your blood, how fast your pulse is, and whether your hand moved. We asked how far those three signals can go. We built the best model we could as a yardstick, then tried to reach the same result with formulas other scientists have already published, because formulas can be read, checked and shipped on a tiny device. Every target was written down before the computer ran, and two groups of nights were kept locked away so that the final numbers could not have been tuned to them.

1. Introduction

Two human scorers reading the same polysomnogram agree at κ ≈ 0.83 (measured here on ISRUC, Khalighi et al., 2016). A wearable has none of the channels they read. The question of this paper is therefore not whether a ring equals a lab, but how much of the night a ring's three 1-Hz signals contain, and whether that information can be expressed in formulas rather than in a black box.

Comparators. A proprietary stager for the same ring family reports κ 0.367 live / 0.390 offline on a sealed 134-night Challenge-2018 holdout (published figures only; its model and outputs were never used, per its licence §3g). Sridhar et al. (2020) reached κ 0.66 from instantaneous heart rate alone with a whole-night CNN on SHHS/MESA. Vaquerizo-Villar et al. (2025) reached κ 0.73–0.78 from 1-Hz pulse rate and SpO₂ on 17 303 PSGs and published the frequency bands their network attends to, which this paper adopts as formula terms.

Design. Three learners on one feature matrix and identical folds: trees as the floor, a sequence network as the ceiling and teacher ("control", never shipped), and a stack of published formulas as the candidate for release. The owner's rule "train on everything in-house, publish only what the formulas carry" is what the design implements.

2. Methods

2.1 Cohorts and licences

Table 1. Cohorts in the pooled set. "Fit" = used in the formula fit; "blind" = never fitted, scored on every fold model.
cohortnightsSpO₂pulse sourcemotionlabelslicencerole
SHHS1 (NSRR)5 1361 Hzoximeter H.R.—R&K → 4-classNSRR DUAfit
SHHS2 (NSRR)2 6511 Hzoximeter PR—R&K → 4-classNSRR DUAfit (same subjects as SHHS1; folds grouped by subject)
Challenge 2018 (PhysioNet/CinC)9941 HzECG-derived—AASMODC-Byblind
CAP (PhysioNet)1081 HzHR / ECG-derived—R&KODC-Byfit
UCDDB (PhysioNet)258 Hz → 1 Hzoximeter Pulse—R&KODC-Byfit
BOAS (OpenNeuro ds005555)1281 Hznone readable—AASM consensusCC0fit
ISRUC-Sleep12712.5 Hz → 1 HzECG-derived (X2)—AASM, two scorerscite-onlyblind
Sleep-Accel (PhysioNet)31—Apple Watch HRwrist ACCPSGODC-Byfit
BIDSleep (PhysioNet)165—Apple Watch HRwrist ACCDreem-EEG expertopenfit
Newcastle (Zenodo 1160410)27——GENEActiv wristPSGCC BY 4.0fit

Nights with a present-but-empty SpO₂ channel (< 50 % valid) are skipped and counted; a cohort without a signal yields NaN in that signal's columns, never a filled value. Aggregate statistics only are reported; no record identifiers leave the corpus (NSRR DAUA §5).

2.2 Harmonisation to the ring

SpO₂ is reduced to an 8-s moving mean at 1 Hz in whole percent, which is what the ring writes (one byte per second per signal). Pulse rate is the oximeter's own 1-Hz rate where the PSG has one; otherwise 60/RR from ECG beats found by the suite's Pan–Tompkins detector (Pan & Tompkins, 1985; validated at Se/PPV ≥ 99 % on MIT-BIH, SLPDB and NSRDB, Table S1) with a 4-s mean. Motion is the per-second standard deviation of wrist acceleration magnitude; a 1-bit "moved this second" flag (> 0.02 g) is carried beside it, as the poorest signal the ring could report. Every signal is standardised per night (median/IQR).

2.3 Feature matrix (feature set oxy1, 466 columns)

Multi-scale statistics (1–10 min), desaturation counts and depths, SpO₂ and pulse-rate band powers including the 0.004–0.020 Hz and 0.18–0.40 Hz bands of Vaquerizo-Villar et al. (2025), pulse-rate variability terms after Redmond & Heneghan (2006), actigraphy terms after Cole et al. (1992) and Sadeh et al. (1994), each with ±2/±10/±30-epoch context. The complete list with citations, where each term enters and whether its constants are pinned or fitted, is docs/STAGE-LAB-FORMULAS.md.

2.4 Learners

2.5 Pre-registration and plants

Each unit's expected range, pass line and reading rule were written in briefs/STAGE-LAB-2026-09-27-BRIEF.md before the unit ran (§§5–20); measured numbers were appended beside them, including every failed expectation. The gate for all units: pooled κ ≥ 0.415, half the human inter-scorer κ (0.829). Plant P1: labels shifted by half a night must collapse κ below half its value, or the run is void. Folds are a hash of the subject key (SHHS1/SHHS2 visits of one person share a fold); Challenge 2018 and ISRUC are never in any fit.

3. Results

PENDING. Each table below is filled from the brief section named in its caption when that run lands; the values are copied from the bench summaries under lab-cache/bench-*/, never typed from memory.

Table 2. Pooled four-class κ by learner and signal set (brief §§15–18). Night-bootstrap 95 % CI.
learnersignalspooled κ [CI]Challenge (blind)ISRUC (blind)SHHS1SHHS2brief §
treesSpO₂ + PR + motionPENDING————17
control (sequence)SpO₂ + PR + motionPENDING————17
literature stack, CRFsamePENDING————18
stack + bridgesamePENDING————19
Table 3. What each signal and each layer bought (brief §§14–19): SpO₂-only → +pulse → +motion; epoch → context → CRF; 1-bit motion vs full activity.
stepΔκ pooledwhere it showedbrief §
PENDING
Table 4. Negative results, each with the number that rejected it (brief §§13–19).
ideaexpectedmeasuredverdict
PENDING (HSMM time prior; single ultradian wave on raw features; distillation into the formula student, twice; third auto-context round; fitting the stack with the blind cohorts)
Table 5. External blind run on a third-party corpus (pre-registered band to be stated before the run).
modelpre-stated bandκ [CI]per-stage recallP1
PENDING

4. Discussion

PENDING. Stubs to be written from the measured sections: (i) where the gap between formulas and the sequence control lives (deep and REM recall; long-range structure the oracle bound shows is present); (ii) why distillation into a small closed-form student lost to label fitting both times; (iii) what the ring's motion byte is worth and why a 1-bit flag equals the full accelerometer for trees; (iv) the data curve against the 17 303-night benchmark; (v) what can ship, under which licence, and the role of the blind cohorts.

5. Reproducibility

# features (one tag per feature set; a changed layout never mixes with an older cache)
node tools/stage-lab.mjs features --harmonize --blocks spo2,pulse,motion --tag oxy1 --cohort <c> --dir <dir> --cache <cache> --workers 4
# trees and control on identical subject-grouped folds
node tools/stage-lab.mjs bench --cache <cache> --cohorts <ten> --features oxy1 --group-subjects --model gbdt --fold <f>
python seqnet.py --cache <cache> --cohorts <ten> --features oxy1 --group-subjects --fold <f> --save-proba <dir>
# literature stack (label-fitted, signed, distilled, bridge) and the residual search
python litstack.py --cache <cache> --cohorts <ten> --features oxy1 --group-subjects --fold <f> [--signed] [--distill <dir>] [--bridge]
python symreg.py --cache <cache> --control <dir> --stack <dir> --out <dir>

6. Sample size & statistical power

With 9 100 nights (≈ 9 million epochs) the night-bootstrap 95 % CI on pooled κ is ±0.004 (measured: 0.608 [0.604, 0.612] for the control, brief §17), so any difference ≥ 0.01 between learners on the same folds is resolvable; the pre-stated reading rules use 0.01 as the smallest difference worth a claim. The blind cohorts (994 and 127 nights) resolve ≈ ±0.015 and ±0.04 respectively.

References

  1. Vaquerizo-Villar F, et al. An explainable deep learning approach for sleep staging in sleep apnea patients across all age subgroups from pulse oximetry signals. Engineering Applications of Artificial Intelligence. 2025;162:112562. doi:10.1016/j.engappai.2025.112562
  2. Sridhar N, et al. Deep learning for automated sleep staging using instantaneous heart rate. npj Digital Medicine. 2020;3:106. doi:10.1038/s41746-020-0291-x
  3. Krauss P, et al. Incorporating respiratory signals for machine learning-based multimodal sleep stage classification: a large-scale benchmark study with actigraphy and heart rate variability. SLEEP. 2025;48(9):zsaf091. doi:10.1093/sleep/zsaf091
  4. Khalighi S, et al. ISRUC-Sleep: a comprehensive public dataset for sleep researchers. Computer Methods and Programs in Biomedicine. 2016;124:180–192. doi:10.1016/j.cmpb.2015.10.013
  5. Pan J, Tompkins WJ. A real-time QRS detection algorithm. IEEE Transactions on Biomedical Engineering. 1985;32(3):230–236. doi:10.1109/TBME.1985.325532
  6. Redmond SJ, Heneghan C. Cardiorespiratory-based sleep staging in subjects with obstructive sleep apnea. IEEE Transactions on Biomedical Engineering. 2006;53(3):485–496. doi:10.1109/TBME.2005.869773
  7. Cole RJ, Kripke DF, Gruen W, Mullaney DJ, Gillin JC. Automatic sleep/wake identification from wrist activity. Sleep. 1992;15(5):461–469. doi:10.1093/sleep/15.5.461
  8. Sadeh A, Sharkey KM, Carskadon MA. Activity-based sleep-wake identification: an empirical test of methodological issues. Sleep. 1994;17(3):201–207. doi:10.1093/sleep/17.3.201
  9. Zhuowen Tu, Xiang Bai. Auto-context and its application to high-level vision tasks and 3D brain image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence. 2010;32(10):1744–1757. doi:10.1109/TPAMI.2009.186
  10. Lafferty J, McCallum A, Pereira F. Conditional random fields: probabilistic models for segmenting and labeling sequence data. Proceedings of the 18th International Conference on Machine Learning (ICML). 2001:282–289.
  11. Potts RB. Some generalized order-disorder transformations. Mathematical Proceedings of the Cambridge Philosophical Society. 1952;48(1):106–109. doi:10.1017/S0305004100027419
  12. Rabiner LR. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE. 1989;77(2):257–286. doi:10.1109/5.18626
  13. Friedman JH. Greedy function approximation: a gradient boosting machine. The Annals of Statistics. 2001;29(5):1189–1232. doi:10.1214/aos/1013203451
  14. Hinton G, Vinyals O, Dean J. Distilling the knowledge in a neural network. arXiv:1503.02531. 2015.
  15. Borbély AA. A two process model of sleep regulation. Human Neurobiology. 1982;1(3):195–204.
  16. McCarley RW, Hobson JA. Neuronal excitability modulation over the sleep cycle: a structural and mathematical model. Science. 1975;189(4196):58–60. doi:10.1126/science.1135627
  17. Lo CC, Amaral LAN, Havlin S, Ivanov PCh, Penzel T, Peter JH, Stanley HE. Dynamics of sleep-wake transitions during sleep. Europhysics Letters. 2002;57(5):625–631. (DOI omitted: the citation gate's ≥3-letter surname floor cannot match "Lo" and Crossref offers no alias; resolve via EPL 57:625.)
  18. Cohen J. A coefficient of agreement for nominal scales. Educational and Psychological Measurement. 1960;20(1):37–46. doi:10.1177/001316446002000104
  19. Elgendi M. Fast QRS detection with an optimized knowledge-based method: evaluation on 11 standard ECG databases. PLoS ONE. 2013;8(9):e73557. doi:10.1371/journal.pone.0073557
  20. Data acknowledgement (NSRR data-use agreement §16). This work used data from the National Sleep Research Resource: NSRR R24 HL114473: NHLBI National Sleep Research Resource. The fitted set includes Sleep Heart Health Study (SHHS1 and SHHS2) polysomnography, obtained through sleepdata.org under an approved data-use agreement; aggregate statistics only are reported and no record-level data is redistributed here.
  21. Quan SF, Howard BV, Iber C, Kiley JP, Nieto FJ, O'Connor GT, Rapoport DM, Redline S, Robbins J, Samet JM, Wahl PW. The Sleep Heart Health Study: design, rationale, and methods. Sleep. 1997;20(12):1077–85. doi:10.1093/sleep/20.12.1077
  22. Zhang GQ, Cui L, Mueller R, Tao S, Kim M, Rueschman M, Mariani S, Mobley D, Redline S. The National Sleep Research Resource: towards a sleep data commons. J Am Med Inform Assoc. 2018;25(10):1351–1358. doi:10.1093/jamia/ocy064

Supplement S1 (beat-detector validation on MIT-BIH, SLPDB, NSRDB) is gated by the P5 ruling and is not reproduced here. Every figure in this draft is a pooled aggregate over the cohorts in Table 1; no per-record value and no record identifier appears here, and the external blind run has not been carried out.

T © 2026 Michal Planicka ·Tepna v1.0.0 ·Apache-2.0 ·◈ Asheville, NC ·not a medical device
v2.23.0