5D Library › 梦境意象二分图、确定性哈希牌卡与潜意识先验激活 · English

第一章 梦境意象二分图与快速眼动期的语义扩散

解梦词典就是一张二分图

解梦词典把意象与人生事务配对:水对钱财,掉牙对亲人,婚礼对情感或家族。梦境内容分析则从另一侧做类似的事:霍尔-范德卡斯尔体系为每份梦境报告编码人物、场景、物件、互动与情绪,使报告可以计数与比较 (Hall and Van de Castle 1966; Domhoff 2003)。两者可以写成同一个对象:一侧是意象,一侧是生活领域,凡有一种解读把两者联系起来,就连一条边,这就是加权二分图。

下面把 24 个常见意象与 8 个生活领域用两种边连接。强边是词典会首先印出的一两种解读;弱边是解梦者可以临时援引的宽松解读(「水也可以指恐惧」)。意象图把共享某个领域的两个意象连起来。

这里有两种「一步」,必须分开:二分图一步是从意象沿二分图的一条边走到领域;意象投影图一步是在意象图中从一个意象走到另一个意象,因此合用二分图的两条边,先从意象走到共享的领域,再从领域走到另一个意象。意象之间的距离(p01)以及联想链的步数与终点距离(p02),都以意象投影图的步数计;「一步可达」的意象与领域配对比例,则以二分图的步数计。

推导

# Chapter 1. p01: A weighted bipartite graph of dream motifs and life domains.
# 24 motifs drawn from dream dictionaries and Hall-Van de Castle style
# codes; 8 life domains. Each motif has one or two STRONG readings
# (weight 1.0, then 0.7) as a dictionary would list them; other pairs get
# a WEAK link (0.05 to 0.30) with probability 0.35 (seed 89), standing
# for the looser readings an interpreter can reach for. The motif graph
# links two motifs that share a domain; distances are counted in it.
import random

DOMAINS = ("wealth", "health", "kin", "love", "work", "travel",
           "conflict", "fear")
STRONG = {
    "water": "wealth fear", "fire": "wealth conflict",
    "snake": "wealth love", "teeth": "kin health", "flying": "work",
    "falling": "fear work", "chased": "fear conflict",
    "death": "health kin", "wedding": "love kin", "money": "wealth",
    "house": "kin", "road": "travel work", "exam": "work fear",
    "child": "kin love", "fish": "wealth", "dog": "conflict kin",
    "mountain": "work travel", "rain": "wealth health",
    "blood": "health wealth", "boat": "travel", "teacher": "work",
    "stranger": "love fear", "food": "health", "phone": "love travel",
}
MOTIFS = sorted(STRONG)

def build(seed=89, p_weak=0.35):
    rng = random.Random(seed)
    w = {}
    for m in MOTIFS:
        doms = STRONG[m].split()
        for d in DOMAINS:
            if d in doms:
                w[m, d] = 1.0 if doms.index(d) == 0 else 0.7
            elif rng.random() < p_weak:
                w[m, d] = round(rng.uniform(0.05, 0.30), 3)
    return w

def motif_distances(w, min_w):
    nb = {m: set() for m in MOTIFS}
    for (m, d), x in w.items():
        if x < min_w:
            continue
        for (m2, d2), y in w.items():
            if d2 == d and m2 != m and y >= min_w:
                nb[m].add(m2)
    dist = {}
    for s in MOTIFS:
        seen, front, k = {s: 0}, [s], 0
        while front:
            k += 1
            nxt = []
            for u in front:
                for v in sorted(nb[u]):
                    if v not in seen:
                        seen[v] = k
                        nxt.append(v)
            front = nxt
        for t in MOTIFS:
            if t > s:
                dist[s, t] = seen.get(t, None)
    return dist

if __name__ == "__main__":
    w = build()
    strong = sum(1 for x in w.values() if x >= 0.7)
    weak = len(w) - strong
    print("   motifs {}, domains {}, strong links {}, weak links {}".format(
        len(MOTIFS), len(DOMAINS), strong, weak))
    print("   density: strong {:.3f}, all {:.3f}".format(
        strong / 192, len(w) / 192))
    for label, mw in (("strong only", 0.7), ("all links", 0.0)):
        dist = motif_distances(w, mw)
        n = len(dist)
        cnt = {}
        for v in dist.values():
            cnt[v] = cnt.get(v, 0) + 1
        parts = ", ".join("d={} {:.3f}".format(k, cnt[k] / n)
                          for k in sorted(cnt, key=lambda x: (x is None, x)))
        print("   {:11s} ({} pairs): {}".format(label, n, parts))
    reach = sum(1 for m in MOTIFS for d in DOMAINS if (m, d) in w)
    print("   motif-domain pairs reachable in one step: {} of 192 ({:.3f})"
          .format(reach, reach / 192))
#    motifs 24, domains 8, strong links 41, weak links 56
#    density: strong 0.214, all 0.505
#    strong only (276 pairs): d=1 0.308, d=2 0.431, d=3 0.221, d=4 0.040
#    all links   (276 pairs): d=1 0.942, d=2 0.058
#    motif-domain pairs reachable in one step: 97 of 192 (0.505)

强边有 41 条,弱边 56 条。只看强边,意象对中只有 0.308 是直接相邻,0.431 相隔两步,0.221 相隔三步,0.040 相隔四步。一旦允许弱边,0.942 的意象对直接相邻,其余也只隔两步;意象与领域的全部配对中有 0.505 在二分图上一步可达。这是本书的第一个结构性结论:只要词典里宽松的解读够多,几乎任何意象都能连到几乎任何人生事务。这种灵活性是图的性质,而不是梦的性质。

语义扩散与快速眼动期的大脑

记忆研究把回想一个概念描述为激活沿联想链接扩散,沿最强的链接扩散得最强 (Collins and Loftus 1975)。在快速眼动(REM)睡眠期,脑成像研究发现背外侧前额叶皮层相对失活,而边缘系统与视觉联合区活跃 (Maquet et al. 1996; Braun et al. 1997);从 REM 睡眠中唤醒的受试者,受弱联想词的启动反而大于强联想词,与清醒时相反 (Stickgold et al. 1999)。用一个玩具模型表达这种差别:联想链继续下去的时间更长(再走一步的概率 cc),下一条边的选择更平坦(边权取更小的幂 β\beta)。

推导

# Chapter 1. p02: Spreading activation on the motif-domain graph of p01.
# A chain of association starts at a motif, steps to a domain and on to
# another motif, with edge choice proportional to weight**beta, and goes
# on for another hop with probability c. "Waking" uses c = 0.50 and a
# sharp beta = 4 (strong links dominate); "REM" uses c = 0.80 and a flat
# beta = 1, a toy stand-in for weakened prefrontal control. Distance is
# counted in the strong-link motif graph of p01. 20,000 chains each.
import random

DOMAINS = ("wealth", "health", "kin", "love", "work", "travel",
           "conflict", "fear")
STRONG = {
    "water": "wealth fear", "fire": "wealth conflict",
    "snake": "wealth love", "teeth": "kin health", "flying": "work",
    "falling": "fear work", "chased": "fear conflict",
    "death": "health kin", "wedding": "love kin", "money": "wealth",
    "house": "kin", "road": "travel work", "exam": "work fear",
    "child": "kin love", "fish": "wealth", "dog": "conflict kin",
    "mountain": "work travel", "rain": "wealth health",
    "blood": "health wealth", "boat": "travel", "teacher": "work",
    "stranger": "love fear", "food": "health", "phone": "love travel",
}
MOTIFS = sorted(STRONG)

def build(seed=89, p_weak=0.35):
    rng = random.Random(seed)
    w = {}
    for m in MOTIFS:
        doms = STRONG[m].split()
        for d in DOMAINS:
            if d in doms:
                w[m, d] = 1.0 if doms.index(d) == 0 else 0.7
            elif rng.random() < p_weak:
                w[m, d] = round(rng.uniform(0.05, 0.30), 3)
    return w

W = build()

def strong_dist():
    nb = {m: {m2 for (m2, d2), y in W.items() if y >= 0.7 and m2 != m
              and W.get((m, d2), 0) >= 0.7} for m in MOTIFS}
    out = {}
    for s in MOTIFS:
        seen, front, k = {s: 0}, [s], 0
        while front:
            k += 1
            front2 = []
            for u in front:
                for v in sorted(nb[u]):
                    if v not in seen:
                        seen[v] = k
                        front2.append(v)
            front = front2
        out[s] = seen
    return out

DIST = strong_dist()

def pick(rng, items, beta):
    tot = sum(x ** beta for _, x in items)
    r, acc = rng.random() * tot, 0.0
    for key, x in items:
        acc += x ** beta
        if r <= acc:
            return key, x
    return items[-1]

def chain(rng, c, beta):
    start = MOTIFS[rng.randrange(len(MOTIFS))]
    m, hops, weak = start, 0, False
    while True:
        d, x = pick(rng, [(d, W[m, d]) for d in DOMAINS if (m, d) in W],
                    beta)
        m2, y = pick(rng, [(n, W[n, d]) for n in MOTIFS
                           if (n, d) in W and n != m], beta)
        weak = weak or x < 0.7 or y < 0.7
        m, hops = m2, hops + 1
        if rng.random() > c:
            return hops, DIST[start].get(m, 9), weak

def summary(c, beta, n=20000, seed=89):
    rng = random.Random(seed)
    rows = [chain(rng, c, beta) for _ in range(n)]
    hops = sum(r[0] for r in rows) / n
    far = sum(1 for r in rows if r[1] >= 2) / n
    d3 = sum(1 for r in rows if r[1] >= 3) / n
    weak = sum(1 for r in rows if r[2]) / n
    return hops, far, d3, weak, rows

if __name__ == "__main__":
    for name, c, beta in (("waking", 0.50, 4.0), ("REM", 0.80, 1.0)):
        hops, far, d3, weak, _ = summary(c, beta)
        print("   {:6s} c={:.2f} beta={:.0f}: hops {:.2f}, end at d>=2 "
              "{:.3f}, d>=3 {:.3f}".format(name, c, beta, hops, far, d3))
        print("          chains using a weak link: {:.3f}".format(weak))
#    waking c=0.50 beta=4: hops 2.02, end at d>=2 0.148, d>=3 0.015
#           chains using a weak link: 0.017
#    REM    c=0.80 beta=1: hops 5.01, end at d>=2 0.570, d>=3 0.195
#           chains using a weak link: 0.775

清醒设置(c=0.50c = 0.50,β=4\beta = 4)下,联想链平均走 2.02 步(每步是意象投影图的一步,即意象到领域再到意象),终点离起点两步以上的比例是 0.148,用到弱边的只有 0.017。REM 设置(c=0.80c = 0.80,β=1\beta = 1)下,平均走 5.01 步,终点离起点两步以上的比例是 0.570(三步以上 0.195),0.775 的联想链经过弱边。这两个参数是示意而非实测,结论是定性的:远距离的组合正是这种过程的产物,所以梦里奇怪的拼接并不需要一个隐藏的讯息来解释。

清醒与 REM 设置下联想链终点与起点的距离(p02,各 20,000 条)。

假说 · 尚未验证

作者的诠释(尚未验证): 一个梦让人觉得「有意义」的程度,随它的意象链跨过的弱边数量而上升,因为弱边正是解梦者必须加以解释的部分。什么会证明它错: 在已编码的梦境报告中,梦的「意义感」评分并不随标准词典图中只有弱边相连的意象对比例上升。

小结

解梦词典与梦境编码体系都是意象与领域的二分图。只看强解读,意象分成互不相连的几簇;允许宽松解读之后,0.942 的意象对成为邻居。仿照 REM 研究结果、让联想链更长更平坦的扩散玩具模型,有 0.570 的链终止在远处。远距离组合是意料之中的,并不是讯息的证据。

参考文献

Braun, Allen R., Thomas J. Balkin, Nancy J. Wesenten, et al. 1997. “Regional Cerebral Blood Flow throughout the Sleep-Wake Cycle: An H2(15)o PET Study.” Brain 120 (7): 1173 to 1197.
Collins, Allan M., and Elizabeth F. Loftus. 1975. “A Spreading-Activation Theory of Semantic Processing.” Psychological Review 82 (6): 407 to 428.
Domhoff, G. William. 2003. The Scientific Study of Dreams: Neural Networks, Cognitive Development, and Content Analysis. American Psychological Association.
Hall, Calvin S., and Robert L. Van de Castle. 1966. The Content Analysis of Dreams. Appleton-Century-Crofts.
Maquet, Pierre, Jean-Marie Péters, Joël Aerts, et al. 1996. “Functional Neuroanatomy of Human Rapid-Eye-Movement Sleep and Dreaming.” Nature 383 (6596): 163 to 166.
Stickgold, Robert, Lauren Scott, Cynthia Rittenhouse, and J. Allan Hobson. 1999. “Sleep-Induced Changes in Associative Memory.” Journal of Cognitive Neuroscience 11 (2): 182 to 193.

Fan, Y. (2026). Dream Motif Bipartite Graphs, Deterministic Oracle Decks and Subconscious Prior Activation: REM Semantic Spreading, SHA-256 Fisher-Yates Permutations and Retroactive Coincidence Rates [梦境意象二分图、确定性哈希牌卡与潜意识先验激活] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090233 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).