基于动态路由的序列编码信息聚合
Information Aggregation via Dynamic Routing for Sequence Encoding
摘要:
虽然在如何将文本序列编码为向量序列方面已经取得了很大的进展,但较少关注如何将这些先前的向量(RNN/CNN的输出)聚合为固定大小的编码向量。通常,使用简单的最大或平均池,这是一种自下而上的被动聚合方式,缺乏任务信息的指导。在本文中,我们提出了一种聚合机制,以获得一个固定大小的编码与动态路由策略。动态路由策略是动态地决定从每个单词到文本序列的最终编码需要传递什么信息和多少信息。在Capsule Network的工作基础上,我们设计了两种动态路由策略,将RNN/CNN编码层的输出聚合为最终的编码向量。与其他聚合方法相比,动态路由可以根据最终编码向量的状态对消息进行细化。五个文本分类任务的实验结果表明,我们的方法明显优于其他聚合模型。相关的源代码发布在我们的github页面上。
英文摘要:
While much progress has been made in how to encode a text sequence into a sequence of vectors, less attention has been paid to how to aggregate these preceding vectors (outputs of RNN/CNN) into fixed-size encoding vector. Usually, a simple max or average pooling is used, which is a bottom-up and passive way of aggregation and lack of guidance by task information. In this paper, we propose an aggregation mechanism to obtain a fixed-size encoding with a dynamic routing policy. The dynamic routing policy is dynamically deciding that what and how much information need be transferred from each word to the final encoding of the text sequence. Following the work of Capsule Network, we design two dynamic routing policies to aggregate the outputs of RNN/CNN encoding layer into a final encoding vector. Compared to the other aggregation methods, dynamic routing can refine the messages according to the state of final encoding vector. Experimental results on five text classification tasks show that our method outperforms other aggregating models by a significant margin. Related source code is released on our github page.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。