On the Sentence Embeddings from Pre-trained Language Models
arXiv:2011.05864
Abstract
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.
EMNLP 2020
References in corpus (4)
Cited by in corpus (11)
- Contrastive Learning for Representation Degeneration Problem in Sequential Recommendation
- Reinforcement Learning-powered Semantic Communication via Semantic Similarity
- Self-Guided Contrastive Learning for BERT Sentence Representations
- Smoothed Contrastive Learning for Unsupervised Sentence Embedding
- VendorLink: An NLP approach for Identifying & Linking Vendor Migrants & Potential Aliases on Darknet Markets
- Graph Entropy Guided Node Embedding Dimension Selection for Graph Neural Networks
- Identical and Fraternal Twins: Fine-Grained Semantic Contrastive Learning of Sentence Representations
- Disentangling Semantics and Syntax in Sentence Embeddings with Pre-trained Language Models
- Enhanced Seq2Seq Autoencoder via Contrastive Learning for Abstractive Text Summarization
- Aligning Cross-lingual Sentence Representations with Dual Momentum Contrast
- On Isotropy Calibration of Transformers