✗ Failed on benchmark 2026

Differentiable Gaussian DAG Layer

Implementation & benchmark of arXiv:2607.04578 — A Differentiable Covariance Calculus for Linear Gaussian Bayesian Networks

Usefulness7/10
Difficulty5/10
Novelty6/10

Source paper: A Differentiable Covariance Calculus for Linear Gaussian Bayesian Networks arXiv:2607.04578 ⓘ · analyzed Aug 30, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Replace an unconstrained covariance or dependency module with a topologically ordered linear-Gaussian DAG whose edge transforms and innovation covariances are neural-network parameters. The layer computes a joint covariance by a differentiable triangular solve, allowing downstream losses to use uncertainty, conditional prediction, or dependency penalties while preserving positive semidefiniteness by construction. This is especially suitable for graph neural networks, structured VAEs, and latent-state modules.

Formulas

$$V_j=\sum_{i\in\mathrm{Pa}(j)}\bm{A}_{ji}V_i+Z_j,\qquad Z_j\sim\mathcal{N}(\bm{0},\bm{\Sigma}_j).$$
$$(I-A)V=Z,\qquad C=\operatorname{Cov}(V)=(I-A)^{-1}D(I-A)^{-\mathsf T},\quad D=\operatorname{blockdiag}(\Sigma_1,\ldots,\Sigma_M).$$
$$\Sigma_j=L_jL_j^{\mathsf T}+\varepsilon I_{d_j},\qquad C_{ab}=\operatorname{Cov}(V_a,V_b).$$

Mathematical statement

The model assigns each vector node the structural equation V_j = sum over parents i of A_ji V_i + Z_j, where V_j is the d_j-dimensional node vector, Pa(j) is its parent set, A_ji is a d_j by d_i edge matrix, and Z_j is an independent Gaussian innovation with covariance Sigma_j positive semidefinite. Stack all nodes into V and innovations into Z. Let A be the block strictly lower-triangular matrix whose (j,i) block is A_ji for graph edges and zero otherwise, and let D = blockdiag(Sigma_1,...,Sigma_M). Then (I-A)V=Z and the joint covariance is C=(I-A)^(-1)D(I-A)^(-T). Acyclicity makes I-A triangular with unit diagonal, so its inverse is computed by forward substitution rather than an unstable generic inverse. Parameterize Sigma_j as L_j L_j^T + epsilon I, where L_j is a learned lower-triangular matrix and epsilon>0. Every covariance block C_ab is differentiable with respect to all edge and innovation parameters, including tied parameters.

Implementation notes

Integrate this as a PyTorch or JAX module after a graph encoder, latent-state encoder, or structured VAE decoder. Expose one edge matrix A_ji per graph edge and one unconstrained lower-triangular factor L_j per node; for relation sharing, generate multiple A_ji matrices from a common relation parameter. Compute Sigma_j=L_j@L_j.T+eps*I, assemble the block lower-triangular A in topological order, and assemble D as a block diagonal matrix. Do not explicitly form an inverse: solve B X=I with a triangular solve, where B=I-A, or propagate covariance recursively using the structural equations. Return selected means, covariance blocks, and optionally reparameterized samples. Pseudocode: A_ji=f_edge(h_i,h_j); L_j=lower_triangular(f_cov(h_j)); Sigma_j=L_j@L_j.T+eps*I; B=I-A; C=solve_triangular(B,D); C=solve_triangular(B,C.T).T; loss=task_loss+lambda*uncertainty_loss(C). The paper-derived computation is the covariance chart; no spectral estimator is required. First test a 10-node synthetic DAG with vector node dimension 4 in a small graph VAE. Compare against a dense covariance head and independent diagonal uncertainty. Measure held-out Gaussian NLL, calibration error, covariance failures, parameter count, and wall-clock time. Success means lower NLL and better calibration at similar parameter count with zero invalid covariance outputs.

Verification

Failed on benchmark

Stage 1 · Toy mechanism gate: Passed ✓

Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗

Stage 2 · Practical benchmark result: Inconclusive

Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works

Stage 1 — Mechanism check agent confidence 9/10

Built a differentiable Gaussian DAG covariance layer using unit-lower-triangular solves and PSD innovation factors. Three quantitative mechanism predictions were confirmed: chain variances matched the geometric-sum formula with maximum error 4.4e-16, zero edges produced zero cross-covariance, and det(C)=det(D) across edge scales 0–2 with relative error at most 2.4e-15. Autodiff matched a finite-difference gradient to 4.2e-10 relative error. In the small NLL comparison, DAG outperformed diagonal uncertainty but was slightly worse than the much larger dense covariance model, so the mechanism is real but a universal accuracy win was not demonstrated.

Agent confidence
9/10
Baseline
Diagonal: test NLL 3.1812, 10 parameters, minimum eigenvalue 0.4192; dense: test NLL 2.4433, 100 parameters, minimum eigenvalue 0.2061, 1.01 s
Idea
Gaussian DAG: test NLL 2.4652, 27 parameters, minimum eigenvalue 0.2047, 7.26 s; chain variance maximum error 4.4e-16; zero-edge off-diagonal maximum 0; determinant relative error <=2.4e-15; finite-difference/autodiff gradient relative error 4.2e-10

Limitations: The comparison used a synthetic scalar-node Gaussian dataset rather than the proposed vector-node graph VAE or downstream GNN task. Calibration error, multiple random seeds, GPU behavior, sampling, batching, and larger-graph scaling were not tested.

How to run: python3 dag_experiment.py

Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.04578)

No significant difference vs. the tuned baseline (+2.1%, p=0.0568, wins 2 / 8 paired seeds).

Benchmark
Correlated_sequence
Model
transformer_tiny
Paired seeds
8
Baseline mean
0.3976
Idea mean
0.4059
Effect (Δ)
0.0084 (+2.1%; negative = idea better)
Wins
2 / 8 paired seeds
p-value
0.0568 (permutation test, 20 000 shuffles)
Smallest detectable effect
±2.3%
Mechanism
Not confirmed ✗
Practical effect
Inconclusive
Baseline tuning
swept over 3 configs
Limitations:

Only the custom 400-sample correlated sequence track was tested; built-in tabular, vision, and dynamics tracks were not run. The covariance signature remained imperfect in absolute calibration, and no larger graph, vector-node GNN, VAE, wall-clock comparison, or multi-GPU scaling study was performed.

How to run: python3 stage2_bench.py

Verdict computed by deterministic test code from paired-seed statistics — not by the language model.

Stage 2 — Benchmark latest Failed ✗

Agent confidence: 9/10

Built a custom correlated multi-step sequence track because the built-in sequence track has only a scalar target and cannot directly test joint covariance. Both systems used the same transformer backbone and end-to-end Gaussian NLL training, differing only in diagonal versus triangular Gaussian-DAG covariance; the DAG signature was confirmed, but test MSE was worse (0.40591 vs 0.39756) with delta +0.00835 and permutation p=0.05685, so there was no significant improvement.

Baseline
Diagonal Gaussian head, best lr=0.001: test MSE mean 0.397559, per-seed [0.348085, 0.324064, 0.341896, 0.367438, 0.425957, 0.579730, 0.375756, 0.417549]. Sweep means: lr 0.001=0.345371, 0.003=0.418712, 0.01=0.844319 on seeds 0-3.
Idea
Gaussian DAG head, best lr=0.001: test MSE mean 0.405910, per-seed [0.356942, 0.316850, 0.351286, 0.370573, 0.438209, 0.577620, 0.403461, 0.432338]. Paired delta idea-baseline=+0.008351, 2/8 wins, permutation p=0.05685. DAG mechanism signature confirmed with relative covariance Frobenius error 0.7249 versus observed residual covariance; predicted mean absolute off-diagonal=0.01072 versus observed=0.18857.

Benchmark result

No significant difference vs. the tuned baseline (+2.1%, p=0.0568, wins 2 / 8 paired seeds).

Benchmark
Correlated_sequence
Model
transformer_tiny
Paired seeds
8
Baseline mean
0.3976
Idea mean
0.4059
Effect (Δ)
0.0084 (+2.1%; negative = idea better)
Wins
2 / 8 paired seeds
p-value
0.0568 (permutation test, 20 000 shuffles)
Smallest detectable effect
±2.3%
Mechanism
Not confirmed ✗
Practical effect
Inconclusive
Baseline tuning
swept over 3 configs
Limitations:

Only the custom 400-sample correlated sequence track was tested; built-in tabular, vision, and dynamics tracks were not run. The covariance signature remained imperfect in absolute calibration, and no larger graph, vector-node GNN, VAE, wall-clock comparison, or multi-GPU scaling study was performed.

How to run: python3 stage2_bench.py

Artifacts

Implementation overview ⬇ Download all as ZIP 7 files · code, reports and structured results