Skip to main content
QUICK REVIEW

[Paper Review] Self-Guided Contrastive Learning for BERT Sentence Representations

Taeuk Kim, Kang Min Yoo|arXiv (Cornell University)|Jun 3, 2021
Topic ModelingComputer Science33 references10 citations
TL;DR

This paper proposes Self-Guided Contrastive Learning (SG-CL), a self-supervised method that improves BERT sentence representations by using intermediate hidden states as self-generated positive samples, without requiring data augmentation. The approach achieves state-of-the-art performance on multiple sentence similarity benchmarks, with a 74.62 average Spearman correlation on STS-B and superior inference efficiency due to no post-processing needs.

ABSTRACT

Although BERT and its variants have reshaped the NLP landscape, it still remains unclear how best to derive sentence embeddings from such pre-trained Transformers. In this work, we propose a contrastive learning method that utilizes self-guidance for improving the quality of BERT sentence representations. Our method fine-tunes BERT in a self-supervised fashion, does not rely on data augmentation, and enables the usual [CLS] token embeddings to function as sentence vectors. Moreover, we redesign the contrastive learning objective (NT-Xent) and apply it to sentence representation learning. We demonstrate with extensive experiments that our approach is more effective than competitive baselines on diverse sentence-related tasks. We also show it is efficient at inference and robust to domain shifts.

Motivation & Objective

  • To address the suboptimal performance of standard BERT sentence representations derived from [CLS] tokens or mean pooling on downstream tasks.
  • To improve sentence-level representation learning in BERT without relying on data augmentation or external supervision.
  • To design a contrastive learning framework that leverages internal BERT representations as positive samples for self-guidance.
  • To enhance model robustness to domain shifts and reduce inference latency by eliminating post-processing steps.
  • To demonstrate that self-guided contrastive learning can outperform existing methods in both accuracy and efficiency.

Proposed method

  • The method introduces a self-guidance mechanism that treats intermediate BERT hidden states across layers as positive samples for the final [CLS] representation.
  • It adapts the NT-Xent contrastive loss for sentence representation learning, optimizing for semantic similarity between the final [CLS] embedding and intermediate representations.
  • The training process fine-tunes BERT in a self-supervised manner, using the model's own internal representations as supervision signals.
  • The approach avoids data augmentation by recycling the model’s own hidden states, simplifying training and deployment.
  • The method applies max pooling over intermediate layers to form the final sentence embedding, with ablation studies showing its effectiveness.
  • It integrates a modified contrastive objective that encourages the [CLS] vector to align with relevant intermediate representations while separating from negatives.

Experimental results

Research questions

  • RQ1Can internal BERT hidden representations be effectively used as self-generated positive samples to improve sentence embeddings?
  • RQ2Does a contrastive learning objective tailored for BERT outperform standard pooling and fine-tuning strategies on sentence similarity tasks?
  • RQ3Can self-guided contrastive learning achieve SOTA performance without data augmentation or external supervision?
  • RQ4How does the proposed method compare in inference efficiency and robustness to domain shifts against existing baselines?
  • RQ5Can combining self-guidance with other contrastive techniques like back-translation further improve performance?

Key findings

  • The proposed method achieves a 74.62 average Spearman correlation on the STS-B benchmark, significantly outperforming the baseline BERT with CLS pooling (62.63) and mean pooling (63.19).
  • With the SG-OPT variant, the model reaches 77.23 on STS-B, 81.56 on STS15, and 80.13 on STS14, demonstrating strong generalization across datasets.
  • The method is the most efficient at inference, requiring no post-processing after training, unlike baselines that rely on pooling or other operations.
  • The model shows improved robustness to domain shifts, maintaining high performance across diverse NLP tasks.
  • Visualizations using t-SNE confirm that SG-OPT enhances clustering of positive sentence pairs while separating negative pairs in the embedding space.
  • Ensembling with back-translation further improves performance, achieving 75.10 average Spearman on STS-B, indicating synergy between techniques.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.