DAGMALinear<T>

Models & Types · AiDotNet.CausalDiscovery.ContinuousOptimization

DAGMA Linear — DAG learning via M-matrices and a log-determinant acyclicity characterization.

Inheritance: CausalDiscoveryBase<T> → ContinuousOptimizationBase<T> → DAGMALinear<T>

For Beginners

DAGMA does the same thing as NOTEARS (finding causal relationships) but uses a different math trick that’s faster and more numerically stable. Instead of using the matrix exponential, it uses the log-determinant, which has nicer gradients and converges faster — especially for larger problems.

How It Works

DAGMA replaces the NOTEARS matrix exponential constraint with a log-determinant constraint: h(W, s) = -log det(sI - W∘W) + d*log(s), which has better gradient behavior and is ~10x faster.

Optimization: Uses a central path / barrier method instead of augmented Lagrangian. At each outer iteration, the domain parameter s decreases, tightening the DAG constraint. Inner optimization uses gradient descent with Adam optimizer.

Default hyperparameters (from original paper): lambda1 = 0.03, T = 5, mu_init = 1.0, mu_factor = 0.1, s = [1.0, 0.9, 0.8, 0.7, 0.6], lr = 0.0003, w_threshold = 0.3

Reference: Bello et al. (2022), “DAGMA: Learning DAGs via M-matrices and a Log-Determinant Acyclicity Characterization”, NeurIPS.

Constructors

Constructor Summary
DAGMALinear(CausalDiscoveryOptions options) Initializes DAGMA Linear with optional configuration.

Properties

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

Methods

Method Summary
ValueTuple<int, double, double> GetLastRunInfo() Gets the iteration count and convergence info from the last run.