Representing text into a multidimensional space can be done with sentence embedding models such as Sentence-BERT (SBERT). However, training these models when the data has a complex multilevel structure requires individually trained class-specific models, which increases time and computing costs. We propose a two step approach which enables us to map sentences according to their hierarchical memberships and polarity. At first we teach the upper level sentence space through an AdaCos loss function and then finetune with a novel loss function mainly based on the cosine similarity of intra-level pairs. We apply this method to three different datasets: two weakly supervised Big Five personality dataset obtained from English and Japanese Twitter data and the benchmark MNLI dataset. We show that our single model approach performs better than multiple class-specific classification models.
翻译:将文本映射到多维空间可通过句子嵌入模型(如Sentence-BERT, SBERT)实现。然而,当数据具有复杂多层结构时,训练这些模型需要分别训练各类别专用模型,这将增加时间与计算成本。我们提出一种两步方法,能够根据句子层级隶属关系及其极性对其进行映射。首先,通过AdaCos损失函数学习上层句子空间,随后采用一种主要基于层级内配对余弦相似度的新型损失函数进行微调。我们将该方法应用于三个不同数据集:两个来自英语与日语Twitter数据的弱监督大五人格数据集,以及基准MNLI数据集。结果表明,我们的单一模型方法性能优于多个类别专用分类模型。