[Paper Review] SBERT-WK: A Sentence Embedding Method by Dissecting BERT-based Word Models
SBERT-WK proposes a novel sentence embedding method that extracts and fuses informative word representations across multiple layers of BERT-based models using geometric analysis of the subspace spanned by word embeddings. Without requiring further training, it achieves state-of-the-art performance on semantic textual similarity and downstream NLP tasks by leveraging layer-wise patterns and salient word representations, outperforming existing methods like SBERT and BERT.
Sentence embedding is an important research topic in natural language processing (NLP) since it can transfer knowledge to downstream tasks. Meanwhile, a contextualized word representation, called BERT, achieves the state-of-the-art performance in quite a few NLP tasks. Yet, it is an open problem to generate a high quality sentence representation from BERT-based word models. It was shown in previous study that different layers of BERT capture different linguistic properties. This allows us to fusion information across layers to find better sentence representation. In this work, we study the layer-wise pattern of the word representation of deep contextualized models. Then, we propose a new sentence embedding method by dissecting BERT-based word models through geometric analysis of the space spanned by the word representation. It is called the SBERT-WK method. No further training is required in SBERT-WK. We evaluate SBERT-WK on semantic textual similarity and downstream supervised tasks. Furthermore, ten sentence-level probing tasks are presented for detailed linguistic analysis. Experiments show that SBERT-WK achieves the state-of-the-art performance. Our codes are publicly available.
Motivation & Objective
- To address the open problem of generating high-quality sentence representations from pre-trained BERT-based models.
- To investigate how word representations evolve across layers in deep contextualized models like BERT.
- To develop a training-free sentence embedding method that fuses multi-layer information effectively.
- To evaluate the linguistic interpretability and performance of the proposed method on semantic similarity and downstream NLP tasks.
Proposed method
- The method analyzes the geometric structure of word representation spaces across BERT layers using singular value decomposition (SVD) and QR factorization.
- It identifies salient word representations by measuring representation variation across layers, with higher variation indicating more informative words.
- A window-based aggregation strategy combines representations from a selected range of layers, with a default window size of m=2 and starting layer l_S=4.
- The final sentence embedding is computed as a weighted average of the selected word representations, where weights are derived from the geometric structure of the subspace.
- The approach is compatible with various BERT-based models, including RoBERTa, and requires no additional fine-tuning.
- It uses a two-stage process: first, subspace analysis identifies informative layers and words; second, a robust aggregation method fuses the selected representations.
Experimental results
Research questions
- RQ1How do word representations evolve across layers in BERT-based models, and what patterns correlate with linguistic informativeness?
- RQ2Can geometric analysis of the subspace spanned by word representations improve sentence embedding quality?
- RQ3How does the selection of layers and window size affect the performance of sentence embeddings in downstream tasks?
- RQ4Can a training-free method outperform fine-tuned sentence embedding models like SBERT on semantic textual similarity and downstream NLP tasks?
- RQ5What linguistic properties are encoded in the sentence representations generated by SBERT-WK, as revealed by probing tasks?
Key findings
- SBERT-WK achieves a Pearson correlation of 74.21 on the STS-B benchmark, outperforming SBERT (73.14) and BERT-based baselines.
- On the SICK-E dataset, SBERT-WK achieves a test accuracy of 91.67%, surpassing the next best baseline by over 1.5 percentage points.
- The method is robust to hyperparameter choices: performance remains stable across different window sizes (m=1 to 4) and starting layer selections (l_S=0 to 6).
- The inference time of SBERT-WK is only 5% higher than BERT on CPU, with a total of 179.27ms per sample, making it computationally efficient.
- Sentence-level probing tasks confirm that SBERT-WK captures diverse linguistic properties such as syntax, semantics, and morphology.
- The geometric analysis reveals that words with higher representation variation across layers are more informative, validating the method's core assumption.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.