【论文笔记】Knowledge Is Flat: A Seq2Seq Generative Framework for Various Knowledge Graph Completion

Knowledge Is Flat: A Seq2Seq Generative Framework for Various Knowledge Graph Completion

arxiv时间: September 15, 2022
作者单位i: 南洋理工大学
来源: COLING 2022
模型名称: KG-S2S
论文链接: https://arxiv.org/abs/2209.07299
项目链接: https://github.com/chenchens190009/KG-S2S

摘要

以往的研究通常将 KGC 模型与特定的图结构紧密结合,这不可避免地会导致两个缺点

  1. 特定结构的 KGC 模型互不兼容
  2. 现有 KGC 方法无法适应新兴 KG。

提出了KG-S2S

1. 引言

static KGC (SKGC)

temporal KGC (TKGC)

few-shot KGC (FKGC)

KG-S2S包括:

  1. the input representations of entities and relations using Entity Description, Soft Prompt and Seq2Seq Dropout
  2. the constrained inference algorithm empowered by the Prefix Constraints

Untitled

2. 相关工作

Temporal KGC

许多 TKGC 模型在现有 KGC 方法的基础上加入了额外的特定时间参数。

Few-shot KGC

For one-shot learning on relations, Xiong et al. (2018) attempts to seek a matching metric that can be used to discover similar triples given one reference triple.

3. 方法

Untitled

我们按照微调 Seq2Seq PLM(即 Cross-Entropy Loss)的常见做法,直接用正向示例训练 KG-S2S(KG-S2S 不需要负向采样技巧)。

两个问题

  1. 如何在 KG-S2S 编码器中有效地表示query?【3.3】
  2. 如何准确生成实体文本作为query的答案?【3.4】

3.3 Entity & Relation Representation

Entity Description

纯文本丢失了结构信息,在encoder中我们将实体名称和描述串联起来作为实体表示。在decoder上面我们训练 KG-S2S 在交叉熵损失条件下联合预测实体名称和实体描述。【有点意思】

KG Soft Prompt

we only apply the Soft Prompt to relations.

we insert the Relation Soft Prompt embeddings Pe1, Pe2, Pr1, Pr2 ∈ R ∣ R ∣ × d R^{|R|×d} RR×d,【见上图】

Seq2Seq Dropout

由于KGC 中不同训练查询中的实体描述保持不变,这很容易导致过度拟合。最初采用encoder droppout,但是效果很差,因此使用的seq2seq dropout.we randomly select and mask p% of the input tokens in X when calculating the encoder self-attention module and decoder cross-attention module.

3.4 KGC Inference

Decoding Methods

采用beam search方法

Prefix Constraints

Untitled

我们提出了前缀约束,以控制 KG-S2S 解码器在给定前缀序列 p 的情况下生成有效标记。

For example, given E = {“Grammy Award for Best Rock Song”, “Grammy Award for Best Music Video”} and p = [Grammy, Award, for, Best], the Prefix Constraints only allow “Rock” and “Music” to be generated in the next step.

4. 实验

FB15K-237 包含许多过度简化的、不切实际的卡方乘积关系(CPR),这不适当地提高了模型的精度。例如,"东京一月份的平均低温为华氏 34 度 "这一多重事实被分解为多个 CPR 事实(东京,climate./month,1 月)和(东京,climate./average_min_temp,34),这显然是不现实的,在语义上也毫无意义。

Untitled

Untitled

Untitled

Untitled

Untitled

Untitled

【beam search和不使用,有区别,但是区别不大】

5. 结论和未来工作

在本文中,我们介绍了针对各种知识图谱补全任务的 KG-S2S。通过将不同类型的知识图谱结构转换为 "文本-文本 "格式,KG-S2S 可以直接生成目标预测实体的文本。

  • 22
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值