Deciding How Long a Wearable Sensor Can Sleep

A battery-powered wearable that tracks activity has to decide, over and over, whether to spend energy reading its sensors. Most adaptive schemes answer a narrow question: given the current reading, should the next reading be taken at a high or low rate? The costly decision is actually a different one. It is how long the sensor can be switched off before something important, such as the wearer standing up, starting to walk, or lying down, is likely to have happened unseen. We propose to answer that question directly. The model is a continuous-time Gaussian process, a probabilistic model of a signal that gives a prediction and an honest error bar at any future moment. We write it in its equivalent state-space form, so that inference is a small Kalman filter that works with samples arriving at arbitrary, irregular times. Because the filter's uncertainty grows in closed form with the length of a sensor-off gap, the device can compute on a microcontroller the longest sleep interval whose risk of missing an activity change stays within budget.

This matters because real sensor energy is dominated by wake-ups, not only by samples. Each power-up of a sensor has latency and transient current, so a scheduler that takes few, well-placed readings can beat one that trickles readings at a low steady rate. The existing Gaussian-process approach to adaptive wearable sensing cannot represent irregular sampling. Its speed depends on a uniform time grid. The existing irregular-rate schedulers have no calibrated model of the signal between samples.

Core Claim

A switching state-space Gaussian process gives two things. The first is a closed-form growth law for uncertainty across a sensor-off gap. The second is an explicit prior on how long each activity lasts. With both, choosing the next wake-up time is a one-dimensional optimization that is cheap enough for a microcontroller. At equal measured energy, including wake-up overhead, this gap-choosing scheduler should match fixed-rate and entropy-gated schedulers on overall activity recognition. It should clearly beat them in the few seconds after an activity changes, where prior adaptive methods fail.

Where This Sits

The closest work is Adaptive Activity Monitoring with Uncertainty Quantification in Switching Gaussian Process Models. It models activities with a hidden semi-Markov model, which is a hidden Markov model with explicit Gamma-distributed state durations, and models signals within each state with switching Gaussian processes. It then turns "virtual sensors" on or off by trading predictive entropy against an energy cost. That paper motivates this proposal and constrains it in three ways. Its speed comes from block-circulant embedding solved by FFT, which requires a uniform time grid, so it cannot represent the irregular sampling that saves the most energy. Its errors cluster just after activity switches. Its "sensors" were 10 PCA components of the 561 UCI HAR features, each assigned a synthetic cost, so no physical wake-up cost appeared in the evaluation. We keep its hierarchical structure and its duration prior. We replace the circulant machinery with a state-space representation and change the decision from which sensors to use now to when to wake next.

The state-space machinery is supplied by the temporal Gaussian process literature. Markovian Gaussian Process maps stationary kernels to state-space models and runs them with GPU parallel scans. Factorial SDE for Multi-Output Gaussian Process Regression decomposes multi-channel processes into independent latent chains with linear mixing so that inference stays linear. Both target offline, server-class workloads. We use the opposite end of the same idea: very low-order Matérn state spaces run sequentially on a Cortex-M-class core.

Two other lines are relevant. Recurrent Memory for Online Interdomain Gaussian Processes streams Gaussian processes with fixed memory, but it freezes hyperparameters and never controls sampling. We sidestep online hyperparameter fitting by using a small bank of per-activity kernels fixed offline, and we let the regime posterior absorb drift. Approximation-Aware Bayesian Optimization shows that approximate Gaussian processes should spend their budget where decisions are made. We borrow that principle but spend energy rather than inducing points, concentrating readings where a switch is likely.

Mechanism

Each activity regime $k$ has, per sensor channel, a Matérn-3/2 or 5/2 state-space model with drift matrix $F_k$ and stationary covariance $P^\infty_k$, both fit offline. After a gap of length $\Delta$ with no readings, the predicted state covariance is

$$\Sigma(\Delta) = A_k(\Delta)\,\Sigma_0\,A_k(\Delta)^\top + P^\infty_k - A_k(\Delta)\,P^\infty_k\,A_k(\Delta)^\top, \qquad A_k(\Delta)=e^{F_k\Delta},$$

where $\Sigma_0$ is the covariance at the last reading. For Matérn kernels, $A_k(\Delta)$ has a closed form, so irregular gaps cost nothing extra. The duration prior gives, from the time already spent in the current regime, a survival probability $S(\Delta)$ that no switch occurs within $\Delta$. At each reading, the device chooses the next wake time by

$$\Delta^\star = \arg\max_{\Delta \in \mathcal{D}} \Big[\, E_{\text{wake}} \cdot \tfrac{1}{\Delta} \text{-saving} \;-\; \lambda\big( (1-S(\Delta))\,\mathbb{E}[\text{missed time}\mid\Delta] + H(\Delta) \big)\Big].$$

Here $\mathcal{D}$ is a small grid of allowed gaps, $E_{\text{wake}}$ is the measured energy of one wake-up plus a burst of readings, $H(\Delta)$ is the predicted entropy over regimes at the next reading (computed from each regime's predictive likelihood under $\Sigma(\Delta)$), and $\lambda$ is the energy-accuracy knob. Evaluation is $O(|\mathcal{D}|\,K\,P\,s^3)$ per decision, with $K$ regimes, $P$ channels, and state size $s \le 3$. That is a few thousand floating-point operations.

To attack the lag after activity switches, each reading's predictive log-likelihood is compared with its regime-conditional expectation. A surprise above threshold triggers a short dense burst of readings, which resets the model's confidence quickly rather than waiting several windows. Channels with different physical costs, for example the barometer versus the gyroscope on smart glasses, get separate gap choices over a shared regime posterior. This is a deliberately simpler coupling than full multi-output mixing.

Research Program

We will build three things. The first is the scheduler with a host-side replay harness. Raw 50–100 Hz recordings are treated as ground truth, and the scheduler may read only the samples it chooses. The second is a per-sensor energy model measured on a physical IMU and barometer board. It records active current, sleep current, wake-up latency, and transient charge, so that replayed schedules are charged real costs rather than per-sample proxies. The third is a Cortex-M4 port that reports latency, RAM, and flash for direct comparison with Efficient Uncertainty Aware Human Activity Recognition On Microcontrollers Using Hyperdimensional Computing And Conformal Prediction, which reports 3–5 ms per window with about 6–9 KB of RAM.

The analysis asks when gap choice matters more than rate choice. We expect the advantage to grow with the ratio of wake-up energy to per-sample energy. We will sweep that ratio in the energy model to map the region where the method is and is not worth using.

Baselines

The naive reference points are fixed-rate downsampling and fixed duty cycles, run on the same raw streams and charged by the same energy model. Fixed downsampling is not a strawman: on the OCOsense glasses, halving the rate from 50 to 25 Hz moved F1 only from 0.81 to 0.79, as reported in Recognizing Activities of Daily Living using Multi-sensor Smart Glasses. Every adaptive method must therefore lie above the full fixed-rate Pareto curve, not just above one point on it. Every fixed rate from 50 Hz down to 1 Hz, and every duty cycle from 5% to 50%, is included.

The strongest existing Gaussian-process competitor is the switching-GP entropy gating of Adaptive Activity Monitoring with Uncertainty Quantification in Switching Gaussian Process Models. Its reported result is 79.26% accuracy on UCI HAR while using 73.42% of sensor data at $\lambda = 0.1$, with 74.21% average accuracy overall. We will first reproduce it in its own PCA virtual-sensor setting to confirm our reimplementation. We will then run it on raw channels with physical costs, using the same regime count, the same duration prior, and the same hyperparameter search budget as our model. Beating it means higher transition-window F1 at equal or lower measured energy across at least three $\lambda$ settings.

The strongest non-GP adaptive-rate competitor is datum-wise frequency selection from Learning Datum-Wise Sampling Frequency for Energy-Efficient Human Activity Recognition. It is a reinforcement-learning policy that picks the next sampling frequency from Fourier features and classifier outputs. The file gives no reported classification-error or energy numbers for it on Lacuna, only significance relative to its own baselines, so we will retrain it on HASC 2011 and on our raw streams with the same energy model.

A further baseline is a conformal trigger built on HDUQ-HAR's microcontroller classifier. The wake interval is lengthened when the prediction set is a single label and shortened when it contains several. This is described below as the most serious threat.

Two ablations isolate the key ingredient. The first uses the identical state-space model but gates by an entropy threshold at a fixed rate, with no gap optimization. The second is our scheduler with $E_{\text{wake}}$ set to zero. If the second matches the full method under realistic wake costs, the wake-aware objective is not doing work.

Why not just…?

Why not just downsample to a fixed low rate? On steady activities this works well, as the smart-glasses 0.81-to-0.79 F1 result shows. The dispute is over transitions. A fixed rate spends energy uniformly across long, predictable sitting bouts, and it samples brief transitions too sparsely. The datum-wise paper found adaptive rates significantly better than fixed ones on HASC, HARSD, and DSA. We will settle the question by reporting transition-window F1 and switch-detection latency against the whole fixed-rate curve. If no point on our curve dominates it, the proposal fails.

Why not just use conformal prediction sets from a tiny classifier to decide when to wake? This is a real threat. HDUQ-HAR already runs on a Cortex-M4 in kilobytes, reaches 0.90 coverage with average set sizes of 1.18–1.25, and detects distribution shift with AUROC 0.92–0.96. The limitation is structural. A prediction set describes ambiguity at the current window. It says nothing about how long the device can safely stay off, and it needs a full window of dense samples to compute at all, which is exactly the cost we want to avoid. Our model predicts the signal and the switch probability across the gap. We will give the conformal trigger its best tuned interval rule under the same energy model. If it matches us on the energy-accuracy Pareto front, we will report that the state-space machinery is unnecessary.

Why not just add a duration-aware hidden Markov model on top of a cheap classifier? This captures the duration prior, and hence $S(\Delta)$, without any Gaussian process. What it lacks is a model of the raw signal between samples. It cannot use a single cheap reading, only full windows, and its surprise signal is coarser. We include this as the entropy-free half of an ablation: the same duration prior with classifier likelihoods in place of Kalman predictive likelihoods. The gap between the two measures what the continuous signal model contributes.

Proposed Experiments

The main replay experiments use raw inertial streams from UCI HAR (50 Hz), HASC 2011 (100 Hz), PAMAP2, and the OCOsense smart glasses, whose 9-axis IMU and barometer let us test per-channel gap choice with genuinely different sensor costs. Metrics are macro-F1 and transition-window F1 over the first two seconds after each labeled switch, median switch-detection latency, measured energy per hour, and wakes per hour. Each is reported as a Pareto curve over $\lambda$, with leave-subjects-out splits.

We apply three decisive checks. First, at matched energy, transition-window F1 must exceed both the reproduced switching-GP gating and the conformal trigger, and overall F1 must stay within noise of the best fixed-rate point. Second, the advantage must widen as the measured wake-to-sample energy ratio grows. If it does not, gap choice is not the mechanism. Third, the Cortex-M4 port must run each decision within a budget comparable to HDUQ-HAR's reported 3–5 ms and single-digit kilobytes of RAM, so the scheduler does not spend the energy it saves.

A secondary experiment on the in-the-wild smartwatch dataset of A continuous real-world dataset comprising wearable-based heart rate variability alongside sleep diaries uses sleep and wake as regimes. It tests whether a fixed kernel bank with a regime posterior tolerates circadian drift without online hyperparameter fitting. That device reports roughly 14 hours of battery life, which makes the extension of operating time the practical outcome to report.