Causal Dynamics Architecture

v1.0.0

因果动力学架构(Causal Dynamics Architecture, CDA)领域知识参考。 当用户讨论 CDA 架构设计、因果机制网络、哈密顿约束、因果封装递归、 物理约束神经网络、因果推断与深度学习融合、统计力学启发的人工智能时触发。 提供架构全局认知和详细参考文件的按需深入能力。

0· 27·0 current·0 all-time
by波动几何@wangjiaocheng

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for wangjiaocheng/cda.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Causal Dynamics Architecture" (wangjiaocheng/cda) from ClawHub.
Skill page: https://clawhub.ai/wangjiaocheng/cda
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Canonical install target

openclaw skills install wangjiaocheng/cda

ClawHub CLI

Package manager switcher

npx clawhub@latest install cda
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description claim to be a domain knowledge/reference pack for Causal Dynamics Architecture (CDA). The skill is instruction-only and ships only markdown reference files; it requests no binaries, environment variables, or credentials. All declared/actual artifacts are consistent with providing on-demand background and technical reference material.
Instruction Scope
SKILL.md contains triggering conditions and extensive reference content and code-like examples, but does not instruct the agent to read unrelated system files, access secrets, or call external endpoints. Example code is explanatory (pseudocode/architecture sketches) rather than runtime commands. There is no open-ended language granting broad discretion to collect unrelated system context.
Install Mechanism
No install spec and no code files that would be executed. This is lowest-risk (instruction-only) distribution — nothing is downloaded or written to disk by an installer.
Credentials
The skill does not request environment variables, keys, tokens, or config paths. The content mentions using detectors or small LLMs in examples, but those are conceptual and not declared as required credentials or external services.
Persistence & Privilege
Flags: always=false, user-invocable=true, model invocation enabled (default). This is appropriate for a reference skill and does not request permanent presence or elevated privileges. No instructions to modify other skills or system configs are present.
Assessment
This skill is a local documentation/reference pack describing a proposed CDA architecture and appears internally consistent. Before installing or enabling it for autonomous invocation, consider: (1) it contains technical pseudocode and design proposals but no runnable install — if you plan to implement parts of it, review any external libraries or models you use for those implementations; (2) the examples mention detectors and small LLMs conceptually — ensure any integration you add requires only the minimal credentials and endpoints you trust; (3) the content is research/proposal material (speculative) and not an audited implementation — treat outputs as theory rather than validated production code. Overall there are no evident security or exfiltration concerns in the provided files.

Like a lobster shell, security has layers — review code before you run it.

latestvk973vmzw1nfk5p7wzy50sba3k185jb5t
27downloads
0stars
1versions
Updated 12h ago
v1.0.0
MIT-0

因果动力学架构(CDA)研究参考

核心定位

CDA 是一个替代 Transformer 的全新 AI 计算架构提案。核心理念:世界不是符号序列,而是实体及其因果关系的动态系统

一句话定义:CDA 是一个以因果图上的哈密顿动力学步进替代 Transformer Self-Attention 的计算架构,原生支持物理约束、因果推理和多尺度建模。

完整文档:references/因果动力学架构(Causal Dynamics Architecture, CDA).md

参考文件体系

本 skill 的 references 目录包含三篇原创文档,构成从宏观文明演进到具体架构实现的完整知识链:

#文件定位与其他文件的关系
1技术的螺旋:从连接到创造,一部数字文明的演进实录.md宏观视角:数字文明三纪元演进框架(PC互联网→移动互联网→物联网)回答"为什么需要新架构"——第三纪元(物联网)需要能理解物理规律的世界模型,第二代统计AI的能力边界在此暴露
2第三代人工智能:因果仿真范式.md范式定义:从规则推理→统计生成→因果仿真的三代AI范式跃迁承接文明的框架,提出"因果仿真"作为第三代的核心理念,是 CDA 的思想源头
3因果动力学架构(Causal Dynamics Architecture, CDA).md架构实现:CDA 的完整技术提案(五层栈、CER、do-演算等 13 章)是"因果仿真"范式的具体计算架构实现,将范式理念落地为可计算的原语和管线

阅读顺序建议:技术的螺旋(理解需求)→ 因果仿真范式(理解方向)→ CDA(理解方案)。

设计哲学

TransformerCDA
世界观世界是符号序列世界是实体及其因果关系的动态系统
核心计算Self-Attention(关联聚合)因果动力学步进(因果机制仿真)
归一化LayerNorm(统计归一化)哈密顿投影(物理守恒约束)
学习方式反向传播(批量离线)在线贝叶斯更新(实时在线)
层次结构同构递归(N 层相同 Transformer)因果封装递归 CER(异构嵌套)
可解释性注意力权重(弱解释)因果链 + 物理约束(强解释)

详见参考文件 §一(第 11-30 行)、§九(第 2564-2583 行)。

五层计算栈

┌─────────────────────────────────────────────────────────────────┐
│  Layer 5: 语言界面层 (Language Interface)                        │
│  意图解析 (NL→do()) + 状态报告 (State→NL) + 因果链解释            │
├─────────────────────────────────────────────────────────────────┤
│  Layer 4: 反事实推理层 (Counterfactual Reasoning)                │
│  平行世界分支 (Fork-State) + 干预传播 (do() Propagate)            │
├─────────────────────────────────────────────────────────────────┤
│  Layer 3: 多尺度聚合层 (Multi-Scale Aggregation)                 │
│  粗粒化 (信息瓶颈) + 重正化 (因果路径求和) + 自适应尺度选择        │
├─────────────────────────────────────────────────────────────────┤
│  Layer 2: 因果机制网络 CMN (Causal Mechanism Network)             │
│  实体-状态因果图 + 因果动力学步进 + 类型化机制函数 + 因果路由       │
├─────────────────────────────────────────────────────────────────┤
│  Layer 1: 感知校准层 (Perception & Calibration)                  │
│  实体发现 + 多模态消歧 + 传感器融合 + 贝叶斯校准                  │
└─────────────────────────────────────────────────────────────────┘

详见参考文件 §二(第 31-93 行)。

核心数据结构

class EntityState:
    position: Tensor      # q: 广义坐标(位置、角度、温度...)
    momentum: Tensor      # p: 共轭动量(速度、角速度、热流...)
    attributes: Tensor    # a: 固有属性(质量、电荷、材料类型...)
    belief: Distribution  # b: 贝叶斯信念 ~ N(μ, Σ)

class CausalEdge:
    source: int           # 因
    target: int           # 果
    mechanism: Callable   # f_ij: 因果机制函数(可微分)
    mechanism_type: str   # 机制类型(热力学/力学/流体/化学反应/信息)
    strength: float       # 因果强度
    confidence: float     # 结构置信度

详见参考文件 §3.1(第 625-662 行)。

各层核心要点

Layer 1: 感知校准(§2.1-2.2,第 94-619 行)

两层设计

  1. §2.1 统一感知接口(第 94-360 行):非结构化数据→实体候选
    • 实体发现:文本 NER / 视觉目标检测 / 时序变点检测
    • 多模态消歧:并查集 + 多特征相似度聚类
    • 本体驱动初始化:领域本体分配初始状态和候选因果边
  2. §2.2 感知校准层(第 361-619 行):结构化传感器→内部表示
    • 传感器融合:时间对齐 + 空间映射 + 量纲归一化
    • 物理感知编码器:直接映射可测量量 + 推断网络估计不可测量量
    • 贝叶斯校准:卡尔曼更新 + 马氏距离异常检测

Layer 2: 因果机制网络 CMN(§三,第 621-1058 行)

核心前向传播(§3.2):因果动力学步进

  • 每个时间步:对每条因果边计算机制函数 → 累加状态变化 → 哈密顿投影
  • 与 Attention 的本质区别:Attention 是无向的关联聚合,CDA 是有向的因果机制仿真

机制函数参数化(§3.3):类型化物理约束

  • 热力学型:傅里叶定律 + 牛顿冷却
  • 力学型:弹簧-阻尼 + 接触力
  • 流体型:Navier-Stokes 简化
  • InteractionBasis:基函数展开 Φ(x) → 参数化 f_ij

因果计算路由(§3.4):稀疏边选择

  • 路由分数 = 因果强度 × 源状态变化 × 目标不确定性 × 查询相关性
  • 三级筛选:硬阈值 → Top-K → 全局预算
  • 复杂度:O(N²k) → O(NKk),640× 加速

Layer 4: 哈密顿约束(§四,第 1059-1340 行)

  • 系统哈密顿量 H(q,p) = T(p) + V(q) 作为架构恒等式
  • 哈密顿投影:每步将状态拉回能量守恒流形(替代 LayerNorm)
  • 辛积分器(Störmer-Verlet / Yoshida 4阶):天然保持辛结构
  • 完整管线:CDABlock(路由→机制计算→积分→投影→信念更新)

注意:哈密顿投影与辛积分器可能存在冗余,需要进一步分析是否可以简化。

Layer 4: 反事实推理(§五,第 1341-1414 行)

  • 干预 (do-演算):图手术——切断因果边,设置变量值,仿真传播
  • 反事实:溯因→干预→预测三步
  • 并行世界分支树:每次干预创建状态分支,支持多策略比较

Layer 3: 多尺度聚合(§七,第 2009-2359 行)

  • 粗粒化:信息瓶颈驱动的实体聚类(特征值分解 + 谱聚类)
  • 重正化:因果路径求和(Neumann 级数截断)更新粗粒化后的机制函数
  • 自适应尺度选择:基于不确定性驱动的多分辨率切换

Layer 2.5: 学习机制(§六,第 1415-2008 行)

冷启动(§6.1,第 1421-1633 行):从零构建因果图

  • Phase A:知识骨架(物理方程 + 工程拓扑 + 文本挖掘)
  • Phase B:骨架引导 NOTEARS 精化(先验正则化)
  • Phase C:主动因果实验(期望信息增益驱动)

在线更新(§6.2,第 1634-1994 行):替代反向传播

  • Level 1:贝叶斯信念追踪(EKF 实时修正状态估计)
  • Level 2:机制函数在线学习(Online Laplace Approximation)
  • Level 3:因果结构学习(NOTEARS 增量更新图结构)
  • Level 4:结构更新触发控制器(不确定性驱动)

因果封装递归 CER(§八,第 2360-2563 行)

CDA 最原创的贡献。替代 Transformer 的同构递归(N 层相同层)。

核心思想:

  • 异构递归嵌套:每层封装一个因果子系统,不同层有不同的实体类型和机制函数
  • 双向因果耦合:子系统和父系统之间通过因果边双向连接(而非单向调用)
  • 因果封装:子系统内部状态对外不可见,只能通过接口实体交互

与 Transformer 层次结构的区别:Transformer 的层级是抽象语义层级(词→短语→句子),CER 的层级是物理因果层级(压缩机→制冷系统→工厂→电网)。

核心术语

术语英文定义
因果机制网络CMN以实体为节点、因果机制为边构成的有向图
实体-状态因果图Entity-State GraphEntityState + CausalEdge 的动态系统表示
哈密顿投影Hamiltonian Projection状态约束在能量守恒流形上,替代 LayerNorm
因果封装递归CER异构嵌套递归结构原则,每层封装一个因果子系统
do-演算do-CalculusJudea Pearl 的干预推理框架,CDA 原生实现
图手术Graph Surgerydo-演算实现——切断特定因果边模拟干预
粗粒化Coarse-Graining微观状态聚合为宏观有效状态
重正化Renormalization调整因果机制函数使其在粗粒化后仍有效
主动推断Active InferenceFriston 理论:智能 = 最小化自由能
贝叶斯在线更新Bayesian Online Update替代反向传播的学习机制

完整术语表见参考文件 §十五(第 2814-2835 行)。

关键公式索引

公式位于参考文件附录(第 2848 行起):

编号公式名称参考文件位置
A1核心状态演化方程第 2850 行
A2哈密顿约束第 2854 行
A3贝叶斯状态更新第 2858 行
A4因果机制函数(热力学)第 2862 行
A6多尺度粗粒化第 2872 行
A7因果封装递归映射第 2876 行
A9Störmer-Verlet 辛积分器第 2886 行
A10哈密顿投影拉格朗日乘子第 2896 行
A13信息瓶颈粗粒化第 2922 行
A14重正化因果路径求和第 2928 行

与现有工作的关系

现有工作CDA 中的角色CDA 的超越
Judea Pearl 因果推断Layer 3-4 理论基础静态因果图 → 动态因果动力学
Yann LeCun JEPA世界模型理念启发联合嵌入预测 → 因果机制仿真
Neural ODE状态演化数学工具加入因果图结构和哈密顿约束
Hamiltonian NN能量守恒实现推广到所有物理守恒律 + 因果结构
统计力学重正化群多尺度理论基础自适应在线尺度选择
GNN因果图上的信息传播无向关联图 → 有向因果动力学图

详见参考文件 §十三(第 2743-2758 行)。

已知局限与开放问题

已知局限

  • 实体规模 > 10⁴ 时的路由精度
  • 感知接口对非物理领域(自然语言、社交网络)的适用性未验证
  • CER 递归的内存管理

开放问题

  • 通用因果发现(无领域知识冷启动)
  • 跨模态因果机制(语言→物理的因果边如何定义)
  • 与 LLM 的有效结合方式

详见参考文件 §十二(第 2704-2742 行)。

原创性评估

真正原创的概念:

  1. 实体-状态因果图:Pearl 因果图 + 哈密顿状态空间的融合
  2. 因果封装递归 CER:异构递归嵌套 + 双向因果耦合
  3. 因果路径求和的重正化:Feynman 路径积分 → 因果图粗粒化

其余 80%+ 为已有工作的系统性重组和工程化。原创贡献占比约 15-20%。

实现路线图

Phase目标时间
14.1热力学仿真引擎(验证核心计算原语)可立即启动
14.2多域因果耦合(热+力+流体)1-2 年
14.3反事实推理与决策2-4 年
14.4通用因果世界模型4-8 年

详见参考文件 §十四(第 2761-2813 行)。

使用指南

当需要深入了解某个模块时,读取参考文件的对应章节:

# 读取特定章节
read_file("references/因果动力学架构(Causal Dynamics Architecture, CDA).md", offset=<起始行>, limit=<行数>)

# 搜索特定概念
search_content(pattern="<关键词>", path="references/因果动力学架构(Causal Dynamics Architecture, CDA).md")

建议的深入顺序:

  1. §二(五层栈全景)→ §3.1(数据结构)→ §3.2(核心计算)
  2. §4.1-4.3(哈密顿约束)→ §五(反事实推理)
  3. §6.1(冷启动)→ §6.2(在线学习)
  4. §七(多尺度)→ §八(CER)
  5. 附录公式验证

Comments

Loading comments...