Abstract
Unsupervised sentence embedding models like SimCSE often struggle with fine-grained semantic distinctions and are biased toward high-frequency tokens. We present SARCSE (Self-Adaptive Reconstruction Contrastive Sentence Embeddings), a framework that integrates a frequency-aware AutoEncoder with contrastive learning. By prioritizing the reconstruction of rare, informative keywords through a self-adaptive loss function, SARCSE generates more robust representations that capture subtle semantic nuances.
Introduction
Sentence embeddings are fundamental to various Natural Language Processing (NLP) tasks, providing vector representations that enable semantic comparison. While contrastive learning methods like SimCSE have set benchmarks, they suffer from two primary limitations. First, they often fail to capture fine-grained semantics, potentially treating sentences with opposite meanings (e.g., "east coast" vs. "west coast") as nearly identical due to high word overlap. Second, they exhibit a token frequency bias, where common "filler" words dominate the representation space, obscuring the rare keywords that define a sentence's unique meaning.
Methodology
SARCSE addresses these issues by augmenting pretrained language models with a specialized reconstruction objective.
Architecture
The framework employs a multi-scale TextCNN Encoder with kernel sizes of 3, 4, and 5 to capture local contextual features. These features are integrated into a single sentence embedding. To ensure this embedding retains critical details, a Transposed TextCNN Decoder is used to reconstruct the original tokens.
Self-Adaptive Reconstruction Loss
The core innovation is the weighted reconstruction loss. Unlike standard autoencoders that treat all tokens equally, SARCSE assigns higher weights to low-frequency words (keywords) and lower weights to high-frequency words (stopwords). This "self-adaptive" mechanism forces the model to prioritize learning the unique, determinative parts of a sentence over linguistic noise.
Experimental Setup
SARCSE was evaluated on seven standard Semantic Textual Similarity (STS) tasks, including STS 2012–2016, STS-B, and SICK-R. The model was trained on 1 million randomly sampled English Wikipedia sentences, ensuring a fair comparison with existing benchmarks.
Results and Discussion
SARCSE consistently outperforms SimCSE across various model sizes. On RoBERTa-base, SARCSE achieved an average Spearman’s correlation of 78.09, a significant improvement over SimCSE’s 76.57.
Qualitative Analysis
Visualizing token importance reveals that SARCSE effectively identifies critical semantic markers. For instance, in geographic comparisons, SARCSE focuses on directional keywords like "east" and "west," whereas SimCSE's attention is more dispersed across common tokens and punctuation.
Efficiency
Notably, SARCSE achieves peak performance with a small batch size of 64. This is a significant improvement over SimCSE, which typically requires batch sizes of 512 or more to be effective, making SARCSE more accessible for researchers with limited GPU resources.
Conclusion
By combining contrastive learning with a frequency-aware reconstruction task, SARCSE successfully mitigates the biases inherent in unsupervised sentence embedding models. Future work may explore learnable reconstruction weights to dynamically identify important tokens across different domains.
Summary updated