---
title: Clique Tree Computation
url: https://www.emergentmind.com/topics/clique-tree-computation
type: topic
---

# Clique Tree Computation

Clique tree computation refers to the collection of algorithmic and theoretical frameworks for constructing clique trees (junction trees) and their generalizations from graphs, particularly chordal graphs. Clique trees are central in sparse matrix factorization, graphical model inference, and combinatorial optimization. Modern developments span efficient enumeration, structural learning, exact and approximate counting, and topological data analysis, connecting graph theory, discrete algorithms, probabilistic graphical models, and statistical learning.

## 1. Foundations of Clique Trees in Chordal Graphs

A clique tree for a chordal graph $G=(V,E)$ is a tree whose nodes are the maximal cliques of $G$, with the property that, for each vertex $v\in V$, the maximal cliques containing $v$ induce a connected subtree (“running-intersection property”). This structure enables efficient factorization of graph-based computations, especially in graphical models and matrix algebra. The Blair–Peyton theorem explicitly characterizes clique trees in chordal graphs as trees whose edges are labeled by the minimal separators, which correspond precisely to the intersections of adjacent maximal cliques [1610.09623].

A chordal graph is one in which every cycle of length greater than three contains a chord. The existence of a perfect elimination ordering (PEO)—an ordering $(x_1,\dots,x_n)$ such that each $x_i$ is simplicial in the induced subgraph on $\{x_i,\dots,x_n\}$—is both necessary and sufficient for chordality. Clique trees and their variants exploit this ordering via algorithmic mechanisms such as Maximum Cardinality Search (MCS), Lexicographic Breadth-First Search (LexBFS), and the more general Maximal Label Search (MLS) [1610.09623].

## 2. Reduced Clique Graphs and Maximum-Weight Spanning Tree Approaches

A key recent advance formalized by Galinier, Habib, and Paul is the reduced clique graph $R(G)$ for a chordal graph $G$ [2301.03781]. Here, $R(G)$ is a weighted graph whose nodes are the maximal cliques of $G$. Two distinct cliques $C_i$ and $C_j$ are connected in $R(G)$ if and only if (1) $C_i\cap C_j\neq \emptyset$ and (2) they form a separating pair—meaning that, upon removal of $S=C_i\cap C_j$ from $G$, no path exists between $C_i\setminus C_j$ and $C_j\setminus C_i$.

The edge weight $w(C_i,C_j)$ is defined as $|C_i\cap C_j|$.

The foundational theorem established is:

> A spanning tree $T$ of $R(G)$ is a clique tree of $G$ if and only if $T$ has maximum total edge weight (i.e., $T$ is a maximum-weight spanning tree of $R(G)$ with edge weights $|C_i\cap C_j|$) [2301.03781].

Algorithmically, the process is:

1. Enumerate all maximal cliques using a PEO (e.g., via MCS) in $O(n+m)$ time.
2. Build $R(G)$ by examining intersections and separator pairs among cliques.
3. Compute a maximum-weight spanning tree (e.g., by Kruskal’s or Prim’s algorithm) to produce the clique tree.

This approach is uniform, yields all clique trees guaranteed by chordality, and achieves near-linear time in sparse chordal graphs [2301.03781].

## 3. Maximal Label Search (MLS) and Clique Tree Extraction

MLS generalizes several graph search heuristics (MCS, LexBFS, LexDFS, MNS) via the introduction of a labelling structure $(\Lambda,\leq,\ell_0,\mathrm{Inc})$ satisfying an inclusion condition [1610.09623]. MLS can compute PEOs, and its modification (MLS-CliqueTree) enables the construction of clique trees and the identification of minimal separators in linear time on chordal graphs.

The critical property, Detectable-Clique-Labels (DCL), ensures that clique boundaries can be detected via label comparisons: for labelings with the DCL property (MCS/LexBFS/MNS), the construction of clique trees and minimal separators follows efficiently and precisely. The running-intersection property and tree edge-labeling by separators emerge naturally. Furthermore, running MLS “in reverse” enables clique tree construction for the complement graph using analogous label tests [1610.09623].

MLS and its extensions also provide mechanisms for minimal triangulation and atomic decomposition of non-chordal graphs via the algorithm MLSM, producing atom trees aligned with the clique minimal separator decomposition.

## 4. Succinct Clique Trees for Exact Clique Counting

The Succinct Clique Tree (SCT), introduced for the efficient enumeration and counting of $k$-cliques (for all $k$), is constructed using recursive pivoting—a generalization of the Bron–Kerbosch algorithm [2001.06784]. The SCT is a rooted, directed structure whose nodes correspond to induced subgraphs and whose arcs record the pivot vertices chosen at each recursion.

Each clique in $G$ is encoded uniquely by a path in the SCT (label set $T$) and a choice of subset $Q$ of pivots. The central unique-encoding property guarantees that every clique appears exactly once. Global and local ($k$-clique per-vertex and per-edge) counts are extracted as sums over SCT leaves, where binomial terms encode combinations of dropped and held pivots.

Theoretical analysis bounds the construction time by $O(\alpha^2|\mathrm{SCT}(G)|+n+m)$, where $\alpha$ is graph degeneracy and $|\mathrm{SCT}(G)|=O(n3^{\alpha/3})$ in the worst case. Empirically, the SCT and associated Pivoter algorithm enable global and per-vertex $k$-clique counts for networks with tens to hundreds of millions of edges within minutes, surpassing previous methods in scalability [2001.06784].

## 5. Clique Tree Structure Learning and Probabilistic Modeling

Clique tree computation underpins high-dimensional probability modeling, especially for categorical data and graphical models. Bayesian model selection for clique-tree decompositions proceeds by:

1. Estimating normalized mutual information (NMI) for all attribute pairs.
2. Constructing the NMI graph and pruning by a threshold $x$ to control structure sparsity.
3. Triangulating the pruned graph to ensure chordality.
4. Extracting maximal cliques and building a clique tree via maximum-weight spanning tree (as above).
5. Fitting empirical clique and separator potentials, yielding a factorization of the joint likelihood:
   $$
   P(d|M) = \frac{\prod_{C\in\text{Cliques}} P(d_C)}{\prod_{S\in\text{Separators}} P(d_S)}
   $$
6. Optimizing threshold $x$ via held-out likelihood to avoid overfitting.

This model selection approach enables clustering, anomaly detection, and interpretable probability distributions in categorical domains [1708.07025].

## 6. Greedy and Topological Algorithms for Clique Forest Learning

The Maximally Filtered Clique Forest (MFCF) algorithm learns clique forest structures from data via repeated application of clique-expansion operators that maximize a global objective, which may be a similarity score or likelihood gain [1905.02266]. At each step, an existing clique is expanded with a new vertex, or a separator is added, maintaining decomposability (chordality and clique-intersection property).

Key algorithmic features:

- The gain function is flexible: can target pairwise similarity, log-likelihood, or multivariate statistical significance.
- The algorithm controls treewidth and structural sparsity via a maximum-clique-size constraint, functioning as an $\ell_0$-type penalization.
- The output includes a decomposable graph structure, a perfect sequence of cliques, and a perfect elimination ordering of vertices.
- Empirical performance demonstrates superior out-of-sample likelihood, accuracy, and sparsity relative to $\ell_1$-regularized approaches such as Graphical Lasso, especially in low-sample, high-dimensional regimes.

The MFCF approach decouples structure learning and parameter estimation, allowing flexible modeling and inference in large-scale probabilistic graphical models [1905.02266].

## 7. Complexity, Structural Variants, and Practical Considerations

Clique tree computation methods scale efficiently on chordal and sparse graphs:

- PEO extraction and maximal clique enumeration can be performed in $O(n+m)$ time [1610.09623].
- Reduced clique graph construction and MST computation in the worst case take $O(k^2(n+m) + k^2\log k)$, but practical implementations reduce this to nearly linear for sparse instances [2301.03781].
- MLS-CliqueTree and its variants attain linear time with appropriate label structures.
- SCT construction for exact $k$-clique counting achieves near-optimal scaling in degeneracy, practical for graphs with billions of edges [2001.06784].
- Structure learning algorithms (NMI threshold sweep, MFCF) are polynomial in the number of nodes and cliques; parallelization further enhances scalability [1708.07025, 1905.02266].

Structural subtleties such as the difference between reduced clique graphs and classical clique graphs, and the non-comparability of their induced classes in chordal graphs, have combinatorial significance [2301.03781]. Establishing the correctness of clique boundary detection algorithms depends critically on label structure properties (e.g., DCL for MLS), and failure in conditions leads to incorrect decompositions [1610.09623].

## References

- "Reduced clique graphs: a correction to 'Chordal graphs and their clique graphs'" [2301.03781]
- "Computing a clique tree with algorithm MLS (Maximal Label Search)" [1610.09623]
- "Bayesian Learning of Clique Tree Structure" [1708.07025]
- "Learning Clique Forests" [1905.02266]
- "The Power of Pivoting for Exact Clique Counting" [2001.06784]

Source: https://www.emergentmind.com/topics/clique-tree-computation