NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Virtual Augmentation Supported Contrastive Learning of Sentence Representations

Dejiao Zhang, Wei Xiao, Henghui Zhu, Xiaofei Ma, Andrew O. Arnold

Introduction

Learning high-quality sentence representations is a fundamental task in Natural Language Processing (NLP). Recently, contrastive learning has emerged as a powerful paradigm, typically involving the maximization of similarity between different "views" of the same instance while minimizing similarity with other instances. While Computer Vision benefits from intuitive augmentations like cropping or rotation, NLP faces the "discrete gap": simple text-editing (e.g., word deletion or synonym replacement) often alters the semantic meaning or grammatical integrity of a sentence.

The current state-of-the-art unsupervised method, SimCSE, utilizes "Dropout" as a minimal augmentation. While effective, this approach provides a relatively weak signal for the model to learn complex semantic structures. This paper introduces VaSCL (Virtual augmentation Supported Contrastive Learning), a framework that replaces simplistic text-editing with "virtual" adversarial perturbations in the embedding space, guided by a sentence's local neighborhood.

Methodology: The VaSCL Framework

VaSCL shifts the augmentation process from the raw text level to the continuous representation space. The core innovation lies in using the existing data distribution to define a "neighborhood" for each sentence, which then constrains the generation of challenging adversarial examples.

The VaSCL framework utilizes neighborhood-constrained virtual augmentation alongside standard dropout-based contrastive learning.

The process consists of three primary steps:

  1. Neighborhood Approximation: For each sentence $x_i$ in a training batch, the model identifies its $K$-nearest neighbors based on their current vector representations. This neighborhood acts as a semantic buffer.
  2. Virtual Augmentation via Adversarial Training: Instead of random noise, VaSCL calculates an adversarial perturbation $\delta$. This mathematical shift is designed to move the sentence's representation toward its neighbors, specifically seeking the noise that most confuses the model's ability to distinguish the original sentence from its surrounding context.
  3. Dual Objective Learning: The model is trained to minimize a composite loss. It must successfully distinguish a sentence from its dropout-induced variant (maintaining the SimCSE baseline) while simultaneously distinguishing it from its "virtual" adversarial version.

Experimental Results

The authors evaluated VaSCL using 1 million sentences from English Wikipedia for training. Performance was measured across Semantic Textual Similarity (STS) benchmarks, short-text clustering, and few-shot intent classification.

Performance Gains

VaSCL consistently outperformed SimCSE across multiple model architectures (DistilRoBERTa, RoBERTa-base, and RoBERTa-large). In STS tasks, VaSCL achieved an average absolute improvement of 0.6% to 2.1%. More significant gains were observed in short-text clustering (1.8% to 6.9% improvement) and few-shot intent classification, particularly on the complex BANKING77 dataset.

Semantic Separation and Dispersion

A key advantage of VaSCL is its ability to produce better-dispersed representations. Many sentence models suffer from "representation collapse," where vectors cluster into a narrow cone. VaSCL forces the model to spread representations out while maintaining tight clusters for semantically similar instances.

Analysis of pairwise distances for Entailment and Contradiction pairs across different models, showing VaSCL's superior semantic separation.

As shown in the analysis of NLI pairs, VaSCL significantly increases the pairwise distance between both entailment and contradiction pairs compared to SimCSE and the RoBERTa baseline. Crucially, the ratio of contradiction distance to entailment distance is higher, indicating a more nuanced understanding of semantic differences.

Discussion: Virtual vs. Explicit Augmentation

One of the most striking findings of the study is the "Aha" moment regarding traditional text-editing. The authors found that combining VaSCL with explicit methods like random word deletion actually decreased performance. This suggests that current discrete editing techniques introduce low-quality noise that interferes with the high-quality semantic signals generated through virtual adversarial perturbations.

Conclusion

VaSCL advances the state-of-the-art in unsupervised sentence representation learning by leveraging neighborhood-constrained virtual augmentations. By moving beyond simple dropout and avoiding the pitfalls of discrete text-editing, VaSCL learns more robust and semantically rich embeddings. Future work will focus on reducing the computational overhead of the adversarial "inner loop" and exploring ways to bridge the gap between virtual noise and informative linguistic patterns.

Summary updated

BibTeX
@inproceedings{zhang2022virtual,
  author = {Dejiao Zhang and Wei Xiao and Henghui Zhu and Xiaofei Ma and Andrew O. Arnold},
  title = {{Virtual Augmentation Supported Contrastive Learning of Sentence Representations}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-acl.70},
}
Figure