Factor Graph Neural Networks

Zhen Zhang, Mohammed Haroon Dupty, Fan Wu, Javen Qinfeng Shi, Wee Sun Lee · DOI

TL;DR

This paper introduces Factor Graph Neural Networks (FGNNs), a novel architecture that bridges the gap between Graph Neural Networks (GNNs) and Probabilistic Graphical Models (PGMs). FGNNs efficiently capture higher-order relationships in data by neuralizing belief propagation algorithms, offering a unified framework for both Sum-Product and Max-Product inference.

What Problem Does This Paper Address?

Traditional Graph Neural Networks (GNNs) excel at learning representations from graph-structured data by propagating information between nodes. However, they primarily focus on pairwise dependencies. Many real-world problems, such as those involving molecules or complex systems, exhibit higher-order relationships (dependencies involving more than two variables) that are not effectively captured by pairwise GNNs. While Probabilistic Graphical Models (PGMs) can model these higher-order relationships, their inference algorithms become computationally intractable for complex scenarios. This paper aims to develop a GNN architecture that can efficiently learn and leverage these higher-order dependencies, bridging the expressiveness of PGMs with the end-to-end learning capabilities of GNNs.

Methods

The core contribution is the Factor Graph Neural Network (FGNN). The authors first derive an efficient low-rank Sum-Product loopy belief propagation (LBP) algorithm for discrete higher-order PGMs. This algorithm leverages tensor decompositions to represent higher-order potentials efficiently. The key innovation is then "neuralizing" this LBP algorithm:

  • Message Passing: The derived LBP message passing updates are translated into neural network modules.
  • Flexibility: Instead of strict positivity constraints in LBP, FGNNs allow unconstrained real-valued messages, enabling richer representations.
  • Aggregation: The paper explores various aggregation operators (beyond simple product) to enhance flexibility and learning capabilities.
  • Unified Framework: Crucially, FGNNs are shown to be capable of representing both Sum-Product and Max-Product belief propagation by simply changing the aggregation operator. This allows FGNNs to learn from both marginal inference and MAP inference tasks.
  • Architecture: FGNNs are built using two modules: Variable-to-Factor (VF) and Factor-to-Variable (FV), which are stacked to form layers.

Datasets

The paper evaluates FGNNs on a variety of datasets:

  • Synthetic PGMs: Three datasets (D1, D2, D3) with varying degrees of randomness in unary, pairwise, and higher-order potentials were used for MAP inference tasks.
  • LDPC Decoding: A standard task for belief propagation, used to evaluate FGNN's performance in communication systems.
  • Graph Matching: The Pascal VOC Keypoint dataset was used to evaluate FGNN on a computer vision task.
  • Molecular Data: The QM9 and Alchemy datasets were used for graph regression tasks, leveraging molecular structures.
  • Handwriting Character Recognition: A sequence prediction task to evaluate FGNN's ability to capture higher-order dependencies in linear chains.
  • Human Motion Prediction: The Human 3.6M dataset was used to evaluate FGNN on sequential prediction tasks involving skeleton data.

Key Insights and Ideas

  • Bridging PGMs and GNNs: FGNNs offer a principled way to inject the inductive biases of PGMs into GNNs, allowing them to learn from structured dependencies that go beyond pairwise interactions.
  • Efficiency of Low-Rank Decomposition: The paper demonstrates that higher-order potentials can be effectively approximated using low-rank tensor decompositions, making inference computationally feasible.
  • Unified Max/Sum-Product Inference: The ability of FGNNs to represent both Sum-Product and Max-Product inference within a single architecture is a significant theoretical and practical advancement. This means a single FGNN can be trained for tasks requiring marginals or for tasks requiring most likely assignments.
  • Flexibility in Modeling: The FGNN framework allows for flexible definition of factors, enabling the incorporation of domain knowledge (e.g., atom types, bond types in molecules) to construct richer representations.

Key Results

  • Synthetic PGMs: FGNN achieved state-of-the-art or competitive results on synthetic PGM inference tasks, outperforming traditional solvers and other GNNs. For example, on dataset D3, FGNN achieved 93.2% agreement, significantly higher than MPNN (82.1%).
  • LDPC Decoding: FGNN (both Max and Sum variants) consistently outperformed baseline methods, especially in scenarios with high burst noise.
  • Graph Matching: FGNN achieved a performance improvement of 0.8% over MPNN on the Pascal VOC Keypoint dataset, demonstrating its ability to leverage higher-order information.
  • Molecular Data: FGNN showed significant improvements over MPNN on both QM9 and Alchemy datasets, with gains up to 74.39% on QM9 when distance information was excluded.
  • Human Motion Prediction: FGNN achieved superior performance in 3D position error compared to state-of-the-art GNNs, suggesting its effectiveness in capturing higher-order structural priors.

Limitations and Future Work

  • Low-Rank Assumption: The efficiency of FGNN relies on the assumption that higher-order potentials can be well-approximated by low-rank tensor decompositions. While experiments support this, it might not hold for all problems.
  • Computational Cost: While more efficient than traditional higher-order methods, FGNNs still incur computational costs that grow with the order of factors and the number of variables involved.
  • Hyperparameter Tuning: As with most deep learning models, FGNNs may require careful hyperparameter tuning.
  • Future Work: The authors suggest exploring FGNNs for more complex graph structures (hypergraphs) and investigating their application in areas like reinforcement learning and causal inference. The unified framework for Sum-Product and Max-Product inference also opens avenues for developing novel learning algorithms.

Summary updated

BibTeX
@article{zhang2023factor,
  author = {Zhen Zhang and Mohammed Haroon Dupty and Fan Wu and Javen Qinfeng Shi and Wee Sun Lee},
  title = {{Factor Graph Neural Networks}},
  journal = {J. Mach. Learn. Res.},
  year = {2023},
  url = {https://openreview.net/forum?id=HiBWgHvkWv},
}
Figure