Governing Equations of Human Sleep Macro-Structure:Symbolic Discovery from 1,106 Nights

Junhui GaoarXiv 2026 · arXiv

This paper marks a transition in sleep science from qualitative description to quantitative law. By applying symbolic regression to over 1,100 nights of polysomnography data, the author distills the complex "macro-structure" of human sleep into four simple, closed-form governing equations.

TL;DR

Researchers have distilled the cycle-by-cycle evolution of human sleep into four precise mathematical laws using symbolic regression on a massive dataset of 1,106 nights. These equations quantify how deep sleep decays, REM fluctuates, and cycle lengths shorten, providing a falsifiable, quantitative framework that aligns perfectly with established biological models of sleep regulation.

What Problem Does This Paper Address?

For decades, our understanding of sleep "macro-structure"—how sleep stages change across the 4–6 cycles of a night—has been largely qualitative. We know "deep sleep is front-loaded" and "REM episodes get longer toward morning," but these are descriptive observations rather than mathematical laws.

While machine learning has become excellent at "micro-scale" sleep scoring (predicting the stage of a 30-second epoch), there has been a gap at the macro-scale. Without closed-form equations, researchers cannot easily compare sleep architecture across different datasets, link sleep patterns to specific physiological parameters, or rigorously falsify theories about how sleep is regulated. This paper seeks to move sleep science into the "AI-for-science" era by discovering the underlying "governing equations" of a night's rest.

Methods

The author developed a pipeline to move from raw sleep labels to mathematical discovery:

  1. Cycle Segmentation: The night is divided into "REM-anchored" cycles (the interval from one REM period to the next). This is a deterministic process that handles the "noise" of short interruptions in sleep stages.
  2. Feature Extraction: For each cycle $k$, four statistics are calculated: cycle length ($T$), total REM duration, the longest "run" of N3 (deep sleep), and the mean "run" of N1 (light sleep).
  3. Symbolic Discovery: The paper uses two complementary approaches to find the best-fitting equations:
  4. Library Fitting: Testing the data against six families of functions (linear, quadratic, exponential, etc.) and using AIC/BIC for model selection.
  5. Unconstrained Symbolic Regression (PySR): Using an evolutionary algorithm to search a much larger space of possible mathematical expressions without a pre-defined template.
  6. Generative Validation: To prove the laws are robust, the author built a "synthesizer" that uses these equations to generate 500 synthetic nights, then checked if the synthetic data matched the statistical properties of real human sleep.
Figure 1: Analysis pipeline. Stage labels from Sleep-EDF and SHHS are segmented into REM-anchored cycles; four cycle-indexed statistics are aggregated as per-cycle means, and two levels of library fitting (population means and per-night fits) plus an unconstrained PySR search converge on closed-form governing equations with bootstrap 95% CIs. The laws are validated by a 500-night synthesizer.

Datasets

The study utilized two major public repositories, totaling 1,106 nights and over 1.5 million 30-second epochs:

  • Sleep-EDF Expanded: 153 nights from healthy young adults.
  • Sleep Heart Health Study (SHHS): 953 nights from a community-based sample of older adults.

This age-mixed sample (ranging from 25 to 101 years old) allowed the author to test if the discovered laws held true across the human lifespan.

Key Insights and Ideas

  • The "Process S" Connection: The most striking finding is that N3 (deep sleep) run length decays exponentially with a time constant of 2.94 cycles. This matches the "Process S" (homeostatic sleep pressure) in the classic two-process model of sleep regulation. It suggests that the persistence of deep sleep is a direct, "cheap" observable for tracking homeostatic pressure without needing complex spectral analysis.
  • N1 is "Long–Short–Long": The paper confirms a U-shaped pattern for light sleep (N1). N1 runs are long early in the night (buffering the entry into sleep), shrink mid-night as sleep stabilizes, and reappear as longer, fragmented runs toward morning.
  • Individual vs. Population: The laws aren't just "averages" that mask individual variation. Differentiable fitting showed that these equations converge for almost every single night in the dataset, meaning they describe a fundamental individual-level regularity.

Key Results

The paper identifies four primary governing equations (where $x = k - 1$ and $k$ is the cycle index):

Statistic Equation $R^2$
Cycle length ($T$) $126.34 - 16.64x + 0.509x^2$ 0.996
REM duration $17.99 + 2.158x - 0.620x^2$ 0.873
N3 longest run $30.85 e^{-0.340x} - 4.68$ 0.987
N1 run length $2.469 - 0.280x + 0.075x^2$ 0.956

The study also found that aging significantly impacts the N3 law: as people age, the "level" of deep sleep ($a$) drops by 44%, and the "decay rate" ($b$) more than doubles, meaning sleep becomes both reduced and much more front-loaded.

Limitations and Future Work

  • Pathological Sleep: The current laws describe population medians and may not capture the architecture of patients with sleep apnea, narcolepsy, or those on specific medications.
  • Single-Night Noise: While the laws hold for individuals, estimating parameters from a single night can be noisy. Reliable individual parameters likely require averaging over multiple nights per subject.
  • Circadian Desynchrony: The paper does not explicitly model "naps" or shift-work scenarios where the homeostatic and circadian processes are out of alignment.

Future work could involve stratifying the SHHS dataset by age more granularly or applying this "discovery-and-generation" loop to other physiological time series like heart-rate variability or glucose dynamics.

Summary updated

Abstract

Human sleep is organized into a small number of cycles per night: deep sleep dominates early cycles, REM lengthens toward morning, and light sleep clusters at cycle boundaries. These regularities have long been described qualitatively but never distilled into closed-form laws from large-scale data. A total of 1,106 nights (Sleep-EDF 153 + SHHS 953) are segmented into REM-anchored cycles, and four cycle-indexed statistics follow simple closed-form equations: cycle length declines nearly linearly (R^2=0.996), REM duration follows an inverted U (R^2=0.873), deep-sleep (N3) run length decays exponentially (R^2=0.987) with a time constant of 2.94 cycles, consistent with the homeostatic Process S of the two-process model, and light-sleep (N1) run length follows a U shape (R^2=0.956), confirming a "long-short-long" pattern across the night. The laws are reproduced by per-night differentiable fitting (142/142 and 773/773 nights converge), by unconstrained symbolic regression (PySR), and by a 500-night generative synthesizer built from them. Their robustness is established against the two main methodological threats: bootstrap CIs computed by resampling whole nights (1,000 replications) exclude zero for every shape term, and a five-level scan of the REM-merge segmentation threshold preserves every qualitative form. These appear to be the first closed-form laws governing the macro-structure of sleep, distilled and tested across an age-mixed sample (healthy young adults and community-based older adults).
BibTeX
@misc{gao2026governing,
  author = {Junhui Gao},
  title = {{Governing Equations of Human Sleep Macro-Structure:Symbolic Discovery from 1,106 Nights}},
  year = {2026},
  eprint = {2611.00550},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.00550},
}
Figure