Imagine your resting heart rate is 52 bpm on a normal day. One morning it reads 61. Should you be worried? The answer depends entirely on a question most health apps never answer: what's normal for you?
A 61 bpm resting heart rate is completely unremarkable for most adults. It only becomes a signal when you know that your personal baseline is 52 — and that a 9-beat elevation combined with a 20% HRV drop and 40 minutes less deep sleep is the exact pattern your body produced two days before your last viral illness.
This is the premise of anomaly detection applied to Apple Health data: not "is this number high?" but "is this number meaningfully different from your personal normal, and what pattern does it fit?" Done well, it surfaces early warnings 24 to 48 hours ahead of when you'd otherwise notice something was wrong. Done poorly, it produces alert fatigue from flags that don't mean anything.
Why a Single Number on a Bad Morning Tells You Nothing
Apple Health surfaces a daily HRV reading and a resting heart rate. Many people glance at these, feel vaguely reassured or vaguely concerned, and move on. The problem is that a single number, in isolation, carries almost no information.
HRV is highly individual. The same reading that signals poor recovery for one person is a perfectly fine baseline for another. Resting heart rate varies with age, fitness level, caffeine intake from the night before, ambient temperature during sleep, and dozens of other factors. SpO₂ fluctuates naturally throughout the night. Any of these metrics can be "off" on any given day with no physiological significance at all.
The baseline approach requires data history — typically 3 to 4 weeks of consistent measurement before the personal average is stable enough to detect meaningful deviations. That's a setup cost. But without it, anomaly detection is just alert noise dressed up in health terminology.
How a 30-Day Rolling Baseline Works
The most robust approach uses a rolling 30-day window — the most recent 30 days of each metric — to establish your personal normal. The window moves forward daily, so recent data is always more weighted than older data.
For each metric, the baseline includes two parameters: the mean (your average value) and the standard deviation (how much your values typically vary day to day). An anomaly is flagged when today's reading falls outside a threshold — typically 1.5 to 2 standard deviations from your mean, depending on the metric's natural volatility.
One important nuance: the rolling mean should exclude days that are themselves flagged as anomalous. If you've been ill for a week, those suppressed HRV values shouldn't drag down the baseline for the following month. Good implementations freeze the baseline during an active anomaly window.
The Six Metrics Worth Monitoring
Not all Apple Health data is equally useful for anomaly detection. The metrics that give the clearest early signals are those that respond to physiological stress before it becomes subjectively apparent:
Metrya monitors all six on-device, building a personal baseline for each. No AI subscription required for baseline monitoring — it runs entirely locally, updated each morning as new HealthKit data comes in.
Pattern Recognition: What Different Combinations Mean
The real power of multi-metric anomaly detection is pattern recognition. A single metric deviation is usually noise. Two or more metrics moving together in a meaningful direction is a signal worth taking seriously. The interpretation depends on which combination is flagging:
| HRV | Resting HR | Deep Sleep | Resp Rate | SpO₂ | Most likely pattern | Confidence |
|---|---|---|---|---|---|---|
| Low | High | Low | High | Normal | Illness onset Immune activation — four-metric convergence is the clearest pre-illness pattern in the data |
High |
| Low | High | Normal | Normal | Normal | Training overreach or cumulative fatigue Classic recovery deficit; common after hard training blocks or under-recovery periods |
High |
| Low | Normal | Low | Normal | Normal | Psychological stress or alcohol HRV-sleep co-suppression without elevated HR points to psychological load or evening alcohol rather than physical stress |
Medium |
| Normal | High | Low | Normal | Normal | Post-hard workout recovery lag Elevated HR without suppressed HRV suggests ongoing cardiovascular recovery; expected after intense training |
Medium |
| Low | High | Low | High | Low | Active illness (confirmed) Five-metric convergence; you're likely already symptomatic or will be within hours |
High |
| Low | Normal | Normal | Normal | Normal | Isolated HRV suppression Often noise, one-time stressor, or delayed effect of yesterday's alcohol — investigate context before acting |
Low on its own |
The Early Warning Window
Research on HRV and illness onset consistently finds that HRV suppression precedes subjective illness symptoms by 24 to 48 hours in a meaningful proportion of cases. The mechanism is direct: immune activation triggers the release of cytokines, which modulate autonomic nervous system tone, which shows up in HRV before inflammation reaches the level where you feel it.
Respiratory rate elevation has a similar pre-symptomatic window — sometimes even shorter. In one study of elite athletes, researchers were able to identify viral illness 1–2 days before athletes reported any symptoms using a combination of elevated resting respiratory rate, suppressed HRV, and elevated resting heart rate.
The window is narrower for overtraining signals, which typically appear 2 to 5 days into an accumulated stress load rather than as a sudden pre-event marker. Seeing resting HR trend upward and HRV trend downward across a week is a different kind of warning — not "something is about to happen" but "you've been building a deficit and it's registering."
Distinguishing Illness from Overtraining from Stress
This is where context — the non-HealthKit data — becomes essential. Apple Health can tell you that your numbers look like an illness-onset or overtraining pattern. It can't tell you which without supplementary information.
Three context signals help disambiguate:
Training load in the preceding week. If HRV is suppressed after three consecutive hard workouts, overtraining is the most likely explanation. If you haven't trained hard but have been in high-stress meetings and sleeping six hours, psychological stress is more plausible. If neither applies, illness becomes the primary hypothesis.
Alcohol and late nutrition. Alcohol is one of the most consistent acute HRV suppressors — a glass of wine at 10pm will affect next-morning HRV reliably. If the anomaly follows an evening with alcohol, the explanation is usually banal. The problem is that alcohol suppression looks nearly identical to illness suppression in the raw metrics — distinguishing them requires logging the alcohol.
Respiratory rate and SpO₂. These are the metrics that most strongly differentiate illness from training fatigue. Overtraining depresses HRV and raises resting HR, but doesn't typically change respiratory rate or blood oxygen. Illness does. When respiratory rate or SpO₂ flags alongside the cardiovascular metrics, the illness interpretation becomes substantially more likely.
How to Respond When the System Flags Something
An anomaly alert is information, not a diagnosis. The appropriate response scales with the severity and pattern of the flag:
What Anomaly Detection Can't Tell You
Setting appropriate expectations is important. Wearable-based anomaly detection has real limitations:
- It cannot identify what is wrong — only that something is outside your normal pattern. The difference between a cold, a hard week, and sustained anxiety looks nearly identical in the raw numbers without context.
- It produces false positives — travel (time zones affect all metrics), hot weather (raises resting HR, suppresses HRV), and measurement artifact from a poorly-worn watch can all trigger flags with no physiological significance.
- Baselines take time to stabilize — four weeks of consistent overnight wear is the minimum before the personal baseline is reliable enough to make deviations meaningful. New watch users and people who recently changed their sleep schedule will see noisier flags.
- It is not designed to detect serious medical events — anomaly detection in a health and fitness app is not a clinical monitoring system. Chest pain, significant shortness of breath, or symptoms that concern you are reasons to contact a healthcare provider, not to check your HRV trend.
- Overtraining is a spectrum — the difference between productive training stress (which should suppress HRV temporarily) and damaging overreaching is a matter of degree that wearable data alone cannot definitively resolve.
On-Device, Private, Continuously Updated
Metrya's anomaly detection runs entirely on your iPhone. Each morning, as HealthKit delivers the previous night's data, the system updates all six baselines, computes deviation scores, and surfaces any meaningful flags — without sending your health data to a server.
No AI API key is required for baseline monitoring. The detection logic is rule-based, running on-device in line with Apple's HealthKit privacy model. The AI Advisor layer — which can explain a pattern, cross-reference multiple weeks of history, and suggest actionable responses — is optionally available for users who connect their own API key.
Over time, as your HealthKit history builds and your baseline stabilizes, the flags become more calibrated to your individual physiology. The system learns that your HRV spikes after rest days and dips after hard sessions — so those expected deviations get contextualized, and the alerts you do receive are genuinely unexpected.
Know before you feel it.
Metrya builds your personal baseline across six key metrics and flags meaningful deviations — entirely on your device. No server. No data sharing. Just your data, interpreted in your context.
Download Metrya Free