Let be a Bayesian Network with joint distribution and define the energy Then provided the CPTs are locally normalised and the BN is well-defined.
Proof :
Let be a such BN. We prove first that :
We define one energy term per node, as the negative log of its CPT entry, given its parent sets :
By convention, if then and . The ideal model correctly assigns that configuration probability 0, so the result still hold in this case.
WLOG, we can assume that wherever the energy is evaluated, so is finite. Summing over all nodes of gives the total energy:
Then use and :
So the Boltzmann form is the BN joint probability. This is the equivalence: the same numbers, viewed once as a product of conditionals and once as an energy landscape.
We now prove that its normalised. We have that
But is a Bayesian Network joint, and a BN joint is normalised by construction — this follows from the locally normalised assumption for each CPT. Therefore:
Why this matters
For a general energy model, is an intractable sum over configurations. For a BN-derived energy model, is known analytically to be exactly 1 — no summation, no approximation. This gives a free, exact ground-truth check: any correctly compiled unconditioned BN energy model must have . Once you clamp, in general, and the deviation is itself meaningful.
Treating zero-probability CPT entries
If any CPT entry is zero, its energy term diverges (). An infinite energy barrier is exactly correct in the ideal model (the state is truly impossible), but physical systems cannot represent infinite barriers — a p-bit or analog spin has a finite maximum bias. Three approaches to test:
(1) Large finite penalty
Replace with a fixed large constant (the biggest barrier the hardware can represent), applied to impossible states.
(2) Epsilon smoothing
Mix each CPT row with the uniform distribution over the variable’s domain:
This lifts every zero to a small positive floor, so stays finite.
The core trade-off
too small → the required energy dynamic range grows without bound (as , ), eventually exceeding hardware limits.
too large → physically impossible states are sampled too often, because their probability floor becomes non-negligible.
(3) Explicit hard-constraint representation
If the compiler/backend supports true constraints (masked states, forbidden transitions), represent impossibility structurally rather than energetically. These are tightly related to the hardware.
From energy factors to the interaction matrix
Prop. 1 produces an energy function. A p-bit backend takes a matrix: biases on the diagonal, couplings off it. This section is the bridge — what the matrix can carry, what it necessarily loses, and how the CPTs become its entries.
The upper triangle carries no direction
First guess: keep the arrows of by storing in the upper triangle, ” points to ”. This fails twice.
As notation: the energy only sees the symmetric monomial , so is invariant under — upper versus lower triangle is a storage convention with zero information capacity.
As information: direction is already absent from the function being stored. depends on the joint alone, and the joint does not know its own factorisation order, so any two BNs encoding the same joint compile to the same energy, hence the same coefficients. The chain , the reversed chain and the fork , equipped with the CPTs induced by one common joint, are three different DAGs producing one matrix. No convention on that object can recover what it does not contain.
Compilation is lossy exactly with respect to causal direction
The matrix is the executable; the arrows survive only in the provenance of its entries — which factor contributed what to which cell (final subsection).
Summing impacts instead of enumerating states
Denote for a function of binary variables, as the finite difference of in the variable , all other coordinates held fixed.
Lemma — per-factor compilation
Let be the coefficients of the multilinear expansion of (note 1, Def. 1bis). Then:
the coefficients are recovered from the evaluations of on the states by
Writing for the coefficients of the single factor, in particular .
Proof :
By Def. 1bis, uniquely. A monomial satisfies iff , hence
Substituting into the alternating sum, we verify the identity
the inner sum being computed by the substitution : equal to for and otherwise.
For the operator form, applying to the expansion annihilates every monomial with (it does not depend on ) and strips from the rest:
The operators commute, so iterating over in any order gives
and at every monomial with vanishes, leaving .
The factor has its own expansion, so 1. applies verbatim:
If the factor does not depend on , so identically; for apply such a first (the order is free), and the whole nested difference vanishes: .
The map is linear, so gives , only the nodes with contributing.
The compiled model is an MRF over the moral graph
If not the DAG, which undirected structure does the matrix hold? A MRF:
Proposition — MRF over
Let have energy with coefficients as above. Then:
Every nonzero coefficient lives on a clique of the moral graph: implies is a clique of ;
For generic CPTs, the pairwise support is exact: iff in ;
factorizes over the cliques of : the compiled model is an MRF over the moral graph of maximal interaction order .
Proof :
By the support property, requires for some ; every family is a clique of , and a subset of a clique is a clique.
The “only if” is 1. for . Conversely, a family’s internal pairs are exactly its child–parent pairs (the arrows into ) and its parent–parent pairs (the co-parents of ); the union over is the original edge set plus every co-parent link — the definition of . A generic family potential has nonzero coefficient on every subset of its family, so every such pair carries .
Exponentiating the per-factor decomposition of ,
a product of nonnegative potentials each carried by a family — a clique of by 1. This is the clique factorization of Hammersley–Clifford theorem over ; the maximal order is that of the support property in the previous lemma, .
This way, moralization is not a rule the compiler follows; it is a consequence of the transform being local to families. It is also what fixes the solvable class: the problems the pipeline currently handles are exactly those compiling to a QUBO — or at most a HUBO reduced through the quadratisation — and by the proposition such a problem is an MRF over : what Gibbs-type/p-bit sampling implements is this MRF, never the BN itself. The computation of the job parameters this licenses is specified in note 9.
What the matrix can no longer say
Superposed provenances. A coupling can accumulate unrelated origins: in the confounded triangle , the pair sits in as a mechanism and in as a co-parent link, so — two origins added into one indistinguishable cell.
Colliders erased. In the collider with no – arrow, marginally, yet forces : the marginal independence survives only as a numerical cancellation, never as a readable zero — and the collider is the sole motif carrying observable orientation. Structure is recoverable from the coefficients at most up to ; the rest lives in the provenance split, not the totals.
A matrix entry is a contrast, not a probability
No coefficient is of an edge. For an energy table , the differences become log-ratios of table entries: holding the rest of the family at the reference,
coefficient
difference
statistical meaning
none
at the reference configuration
first
baseline log-odds
second
odds-ratio
third
ratio of odds-ratios across the third variable
The provenance is the source code
The hardware needs only the sums ; the operations of the later notes are defined on the columns and have no meaning on totals. Two agents holding the same matrix but different provenances sample identical joints and disagree about every edit. The matrix is what runs; the per-factor decomposition is what makes it editable.
Commentary