BlockGNN: Towards Efficient GNN Acceleration Using Block-Circulant Weight Matrices

Zhe Zhou, Bizhao Shi, Zhe Zhang, Yijin Guan, Guangyu Sun, Guojie LuoDAC 2021

TL;DR

This paper introduces BlockGNN, a novel software-hardware co-design approach to accelerate Graph Neural Networks (GNNs). By employing block-circulant weight matrices to compress GNN models and a specialized CirCore hardware architecture for efficient computation, BlockGNN significantly reduces latency and energy consumption, making real-time GNN inference feasible on resource-constrained edge devices.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) are powerful tools for analyzing graph-structured data, achieving state-of-the-art results in various domains. However, as GNN models become larger and more complex, and graph datasets grow in size, their computational demands skyrocket. This exponential increase in complexity makes real-time inference a significant challenge, particularly for edge computing platforms with limited resources. The need for efficient GNN acceleration is critical for applications like smart traffic prediction and real-time object detection in autonomous vehicles.

Methods

The paper proposes a two-pronged approach:

  • Algorithm-Level Compression (Block-Circulant Weight Matrices): The core algorithmic innovation is the use of block-circulant weight matrices. This technique restructures the weight matrices in GNN layers, allowing for computations to be performed much more efficiently using Fast Fourier Transforms (FFTs). This reduces the computational complexity of matrix multiplications from O(n²) to O(n log n) with a negligible impact on accuracy. The storage requirement for weights is also reduced.
  • Hardware-Level Acceleration (BlockGNN Accelerator with CirCore): To efficiently process these compressed GNNs, the authors designed a specialized hardware accelerator called BlockGNN. At its heart is the "CirCore" architecture, a three-stage pipeline comprising:
  • FFT Unit: For transforming feature vectors into the spectral domain.
  • Systolic Array: For performing efficient element-wise multiplications and accumulations of spectral weights and features.
  • IFFT Unit: For transforming the results back to the spatial domain. The CirCore architecture is designed for high throughput and efficient computation of block-circulant matrices. Additionally, a performance and resource model is introduced to automatically determine optimal hardware configurations (e.g., number of FFT channels, systolic array dimensions) for different GNN tasks and datasets, ensuring efficient resource utilization.

Datasets

The paper evaluates its approach on several standard graph datasets:

  • Cora (CR)
  • Citeseer (CS)
  • Pubmed (PB)
  • Reddit (RD)

These datasets are used to evaluate GNN models for tasks like node classification. No new benchmarks were introduced; the focus was on evaluating existing GNN models on established datasets.

Key Insights and Ideas

  • Block-Circulant Matrices are a Practical Compression Technique for GNNs: While known for traditional DNNs, the paper demonstrates their effectiveness and minimal accuracy impact for GNNs, opening up new avenues for GNN acceleration.
  • Software-Hardware Co-design is Crucial: Simply compressing the model or designing a generic accelerator isn't enough. BlockGNN's success stems from tailoring the hardware architecture (CirCore) specifically to the computations enabled by the block-circulant compression.
  • A Performance and Resource Model is Key for Adaptability: GNN tasks vary greatly. The ability to automatically tune hardware parameters for optimal performance and resource usage on different GNN models and datasets is a significant advantage, especially for reconfigurable platforms like FPGAs.
  • Computation, Not Memory, is the Primary Bottleneck for Large GNNs: The authors' profiling and hardware design choices suggest that while memory bandwidth is important, the sheer number of computations is the main hurdle for achieving real-time GNN inference.

Key Results

  • Speedup: BlockGNN achieves up to 8.3x speedup compared to the baseline HyGCN architecture on the Reddit dataset. Compared to a powerful Intel Xeon CPU, BlockGNN-opt (using the optimized parameters) shows an average speedup of 2.3x.
  • Energy Efficiency: BlockGNN demonstrates significant energy savings, achieving up to 111.9x energy reduction compared to the Intel Xeon CPU baseline. The energy-efficiency metric (Nodes/Joule) shows an average improvement of 68.9%.
  • Accuracy: The block-circulant compression results in a negligible accuracy drop, typically within 1.5% even with aggressive compression (e.g., block size n=128).
  • Hardware Utilization: Experiments on the ZC706 FPGA show efficient resource utilization, with configurations often maximizing DSP usage, indicating the model's effectiveness in guiding hardware design.

Limitations and Future Work

  • FFT IP Performance: The paper notes that the implemented speedup is still below the theoretical maximum, partly due to the limitations of the Xilinx FFT IP.
  • Real-Valued FFT (RFFT): The authors suggest using RFFT and IRFFT for further speedup, as GNN inputs are typically real-valued, which could reduce computation further.
  • Compressing Only Aggregators: For even higher accuracy, the paper suggests a trade-off where only the aggregator weight matrices are compressed, leaving the combination phase uncompressed. This could yield better accuracy with a slightly reduced compression ratio.
  • Further Optimization of Hardware: While the CirCore architecture is efficient, there's always room for further optimization in the FFT/IFFT units and systolic array design.

Summary updated

BibTeX
@misc{zhou2021blockgnn,
  author = {Zhe Zhou and Bizhao Shi and Zhe Zhang and Yijin Guan and Guangyu Sun and Guojie Luo},
  title = {{BlockGNN: Towards Efficient GNN Acceleration Using Block-Circulant Weight Matrices}},
  year = {2021},
  eprint = {2104.06214},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.06214},
}
Figure