Abstract
Unsupervised sentence representation learning has recently been dominated by contrastive learning techniques. However, these methods often suffer from sampling bias, specifically the inclusion of false negatives and the presence of anisotropy (the "narrow cone" problem). This paper introduces DCLR (Debiased Contrastive Learning of unsupervised sentence Representations), a framework designed to mitigate these biases. By employing instance weighting to filter out semantically similar false negatives and utilizing synthetic noise-based negatives to ensure a more uniform distribution in the vector space, DCLR achieves state-of-the-art performance across standard semantic similarity benchmarks.
Introduction
In Natural Language Processing (NLP), sentence embeddings are critical for capturing the semantic essence of text in a dense vector format. Currently, the most effective way to learn these representations without labeled data is through contrastive learning. The standard approach involves taking a sentence, creating a positive pair through data augmentation (such as dropout), and contrasting it against a batch of "negative" sentences. The model is trained to pull the positive pairs together while pushing the negatives apart.
Despite its success, this approach is hindered by two primary forms of sampling bias:
- False Negatives: Since negatives are sampled randomly from the training batch, semantically similar sentences (e.g., "A dog runs" and "A dog sprints") are often treated as negatives. Forcing the model to push these apart degrades the quality of the semantic space.
- Anisotropy: Pre-trained language models like BERT tend to map sentences into a narrow cone within the vector space. Relying solely on real sentences as negatives often fails to encourage the model to utilize the entire available hypersphere, limiting the expressiveness of the embeddings.
Methodology: The DCLR Framework
The DCLR framework addresses these biases through two innovative components: Instance Weighting and Synthetic Noise-based Negatives.
Instance Weighting
To resolve the false negative problem, DCLR introduces a debiased objective that weights negatives based on their similarity to the anchor sentence. The framework utilizes a "complementary model" (such as a pre-trained SimCSE model) to estimate the likelihood that a negative sample is actually a false negative. If the similarity between the anchor and a negative sample exceeds a predefined threshold $\phi$, its weight is reduced or set to zero. This prevents the model from being penalized for keeping semantically related sentences close together in the embedding space.
Generating Noise-based Negatives
To combat anisotropy and improve the uniformity of the representation space, DCLR does not rely exclusively on observed sentences. The authors introduce synthetic negatives initialized from a Gaussian distribution. These noise vectors are optimized using a gradient-based algorithm to move toward the most "non-uniform" regions of the representation space. By contrasting real sentences against these optimized synthetic negatives, the model is forced to spread its representations more evenly across the hypersphere, ensuring that the "empty" parts of the vector space are utilized effectively.
Experimental Setup
The DCLR model was trained using 1 million sentences randomly sampled from Wikipedia. To evaluate the quality of the learned representations, the authors utilized the standard Semantic Textual Similarity (STS) tasks, including STS 2012–2016, the STS Benchmark (STS-B), and SICK-Relatedness (SICK-R). Performance was measured using the Spearman correlation between the cosine similarity of the model's embeddings and human-assigned similarity scores.
Key Results and Analysis
DCLR consistently outperformed competitive baselines, including SimCSE, ConSERT, and various whitening techniques, across multiple architectures:
- BERT-base: DCLR achieved an average Spearman correlation of 77.22, a significant improvement over SimCSE’s 76.25.
- RoBERTa-large: The model reached a correlation of 79.30, surpassing SimCSE’s 78.90.
The Impact of Debiasing
Ablation studies highlighted the critical role of each component. Removing instance weighting resulted in a larger performance drop than removing noise-based negatives, suggesting that false negatives are the primary bottleneck in current contrastive learning setups. Furthermore, DCLR demonstrated remarkable robustness to data scarcity; when trained on only 0.3% of the Wikipedia dataset (approx. 3,000 sentences), the model maintained high performance, indicating that debiasing makes the learning process significantly more efficient.
Improved Uniformity
Qualitative and quantitative analysis of the vector space showed that DCLR achieves a much lower uniformity loss than its predecessors. By filling the gaps in the vector space with synthetic negatives, the model ensures that the resulting embeddings are more discriminative and better distributed.
Conclusion and Future Work
DCLR provides a robust solution to the sampling biases inherent in unsupervised contrastive learning. By intelligently weighting instances and generating synthetic negatives, the framework produces sentence embeddings that are both semantically accurate and spatially uniform.
Future research may focus on removing the dependency on a separate "teacher" model for instance weighting, potentially moving toward a fully end-to-end debiasing process. Additionally, the principles of DCLR could be extended to multilingual and multimodal domains, where sampling bias remains a significant challenge in representation learning.
Summary updated