[论文解读] Compositional Coding Capsule Network with K-Means Routing for Text Classification
本文提出了一种组合加权编码(CWC)嵌入方法与k-means路由机制,应用于胶囊网络进行文本分类,将模型参数量最多减少36.29%,同时保持了具有竞争力的准确率。该方法采用加权码字组合进行嵌入,并使用基于余弦相似度的路由机制,相较于动态路由提升了稳定性。
Text classification is a challenging problem which aims to identify the category of texts. In the process of training, word embeddings occupy a large part of parameters. Under the limitation of limited computing resources, it indirectly limits the ability of subsequent network designs. In order to reduce the number of parameters, the compositional coding mechanism has been proposed recently. Based on this, this paper further explores compositional coding and proposes a compositional weighted coding method. And we apply capsule network to model the relationship between word embeddings, a new routing algorithm, which is based on k-means clustering theory, is proposed to fully mine the relationship between word embeddings. Combined with our compositional weighted coding method and the routing algorithm, we design a neural network for text classification. Experiments conducted on eight challenging text classification datasets show that the proposed method achieves competitive accuracy compared to the state-of-the-art approach with significantly fewer parameters.
研究动机与目标
- 在不牺牲分类性能的前提下,降低词嵌入中的高参数数量。
- 提升胶囊网络在文本分类任务中路由的稳定性和鲁棒性。
- 设计一个端到端的胶囊网络模型,结合BiGRUs,以更少的参数量保持高准确率。
- 证明组合编码结合加权码字的方法在嵌入效率与准确率方面优于独占码字选择方法。
提出的方法
- 提出组合加权编码(CWC)嵌入方法,其中每个词的嵌入由多个码本中的加权码字之和构成,而非使用独占码字。
- 引入一种基于k-means的路由算法,利用胶囊之间的余弦相似度计算耦合系数,替代基于点积的动态路由机制。
- 采用结合BiGRUs的胶囊网络,以建模序列依赖关系并捕捉文本中的层次化关系。
- 使用多个码本,每个码本包含K个码字向量,通过由码向量索引的加权和来表示词语。
- 在k-means路由中应用余弦相似度,以确定低层胶囊与高层胶囊之间连接的强度。
- 采用端到端反向传播训练整个模型,联合优化嵌入与路由组件。
实验结果
研究问题
- RQ1组合加权编码方法是否能在保持具有竞争力的分类准确率的同时,减少词嵌入中的参数数量?
- RQ2在胶囊网络用于文本分类时,k-means路由是否相比动态路由展现出更好的稳定性和性能?
- RQ3胶囊层与BiGRUs的结合如何影响整体模型性能与参数效率?
- RQ4CWC嵌入在准确率与参数效率方面,相较于独占码字方法(CC嵌入)的优越程度如何?
主要发现
- 与传统嵌入方法相比,所提出的CWC嵌入在八个数据集上将模型参数量减少了24.68%至36.29%,准确率下降可忽略不计。
- 在AG’s News数据集上,CWC嵌入仅使用245万参数,而基线模型为445万参数,参数量减少45%,同时保持了相近的准确率。
- k-means路由方法相比动态路由在稳定性与鲁棒性方面表现更优,尤其在捕捉词嵌入之间细微关系方面更具优势。
- 当与CWC嵌入结合时,将全连接层替换为胶囊层,在Yelp Review Full数据集上性能最高提升2.82%。
- 结合CWC嵌入与k-means路由的完整模型在保持高准确率的同时显著减少了参数量,例如在Yahoo! Answers数据集上准确率达到96.56%。
- 消融实验表明,CWC嵌入与胶囊层在性能提升方面均具有独立且协同的作用,且CWC在性能上优于CC嵌入方法。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。