Binarized graph neural network

Hanchen Wang, Defu Lian, Ying Zhang, Lu Qin, Xiangjian He, Yiguang Lin, Xuemin Lin

Abstract

Graph Neural Networks (GNNs) have become the standard for learning on graph-structured data but suffer from significant computational and memory overhead due to high-dimensional floating-point operations. This paper introduces the Binarized Graph Neural Network (BGN), the first framework to implement GNNs using 1-bit binary parameters and activations. By replacing standard matrix multiplications with efficient bitwise operations (XNOR and popcount), BGN achieves up to a 29x speedup and 28x memory reduction while maintaining performance competitive with full-precision state-of-the-art models.

Introduction

Standard GNNs represent node embeddings and network parameters as 32-bit real-valued matrices. As graphs scale to millions of nodes and edges, these models encounter severe memory bottlenecks and computational latency. While Binary Neural Networks (BNNs) have been successful in computer vision, their application to the irregular, non-Euclidean structure of graphs is non-trivial. BGN addresses these challenges by creating an end-to-end binarized GNN architecture that preserves structural information while drastically reducing resource requirements.

Methodology

The BGN framework is designed to be modular, allowing it to be integrated into existing GNN architectures such as Graph Attention Networks (GAT) or Adaptive Sampling GCNs (AS-GCN).

Notation and Definitions

To formalize the binarization process, the following notations are employed to define the graph structure and the binarization operations:

Summary of notations and definitions used in the BGN framework.

Core Components

The architecture of BGN relies on several key innovations to maintain expressiveness in a 1-bit space:

  1. Binarization Function: A deterministic sign function $\mathcal{B}(\cdot)$ converts real-valued weights ($\mathbf{W}$) and activations ($\mathbf{h}_v$) into binary values $\{+1, -1\}$.
  2. Binary Attention Mechanism: Unlike standard attention, BGN binarizes attention coefficients ($\alpha_{ij}$), enabling "Masked Summation" instead of traditional dot products, which significantly lowers computational complexity.
  3. The Balance Function: To prevent "information collapse"—where vectors become uniform—a centering function subtracts the mean of pre-activations before binarization, ensuring an even bit distribution.
  4. Optimization via STE: Since the sign function is non-differentiable, the Straight-Through Estimator (STE) is used to propagate gradients during training, allowing the use of standard optimizers like Adam.
The overall architecture of the Binarized Graph Neural Network (BGN) framework.

Experimental Evaluation

The model was evaluated on classic citation benchmarks (Cora, Citeseer, and Pubmed) and synthetic binomial graphs for graph matching tasks.

Key Results

  • Efficiency: On the Cora dataset, BGN-GAT achieved a 19x speedup in inference and a 28x reduction in parameter storage compared to the full-precision GAT baseline.
  • Accuracy: The accuracy drop was remarkably low. For instance, on Cora, BGN-GAT maintained ~77.7% to 80.5% accuracy, compared to the 84% of the full-precision baseline.
  • Robustness: In graph matching, BGN outperformed full-precision models as node counts increased, suggesting that binary Hamming distance can be a more robust similarity metric in high-dimensional spaces than Euclidean distance.

Discussion and Future Work

BGN demonstrates that 1-bit precision is sufficient to capture complex graph topologies if trained correctly. The "Balance Function" is critical for maintaining the discriminative power of binary embeddings. However, a 3-6% accuracy gap remains compared to full-precision models. Future research should explore binarization for tasks beyond node classification, such as link prediction, and evaluate performance on industrial-scale "Web-scale" graphs.

Summary updated

BibTeX
@inproceedings{wang2020binarized,
  author = {Hanchen Wang and Defu Lian and Ying Zhang and Lu Qin and Xiangjian He and Yiguang Lin and Xuemin Lin},
  title = {{Binarized graph neural network}},
  booktitle = {World Wide Web},
  year = {2020},
  url = {https://openreview.net/forum?id=L274paLo4n},
}
Figure