FacePhys: State of the Heart Learning

Jack Tang, Kegang Wang, Yuntao Wang, Xin Liu, Yuxuan Fan, Jiatong Ji, Yuanchun Shi, Daniel McDuffNeurIPS 2026

TL;DR

Every time your heart beats, your face subtly changes color—a signal invisible to the human eye, yet detectable by an ordinary camera. Historically, extracting this pulse reliably required heavy deep learning models that had to buffer long video clips, making private, real-time smartphone monitoring nearly impossible. FacePhys solves this by treating the heartbeat as a continuous physical oscillator inside a lightweight State Space Model, cutting heart rate estimation errors nearly in half while running in under 10 milliseconds per frame inside a mobile web browser.

What Problem Does This Paper Address?

Measuring cardiac activity from video—known as remote photoplethysmography (rPPG)—sounds like magic, until you try to deploy it in the real world. Ideally, you want rPPG running directly on-device (like your phone) for two big reasons: privacy (nobody wants raw video of their face and vital signs streamed to the cloud) and physics (standard video compression destroys the microscopic color fluctuations needed to read a pulse).

However, disentangling a tiny pulse signal from head motion and flickering room lights requires deep learning. Existing architectures force an awkward trade-off:

  • 3D CNNs have limited temporal receptive fields, struggling with long-range patterns.
  • Transformers capture long-range dependencies well, but their quadratic memory complexity forces engineers to chop videos into short, 6-second chunks—losing long-term rhythm context and eating up hundreds of megabytes of RAM.

How do you build a model that remembers long-range cardiac rhythms, processes video frame-by-frame in real time, and fits comfortably in a smartphone's memory?

Methods

Instead of treating pulse extraction as a generic sequence-prediction problem, the authors model the heart for what it actually is: a continuous-time dynamical system.

FacePhys is built on a Linear Time-Invariant (LTI) State Space Model (SSM) leveraging Structured State Space Duality (SSD)—the mathematical insight behind recent architectures like Mamba-2. During training, the model behaves like a parallelized linear-attention network over long video sequences; during inference, it switches to a tiny, constant-memory recurrent loop that updates a hidden "heart state" one frame at a time.

What makes FacePhys uniquely tailored to physiology are three design choices:

  1. Decoupled Spatial-Temporal Modeling (TSD): Rather than crunching 3D video cubes all at once, it uses standard 2D convolutions to extract spatial facial features and SSMs to track how they evolve over time.
  2. Complex Diagonal Transition Matrix: Standard modern SSMs restrict their state-transition matrices to real numbers for speed, which mathematically suppresses oscillations (only allowing exponential decay). FacePhys reintroduces trainable complex eigenvalues along the diagonal. Because complex exponentials produce sines and cosines, this bakes natural "periodic attention" directly into the model without sacrificing linear computational speed.
  3. Temporal Normalization (TN): To prevent lighting shifts or slow drifts from overwhelming the signal, pixels are detrended and standardized over time—computed via least-squares in parallel during training, and swapped for a zero-buffer Recursive Moving Average (RMA) during live streaming.
Figure 3: Periodic attention. Introducing trainable com- plex numbers into the diagonalized state transition matrix generates oscillatory terms for periodic attention.

Finally, standard spectral analysis (FFT/PSD) is applied over a sliding window of the predicted waveform to output the heart rate in beats per minute (BPM).

Datasets

No new datasets were introduced; instead, the authors evaluated FacePhys across five diverse, established benchmarks to test both accuracy and cross-domain generalization:

  • UBFC-rPPG (43 videos, controlled indoor lighting) and PURE (59 videos, structured head movements).
  • RLAP-rPPG (58 subjects, high-synchronization recordings).
  • MMPD (660 videos featuring challenging, real-world lighting, motion, and activities).
  • VitalVideo (the largest benchmark, spanning 893 subjects with varied skin tones).

Key Insights and Ideas

  • Physiology belongs in the math: Look at the latent embeddings below—while the previous state-of-the-art Mamba model scatters pulse representations chaotically, FacePhys's complex-valued LTI system naturally organizes the heartbeat into a clean, cyclical loop.
  • Longer training sequences matter: Because FacePhys doesn't blow up in memory, the authors could train on 1,600-frame sequences (~53 seconds) instead of standard ~180-frame clips. Ablations proved that seeing longer horizons during training directly translates to lower error at test time.
  • Self-healing state: When the authors deliberately replaced 1 second of video with pure random noise during live streaming, the recurrent hidden state didn't permanently derail—it snapped back to tracking the true pulse within an average of 0.92 seconds.

(Note: Referencing the overall comparison below for clarity on both embeddings and speed!)

Figure 1: The FacePhys State Space Model, provides an effective representation of the cyclical nature of heart beats, as shown by the latent embeddings (A), combining high accuracy (B-i) and high efficiency (B-ii). We achieve gains of 49% in heart rate estimation and 83% in per-frame latency compared to the current state-of-the-art.

Key Results

FacePhys achieves a rare "best of both worlds" sweep across accuracy and efficiency on CPUs:

  • Tiny & Fast: It uses just 3.6 MB of memory (an 83% to 98.4% reduction compared to baselines like PhysFormer and RhythmMamba) and runs at 9.46 ms per frame on a CPU (0.15 GFLOPs)—easily outpacing 30 fps camera capture (33.3 ms) and reducing latency by 83%–99%.
  • Intra- & Cross-Dataset Accuracy: Up to a 49% overall reduction in heart rate estimation error. When trained on RLAP and tested zero-shot on the grueling MMPD dataset, FacePhys achieved a Mean Absolute Error (MAE) of 5.30 BPM (a 42.3% improvement over the best baseline). On the massive VitalVideo dataset, cross-dataset MAE dropped to 0.77 BPM.

Limitations and Future Work

  • Frequency-domain lag: While FacePhys outputs a pulse waveform sample in 9.46 ms per frame, turning that wave into a stable heart rate via FFT still requires accumulating a multi-second time window (e.g., ~5 seconds to get under 2 BPM error), and strictly causal frame-by-frame processing cannot peek at future frames to smooth out sudden glitches.
  • Clinical validation: Testing was limited to research datasets rather than hospital settings with patients suffering from cardiovascular arrhythmias.
  • Next steps: The authors plan to extend this lightweight state-space framework to estimate blood pressure and blood oxygen ($SpO_2$), and explore fusing RGB video with thermal cameras or IMU motion sensors.

Summary updated

Abstract

Vital sign measurement using cameras presents opportunities for comfortable, ubiquitous health monitoring. Remote photoplethysmography (rPPG), a foundational technology, enables cardiac measurement through minute changes in light reflected from the skin. However, practical deployment is limited by the computational constraints of performing analysis on front-end devices and the accuracy degradation of transmitting data through compressive channels that reduce signal quality. We propose a memory efficient rPPG algorithm - FacePhys - built on a Linear Time-Invariant (LTI) state space model with temporal-spatial duality, which resolves the trilemma of model scalability, cross-dataset generalization, and real-time operation. Leveraging a transferable heart state, FacePhys captures subtle periodic variations across video frames through streaming per-frame waveform inference, enabling training on extended video sequences and supporting low-latency operation. FacePhys establishes a new state-of-the-art, with a substantial 49\% reduction in heart rate estimation error. Our solution enables streaming waveform inference with a memory footprint of 3.6 MB and per-frame latency of 9.46 ms -- surpassing existing methods by 83\% to 99\%. A real-time demo is available at facephys.com.
BibTeX
@inproceedings{tang2026facephys,
  author = {Jack Tang and Kegang Wang and Yuntao Wang and Xin Liu and Yuxuan Fan and Jiatong Ji and Yuanchun Shi and Daniel McDuff},
  title = {{FacePhys: State of the Heart Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=ftGKpah4gM},
}
Figure