NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Factor Graph Neural Network

Zhen Zhang, Fan Wu, Wee Sun LeearXiv 2019

Introduction

Standard Graph Neural Networks (GNNs) have demonstrated remarkable success in modeling relationships between pairs of objects. However, they often struggle with complex, multi-variable constraints prevalent in real-world systems. This paper introduces the Factor Graph Neural Network (FGNN), a novel architecture that generalizes GNNs to operate on factor graphs. By explicitly modeling higher-order dependencies, FGNNs bridge the gap between the structural rigor of probabilistic graphical models (PGMs) and the learning capacity of deep neural networks.

Problem Formulation: Higher-Order Dependencies

Most contemporary GNNs represent data as simple graphs where edges denote pairwise relationships. In many domains, however, constraints involve three or more variables simultaneously. For instance, in molecular modeling, an atom's valency constrains its total number of bonds across multiple neighbors—a higher-order dependency that pairwise edges cannot easily capture.

Probabilistic Graphical Models utilize factor graphs to represent these complex interactions. A factor graph is a bipartite graph containing two types of nodes: variable nodes and factor nodes.

A simple factor graph illustrating variable nodes ($x_1, x_2, x_3$) connected via factor nodes ($f_1, f_2$).

While PGMs are theoretically sound, exact inference in these models is often NP-hard. Classical approximate algorithms, such as Max-Product Belief Propagation, are effective but can fail under certain conditions. FGNN aims to learn these inference strategies directly from data, potentially discovering more robust solutions than fixed classical algorithms.

Methodology: The FGNN Architecture

The core of the FGNN is its ability to process information across the bipartite structure of a factor graph. The architecture consists of two alternating modules that facilitate message passing between variable and factor nodes.

Variable-to-Factor (VF) Module

In this stage, variable nodes transmit their current feature representations to the factor nodes they are associated with. The factor node aggregates this incoming information to develop a comprehensive understanding of the state of its neighborhood.

Factor-to-Variable (FV) Module

Following the VF update, factor nodes process the aggregated messages and send updates back to the variable nodes. This step allows the variables to adjust their states based on the higher-order constraints enforced by the factors.

The architecture of the Variable-to-Factor (VF) and Factor-to-Variable (FV) modules, showing feature mapping and aggregation.

Theoretical Equivalence

A key contribution of this work is the formal proof that an FGNN can exactly parameterize the Max-Product Belief Propagation algorithm. By utilizing specific architectural components—such as ReLU activation functions, max-pooling for aggregation, and tensor decomposition—the FGNN can replicate the steps of classical MAP inference. This theoretical grounding ensures that FGNNs possess the representational power to solve any problem solvable by classical belief propagation, while also offering the flexibility to learn superior latent features.

Experimental Evaluation

The researchers evaluated the FGNN on synthetic PGM datasets and real-world 3D vision tasks:

  • Synthetic PGM Datasets: These datasets featured chain structures with "budget" constraints to test the model's ability to find exact Maximum A Posteriori (MAP) solutions.
  • S3DIS (Stanford Large-Scale 3D Indoor Spaces): A benchmark for 3D semantic segmentation of indoor environments.
  • ShapeNet Part Dataset: A dataset of 3D CAD models used for part-level segmentation.

Key Results

  • Superiority over Classical Solvers: On synthetic datasets, FGNN achieved 92.5% agreement with exact solutions, significantly outperforming classical Max-Product (53.0%) and Linear Programming relaxation (80.7%).
  • State-of-the-Art in 3D Vision: On the S3DIS task, FGNN achieved a Mean IoU of 60.0%, surpassing established models like PointNet (47.6%) and PointCNN (57.3%).
  • Generalization: On ShapeNet, the model achieved an overall accuracy of 85.5%, demonstrating its effectiveness across diverse geometric data types.

Conclusion and Future Work

The Factor Graph Neural Network represents a significant step toward integrating symbolic probabilistic reasoning with deep learning. By moving beyond pairwise interactions, FGNNs can capture the complex constraints inherent in many physical and logical systems.

Future research directions include improving scalability, as the representation of factor nodes can grow exponentially with their scope. While low-rank tensor approximations offer a partial solution, high-order factors remain computationally demanding. Additionally, exploring automated methods for factor graph construction—rather than relying on heuristics like $k$-nearest neighbors—could further enhance the model's applicability to domains where structural knowledge is less readily available.

Summary updated

BibTeX
@misc{zhang2019factor,
  author = {Zhen Zhang and Fan Wu and Wee Sun Lee},
  title = {{Factor Graph Neural Network}},
  year = {2019},
  eprint = {1906.00554},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.00554},
}
Figure