Introduction
In the field of Probabilistic Graphical Models (PGMs), calculating the partition function or marginal probabilities is a fundamental task. This process often involves summing over an exponential number of possible states, a challenge typically addressed using the Variable Elimination (VE) algorithm. However, the efficiency of VE is critically dependent on the order in which variables are eliminated. Finding the optimal elimination order is a classic NP-hard combinatorial optimization problem. While various heuristics exist, they often fail to account for the internal structure of data factors, leading to unnecessarily large intermediate results that can exceed computational limits.
This paper presents a novel approach that combines Reinforcement Learning (RL) with the exploitation of local symmetries to discover highly efficient elimination orders. By teaching an RL agent to recognize patterns where variables are interchangeable, the authors enable the discovery of calculation paths that are orders of magnitude more efficient than standard methods.
Methodology
The authors' framework bridges the gap between Reinforcement Learning, Tensor Networks (TNs), and probabilistic inference through a multi-step process:
1. MDP Formulation and RL Agent
The search for an optimal elimination order is framed as a Markov Decision Process (MDP). A Graph Neural Network (GNN) serves as the RL agent, observing the current state of the graphical model and selecting the next variable to eliminate. The objective is to minimize the total computational cost of the inference process.
2. Exploiting Duality
By leveraging the mathematical duality between PGMs and Tensor Networks, the researchers adapt RL techniques originally developed for tensor contraction to the domain of probabilistic inference. This allows for a more robust transfer of optimization strategies between the two fields.
3. Compact Encoding of Local Symmetries
The core innovation of this work is the use of Symmetric Random Variables (SRVs) and histograms to represent data. Local symmetries occur when a group of variables within a factor are interchangeable. Instead of storing every possible assignment in a massive table, the system uses histograms to count how many variables are in a particular state.
As illustrated in the figure above, a standard factor table (a) can be compressed into a significantly smaller histogram-based representation (b) when local symmetries are present. The authors prove that these symmetries are preserved during the fundamental operations of VE—multiplication and summing out—allowing the compact representation to persist throughout the inference process.
4. Symmetry-Aware Cost Function
Standard RL agents for this task typically use a cost function based on raw table sizes. The authors redefine this cost function to reflect the size of the compressed representation. This shift allows the agent to "see" efficient paths that standard heuristics would reject as being too computationally expensive.
Experimental Evaluation
The approach was evaluated using synthetic factor graphs across four different scales, ranging from 50 to 65 Boolean variables. Each graph contained 10 symmetric factors involving between 5 and 10 variables. The primary metric for comparison was the cumulative size of intermediate results generated during the variable elimination process.
Key Results
The preliminary results indicate that the symmetry-aware RL agent successfully identifies elimination orders that exploit data redundancy.
As shown in the figure above, the cumulative size of intermediate results (represented by the dashed line) is consistently lower than the standard approach (solid line). On a logarithmic scale, these gains often represent several orders of magnitude in computational savings. This demonstrates that the redefined cost function effectively guides the RL agent toward paths that utilize compact encodings, even when those paths appear "larger" to traditional, symmetry-blind algorithms.
Discussion and Future Work
While these results are promising, the authors identify several avenues for future research. The current work focuses on the partition function; future iterations will need to handle specific evidence and a wider variety of probabilistic queries. Additionally, while local symmetry is a powerful structural property, other compact encodings—such as low-rank tensor decompositions—could be integrated into the agent's cost function to further enhance performance. Finally, testing the framework on real-world relational datasets will be essential to validate its utility beyond synthetic benchmarks.
Summary updated