Objective Graph neural networks (GNNs) have become an important approach for processing graph-structured data, whereas attention, a popular mechanism for GNNs, has achieved improved performance in various graph optimization tasks. However, both static attention (SA) and dynamic attention (DA) can result in high computational costs and greater data complexity. In particular, when dealing with large-scale graph data with numerous nodes and edges, the computational effort can increase substantially. Therefore, reducing computational complexity can significantly improve the training and inference speed of models, enabling GNNs to be deployed across a wider range of applications. Methods First, in this paper, we propose a robust graph neural network model (GSDAT) based on symmetric attention (SAD). The model significantly reduces the number of parameters for training and the inference time. Second, to address the high computational complexity of SA and DA, we propose a SAD mechanism without learning parameters that uses geometric relationships in the feature space to calculate the attention coefficients between a target node and its neighboring nodes, thereby determining the contributions of neighboring nodes. This mechanism avoids introducing additional training parameters to compute the attention graph, effectively reducing the high computational costs. Finally, SA and DA use the softmax function to map the computed attention coefficients, which can increase data complexity during feature weighting in the message aggregation phase. We therefore use the ReLU function to address the limitations of softmax in handling negatively correlated nodes in SA and DA by extracting neighboring nodes with significant contributions for node feature updates. This approach helps alleviate class overlap and reduce data complexity. Results and Discussions Experiments on 13 publicly available benchmark datasets show that GSDAT achieves accuracy comparable to or higher than that of six mainstream GNNs across two downstream tasks: node classification and link prediction. For node classification, GSDAT improves accuracy on the CS dataset by 2.63, 7.94, and 5.36 percentage points relative to the respective comparison models. On the Min and Tol datasets, it achieves accuracy improvements of 7.85 and 24.41 percentage points, respectively, over the sub-optimal models, GraphSAGE and GCN. However, its average accuracy on the Cit and CS datasets is slightly lower than that of the optimal model, GraphSAGE, by 0.13 and 0.10 percentage point, respectively, although it outperforms most of the other comparison algorithms. For link prediction, GSDAT achieves the best receiver operating curve (ROC) area under the curve (AUC) scores on six datasets, including Wik, with values of 86.33%, 86.37%, 84.49%, 86.15%, 81.54%, and 81.76%. On the Ree, Amh, and Joh datasets, it improves the ROC‒AUC score by 6.37, 4.78, and 3.49 percentage points, respectively, over the sub-optimal model, GTN. These results demonstrate GSDAT's effectiveness in node classification and link prediction. Ablation experiments further demonstrate the contribution of SAD to performance improvements. Noise experiments show that GSDAT is robust to structural noise, indicating its potential for applications involving graphs with structural noise. Compared with the graph attention network models GAT, GATv2, and GTN, GSDAT also requires fewer computational resources. Furthermore, its F1, F2, F3, and ONB metric values are 1.109, 0.627, 0.160, and 0.473, respectively, representing substantial improvements over the baseline algorithm and indicating reduced data complexity. Conclusions In this study, we propose GSDAT, a GNN model with low computational and data complexity. First, this paper proposes the SAD mechanism, which uses vector projection to calculate the contributions of neighboring nodes to a target node. This mechanism significantly reduces GSDAT's memory requirements compared with models such as GAT and helps address the high computational complexity of SA, DA, and graph transformers. Second, the ReLU function is used to replace the softmax function. Because ReLU outputs 0 for the negative half-axis, it can automatically identify and suppress neighboring nodes with negative attention coefficients, thereby helping alleviate class overlap in the feature space and reducing data complexity.
给定一个图 G,;其中,和分别为图中节点和边的集合。将集合和的长度,即节点和边的数量分别记作和。将图 G 的节点特征矩阵记作 X,;其中,为特征维度。线性变换模块的主要功能是将图 G 的特征维度从变换到,通常将的选定范围设置为2的幂,且满足,并利用网格搜索策略确定。因此,图 G 的线性变换如式(1)所示。
在链接预测实验中,将GSDAT与DC‒GCN[34]等模型做对比。采用平均ROC‒AUC(AUC,即ROC曲线下面积(area under ROC curve),用于衡量分类模型的整体表现)作为链接预测准确性的主要评价指标,平均ROC‒AUC的值越大链接预测效果越好。表4为6个数据集上的链接预测平均ROC‒AUC。由表4可见,GSDAT在Wik、ree、amh和joh这4个数据集上取得最高平均ROC‒AUC,分别为86.33%、86.37%、84.49%和86.15%。在数据集ree、amh和joh上,次优模型分别为GCN、DC‒GNN和GCN,GSDAT的平均ROC‒AUC比次优模型分别高3.89、1.55和3.03个百分点。在数据集cor和pen上,GSDAT的平均ROC‒AUC分别为81.54%和81.76%,低于最优模型DC‒GNN的84.68%和86.69%。
在数据集Cit、Cor上进行噪声实验,验证GSDAT的抗噪声能力。按照Brody等[17]提出的规则进行噪声图设计,设计的结构噪声如下:对于图 G (())和噪声率(),随机从边集合中选择条不存在的边加入图 G,生成噪声图 G*(())。在噪声图上训练GSDAT、GTN、GAT、GATv2等模型,超参数设置与节点分类实验相同。图2为不同GNN模型的抗噪能力。
为比较SDA、SA、DA的数据复杂度,以及研究ReLU与softmax函数的区别,在数据集Que上对SDA、SA、DA进行类重叠实验。类重叠实验的评价指标采用文献[35]提出的F1(fishers discriminant ratio)、F2(volume of overlap region)、F3(feature efficiency)和文献[36]提出的ONB(overlap number of balls)。其中,F1和F3的值越大,F2和ONB的值越小,则类重叠程度越低,即数据复杂度越低。表6为类重叠实验结果。
JainA, ZamirA R, SavareseS,et al.Structural-RNN:Deep learning on spatio-temporal graphs[C]//Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition(CVPR).Las Vegas:IEEE,2016:5308‒5317. doi:10.1109/cvpr.2016.573
[4]
YanSijie, XiongYuanjun, LinDahua.Spatial temporal graph convolutional networks for skeleton-based action recognition[J].Proceedings of the AAAI Conference on Artificial Intelligence,2018,32(1):7444‒7452. doi:10.1609/aaai.v32i1.12328
[5]
LandrieuL, SimonovskyM.Large-scale point cloud semantic segmentation with superpoint graphs[C]//Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.Salt Lake City:IEEE,2018:4558‒4567. doi:10.1109/cvpr.2018.00479
[6]
WangYue, SunYongbin, LiuZiwei,et al.Dynamic graph CNN for learning on point clouds[J].ACM Transactions on Graphics,2019,38(5):1‒12. doi:10.1145/3326362
[7]
XuDanfei, ZhuYuke, ChoyC B,et al.Scene graph generation by iterative message passing[C]//Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition(CVPR).Honolulu:IEEE,2017:3097‒3106. doi:10.1109/cvpr.2017.330
[8]
JohnsonJ, GuptaA, LiFeifei.Image generation from scene graphs[C]//Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.Salt Lake City:IEEE,2018:1219‒1228. doi:10.1109/cvpr.2018.00133
[9]
KhademiM, SchulteO.Deep generative probabilistic graph neural networks for scene graph generation[J].Proceedings of the AAAI Conference on Artificial Intelligence,2020,34(7):11237‒11245. doi:10.1609/aaai.v34i07.6783
[10]
LiYikang, OuyangWanli, ZhouBolei,et al.Factorizable net:An efficient subgraph-based framework for scene graph generation[C]//Computer Vision‒ECCV 2018.Cham:Springer,2018:346‒363. doi:10.1007/978-3-030-01246-5_21
[11]
KipfT N, WellingM.Semi-supervised classification with graph convolutional networks[PP/OL].V4.(2017‒02‒22)[2024‒08‒29].
[12]
HamiltonW L, YingR, LeskovecJ.Inductive Representation Learning on Large Graphs[C]//Procedings of the 31st Conference on Neural Information Processing Systems(NIPS 2017).Long Beach:NIPS,2017:1024‒1034. doi:10.7551/mitpress/11474.003.0014
[13]
XuKeyulu, HuWeihua, LeskovecJ,et al.How Powerful are Graph Neural Networks[C]//International Conference on Learning Representations(ICLR).Louisiana:OpenReview.net,2019:1‒17.
[14]
KimD, OhA.How to find your friendly neighborhood:Graph attention design with self-supervision[PP/OL].V1.(2022‒04‒11)[2024‒08‒29].
VelickovicP, CucurullG, CasanovaA,et al.Graph attention networks[C]//International Conference on Learning Representations.Vancouver:ICLR,2018:1‒12.
[17]
BrodyS, UriA, YahavE.How Attentive are Graph Attention Networks[C/OL]//International Conference on Learning Representations,2022:1‒26.
[18]
DwivediV P, BressonX.A generalization of transformer networks to graphs[PP/OL].V2.(2021‒01‒24)[2024‒08‒29].
[19]
RongYu, BianYatao, XuTingyang,et al.Self-supervised graph transformer on large-scale molecular data[PP/OL].V1.(2020‒06‒18)[2024‒08‒29].
[20]
YingChengxuan, CaiTianle, LuoShengjie,et al.Do transformers really perform bad for graph representation [PP/OL].V1.(2021‒06‒09)[2024‒08‒29].
[21]
KimJ, OhS, HongS.Transformers generalize deepsets and can be extended to graphs & hypergraphs[J].Advance neural information processing systems,2021,34:28016‒28028.
[22]
CharteD, CharteF, HerreraF.Reducing data complexity using autoencoders with class-informed loss functions[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2022,44(12):9549‒9560. doi:10.1109/tpami.2021.3127698
[23]
LanchoC, Martín De DiegoI, CuestaM,et al.Hostility measure for multi-level study of data complexity[J].Applied Intelligence,2023,53(7):8073‒8096. doi:10.1007/s10489-022-03793-w
[24]
VaswaniA, ShazeerN, ParmarN,et al.Attention is all you need[PP/OL].V7.(2023‒08‒02)[2024‒08‒29].doi:10.65215/ysbyhc05
[25]
KingmaD P, BaJ.Adam:A method for stochastic optimization[PP/OL].V9.(2017‒01‒30)[2024‒08‒29].
[26]
SrivastavaN, HintonG, KrizhevskyA,etal.Dropout:A simple way to prevent neural networks from overfitting[J].Journal of Machine Learning Research,2014,15(56):1929‒1958.
[27]
YangZhilin, CohenW W, SalakhutdinovR.Revisiting semi-supervised learning with graph embeddings[C]//Proceedings of the 33rd International Conference on International Conference on Machine Learning.New York:ICML,2016:40‒48. doi:10.48550/arXiv.1603.08861
[28]
BojchevskiA, GünnemannS.Deep Gaussian embedding of graphs:Unsupervised inductive learning via ranking[C]//Proceedings of the 6th International Conference on Learning Representations.Vancouver:ICLR,2018. doi:10.1609/aaai.v32i1.11642
[29]
YangRenchi, ShiJieming, XiaoXiaokui,et al.Scaling attributed network embedding to massive graphs[J].Proceedings of the VLDB Endowment,2020,14(1):37‒49. doi:10.14778/3421424.3421430
[30]
ShchurO, MummeM, BojchevskiA,et al.Pitfalls of graph neural network evaluation[PP/OL].V2.(2019‒06‒18)[2024‒08‒29].
[31]
PlatonovO, KuznedelevD, DiskinM,et al.A critical look at the evaluation of GNNs under heterophily:Are we really making progress [PP/OL].V2.(2024‒03‒02)[2024‒08‒29].
[32]
LimD, HohneF, LiXiuyu,et al.Large scale learning on non-homophilous graphs:New benchmarks and strong simple methods[PP/OL].V1.(2021‒10‒27)[2024‒08‒29].
HoT K, BasuM.Complexity measures of supervised classification problems[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2002,24(3):289‒300. doi:10.1109/34.990132
[36]
Pascual‒TrianaJ D, CharteD, Andrés ArroyoM,et al.Revisiting data complexity metrics based on morphology for overlap and imbalance:Snapshot,new overlap number of balls metrics and singular problems prospect[J].Knowledge and Information Systems,2021,63(7):1961‒1989.