Abstract
Traditional sentence embedding methods often focus on reconstructing surface-level lexical details or are limited by the availability of task-specific labels. This paper proposes a novel contrastive self-supervised learning objective designed to produce "generalized" sentence representations. By training a model to align a sentence's embedding with a representation derived solely from its surrounding context, the model learns to capture the functional role of a sentence within a discourse. Our approach achieves state-of-the-art results on discourse relation analysis tasks in both English and Japanese, demonstrating the utility of abstraction over reconstruction for high-level context analysis.
Introduction
Understanding how sentences relate to one another within a document is a fundamental challenge in natural language processing. Most existing sentence encoders are trained either through supervised learning on tasks like Natural Language Inference (NLI) or through self-supervised generative objectives (e.g., predicting masked words). However, generative objectives often force models to retain minor details necessary for word-level reconstruction, which may be irrelevant for understanding high-level discourse structures.
The authors argue that for effective discourse analysis, we need representations that are both contextualized (aware of the surrounding text) and generalized (focused on functional roles rather than surface features). To achieve this without massive human annotation, they introduce a contrastive learning framework.
Contrastive Learning Framework
The core innovation is a contrastive self-supervised objective that uses a standard Transformer encoder (such as BERT or RoBERTa). The training process involves three distinct representations for a given target sentence within a document:
- Positive ($s_{pos}$): The representation of the actual target sentence in its original context.
- Anchor ($s_{anc}$): The representation of a special
[SENT-MASK]token placed at the target sentence's position. This anchor represents the context's "expectation" of what should appear there. - Negative ($s_{neg}$): The representation of a random sentence from the same document inserted into the target context.
The objective is to maximize the similarity between $s_{pos}$ and $s_{anc}$ while minimizing the similarity between $s_{anc}$ and $s_{neg}$. By forcing the real sentence to match the context-only anchor, the model is incentivized to ignore idiosyncratic word choices and focus on the underlying meaning that satisfies the discourse requirements.
Experimental Setup
The models were initialized with pre-trained weights (RoBERTa-base for English, BERT-base for Japanese) and further trained using the proposed contrastive objective on large-scale corpora (Wikipedia and BookCorpus).
Evaluation focused on discourse relation analysis:
- PDTB 3.0 (English): A benchmark for implicit discourse relations.
- KWDLC (Japanese): A web-based corpus for discourse labels.
Results and Discussion
The proposed method, denoted as Con, consistently outperformed strong baselines, including vanilla pre-trained models and those trained with generative objectives.
On the PDTB 3.0 dataset, the RoBERTa-base model fine-tuned with the contrastive objective achieved an accuracy of 63.30%, a significant improvement over the 61.68% achieved by the base RoBERTa model. Similar gains were observed in the Japanese KWDLC experiments, where the model reached 85.02% accuracy.
A key finding from the ablation studies was that the contrastive approach outperformed a "Generative" baseline (reconstructing the masked sentence). This supports the hypothesis that abstraction—filtering out surface-level noise—is more beneficial for discourse-level tasks than precise reconstruction. Qualitative analysis further revealed that the model groups sentences based on functional similarity (e.g., "describing a positive attribute") even when they share no common keywords.
Conclusion
This work demonstrates that contrastive self-supervised learning is a powerful tool for creating generalized sentence representations. By leveraging the predictive power of context through a masking-and-matching strategy, the model learns to prioritize discourse-relevant features. Future work will explore the optimal level of abstraction for various downstream tasks and extend the evaluation to long-form document understanding and summarization.
Summary updated