5D Library › 双过程睡眠架构、慢波胶质淋巴清除与体温节律相位控制 · English
第一章 睡眠压力、时钟,以及咖啡因到底做了什么
两个过程
双过程模型是关于「我们何时睡觉」最简单、却仍能作出定量预测的解释 (Borbély 1982; Daan et al. 1984)。稳态的过程 S 在清醒时上升、在睡眠时下降;它最著名的标志物是非快速眼动睡眠中脑电图的慢波活动——长时间清醒后它很高,整夜逐渐衰减。由视交叉上核产生的昼夜过程 C 设定两条在 24 小时内起伏的阈值。S 升到上阈值时睡眠开始,降到下阈值时睡眠结束。四十年的研究细化了这个模型,却没有推翻它的结构 (Borbély et al. 2016)。
推导
所用方程。 清醒时, 以时间常数 指数趋近 1:。睡眠时,它以 衰减趋近 0:。阈值为 与 。程序使用经典的示意时间常数 18.2 小时与 4.2 小时; 无量纲。
推导
# Chapter 1. Borbely's two-process model. Process S (sleep pressure) rises
# toward 1 while awake with time constant TAU_R and decays toward 0 while
# asleep with TAU_D. Process C sets two thresholds that oscillate over 24 h:
# sleep starts when S reaches the upper one, waking happens when S falls to
# the lower one. Parameters are the classical illustrative values (time
# constants 18.2 h and 4.2 h); S is dimensionless. Time step 1 minute; t = 0
# is midnight.
import math
TAU_R, TAU_D = 18.2, 4.2
# thresholds and their peak hour
H0, L0, AMP, PHASE = 0.67, 0.17, 0.10, 16.0
DT = 1.0 / 60
def thr(t, base):
return base + AMP * math.cos(2 * math.pi * (t - PHASE) / 24.0)
def run(days, no_sleep=None, s0=0.25, t0=7.0):
"""Simulate; returns list of (sleep_on, sleep_off, S_at_onset, area under
S asleep)."""
t, S, asleep = t0, s0, False
bouts, cur = [], None
while t < t0 + 24 * days:
if asleep:
S *= math.exp(-DT / TAU_D)
cur[3] += S * DT
if S <= thr(t, L0):
asleep = False
cur[1] = t
bouts.append(tuple(cur))
else:
S = 1 - (1 - S) * math.exp(-DT / TAU_R)
can_sleep = no_sleep is None or not (
no_sleep[0] <= t < no_sleep[1]
)
if S >= thr(t, H0) and can_sleep:
asleep = True
cur = [t, None, S, 0.0]
t += DT
return bouts
def clock(h):
h = h % 24
return "{:02d}:{:02d}".format(int(h), int(round((h - int(h)) * 60)) % 60)
if __name__ == "__main__":
b = run(10)
on, off, s_on, area = b[-1]
print("A. Entrained day (after 10 simulated days)")
print(
" sleep {} -> {} duration {:.2f} h\n S at onset {:.3f} S at"
" waking {:.3f}".format(
clock(on), clock(off), off - on, s_on, thr(off, L0)
)
)
base_dur, base_area = off - on, area
print("\nB. One night of total sleep deprivation, then recovery")
for extra in (0, 8, 16, 24):
bb = run(12, no_sleep=(on - 1, on + extra) if extra else None)
rec = [x for x in bb if x[0] >= on + extra - 0.5][0]
print(
" kept awake {:>2} h past usual bedtime: recovery sleep {} ->"
" {},\n {:.2f} h (x {:.2f} usual), S at onset {:.3f},"
" slow-wave proxy x {:.2f}".format(
extra,
clock(rec[0]),
clock(rec[1]),
rec[1] - rec[0],
(rec[1] - rec[0]) / base_dur,
rec[2],
rec[3] / base_area,
)
)
print(
"\nReading: hours of sleep lost are not repaid hour for hour."
" Recovery sleep"
)
print(
"is longer only modestly; most of the repayment is in intensity"
" (higher S at"
)
print(
"onset, more slow-wave activity), and the clock (Process C) ends it"
" on time."
)
# A. Entrained day (after 10 simulated days)
# sleep 23:27 -> 07:08 duration 7.68 h
# S at onset 0.633 S at waking 0.102
#
# B. One night of total sleep deprivation, then recovery
# kept awake 0 h past usual bedtime: recovery sleep 23:27 -> 07:08,
# 7.68 h (x 1.00 usual), S at onset 0.633, slow-wave proxy x 1.00
# kept awake 8 h past usual bedtime: recovery sleep 07:27 -> 12:29,
# 5.03 h (x 0.66 usual), S at onset 0.764, slow-wave proxy x 1.00
# kept awake 16 h past usual bedtime: recovery sleep 15:27 -> 22:37,
# 7.17 h (x 0.93 usual), S at onset 0.848, slow-wave proxy x 1.30
# kept awake 24 h past usual bedtime: recovery sleep 23:27 -> 07:58,
# 8.52 h (x 1.11 usual), S at onset 0.902, slow-wave proxy x 1.47
#
# Reading: hours of sleep lost are not repaid hour for hour. Recovery sleep
# is longer only modestly; most of the repayment is in intensity (higher S at
# onset, more slow-wave activity), and the clock (Process C) ends it on time.A 段是被昼夜节律锁定的一天:23:27 到 07:08 睡眠,共 7.68 小时,开始于压力达到 0.633 时。B 段是大多数人会弄错的结果。让人在平时就寝时间之后继续清醒,失去的小时不会按小时偿还。多醒 8 小时,补觉落在早上,而且比平常更短——5.03 小时,为平常的 0.66——因为昼夜阈值把它结束了。多醒整整一天,补觉也只是平常的 1.11 倍长,但入睡时的压力是 0.902 而不是 0.633,慢波代理量是平常的 1.47 倍。偿还主要体现在强度上,而不是时长上。
证据
关于恢复已知的情况。 剥夺后的睡眠更深、而不是按比例更长,慢波活动随先前清醒时间而上升——这是该模型的实证核心 (Borbély 1982; Daan et al. 1984; Borbély et al. 2016)。程序中的数字是模型的数字,不是对任何人的测量。
腺苷与咖啡因
在脑中承载过程 S 的是什么尚无定论,但腺苷是首要候选:在猫身上,基底前脑的细胞外腺苷在长时间清醒中上升、在恢复睡眠中下降 (Porkka-Heiskanen et al. 1997)。咖啡因阻断腺苷受体。它是 A1 与 A2A 受体的非选择性拮抗剂 (Fredholm et al. 1999);在小鼠中,它的促醒作用依赖 A2A 而不是 A1 受体 (Huang et al. 2005)。
竞争性拮抗剂并不清除激动剂;它只是占据了激动剂本会使用的部分受体。所以模型把腺苷占据的受体份额写成 ,并假定感到的困意跟随这个份额。咖啡因以其自身解离常数为单位表示;本书任何地方都不涉及剂量。
推导
# Chapter 1. Caffeine as a competitive antagonist at adenosine receptors.
# Adenosine (proportional to Process S) and caffeine compete for the same
# receptor; the share of receptors occupied by adenosine is
# occ = A / (A + KA x (1 + C / KC)) (competitive binding)
# Felt sleepiness is taken to follow occ, not A. Caffeine follows
# one-compartment elimination with half-life 3 h ("fast") or 8 h ("slow");
# concentrations are expressed in units of KC, with a peak of 2.0 KC one hour
# after intake. No doses are implied. The two-process model of p01 supplies A;
# slow-wave activity in the first three hours of sleep is taken, as a working
# hypothesis, to scale with adenosine occupancy.
import math
TAU_R, TAU_D = 18.2, 4.2
KA = 0.5
PEAK = 2.0
def caffeine(t, intake, half):
if t < intake:
return 0.0
k = math.log(2) / half
ka = 3.0 # absorption rate per hour (fast)
# Bateman function scaled so the peak is about PEAK
raw = (math.exp(-k * (t - intake)) - math.exp(-ka * (t - intake)))
tmax = math.log(ka / k) / (ka - k)
rmax = math.exp(-k * tmax) - math.exp(-ka * tmax)
return PEAK * raw / rmax
def occ(A, C):
return A / (A + KA * (1 + C))
def S_awake(hours_awake, s_wake=0.10):
return 1 - (1 - s_wake) * math.exp(-hours_awake / TAU_R)
if __name__ == "__main__":
wake, bed = 7.0, 23.0
A_bed = S_awake(bed - wake)
print(
"A. Adenosine pressure at 23:00 is the same with or without caffeine:"
)
print(" S = {:.3f}".format(A_bed))
print(
" felt pressure (occupancy) at 23:00, by intake time and half-life"
)
print(
" intake half-life caffeine left at 23:00 (x KC) occupancy "
" vs none"
)
base = occ(A_bed, 0.0)
for intake in (8.0, 14.0, 17.0):
for half in (3.0, 8.0):
c = caffeine(bed, intake, half)
o = occ(A_bed, c)
print(
" {:02d}:00 {:3.0f} h {:6.3f} "
" {:.3f} {:5.1%}".format(
int(intake), half, c, o, o / base - 1
)
)
print(
" no caffeine {:.3f}"
.format(base)
)
print(
"\nB. Working hypothesis: slow-wave activity over the first 3 h of"
" sleep"
)
print(
" scales with adenosine occupancy. Predicted change vs no caffeine:"
)
for intake in (8.0, 14.0, 17.0):
row = []
for half in (3.0, 8.0):
tot = tot0 = 0.0
for i in range(180):
t = bed + i / 60
A = A_bed * math.exp(-(i / 60) / TAU_D)
tot += occ(A, caffeine(t, intake, half))
tot0 += occ(A, 0.0)
row.append(tot / tot0 - 1)
print(
" intake {:02d}:00 fast (3 h) {:+6.1%} slow (8 h) {:+6.1%}"
.format(int(intake), *row)
)
print(
"\nC. After an 08:00 intake (3 h half-life): felt pressure climbs"
" faster as"
)
print(
" caffeine clears, because the masked pressure is unmasked on"
" top of"
)
print(" the rise")
print(
" time adenosine S felt felt without rise of felt over 2 h"
)
print(" caffeine (with / without)")
prev = None
for h in (9, 11, 13, 15, 17, 19):
A = S_awake(h - wake)
f, f0 = occ(A, caffeine(h, 8.0, 3.0)), occ(A, 0.0)
rise = (
""
if prev is None
else "{:+.3f} / {:+.3f}".format(f - prev[0], f0 - prev[1])
)
print(
" {:02d}:00 {:.3f} {:.3f} {:.3f} {}"
.format(
h, A, f, f0, rise
).rstrip()
)
prev = (f, f0)
print(
"\nReading: caffeine lowers how much of the pressure is felt, not the"
" pressure."
)
print(
"As it clears, the full accumulated pressure is felt again; the"
" slower the"
)
print(
"clearance, the more of it is still masking adenosine when sleep"
" begins."
)
# A. Adenosine pressure at 23:00 is the same with or without caffeine:
# S = 0.626
# felt pressure (occupancy) at 23:00, by intake time and half-life
# intake half-life caffeine left at 23:00 (x KC) occupancy vs none
# 08:00 3 h 0.084 0.536 -3.6%
# 08:00 8 h 0.624 0.435 -21.7%
# 14:00 3 h 0.335 0.484 -13.0%
# 14:00 8 h 1.049 0.379 -31.8%
# 17:00 3 h 0.671 0.428 -22.9%
# 17:00 8 h 1.361 0.347 -37.7%
# no caffeine 0.556
#
# B. Working hypothesis: slow-wave activity over the first 3 h of sleep
# scales with adenosine occupancy. Predicted change vs no caffeine:
# intake 08:00 fast (3 h) -3.1% slow (8 h) -22.5%
# intake 14:00 fast (3 h) -11.3% slow (8 h) -32.8%
# intake 17:00 fast (3 h) -20.3% slow (8 h) -38.7%
#
# C. After an 08:00 intake (3 h half-life): felt pressure climbs faster as
# caffeine clears, because the masked pressure is unmasked on top of
# the rise
# time adenosine S felt felt without rise of felt over 2 h
# caffeine (with / without)
# 09:00 0.194 0.114 0.279
# 11:00 0.278 0.192 0.357 +0.077 / +0.078
# 13:00 0.353 0.277 0.414 +0.085 / +0.057
# 15:00 0.420 0.354 0.457 +0.078 / +0.043
# 17:00 0.480 0.418 0.490 +0.064 / +0.033
# 19:00 0.535 0.469 0.517 +0.050 / +0.027
#
# Reading: caffeine lowers how much of the pressure is felt, not the pressure.
# As it clears, the full accumulated pressure is felt again; the slower the
# clearance, the more of it is still masking adenosine when sleep begins.A 段把要点说得很直白:无论白天喝了什么,23:00 的腺苷压力都是 0.626。改变的只是其中被感到的部分。半衰期 3 小时时,早上摄入到就寝时几乎不剩(感到的压力 −3.6%)。半衰期 8 小时时,同样的早上摄入仍掩盖了 −21.7%,17:00 的摄入则掩盖 −37.7%。
B 段在一个明确声明的工作假设——慢波活动与腺苷占据率成正比——之下,把这一点变成对睡眠头三个小时的预测:快代谢者早上摄入为 −3.1%,慢代谢者为 −22.5%;17:00 摄入则为 −20.3% 与 −38.7%。半衰期比摄入时间本身更要紧:慢代谢者 08:00 的一杯,作用大约相当于快代谢者 17:00 的一杯。
C 段就是所谓的「崩溃」。咖啡因降低了感到的压力,但压力在下面照样累积。随着咖啡因清除,被掩盖的压力在持续上升之上被揭开,所以感到的压力比不喝咖啡时上升得更快:13:00 到 15:00 之间为 +0.078,对 +0.043。
证据
关于咖啡因与睡眠已知的情况。 健康成年人之间咖啡因的消除半衰期相差数倍;吸烟使它缩短,怀孕和包括口服避孕药在内的一些药物使它延长,肝酶 CYP1A2 的遗传差异也有作用 (Nehlig 2018)。研究表明早上摄入的咖啡因会影响当晚的睡眠及其脑电频谱 (Landolt et al. 1995);在一项对照研究中,即使在就寝前六小时摄入,咖啡因也可测地减少了睡眠 (Drake et al. 2013)。
假说 · 尚未验证
作者的假说(尚未验证): 在习惯摄入时间相同的成年人中,下午摄入咖啡因后第一个睡眠周期慢波活动的下降,在慢代谢者中更大;下降的幅度由熄灯时估计的残余咖啡因预测,好于由摄入的钟点预测。什么结果会证明它错:估计残余咖啡因与慢波活动的变化无关,或者这种关系完全可以用摄入时间解释。
小结
在双过程模型中,睡眠压力清醒时上升、睡眠时下降,昼夜时钟设定睡眠开始与结束的水平。失去的睡眠主要以强度偿还:多醒整整一天,补觉只延长约十分之一,入睡压力与慢波代理量却提高约一半;错过一夜后在早上补觉,睡得很短,因为时钟把它结束了。咖啡因作为竞争性拮抗剂并不清除腺苷;它降低被感到的份额,而随着咖啡因清除,这份额会回来——而且比不喝时回来得更快。就寝时还有多少被掩盖,至少同样取决于半衰期,而不只是最后一杯的时间。
参考文献
Fan, Y. (2026). Two-Process Sleep Architecture, Slow-Wave Glymphatic Clearance and Thermoregulatory Phase Control: Adenosine Homeostasis, Flip-Flop Switch Bistability, Core-Distal Heat Flux and Sleep-Stage Markov Chains [双过程睡眠架构、慢波胶质淋巴清除与体温节律相位控制] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090162 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).