ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

The Art of Prompting: Event Detection based on Type Specific Prompts

2022-09-10 15:03:41  阅读:180  来源: 互联网

标签:tau mathbf Prompting prompt Specific based Type Event shot


Motivation

  • 之前的研究表明prompt可以提高模型在事件检测方面的性能,包括
    • 使用特定structure
    • 使用每种事件类型特定的query
    • 原型 trigger
  • 这些尝试启发对不同prompt效果的探究

Settings

作者在3种setting下做了实验:

  • Supervised event detection
  • Few-shot Event detection
    • 两个数据集\(D_{base}, D_{novel}\),前者规模大,后者小。后者用来作为第二个域。
  • Zero-shot Event detection
    • 只用第二个域的数据作为测试,不在\(D_{novel}\)上面fine-tune

Event Type Prompts

  • Event Type Name
    • 使用Event的名字作为prompt
  • Definition
    • 如 Attack:violent or physical act causing harm or damage
  • Prototype Seed Triggers
    • 在判断事件类别\(T\)时,选取\(K\)个trigger word,他们作为\(T\)的触发词的次数占他们出现总次数的比例最大,并连接起来。
  • Event Type Structure
    • 加入事件的参数
  • Continuous Soft Prompt
    • 参考经典论文 Prefifix-tuning: Optimizing continuous prompts for generation
  • APEX Prompt
    • 综合prompt,包含:event type name, seed triggers, and definition
    • 如下图所示

A Unified Framework for Event Detection

  • Context Encoding

    • Sentence \(W={w_1,w_2,\dots,w_N}\)

    • event type prompt \(T={\tau _1^t, \tau _2^t,\dots,\tau _K^t}\)

    • 拼接成一个序列

    • \[[CLS] \tau _1^t, \tau _2^t,\dots,\tau _K^t [SEP] w_1,\dots,w_N[SEP] \]

    • 序列通过BERT得到对应的向量\(\mathbf{W},\mathbf{T}\)

  • Event Type Aware Contextual Representation

    • 计算每个token的event type \(t\) aware contextual representation \(A_i^t=\sum_{j=1}^{|T|} \alpha_{ij} \cdot \mathbf{T}_j, \text{where } \alpha_{ij}=\cos(\mathbf{w}_i, \mathbf{T_j})\)
  • Event Detection

    • \(\tilde{y}_i^t = U_o ([\mathbf{w}_i;\mathbf{A}_i^T;\mathbf{P}_i])\)
    • \(\mathbf{P}_i\)是token i的pos编码向量
    • \(U_o\)是预测事件检测的分类头

Experiments

Method Supervised ED Few-shot ED Zero-shot ED
State of the art 73.3 35.2 49.1
(a) Event Type name 72.2 52.7 49.8
(b) Defifinition 73.1 46.7 45.5
(c) Seed Triggers 73.7 53.8 52.4
(d) Event Type Structure 72.8 50.4 48.0
(e) Continuous Soft Prompt 68.1 48.2 -
Majority Voting of (a)-(e) 73.9 52.1 48.7
(f) APEX Prompt 74.9 57.4 55.3

标签:tau,mathbf,Prompting,prompt,Specific,based,Type,Event,shot
来源: https://www.cnblogs.com/TABball/p/16676667.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有