Peinelt N, Nguyen D, Liakata M. tBERT: Topic models and BERT joining forces for semantic similarity detection[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. 2020: 7047-7055.
摘要粗讀
語義相似性檢測是自然語言理解中的一項基本任務(wù)。添加主題信息對于以前的特征工程語義相似性模型以及其他任務(wù)的神經(jīng)模型都很有用。目前還沒有標(biāo)準(zhǔn)的方法來將主題與預(yù)先訓(xùn)練好的上下文表示(如BERT)相結(jié)合。本文提出了一種新的基于主題信息的bert的框架用于成對語義相似性檢測,實驗表明提出的模型在各種英語數(shù)據(jù)集的強神經(jīng)基線上提高了性能。因此發(fā)現(xiàn),在BERT中添加主題特別有助于解決特定領(lǐng)域的情況。
如果所提出的方法并不能很好的覆蓋全面的研究領(lǐng)域,可以使用如下敘述:We find that the addition of < topics to BERT > helps particularly with resolving domain-specific cases.
We, therefore, introduce a novel architecture for semantic similarity detection which incorporates topic models and BERT. More specifically, we make the following contributions: We propose tBERT — a simple architecture combining topics with BERT for semantic similarity prediction (section 3). We show in our error analysis that tBERT’s gains are prominent on domain-specific cases, such as those encountered in < CQA > (section 5).
tBERT(topic-informed BERT-based model)結(jié)構(gòu)
- 整體結(jié)構(gòu)
該論文研究了主題模型是否可以進一步提高BERT在語義相似性檢測方面的性能。整體的模型結(jié)構(gòu)如下:

about BERT
對于待檢測的句子對,長度為N,
長度為M,分別作為
的text_a和text_b得到BERT最后一層CLS token的輸出,并將其作為句子對的表示,形式化為如下:

about Topic Model
該模型的實驗中,使用了兩種較為流行的主題模型,分別為LDA和GSDMM。
當(dāng)然對于主題模型來說,論文指出了兩種使用的策略:
(1)句子主題表示:
對于文檔主題和
,將一個句子中的所有token傳遞給主題模型,以推斷每個句子的一個主題分布。

(2)主題詞表示:
對于詞主題


由此可以對應(yīng)兩種< 句子對向量 與 句子級的主題表示 >相結(jié)合的表現(xiàn)形式:

(2)for word topics

對于拼接之后的表示,傳入到一個隱藏層進行相關(guān)權(quán)重的調(diào)整,然后用softmax layer進行分類。對應(yīng)的損失函數(shù)也僅僅是交叉熵損失。
- 主題模型的選擇
主題的數(shù)量和alpha值是重要的主題模型超參數(shù),并且是依賴于對應(yīng)數(shù)據(jù)集的。而對于不同長度的文本及:論文則使用了LDA(最流行和廣泛使用的主題模型,但它不太適合短文本)和短文本主題模型GSDMM。
about conclusion
In this work, we proposed a flexible framework for combining topic models with BERT. We demonstrated that adding LDA topics to BERT consistently improved performance across a range of semantic similarity prediction datasets. In our qualitative analysis, we showed that these improvements were mainly achieved on examples involving domain-specific words. Future work may focus on how to directly induce topic information into BERT without corrupting pretrained information and whether combining topics with other pretrained contextual models can lead to similar gains.
論文的行文較為明確,也以很簡單的形式給出了主題模型和預(yù)訓(xùn)練語言模型的結(jié)合,提出的tBERT從實驗來看,取得了較高的效果,但主題與文本表示的集合都是在兩個模型外部進行的融合,從模型的統(tǒng)一性而言還不夠高,但是作者也在conclusion部分給出了展望,大概是將主題信息融入到BERT內(nèi)部,從而指導(dǎo)語義相似度的檢測,這一點很值得期待。