《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (6): 1817-1826.DOI: 10.11772/j.issn.1001-9081.2024060792
• 人工智能 • 上一篇
收稿日期:
2024-06-14
修回日期:
2024-08-30
接受日期:
2024-09-05
发布日期:
2024-09-25
出版日期:
2025-06-10
通讯作者:
刘爽
作者简介:
刘爽(1977—),女,辽宁锦州人,教授,博士,CCF会员,主要研究方向:知识图谱、深度学习 dlnuliushuang@qq.com基金资助:
Shuang LIU(), Daqing LIU, Jiana MENG, Di ZHAO
Received:
2024-06-14
Revised:
2024-08-30
Accepted:
2024-09-05
Online:
2024-09-25
Published:
2025-06-10
Contact:
Shuang LIU
About author:
LIU Shuang, born in 1977, Ph. D., professor. Her research interests include knowledge graph, deep learning.Supported by:
摘要:
针对超关系知识图谱中限定符会为主三元组引入无关噪声的问题,提出一种融合噪声过滤的超关系知识图谱补全方法(HRNF)。首先,为了有效增强超关系事实,构建特征增强模块;同时,利用卷积神经网络(CNN)提取普通三元组特征,并通过异构图神经网络(HGNN)捕获超关系事实中的复杂关系特征;其次,融合这2种特征,利用普通三元组的稳定性与可靠性增强超关系事实中主三元组的信息,减少限定符引入噪声的影响;再次,为了更准确地融合特征表示,构建相关性感知模块;同时,利用图注意力网络(GATv2),通过动态学习不同节点间的权重更新增强后的特征表示;继次,为了捕获复杂的语义信息,构建语义增强模块;最后利用Transformer模型,通过自注意力机制捕获序列中任意2个元素之间的依赖关系,从而生成最终的预测序列。为了验证HRNF的有效性,在2个常用的数据集Wikipeople和JF17K上进行广泛的实验。结果表明,相较于基线方法中较优的GRAN(GRAph-based N-ary relational learning),在预测主三元组实体时,HRNF在Wikipeople数据集上的平均倒数排名(MRR)、Hits@1和Hits@10分别提升了0.6、1.1和1.8个百分点,在JF17K数据集上的MRR、Hits@1和Hits@10分别提升了0.5、0.7和2.9个百分点。以上这些显著提升证明了HRNF在处理超关系知识图谱补全任务中可以有效地缓解限定符带来的噪声问题。
中图分类号:
刘爽, 刘大庆, 孟佳娜, 赵迪. 融合噪声过滤的超关系知识图谱补全方法[J]. 计算机应用, 2025, 45(6): 1817-1826.
Shuang LIU, Daqing LIU, Jiana MENG, Di ZHAO. Hyper-relational knowledge graph completion method fusing noise filtering[J]. Journal of Computer Applications, 2025, 45(6): 1817-1826.
数据集 | 训练集样本数 | 验证集样本数 | 测试集样本数 | 实体 数 | 关系数 | 超关系数 | 最大 属性值 |
---|---|---|---|---|---|---|---|
Wikipeople | 294 439 | 37 715 | 37 712 | 34 839 | 178 | 369 866 | 7 |
JF17K | 76 379 | — | 24 568 | 28 645 | 501 | 100 947 | 6 |
表1 数据集详情
Tab. 1 Dataset details
数据集 | 训练集样本数 | 验证集样本数 | 测试集样本数 | 实体 数 | 关系数 | 超关系数 | 最大 属性值 |
---|---|---|---|---|---|---|---|
Wikipeople | 294 439 | 37 715 | 37 712 | 34 839 | 178 | 369 866 | 7 |
JF17K | 76 379 | — | 24 568 | 28 645 | 501 | 100 947 | 6 |
超参数 | Wikipeople参数值 | JF17K参数值 |
---|---|---|
训练轮数 | 300 | 300 |
学习率 | ||
嵌入维度 | 256 | 256 |
图表示丢弃值 | 0.1 | 0.2 |
图表示注意力头数 | 4 | 4 |
语义丢弃值 | 0.1 | 0.2 |
语义注意力头数 | 4 | 4 |
HGNN激活函数 | eLU | eLU |
解码器激活函数 | GeLU | GeLU |
隐藏层大小 | 256 | 256 |
批次大小 | 1 024 | 1 024 |
权重衰减 | 0.01 | 0.01 |
实体软标签 | 0.2 | 0.9 |
关系软标签 | 0.1 | 0.0 |
表2 超参数的最佳设置
Tab. 2 Best setting of hyperparameters
超参数 | Wikipeople参数值 | JF17K参数值 |
---|---|---|
训练轮数 | 300 | 300 |
学习率 | ||
嵌入维度 | 256 | 256 |
图表示丢弃值 | 0.1 | 0.2 |
图表示注意力头数 | 4 | 4 |
语义丢弃值 | 0.1 | 0.2 |
语义注意力头数 | 4 | 4 |
HGNN激活函数 | eLU | eLU |
解码器激活函数 | GeLU | GeLU |
隐藏层大小 | 256 | 256 |
批次大小 | 1 024 | 1 024 |
权重衰减 | 0.01 | 0.01 |
实体软标签 | 0.2 | 0.9 |
关系软标签 | 0.1 | 0.0 |
预测位置 | 方法 | Wikipeople | JF17K | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
主三元组 | 所有实体 | 主三元组 | 所有实体 | ||||||||||
MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | ||
实体预测 | m-TransH | 0.063 | 0.063 | 0.300 | — | — | — | 0.206 | 0.206 | 0.462 | 0.102 | 0.069 | 0.168 |
RAE | 0.058 | 0.058 | 0.306 | 0.172 | 0.102 | 0.320 | 0.215 | 0.215 | 0.466 | 0.310 | 0.219 | 0.504 | |
NaLP | 0.408 | 0.331 | 0.546 | 0.338 | 0.272 | 0.466 | 0.221 | 0.165 | 0.331 | 0.366 | 0.290 | 0.516 | |
HINGE | 0.342 | 0.272 | 0.463 | 0.350 | 0.282 | 0.467 | 0.431 | 0.342 | 0.611 | 0.517 | 0.436 | 0.675 | |
StarE | 0.491 | 0.398 | 0.592 | 0.378 | 0.265 | 0.542 | 0.574 | 0.496 | 0.725 | 0.542 | 0.454 | 0.685 | |
Hy-Transformer | 0.501 | 0.426 | — | — | — | 0.582 | 0.501 | 0.742 | — | — | — | ||
GRAN | 0.620 | 0.479 | 0.604 | 0.656 | 0.582 | ||||||||
QUAD | 0.497 | 0.431 | 0.617 | — | — | — | 0.596 | 0.519 | 0.751 | — | — | — | |
HyperFormer | — | — | — | 0.473 | 0.361 | — | — | — | 0.607 | 0.787 | |||
HRNF | 0.509 | 0.449 | 0.638 | 0.424 | 0.649 | 0.622 | 0.546 | 0.799 | 0.666 | 0.813 | |||
关系预测 | NaLP | 0.482 | 0.320 | 0.735 | 0.595 | 0.639 | 0.547 | 0.822 | 0.825 | 0.762 | 0.927 | ||
HINGE | — | — | — | 0.765 | 0.686 | 0.900 | — | — | — | 0.861 | 0.832 | 0.910 | |
StarE | — | — | — | 0.378 | 0.265 | 0.542 | — | — | — | 0.901 | 0.884 | ||
GRAN | 0.976 | 0.960 | 0.946 | 0.977 | 0.996 | 0.999 | |||||||
HRNF | 0.960 | 0.945 | 0.976 | 0.977 | 0.993 | 0.991 | 0.996 | 0.994 | 0.999 |
表3 链接预测结果
Tab. 3 Link prediction results
预测位置 | 方法 | Wikipeople | JF17K | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
主三元组 | 所有实体 | 主三元组 | 所有实体 | ||||||||||
MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | ||
实体预测 | m-TransH | 0.063 | 0.063 | 0.300 | — | — | — | 0.206 | 0.206 | 0.462 | 0.102 | 0.069 | 0.168 |
RAE | 0.058 | 0.058 | 0.306 | 0.172 | 0.102 | 0.320 | 0.215 | 0.215 | 0.466 | 0.310 | 0.219 | 0.504 | |
NaLP | 0.408 | 0.331 | 0.546 | 0.338 | 0.272 | 0.466 | 0.221 | 0.165 | 0.331 | 0.366 | 0.290 | 0.516 | |
HINGE | 0.342 | 0.272 | 0.463 | 0.350 | 0.282 | 0.467 | 0.431 | 0.342 | 0.611 | 0.517 | 0.436 | 0.675 | |
StarE | 0.491 | 0.398 | 0.592 | 0.378 | 0.265 | 0.542 | 0.574 | 0.496 | 0.725 | 0.542 | 0.454 | 0.685 | |
Hy-Transformer | 0.501 | 0.426 | — | — | — | 0.582 | 0.501 | 0.742 | — | — | — | ||
GRAN | 0.620 | 0.479 | 0.604 | 0.656 | 0.582 | ||||||||
QUAD | 0.497 | 0.431 | 0.617 | — | — | — | 0.596 | 0.519 | 0.751 | — | — | — | |
HyperFormer | — | — | — | 0.473 | 0.361 | — | — | — | 0.607 | 0.787 | |||
HRNF | 0.509 | 0.449 | 0.638 | 0.424 | 0.649 | 0.622 | 0.546 | 0.799 | 0.666 | 0.813 | |||
关系预测 | NaLP | 0.482 | 0.320 | 0.735 | 0.595 | 0.639 | 0.547 | 0.822 | 0.825 | 0.762 | 0.927 | ||
HINGE | — | — | — | 0.765 | 0.686 | 0.900 | — | — | — | 0.861 | 0.832 | 0.910 | |
StarE | — | — | — | 0.378 | 0.265 | 0.542 | — | — | — | 0.901 | 0.884 | ||
GRAN | 0.976 | 0.960 | 0.946 | 0.977 | 0.996 | 0.999 | |||||||
HRNF | 0.960 | 0.945 | 0.976 | 0.977 | 0.993 | 0.991 | 0.996 | 0.994 | 0.999 |
方法 | Wikipeople | JF17K | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
主三元组 | 所有实体关系 | 主三元组 | 所有实体关系 | |||||||||
MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | |
HRNF-C | 0.482 | 0.424 | 0.619 | 0.466 | 0.403 | 0.624 | 0.591 | 0.536 | 0.769 | 0.641 | 0.563 | 0.772 |
HRNF-H | 0.491 | 0.612 | 0.469 | 0.411 | 0.637 | 0.610 | 0.779 | 0.653 | 0.576 | 0.781 | ||
HRNF-R | 0.499 | 0.434 | 0.626 | 0.471 | 0.635 | 0.613 | 0.539 | 0.649 | 0.582 | 0.792 | ||
HRNF-T | 0.471 | 0.422 | 0.611 | 0.436 | 0.394 | 0.614 | 0.603 | 0.512 | 0.762 | 0.633 | 0.545 | 0.740 |
表4 消融实验结果
Tab. 4 Ablation experimental results
方法 | Wikipeople | JF17K | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
主三元组 | 所有实体关系 | 主三元组 | 所有实体关系 | |||||||||
MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | MRR | Hits@1 | Hits@10 | |
HRNF-C | 0.482 | 0.424 | 0.619 | 0.466 | 0.403 | 0.624 | 0.591 | 0.536 | 0.769 | 0.641 | 0.563 | 0.772 |
HRNF-H | 0.491 | 0.612 | 0.469 | 0.411 | 0.637 | 0.610 | 0.779 | 0.653 | 0.576 | 0.781 | ||
HRNF-R | 0.499 | 0.434 | 0.626 | 0.471 | 0.635 | 0.613 | 0.539 | 0.649 | 0.582 | 0.792 | ||
HRNF-T | 0.471 | 0.422 | 0.611 | 0.436 | 0.394 | 0.614 | 0.603 | 0.512 | 0.762 | 0.633 | 0.545 | 0.740 |
1 | 张文豪,徐贞顺,刘纳,等. 知识图谱补全方法研究综述[J]. 计算机工程与应用, 2024, 60(12):61-73. |
ZHANG W H, XU Z S, LIU N, et al. Overview of knowledge graph completion methods[J]. Computer Engineering and Applications, 2024, 60(12):61-73. | |
2 | BORDES A, USUNIER N, GARCIA-DURÁN A, et al. Translating embeddings for modeling multi-relational data[C]// Proceedings of the 27th International Conference on Neural Information Processing Systems — Volume 2. Red Hook: Curran Associates Inc., 2013: 2787-2795. |
3 | NICKEL M, TRESP V, KRIEGEL H P. A three-way model for collective learning on multi-relational data[C]// Proceedings of the 28th International Conference on Machine Learning. Madison, WI: Omnipress, 2011: 809-816. |
4 | DETTMERS T, MINERVINI P, STENETORP P, et al. Convolutional 2D knowledge graph embeddings [C]// Proceedings of the 32nd AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2018: 1811-1818. |
5 | GUAN S, JIAN X, GUO J, et al. Link prediction on n-ary relational data based on relatedness evaluation[J]. IEEE Transactions on Knowledge and Data Engineering, 2023, 35(1): 672-685. |
6 | WEN J, LI J, MAO Y, et al. On the representation and embedding of knowledge bases beyond binary relations[C]// Proceedings of the 25th International Joint Conference on Artificial Intelligence. California: ijcai.org, 2016: 1300-1307. |
7 | ZHANG R, LI J, MEI J, et al. Scalable instance reconstruction in knowledge bases via relatedness affiliated embedding[C]// Proceedings of the 2018 World Wide Web Conference. Republic and Canton of Geneva: International World Wide Web Conferences Steering Committee, 2018: 1185-1194. |
8 | ROSSO P, YANG D, CUDRÉ-MAUROUX P. Beyond triplets: hyper-relational knowledge graph embedding for link prediction[C]// Proceedings of the Web Conference 2020. New York: ACM, 2020: 1885-1896. |
9 | GALKIN M, TRIVEDI P, MAHESHWARI G, et al. Message passing for hyper-relational knowledge graphs[C]// Proceedings of the 2020 Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2020: 7346-7359. |
10 | HU Z, GUTIÉRREZ-BASULTO V, XIANG Z, et al. HyperFormer: enhancing entity and relation interaction for hyper-relational knowledge graph completion[C]// Proceedings of the 32nd ACM International Conference on Information and Knowledge Management. New York: ACM, 2023: 803-812. |
11 | LUO H, E H, TAN L, et al. DHGE: dual-view hyper-relational knowledge graph embedding for link prediction and entity typing[C]// Proceedings of the 37th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2023: 6467-6474. |
12 | WANG C, LI X, GAN T, et al. Hyper-relational knowledge graph embedding based on type constraints [C]// Proceedings of the 16th International Conference on Advanced Computer Theory and Engineering. Piscataway: IEEE, 2023: 54-58. |
13 | LUO H, YANG Y E H, et al. HAHE: hierarchical attention for hyper-relational knowledge graphs in global and local level[C]// Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Stroudsburg: ACL, 2023: 8095-8107. |
14 | CHUNG C, LEE J, WHANG J. Representation learning on hyper-relational and numeric knowledge graphs with Transformers [C]// Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. New York: ACM, 2023: 310-322. |
15 | FENG Y, YOU H, ZHANG Z, et al. Hypergraph neural networks[C]// Proceedings of the 33rd AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2019: 3558-3565. |
16 | BRODY S, ALON U, YAHAV E. How attentive are graph attention networks?[EB/OL]. [2024-04-23].. |
17 | WANG Z, ZHANG J, FENG J, et al. Knowledge graph embedding by translating on hyperplanes[C]// Proceedings of the 28th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2014: 1112-1119. |
18 | JI G, HE S, XU L, et al. Knowledge graph embedding via dynamic mapping matrix[C]// Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). Stroudsburg: ACL, 2015: 687-696. |
19 | LIN Y, LIU Z, SUN M, et al. Learning entity and relation embeddings for knowledge graph completion[C]// Proceedings of the 29th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2015: 2181-2187. |
20 | YANG B, YIH W T, HE X, et al. Embedding entities and relations for learning and inference in knowledge bases[EB/OL]. [2024-04-23].. |
21 | TROUILLON T, WELBL J, RIEDEL S, et al. Complex embeddings for simple link prediction[C]// Proceedings of the 33rd International Conference on Machine Learning. New York: JMLR.org, 2016, 2071-2080. |
22 | NGUYEN D Q, TUDINH T D, NGUYEN D Q, et al. A novel embedding model for knowledge base completion based on convolutional neural network[C]// Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers). Stroudsburg: ACL, 2018: 327-333. |
23 | SUN Z, DENG Z H, NIE J Y, et al. RotatE: knowledge graph embedding by relational rotation in complex space[EB/OL]. [2024-04-23].. |
24 | SONG T, LUO J, HUANG L. Rot-Pro: modeling transitivity by projection in knowledge graph embedding[C]// Proceedings of the 35th International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2021: 24695-24706. |
25 | JIANG T, LIU T, GE T, et al. Encoding temporal information for time-aware link prediction[C]// Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2016: 2350-2354. |
26 | DASGUPTA S S, RAY S N, TALUKDAR P. HyTE: hyperplane-based temporally aware knowledge graph embedding[C]// Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2018: 2001-2011. |
27 | GOEL R, KAZEMI S M, BRUBAKER M, et al. Diachronic embedding for temporal knowledge graph completion[C]// Proceedings of the 34th AAAI Conference on Artificial Intelligence. Palo Alto: AAAI Press, 2020: 3988-3995. |
28 | JAIN P, RATHI S, CHAKRABARTI S, et al. Temporal knowledge base completion: new algorithms and evaluation protocols[C]// Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2020: 3733-3747. |
29 | XU C, NAYYERI M, ALKHOURY F, et al. TeRo: a time-aware knowledge graph embedding via temporal rotation[C]// Proceedings of the 28th International Conference on Computational Linguistics. [S.l.]: International Committee on Computational Linguistics, 2020: 1583-1593. |
30 | SHOMER H, JIN W, LI J, et al. Learning representations for hyper-relational knowledge graphs[C]// ASONAM ’23:Proceedings of the International Conference on Advances in Social Networks Analysis and Mining. New York: ACM, 2023: 253-257. |
31 | LOSHCHILOV I, HUTTER F. Decoupled weight decay regularization[EB/OL]. [2024-04-25].. |
32 | VRANDEČIĆ D, KRÖTZSCH M. Wikidata: a free collaborative knowledgebase [J]. Communications of the ACM, 2014, 57(10): 78-85. |
33 | BOLLACKER K, EVANS C, PARITOSH P, et al. Freebase: a collaboratively created graph database for structuring human knowledge[C]// Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data. New York: ACM, 2008: 1247-1250. |
34 | YU D, YANG Y. Improving hyper-relational knowledge graph completion[EB/OL]. [2024-04-28].. |
35 | WANG Q, WANG H, LYU Y, et al. Link prediction on n-ary relational facts: a graph-based approach[C]// Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021. Stroudsburg: ACL, 2021: 396-407. |
[1] | 张增辉, 姜高霞, 王文剑. 基于动态概率抽样的标签噪声过滤方法[J]. 《计算机应用》唯一官方网站, 2021, 41(12): 3485-3491. |
[2] | 张增辉, 姜高霞, 王文剑. 基于局部概率抽样的标签噪声过滤方法[J]. 计算机应用, 2021, 41(1): 67-73. |
[3] | 张岩 闫德勤 郑宏亮. 非球形分布数据集的去噪方法[J]. 计算机应用, 2011, 31(10): 2786-2789. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||