Efficient Mixed Precision Quantization in Graph Neural Networks

Samir Moustafa, Nils M. Kriege, Wilfried N. Gansterer

Main figure for Efficient Mixed Precision Quantization in Graph Neural Networks

Abstract

Graph Neural Networks (GNNs) have become essential for handling large-scale graph applications. However, the computational demands of GNNs necessitate the development of efficient methods to accelerate inference. Mixed precision quantization emerges as a promising solution to enhance the efficiency of GNN architectures without compromising prediction performance. Compared to conventional deep learning architectures, GNN layers contain a wider set of components that can be quantized, including message passing functions, aggregation functions, update functions, the inputs, learnable parameters, and outputs of these functions. In this paper, we introduce a theorem for efficient quantized message passing to aggregate integer messages. It guarantees numerical equality of the aggregated messages using integer values with respect to those obtained with full (FP32) precision. Based on this theorem, we introduce the Mixed Precision Quantization for GNN (MixQ-GNN) framework, which flexibly selects effective integer bit-widths for all components within GNN layers. Our approach systematically navigates the wide set of possible bit-width combinations, addressing the challenge of optimizing efficiency while aiming at maintaining comparable prediction performance. MixQ-GNN integrates with existing GNN quantization methods, utilizing their graph structure advantages to achieve higher prediction performance. On average, MixQ-GNN achieved reductions in bit operations of $5.5 $ for node classification and $5.1 $ for graph classification compared to architectures represented in FP32 precision.

Benchmark Results

Tested on 6 datasets Non-standard metric on 1 dataset

Tables show presented results in global context (best 3 papers + GCN + MLP).

Classic

Reddit

Global leaderboard →
Non-default metric. This paper reports Accuracy; the dataset default is F1. Values below use Accuracy only.

Sorted by Accuracy. Highlighted rows are from other papers.

#ModelAccuracy ↑Paper
1
GAP-EDP
0.9870 ±0.0003
2
NE-ASGCN
0.9758 ±0.0027
3
HSGT
0.9730 ±0.0024
21
GraphSAGE
0.9653 ±0.0011
139
GraphSAGE (FP32)
0.8672 ±0.0038
This paper
144
MixQ-GNN (0.1)
0.8601 ±0.0104
This paper
147
MLP
0.8240 ±0.0010

TU Dortmund

#ModelAccuracy ↑Paper
1
MSH-GNN
0.9410 ±0.0330
2
GRDL
0.8260 ±0.0120
3
GMN
0.8225
32
GIN
0.7880 ±0.0410
149
MLP
0.7600 ±0.0320
317
A^2Q
0.7400 ±0.0120
This paper
363
MixQ (λ*)
0.7310 ±0.0550
This paper
362
DQ
0.7310 ±0.0410
This paper
452
FP32
0.7050 ±0.0420
This paper
#ModelAccuracy ↑Paper
1
GC-GNN (GCN)
0.9210 ±0.0810
2
SUGAR
0.8403 ±0.0133
3
Ortho-g-U-Nets
0.8387
15
SAGE
0.8088 ±0.0233
152
FP32
0.7380 ±0.0330
This paper
157
DQ
0.7290 ±0.0310
This paper
160
A^2Q
0.7220 ±0.0100
This paper

OGB

GNNBenchmark

#ModelAccuracy ↑Paper
1
PPGN
1.0000
2
RW-AgentNet
1.0000
3
AgentNet
1.0000
8
GCN
1.0000
39
FP32
0.9940 ±0.0130
This paper
50
MixQ - (λ=-ε)
0.9500 ±0.0510
This paper
51
QAT - INT4
0.9440 ±0.0590
This paper
65
QAT - INT2
0.2440 ±0.0810
This paper
SOTA performance (not significantly different from the best) Proposed method (this paper) Baseline / comparison (this paper) Global context (other papers)