## 4 Application to Gaussian Graphical Models
### Junction Tree Representation  
In order to combat the computational overhead associated with larger graphs, we modify EPSOM-Hyb to first break down the graph into subgraphs according to its topology using a junction tree representation, which exists for all connected graphs. By leveraging the attractive properties of junction tree representations, we not only achieve significant computational speedup in the marginal likelihood calculation, but we can also more adequately handle general graphs. We briefly discuss the properties of decomposable versus non-decomposable graphs and how their respective junction tree representations can simplify the normalizing constant calculation. A junction tree representation of a graph decomposes the graph into a sequence of interconnecting subgraphs separated by complete subgraphs [36], which has the following form:  
\[G\mapsto\mathcal{J}_{G}=\{P_{1},S_{2},P_{2},S_{3},\ldots,P_{m-1},S_{m},P_{m}\}. \tag{17}\]  
In \(\mathcal{J}_{G}\), each prime component \(P_{i}\) is a proper subgraph of \(G\), each separator \(S_{i}\) is a complete subgraph of \(G\), and each \(S_{i}\) is the intersection of \(P_{i}\) with all the previous components \(\{P_{1},P_{2},\ldots,P_{i-1}\}\). If any of the prime components found by this decomposition procedure is not complete and cannot be further decomposed, then G is non-decomposable [37]. With these concepts in place, we recall the original goal of marginal likelihood estimation but look to include the intermediate step of obtaining the junction tree representation of the graph. By working with the smaller prime components, we can overcome the complexity associated with the original high-dimensional graph. Moreover, we can take advantage of the distributional properties of the complete prime components. Concretely, suppose we have data \(X=\{x_{1},\ldots,x_{n}\}\) satisfying the GGM with a graph \(G\) and corresponding junction tree \(\mathcal{J}_{G}\), as given in Equation (17). Let \(\mathcal{P}\) and \(\mathcal{S}\) represent the prime component and separator sequences, respectively. If all of the prime components are complete (cliques), we denote the clique sequence as \(\mathcal{C}\). Regardless of the decomposability of \(G\), we can use \(\mathcal{J}_{G}\) to express the joint density of \(X\) given \(\Sigma\),  
\[p(X\mid\Sigma)=\frac{\prod_{P\in\mathcal{P}}p(X_{P}\mid\Sigma_{P})}{\prod_{S \in\mathcal{S}}p(X_{S}\mid\Sigma_{S})}, \tag{18}\]  
where \(\Sigma_{P}\) and \(\Sigma_{S}\) represent the submatrices corresponding to the subgraphs \(P\) and \(S\), respectively. We first consider the case where \(G\) is decomposable, with \(\Sigma^{-1}\sim\mathrm{HIW}_{G}(\delta,\Lambda)\). Then, the prior density factorizes over the cliques and separators,  
\[p(\Sigma\mid G)=\frac{\prod_{C\in\mathcal{C}}p(\Sigma_{C}\mid G)}{\prod_{S\in \mathcal{S}}p(\Sigma_{S}\mid G)}. \tag{19}\]  
The completeness of the prime components admits distributional properties that make the normalizing constants tractable. In particular, the prior density on \(\Sigma_{C}\) is the inverse-Wishart (IW). Putting this together with the likelihood given in Equation (18), we deduce that the marginal likelihood also factorizes over the cliques and separators as follows,  
\[p(X\mid G) =\int_{\Sigma\mid G}p(X\mid G)p(\Sigma\mid G)d\Sigma\] \[=(2\pi)^{-\frac{np}{2}}\frac{h(G,\delta,\Lambda)}{h(G,\delta+n, \Lambda+B)} \tag{20}\] \[=(2\pi)^{-\frac{np}{2}}\frac{\prod_{C\in\mathcal{C}}w(C)}{\prod_{ S\in\mathcal{S}}w(S)}. \tag{21}\]  
Here, \(B=\sum_{i}x_{i}x_{i}^{\prime}\). For a decomposable graph, the factorization of the likelihood and IW prior over the cliques and separators yields a product of tractable normalizing constants. Exact formulae for \(h(G,\delta,\Lambda)\), \(w(C)\) and \(w(S)\) can be found in Equations (A4) and (A5). We can easily generalize the calculations above to accommodate non-decomposable graphs with GW priors.