Deal or No Deal? End-to-End Learning for Negotiation Dialogues学习笔记

训练数据格式为,ctx,input,out,ctx为goal,input 为对话,out为协商结果,例如

<input> 3 2 3 1 1 1 </input> <dialogue> THEM: im a reader , so id like the books . . . . you may have the hats and ball <eos> YOU: let me have two books and the hats <eos> THEM: its a trilogy so i really need to hold on to all the books <eos> YOU: cant do it <eos> THEM: ok , well best i can do is 2 books and the ball then . . . anything less and i cant make a deal <eos> YOU: so the hats and a book for me ? <eos> THEM: yes <eos> YOU: <selection> </dialogue> <output> item0=1 item1=3 item2=0 item0=2 item1=0 item2=1 </output> <partner_input> 3 3 3 0 1 1 </partner_input>

上述数据中ctx=[3,2,3,1,1,1]

input dialog=THEM: im a reader , so id like the books … . you may have the hats and ball YOU: let me have two books and the hats THEM: its a trilogy so i really need to hold on to all the books YOU: cant do it THEM: ok , well best i can do is 2 books and the ball then … anything less and i cant make a deal YOU: so the hats and a book for me ? THEM: yes YOU:

out=[ 3, 3 ,3 ,0 ,1, 1]

模型为,首先用一个GRUg对input goal ctx编码,最后的隐藏层输出得到hg.

之后用一个GRUw对 input dialog以及hg编码,得到输出ht,公式为:

ht=GRUw(ht1,[Ext1,hg])

得到ht后将其输入一个线性层得到输出概率,

pθ(xt|x0..t1,g)=exp(ETht)

将input dialog以及input goal输入另一个双向GRU0得到输出out:

这里写图片描述

最后计算损失函数:

这里写图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值