5D Library › 五节点循环网络动力学、黄经历表与多尺度振子扰动 · English

第五章 有限观测:可辨识性、黄金比方向与极值时刻的预报

参数从哪里来

第四章说,已知参数时,未来的能量极值是算出来的。但参数从来不是已知的:它们要从一段有限、带噪声的观测中估计。本章问两个问题:一段观测记录能确定哪些参数组合,确定不了哪些?参数不确定时,未来与过去窗口里极值的时刻有多可靠?

费希尔信息与「松弛」方向

推导

费希尔信息矩阵。 只观测节点 0,每月一次,噪声标准差 σ=0.05\sigma = 0.05。记录对参数 θ=(c1,c2,μ)\theta = (c_1, c_2, \mu) 的灵敏度矩阵为 SS(用中心差分算出),费希尔信息 F=S⊤S/σ2F = S^{\top}S/\sigma^2,其逆给出估计的协方差下界。FF 的小特征值对应的方向,就是记录几乎无法分辨的参数组合 (Raue et al. 2009; Gutenkunst et al. 2007)。

推导

由对称性预言的方向。 循环环的记录只通过特征值 λ1\lambda_1、λ2\lambda_2 依赖参数。保持 λ1\lambda_1 不变(实部与虚部各一个条件)的参数变化方向满足 dc2=φdc1\mathrm{d}c_2 = \varphi\,\mathrm{d}c_1、dμ=φdc1\mathrm{d}\mu = \varphi\,\mathrm{d}c_1,其中 φ=(1+5)/2\varphi = (1 + \sqrt5)/2。沿这个方向,只有衰减很快的模 2 还在变化,所以它应当是记录最难分辨的方向。

推导

# Chapter 5. p10: What a finite record can tell about (c1, c2, mu).
# The damped, forced ring of p08 (true c1 = 1, c2 = 0.5, mu = mu_c + 0.1,
# rates x10 per year, forcing = 20-yr square wave + 1-yr sine into node 0,
# out of node 2). Only node 0 is observed, monthly, with noise sd 0.05,
# for T years. The Fisher information F = S^T S / sd^2 uses sensitivities
# S from central differences of the simulated record. Its eigenvalues
# (Jacobi rotations) show which parameter combinations the record pins
# down. Prediction: in a circulant ring the record depends on the
# parameters only through lambda_1 and lambda_2; holding lambda_1 fixed
# leaves the direction (1, phi, phi), phi = 1.618, constrained only by
# the fast-decaying mode 2.
import cmath
import math

W = cmath.exp(2j * math.pi / 5)
SCALE, SD = 10.0, 0.05
TRUE = (1.0, 0.5, math.cos(math.radians(72))
        + 0.5 * math.cos(math.radians(36)) + 0.1)
B = [1.0, 0.0, -1.0, 0.0, 0.0]

def record(th, years, h=0.01):
    c1, c2, mu = th
    def f(y, t):
        u = ((1.0 if int(t // 10) % 2 == 0 else -1.0)
             + math.sin(2 * math.pi * t))
        return [SCALE / 5 * (c1 * y[(i - 1) % 5] - c2 * y[(i - 2) % 5]
                             - mu * y[i]) + B[i] * u for i in range(5)]
    y, out, n = [0.0] * 5, [], 0
    per = int(round(1 / 12 / h))
    while n * h < years - 1e-9:
        t = n * h
        k1 = f(y, t)
        k2 = f([a + h / 2 * b for a, b in zip(y, k1)], t + h / 2)
        k3 = f([a + h / 2 * b for a, b in zip(y, k2)], t + h / 2)
        k4 = f([a + h * b for a, b in zip(y, k3)], t + h)
        y = [a + h / 6 * (b + 2 * c + 2 * d + e)
             for a, b, c, d, e in zip(y, k1, k2, k3, k4)]
        n += 1
        if n % per == 0:
            out.append(y[0])
    return out

def fisher(years, d=1e-4):
    cols = []
    for k in range(3):
        up = list(TRUE)
        dn = list(TRUE)
        up[k] += d
        dn[k] -= d
        a, b = record(up, years), record(dn, years)
        cols.append([(x - y) / (2 * d) for x, y in zip(a, b)])
    return [[sum(p * q for p, q in zip(cols[i], cols[j])) / SD ** 2
             for j in range(3)] for i in range(3)]

def jacobi(m):
    a = [row[:] for row in m]
    v = [[float(i == j) for j in range(3)] for i in range(3)]
    for _ in range(100):
        p, q = max(((i, j) for i in range(3) for j in range(i + 1, 3)),
                   key=lambda ij: abs(a[ij[0]][ij[1]]))
        if abs(a[p][q]) < 1e-14 * (abs(a[p][p]) + abs(a[q][q])):
            break
        th = 0.5 * math.atan2(2 * a[p][q], a[q][q] - a[p][p])
        c, s = math.cos(th), math.sin(th)
        for k in range(3):
            akp, akq = a[k][p], a[k][q]
            a[k][p], a[k][q] = c * akp - s * akq, s * akp + c * akq
        for k in range(3):
            apk, aqk = a[p][k], a[q][k]
            a[p][k], a[q][k] = c * apk - s * aqk, s * apk + c * aqk
        for k in range(3):
            vkp, vkq = v[k][p], v[k][q]
            v[k][p], v[k][q] = c * vkp - s * vkq, s * vkp + c * vkq
    return [a[i][i] for i in range(3)], [[v[r][c] for r in range(3)]
                                         for c in range(3)]

def inv3(m):
    det = (m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1])
           - m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0])
           + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]))
    cof = [[(m[(i + 1) % 3][(j + 1) % 3] * m[(i + 2) % 3][(j + 2) % 3]
             - m[(i + 1) % 3][(j + 2) % 3] * m[(i + 2) % 3][(j + 1) % 3])
            for i in range(3)] for j in range(3)]
    return [[cof[i][j] / det for j in range(3)] for i in range(3)]

if __name__ == "__main__":
    phi = (1 + math.sqrt(5)) / 2
    nrm = math.sqrt(1 + 2 * phi * phi)
    g = [1 / nrm, phi / nrm, phi / nrm]
    print("predicted sloppy direction (1, phi, phi)/norm = {}".format(
        [round(x, 4) for x in g]))
    for years in (20, 60):
        f = fisher(years)
        ev, vec = jacobi(f)
        order = sorted(range(3), key=lambda i: ev[i])
        cov = inv3(f)
        se = [math.sqrt(cov[i][i]) for i in range(3)]
        lo = vec[order[0]]
        lo = [x if lo[0] >= 0 else -x for x in lo]
        cosang = abs(sum(a * b for a, b in zip(lo, g)))
        print("\nrecord of {} years ({} monthly points)".format(
            years, 12 * years))
        print("   Fisher eigenvalues: {}".format(
            ", ".join("{:.3e}".format(ev[i]) for i in order)))
        print("   condition number {:.1f}".format(
            ev[order[2]] / ev[order[0]]))
        print("   sloppiest direction {}".format([round(x, 4) for x in lo]))
        print("   |cos| with the predicted direction {:.6f}".format(cosang))
        print("   standard errors c1 {:.4f}  c2 {:.4f}  mu {:.4f}"
              .format(*se))
        r = cov[0][1] / (se[0] * se[1])
        print("   correlation of c1 and c2 estimates {:+.4f}".format(r))
    print("\nReading: the record pins down two combinations well and the")
    print("third poorly, and the poorly fixed one is the golden-ratio")
    print("direction the ring's symmetry predicts. Each parameter alone")
    print("has a wide error bar while their combination is sharp - a")
    print("'sloppy' model in the sense of Gutenkunst et al.; a longer")
    print("record narrows every bar but not the imbalance.")
# predicted sloppy direction (1, phi, phi)/norm = [0.4004, 0.6479, 0.6479]
#
# record of 20 years (240 monthly points)
#    Fisher eigenvalues: 6.110e+01, 4.518e+05, 6.942e+05
#    condition number 11361.2
#    sloppiest direction [0.3982, 0.6476, 0.6496]
#    |cos| with the predicted direction 0.999996
#    standard errors c1 0.0510  c2 0.0829  mu 0.0831
#    correlation of c1 and c2 estimates +0.9994
#
# record of 60 years (720 monthly points)
#    Fisher eigenvalues: 1.898e+02, 1.355e+06, 2.064e+06
#    condition number 10874.8
#    sloppiest direction [0.3976, 0.6476, 0.65]
#    |cos| with the predicted direction 0.999994
#    standard errors c1 0.0289  c2 0.0470  mu 0.0472
#    correlation of c1 and c2 estimates +0.9994
#
# Reading: the record pins down two combinations well and the
# third poorly, and the poorly fixed one is the golden-ratio
# direction the ring's symmetry predicts. Each parameter alone
# has a wide error bar while their combination is sharp - a
# 'sloppy' model in the sense of Gutenkunst et al.; a longer
# record narrows every bar but not the imbalance.

预言的方向是 (0.4004, 0.6479, 0.6479)。二十年记录(240 个月度数据点)的费希尔矩阵的最小特征值是 6.110e+01,最大的是 6.942e+05,条件数 11361.2;最松弛的方向是 (0.3982, 0.6476, 0.6496),与预言方向的夹角余弦 0.999996。对称性事先告诉了我们记录会分辨不清哪个方向——又是黄金比。

后果是:c1c_1、c2c_2、μ\mu 单独看,标准误分别是 0.0510、0.0829、0.0831,但 c1c_1 与 c2c_2 估计值的相关系数高达 +0.9994:每个参数都模糊,它们的组合却很清楚。这正是 Gutenkunst 等人所说的「松弛」模型。把记录延长到六十年,所有标准误都缩小了(0.0289、0.0470、0.0472),但条件数几乎不变(10874.8):更长的记录收窄每一根误差棒,却不改变它们之间的失衡。

极值时刻:被强迫锁定,还是自由漂移

推导

# Chapter 5. p11: How sure are the dates of future and past energy peaks?
# Parameter uncertainty from a 20-year record (the Fisher information of
# p10, recomputed here), 100 parameter draws from N(theta, F^-1).
# A. Forced, damped ring (as p08): for each draw, the time and height of
#    the largest energy peak in a past window (60-80 yr) and two future
#    windows (120-140, 140-160 yr).
# B. A free oscillation instead (no forcing, just past its Hopf point):
#    the period near threshold is 2 pi 5 / (10 |Im lambda_1|) years, and
#    a peak H years ahead is uncertain by about H sd(period) / period.
import cmath
import math
import random

W = cmath.exp(2j * math.pi / 5)
SCALE, SD = 10.0, 0.05
TRUE = (1.0, 0.5, math.cos(math.radians(72))
        + 0.5 * math.cos(math.radians(36)) + 0.1)
B = [1.0, 0.0, -1.0, 0.0, 0.0]

def run(th, years, h, sample=None):
    c1, c2, mu = th
    def f(y, t):
        u = ((1.0 if int(t // 10) % 2 == 0 else -1.0)
             + math.sin(2 * math.pi * t))
        return [SCALE / 5 * (c1 * y[(i - 1) % 5] - c2 * y[(i - 2) % 5]
                             - mu * y[i]) + B[i] * u for i in range(5)]
    y, out, n = [0.0] * 5, [], 0
    while n * h < years - 1e-9:
        t = n * h
        k1 = f(y, t)
        k2 = f([a + h / 2 * b for a, b in zip(y, k1)], t + h / 2)
        k3 = f([a + h / 2 * b for a, b in zip(y, k2)], t + h / 2)
        k4 = f([a + h * b for a, b in zip(y, k3)], t + h)
        y = [a + h / 6 * (b + 2 * c + 2 * d + e)
             for a, b, c, d, e in zip(y, k1, k2, k3, k4)]
        n += 1
        if sample is None:
            out.append(((n * h), sum(v * v for v in y)))
        elif n % sample == 0:
            out.append(y[0])
    return out

def fisher(years=20, d=1e-4):
    cols = []
    for k in range(3):
        up, dn = list(TRUE), list(TRUE)
        up[k] += d
        dn[k] -= d
        a, b = run(up, years, 0.01, 8), run(dn, years, 0.01, 8)
        cols.append([(x - y) / (2 * d) for x, y in zip(a, b)])
    return [[sum(p * q for p, q in zip(cols[i], cols[j])) / SD ** 2
             for j in range(3)] for i in range(3)]

def chol_of_inverse(f):
    det = (f[0][0] * (f[1][1] * f[2][2] - f[1][2] * f[2][1])
           - f[0][1] * (f[1][0] * f[2][2] - f[1][2] * f[2][0])
           + f[0][2] * (f[1][0] * f[2][1] - f[1][1] * f[2][0]))
    c = [[(f[(j + 1) % 3][(i + 1) % 3] * f[(j + 2) % 3][(i + 2) % 3]
           - f[(j + 1) % 3][(i + 2) % 3] * f[(j + 2) % 3][(i + 1) % 3]) / det
          for j in range(3)] for i in range(3)]
    l = [[0.0] * 3 for _ in range(3)]
    for i in range(3):
        for j in range(i + 1):
            s = c[i][j] - sum(l[i][k] * l[j][k] for k in range(j))
            l[i][j] = math.sqrt(s) if i == j else s / l[j][j]
    return l

def sd(v):
    m = sum(v) / len(v)
    return math.sqrt(sum((x - m) ** 2 for x in v) / (len(v) - 1))

if __name__ == "__main__":
    rng = random.Random(60011)
    l = chol_of_inverse(fisher())
    draws = []
    for _ in range(100):
        z = [rng.gauss(0, 1) for _ in range(3)]
        draws.append(tuple(TRUE[i] + sum(l[i][k] * z[k] for k in range(3))
                           for i in range(3)))
    wins = ((60, 80), (120, 140), (140, 160))
    times = {w: [] for w in wins}
    highs = {w: [] for w in wins}
    for th in draws:
        e = run(th, 160, 0.02)
        for lo, hi in wins:
            t, v = max(((t, v) for t, v in e if lo <= t <= hi),
                       key=lambda r: r[1])
            times[(lo, hi)].append(t)
            highs[(lo, hi)].append(v)
    print("A. forced, damped ring: largest energy peak per window")
    print("   window (yr)   mean time   sd time (yr)   mean height  sd")
    for w in wins:
        print("   {:3d}-{:3d}       {:8.2f}      {:7.3f}       {:7.3f}"
              "   {:.3f}".format(w[0], w[1], sum(times[w]) / 100,
                                sd(times[w]), sum(highs[w]) / 100,
                                sd(highs[w])))
    pers = [2 * math.pi * 5 / (SCALE * abs((c1 * W ** -1
                                             - c2 * W ** -2).imag))
            for c1, c2, _ in draws]
    mp, sp = sum(pers) / 100, sd(pers)
    print("\nB. free oscillation: period {:.3f} +- {:.3f} yr".format(mp, sp))
    for hz in (20, 50, 100):
        print("   peak {:3d} yr ahead: timing sd about {:.2f} yr".format(
            hz, hz * sp / mp))
    print("\nReading: a forced, damped ring keeps time with its forcing, so")
    print("a peak 140 years out is dated as well as one 60 years back -")
    print("every draw puts it on the same 0.02-yr time step - and only")
    print("its height is uncertain. A free oscillation keeps its own")
    print("time, and its timing error grows in proportion to the horizon.")
    print("Which kind of system one has is the first question.")
# A. forced, damped ring: largest energy peak per window
#    window (yr)   mean time   sd time (yr)   mean height  sd
#     60- 80          72.04        0.000         4.130   0.022
#    120-140         132.04        0.000         4.130   0.022
#    140-160         152.04        0.000         4.130   0.022
#
# B. free oscillation: period 4.782 +- 0.011 yr
#    peak  20 yr ahead: timing sd about 0.05 yr
#    peak  50 yr ahead: timing sd about 0.12 yr
#    peak 100 yr ahead: timing sd about 0.23 yr
#
# Reading: a forced, damped ring keeps time with its forcing, so
# a peak 140 years out is dated as well as one 60 years back -
# every draw puts it on the same 0.02-yr time step - and only
# its height is uncertain. A free oscillation keeps its own
# time, and its timing error grows in proportion to the horizon.
# Which kind of system one has is the first question.

A 段从二十年记录的不确定性中抽取 100 组参数,对每组模拟受强迫的阻尼环,找出三个窗口里最大能量峰的时刻。结果是:过去窗口(60 到 80 年)的峰在 72.04 年,未来窗口的峰在 132.04 年与 152.04 年,三者在所有抽样中都落在同一个 0.02 年的时间步上,时刻标准差为 0.000;不确定的只是峰的高度(4.130,标准差 0.022)。受强迫的阻尼系统跟着强迫走,140 年后的峰与 60 年前的峰一样可以确定日期。

B 段换成一个自由振荡(没有强迫,刚越过 Hopf 点)。它按自己的周期走,周期估计为 4.782 ± 0.011 年;预报 20 年后的峰,时刻标准差约 0.05 年,50 年后约 0.12 年,100 年后约 0.23 年——误差与预报距离成正比。

这是对提纲「预测未来与过去时间窗口内的能量波峰与波谷」的诚实回答:能否预报极值的时刻,首先取决于系统是被外部节奏锁定的阻尼系统,还是按自己节奏运行的自由振荡。前者的时刻几乎不受参数不确定性影响;后者的时刻误差随距离线性增长。对一个未知的系统,先要从数据判断它属于哪一类,而这本身就需要第八章那样事先登记的检验。

费希尔信息矩阵最小特征值对应的方向与对称性预言的黄金比方向几乎重合;左:二十年记录,右:六十年记录。

注

「回溯」与「预报」在这里是对称的。 对受强迫的阻尼系统,过去窗口与未来窗口的极值同样由强迫周期决定,所以本章对两者给出同样的精度。这只在模型完全正确时成立;真实数据中,过去窗口有观测可以检验,未来窗口没有。

假说 · 尚未验证

作者的假说(尚未验证): 若同时观测两个相邻节点,最松弛方向的费希尔特征值会增大一个数量级以上,因为第二个观测点给出了模 2 的相位信息。什么结果会证明它错:加上第二个观测节点后,最小特征值的增长不到十倍。

小结

只观测一个节点时,记录能精确确定两个参数组合,却几乎无法分辨第三个;这个松弛方向正是环的对称性所预言的黄金比方向,延长记录不能消除这种失衡。受强迫的阻尼系统,其能量极值的时刻被强迫锁定,未来 140 年与过去 60 年的峰同样可以确定日期;自由振荡的时刻误差则随预报距离成正比增长。

参考文献

Gutenkunst, Ryan N., Joshua J. Waterfall, Fergal P. Casey, Kevin S. Brown, Christopher R. Myers, and James P. Sethna. 2007. “Universally Sloppy Parameter Sensitivities in Systems Biology Models.” PLoS Computational Biology 3 (10): e189.
Raue, Andreas, Clemens Kreutz, Thomas Maiwald, et al. 2009. “Structural and Practical Identifiability Analysis of Partially Observed Dynamical Models by Exploiting the Profile Likelihood.” Bioinformatics 25 (15): 1923–29.

Fan, Y. (2026). Five-Node Cyclic Network Dynamics, Solar-Longitude Ephemeris and Multi-Scale Oscillator Perturbations: Rock-Paper-Scissors-Lizard-Spock Lotka-Volterra Graphs, Equation-of-Time Keplerian Mechanics and Jacobian Sensitivity Bounds [五节点循环网络动力学、黄经历表与多尺度振子扰动] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090168 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).