End-To-End Memory Networks

来源:互联网 发布:mac版魔兽世界大脚插件 编辑:程序博客网 时间:2024/05/20 16:42

Single Layer

A layer has two memroy: input memory,output memory. Parameters are ARd×|V|,BRd×|V|,CRd×|V|,WR|V|×d.

Input set x1,...,xi (one hot encoding or distribute encoding? probably the one hot.)

Input memory
The input memory represented by mi, the mi is computed by Axi, i.e. each mi is transformed from xi using A.

Query
The query q is transformed to the internal state u using Bq. Then, compute the match probability pi between u and each memory mi using softmax:

pi=softmax(uTmi)

so p is a probability vecotr over the inputs.

Output memory
Each xi is transformed to a output vecotr ci by Cxi. The response vector o from the memory computed by:

o=ipici

Generating final prediction
The predicted label formula:

a^=softmax(W(o+u))

Figure 1

Mutltiple Layers

With K hop operations, the memory layers are stacked in the following way:

  • The input tot layers above the first is the sum of the output ok and the input uk from layers k1(different ways to combine ok and uk are proposed later):

    uk+1=uk+ok

  • Each layer has its own embedding matrices Ak,Ck, used to embed the inputs xi.

  • At the top of network, the input W also combines the input and the output of the top memory layer:a^=softmax(Wuk+1)=softmax(W(oK+uK)).

Two types of weights tying:

  • Adjacent: the output embedding for one layer is the input embedding for the one above, i.e. Ak+1=Ck. also constrain (a) the answer prediction matrix to be the same as the final output embedding, i.e. WT=CK, and (b) the question embedding to match the input embedding of the first layer, i.e. B=A1.
  • Layer-wise (RNN-like): the input and output embeddings are the same across different layers, i.e. A1=A2=...=AK and C1=C2=...=CK. found it useful to add a linear mapping H to the update of u between hops; that is, uk+1=Huk+ok. This mapping is learned from data and used throughout experiments for layer-wise weight tying.
0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 多肉植物干瘪了怎么办 多肉叶片有黑点怎么办 多肉叶片有黑斑怎么办 多肉表面有黑点怎么办 杉果游戏买了后怎么办 盆景叶子上的灰怎么办 福建茶盆景掉叶怎么办 被普通蜘蛛咬了怎么办 被小蜘蛛咬了怎么办 被一般蜘蛛咬了怎么办 联通4g流量超出怎么办 腿上的肥胖纹怎么办除 金属眼镜腿歪了怎么办 炸东西油往外溢怎么办 油反复使用起沫怎么办 炸东西的油黑了怎么办 板栗放久了干了怎么办 三四个月的宝宝拉肚子怎么办 四个月的孩子拉肚子怎么办 4个月孩子拉肚子怎么办 三阳的房子很热怎么办 买了缺角的房子怎么办 多肉摇钱树焉了怎么办 虎皮兰叶子烂了怎么办 三角龙骨烂根了怎么办 地板木龙骨会动怎么办 多肉植物开花后怎么办 春峰之辉烂了怎么办 仙人指不开花是怎么办 大门开在破财位怎么办 人走霉运的时候怎么办 pp助手刷机失败怎么办 别人骂我很难听怎么办 被骂了心里不爽怎么办 被别人扎小人了怎么办 人要倒霉的时候怎么办 属虎的请了貔貅怎么办 我的护身符丢了怎么办 地漏被头发堵了怎么办 淋浴房地漏堵了怎么办 冰箱对着卧室门怎么办