让知识图谱理解数值大小关系,提升推理精度。
NumCoKE: Ordinal-Aware Numerical Reasoning over Knowledge Graphs with Mixture-of-Experts and Contrastive Learning
- 用专家混合模型融合符号与数值信息,动态分配特征。
- 通过对比学习捕捉细微数值差异,提升排序推理能力。
- 适合需要精确数值推理的推荐与问答系统使用。
知识图谱(KGs)是自然语言理解与推荐等AI应用的重要基础。然而,基于知识图谱的数值推理仍面临两大挑战:(1)语义整合不全:现有模型难以在统一表示空间中联合编码实体、关系与数值属性,限制了对数值信息的语义挖掘;(2)序数区分不足:因数值接近或采样不平衡,模型难以捕捉细微的序数关系(如更长、更重),尤其在存在困难负样本时表现不佳。为此,我们提出NumCoKE框架,结合专家混合机制与序数对比学习。为解决(C1),引入基于知识感知的专家混合(MoEKA)编码器,将符号与数值成分统一映射到共享语义空间,并动态将属性特征路由至关系特定专家。为应对(C2),提出序数知识对比学习(OKCL),利用先验知识构建序数感知的正负样本,增强模型对微小语义变化的判别能力。在三个公开知识图谱基准上的实验表明,NumCoKE在多种属性分布下均显著优于现有基线,验证了其在语义融合与序数推理方面的优势。
原文摘要 · Abstract (English)
Knowledge graphs (KGs) serve as a vital backbone for a wide range of AI applications, including natural language understanding and recommendation. A promising yet underexplored direction is numerical reasoning over KGs, which involves inferring new facts by leveraging not only symbolic triples but also numerical attribute values (e.g., length, weight). However, existing methods fall short in two key aspects: (1) Incomplete semantic integration: Most models struggle to jointly encode entities, relations, and numerical attributes in a unified representation space, limiting their ability to extract relation-aware semantics from numeric information. (2) Ordinal indistinguishability: Due to subtle differences between close values and sampling imbalance, models often fail to capture fine-grained ordinal relationships (e.g., longer, heavier), especially in the presence of hard negatives. To address these challenges, we propose NumCoKE, a numerical reasoning framework for KGs based on Mixture-of-Experts and Ordinal Contrastive Embedding. To overcome (C1), we introduce a Mixture-of-Experts Knowledge-Aware (MoEKA) encoder that jointly aligns symbolic and numeric components into a shared semantic space, while dynamically routing attribute features to relation-specific experts. To handle (C2), we propose Ordinal Knowledge Contrastive Learning (OKCL), which constructs ordinal-aware positive and negative samples using prior knowledge, enabling the model to better discriminate subtle semantic shifts. Extensive experiments on three public KG benchmarks demonstrate that NumCoKE consistently outperforms competitive baselines across diverse attribute distributions, validating its superiority in both semantic integration and ordinal reasoning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。