Abstract
Sentence embeddings are critical for efficient large-scale document retrieval and question answering. However, standard pre-training objectives often fail to capture inter-sentence relationships effectively. We present Cross-Thought, a pre-training framework that encourages models to learn global context by masking words in short sequences that can only be recovered using information from neighboring segments. By utilizing multi-special tokens and a cross-sequence Transformer layer, Cross-Thought produces high-dimensional embeddings that significantly outperform traditional Masked Language Modeling (MLM) and Skip-Thought baselines on benchmarks such as MNLI and HotpotQA.
Introduction: The Challenge of Sentence Embeddings
In Natural Language Processing (NLP), sentence embeddings serve as condensed vector representations of textual meaning. These "zip files" of information allow for rapid comparison and retrieval in tasks like open-domain question answering. Despite their utility, current pre-training methods face a "local context" problem. Standard Masked Language Modeling (MLM), like BERT, typically uses long sequences where a model can predict a masked word using only immediate neighbors, neglecting broader discourse structure. Conversely, methods like Skip-Thought or Inverse Cloze Tasks (ICT) rely on predicting adjacent sentences using pseudo-labels, which often introduces noise and loses fine-grained linguistic detail found in raw text.
Methodology: The Cross-Thought Framework
Cross-Thought addresses these limitations through a structural shift in how models process context. The approach is defined by three primary innovations:
- Short Sequence Constraints: By breaking training text into short chunks (e.g., 64 tokens), the model is deprived of sufficient local context to solve the masking task. This forces it to look beyond the current sequence to recover missing information.
- Multi-Special Tokens: Rather than relying on a single
[CLS]token, Cross-Thought prepends $N$ special tokens ($<s_0>, <s_1>, \dots, <s_n>$). The final hidden states of these tokens are concatenated, creating a richer, higher-dimensional embedding capable of storing more diverse semantic information. - Cross-Sequence Transformer Architecture: The model employs a dual-stage encoding process. First, individual sequences are processed through a 12-layer Transformer. Then, a final "cross-sequence" Transformer layer allows the model to attend to the embeddings of all sequences within a document. To recover a masked word in Sequence A, the model must effectively retrieve information from the embeddings of Sequences B, C, and D.
Evaluation and Results
The model was pre-trained on English Wikipedia and evaluated across several challenging benchmarks, including Natural Language Inference (MNLI, SNLI), Paraphrase Identification (QQP), and complex Question Answering (HotpotQA).
Performance Benchmarks
Cross-Thought consistently outperformed traditional MLM and specialized sentence-embedding baselines:
- NLI Tasks: On MNLI-m, Cross-Thought achieved 76.8% accuracy, a significant improvement over standard MLM (73.8%) and Skip-Thought (65.3%).
- HotpotQA (Full-Wiki): In the multi-hop reasoning setting of HotpotQA, the pipeline reached a state-of-the-art 54.3/78.6 (EM/F1) score for supporting facts.
- Retrieval Efficiency: The model's ability to identify the correct paragraph (Recall@20) among millions of candidates jumped from 81.5% with standard ICT to 88.9%.
Key Insights
The success of Cross-Thought highlights that making the pre-training task "harder" by limiting local context can lead to more robust global representations. Furthermore, the attention weights learned during pre-training can serve as an effective zero-shot ranker, allowing the model to find relevant context even before task-specific fine-tuning. The authors also noted that increasing the "width" of the embedding via multi-special tokens significantly improved performance on ranking tasks.
Conclusion and Future Directions
Cross-Thought represents a significant step forward in sentence encoder pre-training by prioritizing global discourse over local syntax. While the cross-sequence Transformer introduces some computational overhead, the resulting embeddings offer superior performance in retrieval and ranking. Future work may explore optimizing sequence lengths for specific domains and reducing the complexity of the cross-sequence attention mechanism to improve scalability across even larger document sets.
Summary updated