arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2104.07155cs.CLcs.LG
收藏

用掩蔽Transformers的方法解开文本的表示

Disentangling Representations of Text by Masking Transformers

Northeastern University(东北大学);University of Amsterdam(阿姆斯特丹大学)

Xiongyi Zhang, Jan-Willem van de Meent, Byron C. Wallace

摘要:

来自大型预训练模型(如BERT)的表示将一系列特征编码为单一向量,在众多下游任务中提供强大的预测准确性。在本文中,我们将探讨是否有可能通过识别预训练模型中编码不同的互补方面表示的现有子网络来学习解纠缠表示。具体地说,我们通过Transformer权重或隐藏单元学习二进制掩码,以揭示与特定变异因子相关的特征子集;这消除了为特定任务从头开始训练解纠缠模型的需要。我们评估这种方法的能力,从电影评论中的类型,从方言的“毒性”,从语义和句法的情感表示解开。通过将掩蔽与幅度修剪相结合,我们发现我们可以识别BERT内对特定方面进行强烈编码的稀疏子网络(例如,毒性)而仅弱编码其它(例如,种族)。此外,尽管只学习掩码,我们发现通过掩码的解纠缠执行得和以前提出的基于变分自编码器和对抗训练的方法一样好,而且往往更好。

英文摘要:

Representations from large pretrained models such as BERT encode a range of features into monolithic vectors, affording strong predictive accuracy across a multitude of downstream tasks. In this paper we explore whether it is possible to learn disentangled representations by identifying existing subnetworks within pretrained models that encode distinct, complementary aspect representations. Concretely, we learn binary masks over transformer weights or hidden units to uncover subsets of features that correlate with a specific factor of variation; this eliminates the need to train a disentangled model from scratch for a particular task. We evaluate this method with respect to its ability to disentangle representations of sentiment from genre in movie reviews, "toxicity" from dialect in Tweets, and syntax from semantics. By combining masking with magnitude pruning we find that we can identify sparse subnetworks within BERT that strongly encode particular aspects (e.g., toxicity) while only weakly encoding others (e.g., race). Moreover, despite only learning masks, we find that disentanglement-via-masking performs as well as -- and often better than -- previously proposed methods based on variational autoencoders and adversarial training.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑