poc:2025:ondevice-sleepstaging

This is an old revision of the document!


On-Device Prediction of Sleep Stages

  • Status: 🟡 In Progress
  • Duration: August 19 2025
  • Type: Hardware/Possible Product
  • Repository: N/A
  • Team: Fabricio

What we're exploring: The feasibility of on-device predictions of sleep stages. Important aspects are a.) realtime processing b.) feasibility on an ESP32 c.) expected performance regressions. This is relevant due to a.) limitations on the iPhone for compute b.) decisions on how to process sleep stages etc. on our devices, e.g. what hardware?, rather in the cloud?

The ESP32 S3 is optimized for neural networks. Documentation can be found here .

The main limitation is presumably the memory.

  • The ESP32 has a total of 512KB of SRAM. This has to be shared with other processes.
  • While there is an option to upgrade with external RAM up to an additional 4MB (i.e. 4MB accessed at once), this does not seem to be recommended due to a hard decrease in performance.
  • The main issue with Convolutional-Architectures would be the explosion in intermediate activations if many filters are used.
  • This is a bit difficult to manually tune and explore.
  • The quantization doesn't need to be uniform, large optimization space.
  • Failed approaches (and why)
  • Performance bottlenecks discovered
  • Incompatibilities found
  • Unexpected discoveries
  • Hidden complexities
  • Simpler alternatives found

Should we proceed?: Yes/No/Maybe

If yes, what needs to happen?

  • poc/2025/ondevice-sleepstaging.1755600712.txt.gz
  • Last modified: 2025/08/19 10:51
  • by fabricio