CGNNAlgorithm<T>

Models & Types · AiDotNet.CausalDiscovery.DeepLearning

CGNN — Causal Generative Neural Networks.

Inheritance: CausalDiscoveryBase<T> → DeepCausalBase<T> → CGNNAlgorithm<T>

For Beginners

CGNN tests different causal graph candidates by asking “If this graph were correct, could a neural network generate data that looks like the real data?” The graph that produces the most realistic synthetic data is chosen as the answer.

How It Works

CGNN generates data according to a causal model parameterized by neural networks. For each candidate edge (i→j), a generative model f_j(parents(j), noise) is trained. The model quality is measured by Maximum Mean Discrepancy (MMD) between generated and observed data. Edges are scored pairwise: the direction with lower MMD indicates the causal direction.

Algorithm:

  • Initialize from correlation-based skeleton
  • For each pair (i,j) with non-zero correlation:
  • Train MLP f: x_i + noise → x_j, compute MMD(generated_j, real_j)
  • Train MLP g: x_j + noise → x_i, compute MMD(generated_i, real_i)
  • If MMD(f) < MMD(g), edge is i→j; otherwise j→i
  • Compute OLS weights for the oriented edges

Reference: Goudet et al. (2018), “Learning Functional Causal Models with Generative Neural Networks”, Explainable and Interpretable Models in CV and ML.

Constructors

Constructor Summary
CGNNAlgorithm(CausalDiscoveryOptions options)

Properties

Property Summary
bool SupportsNonlinear { get; }
string Name { get; }