A training-inference collaborative defense framework against membership inference attacks for graph neural networks
Graph neural networks (GNNs) have been widely adopted in sensitive domains such as social recommendation, medical diagnosis, and financial analysis due to their powerful capability in modeling structured data. However, their strong reliance on local structures and node attributes during training exposes them to membership inference attacks (MIAs), where attackers can infer whether a node was part of the training set by analyzing prediction discrepancies. Existing defense strategies often suffer from limited effectiveness, high graph perturbation costs, or significant performance degradation when applied to GNNs. To address this, we propose a training-inference collaborative defense framework that enhances output obfuscation from the perspective of predictive entropy. In the training phase, we design an adaptive high-entropy soft labeling mechanism based on node importance, combined with entropy regularization to suppress overconfident predictions. A node-level contrastive learning module is further introduced to mitigate the accuracy drop caused by high-entropy supervision. In the inference phase, we propose a random graph-driven output perturbation strategy that reconstructs the model's output using non-private synthetic inputs while preserving the prediction order. Experimental results on multiple benchmark datasets and GNN models demonstrate that our method achieves a superior trade-off between privacy and utility, significantly enhancing resistance against MIAs.