Friedman 2000 - MCMC over Orderings and Computational Tricks
Summary
Put a uniform prior over the orderings and run Metropolis over orderings with the closed-form as target. Proposals: swap two nodes (cheap, small steps) or cut the deck (big steps). Feature posteriors are estimated by averaging over sampled orderings. Computational tricks (candidate-parent restriction, cached top families, pruning, incremental updates) make 37-node problems feasible.
Overview
The induced prior over structures is non-uniform: graphs consistent with more orderings are favoured (a naive-Bayes graph is consistent with orderings, a chain with one). The authors argue standard priors are chosen for convenience and the uniform prior over DAGs is itself far from uniform over equivalence classes (PDAGs).
Main Content
Order-MCMC estimator
Let be draws from a chain with stationary distribution . For any feature with closed form, (Rao-Blackwellised). Metropolis acceptance: .
Proposal operators: (1) flip two nodes in the ordering; (2) cut the deck; choose flip with probability , cut with , instantiation uniform.
Computational tricks (Sec. 4.2)
- Candidate parents: each node keeps only the best single-edge parents, selected before MCMC by .
- Cache top families: precompute and sort the highest-scoring families per node; with worst cached score , if the best cached family consistent with the current ordering exceeds by a factor use only cached families, else enumerate fully.
- Pruning: families extending a low-scoring family are skipped using incremental value : if is below the best family found for every other parent , prune all extensions.
- Incremental update: after a flip of only terms for nodes between them change, and only for families containing or (subtract old, add new); a cut recomputes everything. A flip step is much cheaper but the chain moves slowly. Alarm settings in the paper: , , 4000 cached families, (score difference of 10 bits, a factor ).
Examples
Skeleton of order-MCMC (Python)
Setup:
log_P_D_given_order(order)returns from eq. 6 (via per-nodelogsumexpof local scores). Swap proposal is symmetric, so the acceptance ratio is the likelihood ratio under a uniform ordering prior.
import numpy as np
def order_mcmc(logP, n, T, rng):
o = rng.permutation(n); cur = logP(o); out = []
for _ in range(T):
i, j = rng.choice(n, 2, replace=False); p = o.copy(); p[i], p[j] = p[j], p[i]
new = logP(p)
if np.log(rng.uniform()) < new - cur: o, cur = p, new
out.append(o.copy())
return out # average P(edge | order_t, D) over `out` for edge posteriorsConnections
Why order space helps is in Friedman 2000 - Experiments Mixing and Feature Recovery. For continuous optimisation of DAG structure see NOTEARS - Overview.
See Also
Friedman 2000 - Being Bayesian about Network Structure - Overview