DAGs with NO TEARS: Continuous Optimization for Structure Learning
DAGs with NO TEARS: Continuous Optimization for Structure Learning
概
有向图可以用邻接矩阵\(A \in \{0, 1\}^{d \times d}\)来表示, 其中\(A_{ij} = 1\) 表示 node \(i\) 指向 node \(j\). 进一步的, 我们想要表示有向无环图(DAG), 则\(A\)需要满足额外的性质, 保证无环.
现在的问题是, 有一堆观测数据\(X \in \mathbb{R}^{n \times d}\), 如何通过这些数据推测其(特征之间的)关系, 即对应的\(A\).
主要内容
首先, 假设特征之间满足一个线性关系:
\]
其中
\]
\(z\)为随机的噪声.
通过\(W\)可以推出相应的\(A=\mathcal{A}(W)\), 即
\]
故我们目标通常是:
\mathrm{s.t.} \quad \mathcal{A}(W) \in \mathbb{D},
\]
其中\(\mathbb{D}\)表示有向无环图.
进一步地, 因为我们希望\(W\)是一个系数的矩阵(否则断然不是DAG), 故
\]
并
\mathrm{s.t.} \quad \mathcal{A}(W) \in \mathbb{D}.
\]
显然现在的关键是如何处理\(\mathcal{A}(W) \in \mathbb{D}\)这个条件, 以前的方法通常需要复杂的运算, 本文提出一种等价的条件
\]
满足
- \(h(W)= 0\)当且仅当\(\mathcal{A}(W) \in \mathbb{D}\);
- \(h(W)\)越小, 说明\(\mathcal{A}(W)\)越接近无环图;
- \(h(W)\)是一个光滑函数;
- \(h(W)\)便于求导.
显然1是期望的, 2可以用于判断所得的\(W\)的优劣, 3, 4便于我们用数值方法求解.
等价条件的推导
\(\mathrm{tr}(I-W)^{-1} = d\)
Proposition 1: 假设\(W \in \mathbb{R}_+^{d \times d}\) 且 \(\|W\| < 1\), 则\(\mathcal{A}(W)\)能够表示有向无环图当且仅当
\]
proof:
\(A = \mathcal{A}(W)\)能够表示有向无环图, 当且仅当
\]
\(\Rightarrow\)
由于\(\|W\| < 1\)(最大奇异值小于1), 故
\]
\(\Leftarrow\)
\(\mathrm{tr}(W^k) \ge 0\), 故
\]
当且仅当
\]
注: \(\|W\| < 1\)这个条件并不容易满足.
\(\mathrm{tr}(e^W)=d\)
注: \(e^A = I + \sum_{k=1} \frac{A^k}{k!}\).
Proposition 2: 假设\(W \in \mathbb{R}_+^{d \times d}\), 则\(\mathcal{A}(W)\)能够表示有向无环图当且仅当
\]
proof:
证明是类似的.
注: 此时对\(W\)的最大奇异值没有要求.
\(\mathrm{tr}(W^k) = 0\)
这部分的证明可能应该归属于DAG-GNN.
Proposition 3: 假设\(W \in \mathbb{R}_+^{d \times d}\) , 则\(\mathcal{A}(W)\)能够表示有向无环图当且仅当
\]
proof:
\(\Rightarrow\)是显然的, 证明\(\Rightarrow\)只需说明
\]
假设\(W\)的特征多项式为\(p(\lambda) = \sum_{k=0}^d \beta_k \lambda^k, \beta_d=1\), 则有
\]
进一步有
\]
由归纳假设可知结论成立.
Corollary 1: 假设\(W \in \mathbb{R}_+^{d \times d}\) , 则\(\mathcal{A}(W)\)能够表示有向无环图当且仅当
\]
\(\mathrm{tr}(e^{W \circ W}) =d\)
注: \(\circ\) 表示哈达玛积, 即对应元素相乘.
上面依然要求\(W\)各元素大于0, 一个好的办法是:
Theorem 1: 一个矩阵\(W \in \mathbb{R}^{d \times d}\), 则\(\mathcal{A}(W)\) 能表示有向无环图当且仅当
\]
proof:
\(\mathcal{A}(W)=\mathcal{A}(W \circ W)\).
\(\mathrm{tr}(I + W \circ W)^d =d\)
Theorem 2: 一个矩阵\(W \in \mathbb{R}^{d \times d}\), 则\(\mathcal{A}(W)\) 能表示有向无环图当且仅当
\]
注: \(W \circ W\)前面加个系数也是没关系的.
性质的推导
故, 此时我们只需设置
\]
显然满足1,2,3, 接下来我们推导其梯度
\mathrm{d}h(W)
&= \mathrm{d}\: \mathrm{tr} (e^{W\circ W}) \\
&= \mathrm{tr} (\mathrm{d}e^{W\circ W}) \\
&= \mathrm{tr} (\mathrm{d}\sum_{k=1} \frac{M^k}{k!}) \\
&=\sum_{k=1} \mathrm{tr} ( \frac{\mathrm{d}M^k}{k!}) \\
&=\sum_{k=0} \mathrm{tr} ( \frac{M^k \mathrm{d}M}{k!}) \\
&= \mathrm{tr}(e^{W\circ W} \cdot \mathrm{d}(W\circ W)) \\
&= \mathrm{tr}(e^{W\circ W} \cdot (2W \circ \mathrm{d} W)) \\
&= \mathrm{tr}(e^{W\circ W} \circ 2W^T \cdot \mathrm{d} W) \\
\end{array}
\]
故
\]
注: 其中\(M =W \circ W\).
求解
利用augmented Lagrangian转换为(这一块不是很懂, 但只是数值求解的东西, 不影响理解)
\]
具体求解算法如下:

代码
DAGs with NO TEARS: Continuous Optimization for Structure Learning的更多相关文章
- DAG-GNN: DAG Structure Learning with Graph Neural Networks
目录 概 主要内容 代码 Yu Y., Chen J., Gao T. and Yu M. DAG-GNN: DAG structure learning with graph neural netw ...
- Masked Gradient-Based Causal Structure Learning
目录 概 主要内容 最终的目标 代码 Ng I., Fang Z., Zhu S., Chen Z. and Wang J. Masked Gradient-Based Causal Structur ...
- Gradient-based Hyperparameter Optimization through Reversible Learning
目录 概 主要内容 算法 finite precision arithmic 实验 Maclaurin D, Duvenaud D, Adams R P, et al. Gradient-based ...
- 论文解读(SUBLIME)《Towards Unsupervised Deep Graph Structure Learning》
论文信息 论文标题:Towards Unsupervised Deep Graph Structure Learning论文作者:Yixin Liu, Yu Zheng, Daokun Zhang, ...
- 机器学习 —— 概率图模型(Homework: Structure Learning)
概率图的学习真的要接近尾声了啊,了解的越多越发感受到它的强大.这周的作业本质上是data mining.从数据中学习PGM的结构和参数,完全使用数据驱动 —— No structure, No par ...
- Federated Optimization: Distributed Machine Learning for On-Device Intelligence
郑重声明:原文参见标题,如有侵权,请联系作者,将会撤销发布! arXiv:1610.02527v1 [cs.LG] 8 Oct 2016 坐标下降法:https://blog.csdn.net/qq_ ...
- A novel multi-swarm particle swarm optimization with dynamic learning strategy(一种新颖的具有动态学习策略的多种群粒子群优化算法)
1.核心 在每个子种群的粒子被划分为普通粒子(ordinary particles)和交流粒子(communication particles),在每次迭代过程中,不同的粒子执行不同的进化操作.普通粒 ...
- ADAM : A METHOD FOR STOCHASTIC OPTIMIZATION
目录 概 主要内容 算法 选择合适的参数 一些别的优化算法 AdaMax 理论 代码 Kingma D P, Ba J. Adam: A Method for Stochastic Optimizat ...
- Loss Landscape Sightseeing with Multi-Point Optimization
目录 概 主要内容 代码 Skorokhodov I, Burtsev M. Loss Landscape Sightseeing with Multi-Point Optimization.[J]. ...
随机推荐
- CAD简介
Computer-aided design (CAD) is the use of computers (or workstations) to aid in the creation, modifi ...
- 【leetcode】1217. Minimum Cost to Move Chips to The Same Position
We have n chips, where the position of the ith chip is position[i]. We need to move all the chips to ...
- 【leetcode】122.Best Time to Buy and Sell Stock II(股票问题)
You are given an integer array prices where prices[i] is the price of a given stock on the ith day. ...
- tomcat之nginx调度
# :安装nginx [root@nginx ~]# yum install nginx -y #配置 [root@nginx ~]# vim /etc/nginx/nginx.conf upstre ...
- MyBatis常用批量方法
<!-- 批量添加派车单子表数据 --> <insert id="addBatch" parameterType="java.util.List&quo ...
- System.exit(-1)和return 的区别
对于只有一个单一方法的类或者系统来说是一样的,但是对于含有多个类和方法,且调用关系比较复杂时就不一样了. System.exit(-1)是指所有程序(方法,类等)停止,系统停止运行. return只是 ...
- jQuery - focusin/focusout/focus/blur事件的区别与不同
focus与blur事件:不支持冒泡 focusin与focusout:支持冒泡 事件触发顺序: 对于同时支持这4个事件的浏览器,事件执行顺序为focusin(聚焦) > focus > ...
- 使用$.ajax方式实现页面异步访问,局部更新的效果
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- 使用cookie记录用户上次访问网页的时间,并返回到页面
package com.hopetesting.cookie;import javax.servlet.ServletException;import javax.servlet.annotation ...
- python自带性能强悍的标准库 itertools
可迭代对象就像密闭容器里的水,有货倒不出 itertools是python内置的标准模块,提供了很多简洁又高效的专用功能,使用得当能够极大的简化代码行数,同时所有方法都是实现了生成器函数,这就意味着极 ...