[论文解读] On the Sentence Embeddings from Pre-trained Language Models
本文提出 BERT-flow,一种基于流的模型,通过无监督归一化流将 BERT 的各向异性句子嵌入转换为平滑、各向同性的高斯分布,显著提升了语义文本相似度性能,减少了虚假的词汇相似度相关性。该方法在无需下游微调的情况下,在多个 STS 基准测试中取得最先进结果。
Pre-trained contextual representations like BERT have achieved great success in natural language processing. However, the sentence embeddings from the pre-trained language models without fine-tuning have been found to poorly capture semantic meaning of sentences. In this paper, we argue that the semantic information in the BERT embeddings is not fully exploited. We first reveal the theoretical connection between the masked language model pre-training objective and the semantic similarity task theoretically, and then analyze the BERT sentence embeddings empirically. We find that BERT always induces a non-smooth anisotropic semantic space of sentences, which harms its performance of semantic similarity. To address this issue, we propose to transform the anisotropic sentence embedding distribution to a smooth and isotropic Gaussian distribution through normalizing flows that are learned with an unsupervised objective. Experimental results show that our proposed BERT-flow method obtains significant performance gains over the state-of-the-art sentence embeddings on a variety of semantic textual similarity tasks. The code is available at https://github.com/bohanli/BERT-flow.
研究动机与目标
- 探究尽管经过强大预训练,BERT 句子嵌入在语义文本相似度任务上表现不佳的原因。
- 识别性能不佳的根本原因,特别是句子嵌入空间的各向异性和非平滑性。
- 开发一种无监督方法,无需标注数据或微调即可增强 BERT 句子嵌入。
- 减少 BERT 所诱导的相似度与词汇相似度(如编辑距离)之间的过度相关性,这种相关性会损害语义泛化能力。
提出的方法
- 应用归一化流——一类具有可学习神经网络变换的可逆生成模型——将 BERT 句子嵌入映射到标准高斯潜在空间。
- 通过最大化从标准高斯先验生成观测到的 BERT 嵌入的似然性,无监督地训练流网络。
- 在训练过程中保持 BERT 参数冻结,仅优化流网络,以保留原始上下文表示。
- 利用学习到的可逆映射将 BERT 句子嵌入转换为更平滑、更具各向同性的潜在空间,从而更好地反映语义相似度。
- 在推理阶段应用该变换,通过潜在空间中的余弦相似度计算实现性能提升。
- 在无需任何下游微调的情况下,端到端评估该方法在语义文本相似度任务上的表现。
实验结果
研究问题
- RQ1尽管经过强大预训练,为什么 BERT 句子嵌入在语义文本相似度任务上表现不佳?
- RQ2BERT 句子嵌入空间的各向异性和非平滑结构在多大程度上损害了语义相似度估计?
- RQ3能否通过无监督、可逆变换在无需标注数据或微调的情况下改进 BERT 的句子嵌入?
- RQ4所提出的方法是否能减少嵌入相似度与词汇相似度(如编辑距离)之间的虚假相关性?
- RQ5基于流的变换能否在语义文本相似度基准测试中实现最先进性能?
主要发现
- BERT-flow 在 7 个语义文本相似度基准测试中,平均皮尔逊相关系数较 BERT 提升 8.16 个百分点,最大提升达 12.70 个百分点。
- 该方法将 BERT 所诱导的相似度与编辑距离之间的相关系数从 ρ = -50.49 降低至 ρ = -28.01,表明对词汇相似度的依赖程度降低。
- BERT-flow 在性能上优于标准归一化和 top-k 奇异向量归零(NATSV)等先前用于缓解各向异性的基线方法。
- 即使结合自然语言蕴含任务的外部监督,该基于流的变换仍优于 Sentence-BERT,性能更优。
- 该方法有效抑制了词汇相似度的影响,尤其在编辑距离较小(≤4)的句子对中,BERT 的相似度对词汇变化的过度相关性被显著削弱。
- 所学习的流变换在保留全部语义信息的同时,使嵌入空间更加平滑且更具各向同性,从而更好地与人工标注的语义相似度对齐。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。