No-Tears

The problem of revealing the structures of directed acyclic graphs (DAGs) can be solved by formulating a continuous optimization problem over real matrices with the constraint enforcing the acyclicity condition [Zheng2018]. Specifically, for a given vector \(x \in \mathbb{R}^d\) such that there exists a matrix \(V\) which satisifies \(x = Vx + \eta\) for some noise vector \(\eta \in \mathbb{R}^d\), the optimization problem can be summarized as follows:

\[\begin{split}\min_{W \in \mathbb{R}^{d\times d}} & F(W) \\ s.t. \quad & h(W) = 0,\end{split}\]

where \(F(W)\) is a continuous function measuring \(\|x - Wx\|\) and

\[h(W) = tr\left( e^{W \circ W} \right)\]

where \(\circ\) is the Hadamard product. This optimization can then be solved with some optimization technique, such as gradient desscent.

The YLearn class for the NO-TEARS algorithm is CausalDiscovery.