高级检索

    基于对比学习的图结构规则学习方法

    Graph-Structured Rule Learning via Contrastive Learning

    • 摘要: 知识图谱推理因其能够有效缓解知识图谱中的数据不完整问题而受到广泛关注。现有方法多依赖于嵌入模型或链式规则,但在可解释性与表达能力方面仍存在明显局限。一方面,基于闭合路径的规则学习仅能建模线性链式依赖,难以捕捉图结构中存在的多路径交互与层次化语义关系;另一方面,基于统计指标的传统方法通常采用“穷举+验证”策略,不仅在大规模图谱中面临高昂计算成本,也难以充分挖掘规则间的深层语义关联,从而制约了推理性能的进一步提升。为此,提出一种基于对比学习的图结构规则学习方法(contrastive graph rule learning,CGRL),以同时提升推理的表达能力与可解释性。CGRL 通过三重机制实现高效规则学习:首先,采用自适应聚类策略为节点生成软标签,引入类别语义以增强规则泛化能力;其次,设计多跳邻域采样方法构建语义子图,并生成高质量正负规则样本;最后,利用基于 Transformer 的编码器学习规则表示,并通过对比学习将规则对映射至统一向量空间以优化语义一致性判别。在6个公开知识图谱补全任务上的实验结果表明,CGRL 取得了显著性能提升。在FB15k-237 和 WN18RR这种关系结构相对复杂的数据集下,其MRR 指标平均提升 6.04%,Hits@1 指标平均提升 16.26%,显著优于现有基线方法,验证了其在学习高质量图结构规则与提升推理效果方面的有效性。

       

      Abstract: Knowledge graph reasoning has attracted extensive attention because of its ability to alleviate the inherent incompleteness of knowledge graphs. However, existing approaches mainly rely on embedding models or chain-based rules, but they still suffer from limitations in interpretability and expressiveness. Existing approaches mainly rely on embedding models or chain-based rules, but they still suffer from limitations in interpretability and expressiveness. Existing rule learning methods are often limited to linear dependency modeling and struggle to capture multi-path interactions and hierarchical semantic relations, while traditional rule-mining methods usually follow the “enumeration–verification” paradigm, resulting in high computational costs and insufficient modeling of deep semantic correlations among rules. To address these challenges, this paper proposes CGRL (Contrastive Graph Rule Learning), a novel method for learning graph-structured rules through contrastive learning. CGRL enhances rule learning through a threefold mechanism. First, it applies an adaptive clustering strategy to generate soft type labels for entities, introducing semantic priors that improve rule generalization. Second, it designs a multi-hop neighborhood sampling method to construct semantic subgraphs and to generate high-quality positive and negative rule instances. Third, it employs a Transformer-based encoder and a contrastive learning objective to map rule pairs into a unified embedding space, thereby jointly capturing structural dependencies and semantic consistency. Extensive experiments on six public knowledge graph completion benchmarks demonstrate that CGRL achieves substantial improvements over state-of-the-art baselines. On datasets with relatively complex relational structures, such as FB15k-237 and WN18RR, CGRL yields average gains of 6.04% in MRR and 16.26% in Hits@1, confirming its effectiveness in discovering high-quality graph-structured rules and significantly enhancing reasoning performance.

       

    /

    返回文章
    返回