Spiking GATs: Learning Graph Attentions via Spiking Neural Network

Beibei Wang, Bo JiangarXiv 2022

Abstract

Graph Attention Networks (GATs) have been intensively studied and widely used in graph data learning tasks. Existing GATs generally adopt the self-attention mechanism to conduct graph edge attention learning, requiring expensive computation. It is known that Spiking Neural Networks (SNNs) can perform inexpensive computation by transmitting the input signal data into discrete spike trains and can also return sparse outputs. Inspired by the merits of SNNs, in this work, we propose a novel Graph Spiking Attention Network (GSAT) for graph data representation and learning. In contrast to self-attention mechanism in existing GATs, the proposed GSAT adopts a SNN module architecture which is obvious energy-efficient. Moreover, GSAT can return sparse attention coefficients in natural and thus can perform feature aggregation on the selective neighbors which makes GSAT perform robustly w.r.t graph edge noises. Experimental results on several datasets demonstrate the effectiveness, energy efficiency and robustness of the proposed GSAT model.

Introduction

Graph Attention Networks (GATs) have revolutionized graph representation learning by allowing nodes to dynamically weight their neighbors' contributions. However, standard GATs face two significant hurdles. First, the computational cost is high due to dense self-attention mechanisms requiring extensive floating-point operations. Second, they are often sensitive to noise; dense attention weights mean that even irrelevant or adversarial edges influence node representations.

While sparse GAT variants exist, they typically rely on complex regularization (e.g., $L_0$ norm) that increases the training burden. This paper introduces the Graph Spiking Attention Network (GSAT), which leverages the inherent efficiency and sparsity of Spiking Neural Networks (SNNs) to address these limitations.

Methods: The GSAT Architecture

The core innovation of GSAT is the replacement of standard attention with a bio-inspired spiking mechanism. Instead of continuous values, GSAT uses discrete, binary "spikes" to compute attention weights over $T$ time steps.

The GSAT architecture illustrating the spiking attention computation and feature aggregation process.

Spiking Attention Computation

The process begins with a Poisson Encoder that transforms continuous node features into discrete spike trains. These spikes are processed through an Integrate-and-Fire (IF) mechanism. At each time step, a neuron accumulates a "membrane potential." If this potential exceeds a threshold $\mu$, the neuron fires a spike (1) and resets; otherwise, it remains silent (0).

The final attention coefficients are derived by averaging these spikes over the time window $T$. This naturally results in sparse weights: edges that do not trigger enough spikes receive a weight of zero. To maintain this sparsity without the smoothing effect of Softmax, the authors employ a symmetric normalization technique that preserves the zero-weights.

Experimental Evaluation

GSAT was evaluated on standard benchmarks including citation networks (Cora, Citeseer, Pubmed) and co-purchase networks (Amazon Photo, Amazon Computers).

Performance and Robustness

GSAT consistently outperformed traditional GCN, GAT, and other sparse variants like SGAT. For instance, on the Cora dataset, GSAT achieved an accuracy of 84.18%, surpassing GAT's 82.86%.

Beyond raw accuracy, GSAT demonstrates remarkable robustness to structural perturbations. When subjected to targeted "Nettack" and random edge noise, GSAT's performance degrades significantly slower than its counterparts. The spiking mechanism effectively acts as a natural filter, ignoring noisy edges that fail to meet the firing threshold.

Performance of GSAT compared to other models under Nettack and Random attacks, showing superior robustness.

Energy Efficiency

By operating on binary spikes, GSAT simplifies complex multiplications into basic additions or identity operations. This leads to a massive reduction in Floating Point Operations (FLOPs), making the model highly energy-efficient, especially for deployment on neuromorphic hardware.

Conclusion

The Graph Spiking Attention Network (GSAT) provides a compelling alternative to traditional GATs by integrating SNN principles. By utilizing the natural sparsity and binary efficiency of spiking neurons, GSAT achieves state-of-the-art performance while offering enhanced robustness and significantly lower computational costs. Future work may explore more complex spiking neuron models and scaling to larger graph structures.

Summary updated

BibTeX
@misc{wang2022spiking,
  author = {Beibei Wang and Bo Jiang},
  title = {{Spiking GATs: Learning Graph Attentions via Spiking Neural Network}},
  year = {2022},
  eprint = {2209.13539},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.13539},
}
Figure