2021-04-20

Title:Incremental Event Detection via Knowledge Consolidation Networks(EMNLP‘20)

Motivation:

第一个把incremental setting引入ED任务,并解决catastrophic forgetting problem

 

Problem Definition:

Event Detection是Event extraction的子任务,是个token-level多分类任务,将一句话中的每个token划分入预定义的事件类别中。

本文中incremental ED的设定为,有一个随着步数类别递增的数据流\{X^{(1)}, X^{(2)},...,X^{(M)}\}(且每一步包含的类别互不相交),在每一步,模型使用当前步的X_{train}^{(k)}更新参数,并使用之前所有步的\cup _{i=1}^{k}X_{test}^{(i)}做测试。

Method:

Trigger Extraction:

对于前k-1步的中的m个类别,都存储了一些代表性样本P=\{P^{(1)},...,P^{(m)}\},在每一步使用N=P\cup X_{train}^{(k)}(当前步数据以及P)训练一个BERT-softmax分类器。

Prototype Enhanced Retrospection:

用来存储旧数据的memory大小固定为B,则若每个类别平分同样大小的memory,每个类别可存储n=B/m个数据。每一步随着新类别的加入,都要做两种操作:

给新类别选取代表性样本。根据X_{train}^{(k)}中每类的所有样本计算类别prototype,取离prototype最近的n个样本。

删除一些旧样本(因为每类的存储空间变小了)。同样,根据memory中的样本计算prototype,删掉离prototype最远的样本。

Hierarchical Distillation:

feature-level

最大化原模型和现模型抽取出来的特征相似度

prediction-level

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可以使用以下代码将该XML实例转换为application/x-www-form-urlencoded格式的模型: ``` using System.Net.Http; using System.Text; using System.Xml; // 将XML实例转换为application/x-www-form-urlencoded模型 var xmlString = @"<OTA_InventoryCheckRQ EchoToken='487ef6b0-3526-45e3-81e7-0eac31754c10' Password='abc888888' PrimaryLangID='en-us' TimeStamp='2021-04-20 10:30:59' UserName='guowang' Version='1.000'> <POS> <Source> <RequestorID ID='elongID' Type='2'/> </Source> </POS> <HotelReservations> <HotelReservation> <RoomStay> <RoomTypes> <RoomType RoomTypeCode='5412309'/> </RoomTypes> <RatePlans> <RatePlan RatePlanCode='4674478'/> </RatePlans> <GuestCounts> <GuestCount AgeQualifyingCode='10' Count='2'/> <GuestCount AgeQualifyingCode='8' Count='0'/> </GuestCounts> <BasicPropertyInfo HotelCode='2525137'/> </RoomStay> <ResGlobalInfo> <RoomCount>10</RoomCount> <MemberLevel>V1</MemberLevel> <TimeSpan End='2021-04-30' Start='2021-04-29'/> </ResGlobalInfo> </HotelReservation> </HotelReservations> </OTA_InventoryCheckRQ>"; var xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xmlString); var formContent = new FormUrlEncodedContent(new[] { new KeyValuePair<string, string>("Message", xmlDoc.OuterXml) }); var encodedString = formContent.ReadAsStringAsync().Result; Console.WriteLine(encodedString); ``` 输出结果为: ``` Message=%3COTA_InventoryCheckRQ%20EchoToken%3D%22487ef6b0-3526-45e3-81e7-0eac31754c10%22%20Password%3D%22abc888888%22%20PrimaryLangID%3D%22en-us%22%20TimeStamp%3D%222021-04-20%2010%3A30%3A59%22%20UserName%3D%22guowang%22%20Version%3D%221.000%22%3E%3CPOS%3E%3CSource%3E%3CRequestorID%20ID%3D%22elongID%22%20Type%3D%222%22%2F%3E%3C%2FSource%3E%3C%2FPOS%3E%3CHotelReservations%3E%3CHotelReservation%3E%3CRoomStay%3E%3CRoomTypes%3E%3CRoomType%20RoomTypeCode%3D%225412309%22%2F%3E%3C%2FRoomTypes%3E%3CRatePlans%3E%3CRatePlan%20RatePlanCode%3D%224674478%22%2F%3E%3C%2FRatePlans%3E%3CGuestCounts%3E%3CGuestCount%20AgeQualifyingCode%3D%2210%22%20Count%3D%222%22%2F%3E%3CGuestCount%20AgeQualifyingCode%3D%228%22%20Count%3D%220%22%2F%3E%3C%2FGuestCounts%3E%3CBasicPropertyInfo%20HotelCode%3D%222525137%22%2F%3E%3C%2FRoomStay%3E%3CResGlobalInfo%3E%3CRoomCount%3E10%3C%2FRoomCount%3E%3CMemberLevel%3EV1%3C%2FMemberLevel%3E%3CTimeSpan%20End%3D%222021-04-30%22%20Start%3D%222021-04-29%22%2F%3E%3C%2FResGlobalInfo%3E%3C%2FHotelReservation%3E%3C%2FHotelReservations%3E%3C%2FOTA_InventoryCheckRQ%3E ``` 其中,key为"Message",value为对该XML实例进行URL编码后的字符串。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值