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.

"Population averages tell you nothing. What matters is the deviation from your baseline — and the pattern of which metrics moved together."

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.

Doesn't work
Population comparison
Comparing your HRV to average population values for your age and sex. Produces false alarms for naturally low-HRV individuals and missed signals for naturally high-HRV individuals.
Example: HRV of 28ms flagged as "low" for a 40-year-old — even if their personal average is 26ms and 28ms is actually a strong day for them.
Works
Personal baseline deviation
Comparing today's reading to your own rolling 30-day average. Deviations from personal normal are the signal — not absolute values. Context makes the flag meaningful.
Example: HRV of 52ms flagged as anomalous for someone whose 30-day average is 74ms — a 30% drop that represents a real departure from their norm.

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.

Why 30 days and not 7? A 7-day window is too short — one hard training week shifts the baseline enough to mask real deviations in the following week. A 90-day window responds too slowly to fitness improvements and changes in lifestyle. 30 days balances responsiveness to genuine change with resistance to noise from individual days.

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:

💓
HRV (overnight)
Drops 1–2 days before illness symptoms; also suppressed by alcohol, poor sleep, and hard training loads.
❤️
Resting Heart Rate
Elevates during immune activation and overreaching. Often rises 12–24 hours before subjective fatigue is noticed. Moving in the same direction as HRV strongly amplifies the signal.
😴
Deep Sleep Duration
Suppressed by illness, stress, alcohol, and late training. A reliable downstream indicator — the body's first response to any threat is often disrupted slow-wave sleep.
🫁
Respiratory Rate
Measured by Apple Watch during sleep. Elevated respiratory rate at rest is one of the clearest early markers of respiratory illness and acute physiological stress — often moves before other metrics.
🩸
Blood Oxygen (SpO₂)
Normally highly stable (95–100%). Significant drops — particularly when sustained across multiple sleep phases — indicate respiratory compromise or altitude effects.
🛏️
Sleep Duration + Efficiency
Total hours and time-asleep-to-time-in-bed ratio. Consistent short sleep creates a compounding stress load that shows up in HRV and resting HR over several days.

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.

What this means practically: When your anomaly detection flags the four-metric illness pattern, your best response isn't to soldier through an intense training session or a stressful work deadline. The window is small — 24–48 hours — and using it to reduce physiological load, prioritize sleep, and support your immune response may shorten the illness duration and severity. You're not sick yet. You have a narrow lead time.

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.

The annotation advantage: Apps that let you log lifestyle events — sleep quality, stress level, illness notes, alcohol — can use that context to calibrate anomaly interpretation. If Metrya knows you had alcohol last night (logged via the note system), the HRV flag is contextualized accordingly. Without logging, the system has to present the multi-metric pattern and leave interpretation to you.

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:

1
Note the specific pattern
Which metrics flagged? One, two, or five? A single HRV deviation is different from a four-metric convergence. The more metrics aligning, the more seriously to take the signal.
2
Check the obvious causes first
Alcohol, poor sleep, a hard training session, late-night eating, high ambient temperature during sleep. If any apply, they're likely the explanation. Hold off on adjusting plans for one day.
3
Reduce optional load
If the four-metric illness pattern flags and no obvious cause explains it, treat training as optional today. A missed session costs almost nothing. Training through early illness onset costs significantly more.
4
Prioritize sleep tonight
Regardless of cause, the most universally correct response to a multi-metric anomaly is to prioritize sleep. Sleep is where HRV recovers, immune function peaks, and tissue repair happens.
5
Watch the trend over 48 hours
One day of recovery often resolves a training fatigue pattern. Persistent multi-metric suppression across two to three consecutive days is a stronger signal worth investigating further.
6
Ask the AI for context
With an AI Advisor that has access to your HealthKit history, you can ask: "What's driving my HRV anomaly this week?" and get an answer cross-referencing your sleep, activity, and recent patterns — not a generic answer.

What Anomaly Detection Can't Tell You

Setting appropriate expectations is important. Wearable-based anomaly detection has real limitations:

The value proposition: Anomaly detection doesn't replace your judgment or your doctor. It gives you an early signal to pay attention — information that lets you make better decisions about training load, rest, and whether to monitor how you feel more carefully over the next 24 hours. Used as one input among several, it's genuinely useful. Used as a definitive verdict, it over-promises.

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