MSGNN: A Spectral Graph Neural Network Based on a Novel Magnetic Signed Laplacian

Yixuan He, Michael Perlmutter, Gesine Reinert, Mihai Cucuringu

Abstract

Signed and directed networks are ubiquitous in real-world applications. However, there has been relatively little work proposing spectral graph neural networks (GNNs) for such networks. Here we introduce a signed directed Laplacian matrix, which we call the magnetic signed Laplacian, as a natural generalization of both the signed Laplacian on signed graphs and the magnetic Laplacian on directed graphs. We then use this matrix to construct a novel efficient spectral GNN architecture and conduct extensive experiments on both node clustering and link prediction tasks. We demonstrate that our proposed spectral GNN is effective for incorporating both signed and directional information, and attains leading performance on a wide range of data sets. Additionally, we provide a novel synthetic network model, which we refer to as the Signed Directed Stochastic Block Model, and a number of novel real-world data sets based on lead-lag relationships in financial time series.

Introduction

Most Graph Neural Networks (GNNs) are designed for "simple" graphs—those where edges are undirected and weights are non-negative. However, real-world data is rarely that simple. Social networks have friendships (+) and enmities (-); financial markets have lead-lag relationships where one stock's movement influences another's directionally.

While there are GNNs for signed graphs and GNNs for directed graphs, there has been very little work on spectral GNNs that can handle both simultaneously. Spectral methods are powerful but traditionally struggle with directionality because the standard graph Laplacian is symmetric. The challenge lies in defining a Laplacian that is mathematically well-behaved (positive semidefinite) while encoding both the sign and the directional flow of an edge.

Methodology: The Magnetic Signed Laplacian

The authors propose a new operator: the Magnetic Signed Laplacian. This framework unifies the magnetic Laplacian (used for directed graphs) with the signed Laplacian (used for undirected signed graphs). The resulting matrix is Hermitian (complex-valued but with real eigenvalues), which allows it to encode direction as a "phase shift" in a complex plane.

A tunable parameter $q$ acts as a "charge." When $q=0$, the model ignores direction; as $q$ increases, the phase matrix captures the directional flow between nodes. Instead of expensive eigen-decompositions, the MSGNN architecture uses Chebyshev polynomials to approximate spectral filters, making the convolution operation localized and computationally efficient. Since the hidden representations are complex-valued, the authors utilize a complex version of the ReLU activation function to preserve phase information.

Datasets and Evaluation

The paper evaluates MSGNN on a mix of synthetic and real-world benchmarks:

  • Signed Directed Stochastic Block Model (SDSBM): A novel synthetic model that allows researchers to control noise levels for both signs and directions.
  • Real-World Benchmarks: Bitcoin-Alpha, Bitcoin-OTC, Slashdot, and Epinions.
  • FiLL (Financial Lead-Lag) Datasets: A new contribution constructed from 20 years of stock return data, where edges represent the linear regression coefficients of one stock's returns against another's lagged returns.
Three-cluster (F1) and Four-cluster (F2) configurations for the Signed Directed Stochastic Block Model (SDSBM).

Key Insights and Results

The Magnetic Signed Laplacian is a true generalization: if the graph is only signed, it reduces to the standard signed Laplacian; if only directed, it reduces to the magnetic Laplacian. By using complex numbers, the model treats a link from $A \to B$ as the complex conjugate of $B \to A$, elegantly encoding asymmetry without breaking spectral properties required for stable GNN training.

Experimental results show that MSGNN achieved the highest accuracy in all 25 link prediction cases tested. Furthermore, MSGNN is significantly faster than existing spatial methods; for example, on the Epinions dataset, it was roughly 20x faster than SNEA, a leading spatial attention-based baseline. The model also showed strong performance with very few layers (2–4), suggesting it avoids the "oversmoothing" problem common in deep GNNs.

Conclusion

MSGNN demonstrates that for many tasks, discarding either sign or direction ruins the underlying cluster structure. While currently designed for static snapshots, future work will explore extending this magnetic spectral approach to dynamic graphs, hypergraphs, and networks with highly varying edge densities.

Summary updated

BibTeX
@inproceedings{he2022msgnn,
  author = {Yixuan He and Michael Perlmutter and Gesine Reinert and Mihai Cucuringu},
  title = {{MSGNN: A Spectral Graph Neural Network Based on a Novel Magnetic Signed Laplacian}},
  booktitle = {LoG},
  year = {2022},
  url = {https://openreview.net/forum?id=KUGwmnSdPV3},
}
Figure