DEV Community

SleepTrace
SleepTrace

Posted on

Stop shipping sleep stage charts you cannot defend

Stop shipping sleep stage charts you cannot defend

Sleep stage charts are everywhere now. Apple Health, Oura, Whoop, Garmin — every tracker that can guess your breathing gives you a stacked bar of "light," "deep," and "REM" sleep. The charts look scientific. The accuracy does not match the confidence they imply.

Here is the honest problem: without an EEG, sleep stages are a classification task built on proxies. Movement, heart rate, and (if you're lucky) breathing rhythm are fed into a model trained against lab polysomnography. The model outputs a probability distribution, and the app draws it as a fact.

The gap between "probability distribution" and "you were in REM from 01:13 to 01:47" is the entire integrity problem of consumer sleep tracking.

Why stage charts survive anyway

They survive for three reasons, none of which are technical:

  1. They look good. A stacked bar is visual and familiar. Users understand pie charts even when they shouldn't.
  2. They anchor a narrative. "You got 90 minutes of deep sleep" gives a user something to talk about — and to share. Sharing drives retention.
  3. They are internally consistent. Even if wrong, the chart always sums to 100%. That completeness feels authoritative.

None of these are reasons the chart is accurate.

The alternative most apps won't take

Our approach is to surface events instead of stages. The morning view shows: when you snored, when your breathing looked obstructed, how your rhythm shifted relative to your baseline, and — critically — the confidence level for each detection. No stage pie. No 0–100 score.

The full acoustic detection pipeline, including the feature engineering that makes "obstructed breathing" detectable without an EEG, is documented on the blog.

For builders: ship the uncertainty

If you must ship a stage estimate, ship the uncertainty with it. A toggle between "show probability bands" and "show most-likely stage" is enough to make the user understand the chart is a model output, not a measurement. If you won't do that, stop shipping the chart. Sleep is too personal to optimize against a number that is, at best, an educated guess dressed up as data.

Top comments (0)