Transcormer: Transformer for Sentence Scoring with Sliding Language Modeling
Sentence scoring aims at measuring the likelihood score of a sentence and is widely used in many natural language processing scenarios, like reranking, which is to select the best sentence from multiple candidates. Previous works on sentence scoring mainly adopted either causal language modeling (CLM) like GPT or masked language modeling (MLM) like BERT, which have some limitations: 1) CLM only utilizes unidirectional information for the probability estimation of a sentence without considering bidirectional context, which affects the scoring quality; 2) MLM can only estimate the probability of partial tokens at a time and thus requires multiple forward passes to estimate the probability of the whole sentence, which incurs large computation and time cost. In this paper, we propose \textit{Transcormer} -- a Transformer model with a novel \textit{sliding language modeling} (SLM) for sentence scoring. Specifically, our SLM adopts a triple-stream self-attention mechanism to estimate the probability of all tokens in a sentence with bidirectional context and only requires a single forward pass. SLM can avoid the limitations of CLM (only unidirectional context) and MLM (multiple forward passes) and inherit their advantages, and thus achieve high effectiveness and efficiency in scoring. Experimental results on multiple tasks demonstrate that our method achieves better performance than other language modelings.
Code (1)
Tasks
Causal Language ModelingLanguage ModelingLanguage ModellingMasked Language ModelingRerankingSentenceMethods 이 논문이 사용한 방법론
Similar Papers 제목 키워드 기반
Slide, Constrain, Parse, Repeat: Synchronous SlidingWindows for Document AMR Parsing
The sliding window approach provides an elegant way to handle contexts of sizes larger than the Transformer's input window, for tasks like language modeling. Here we extend this approach to the sequence-to-sequence task …
Abstract Meaning RepresentationAMR ParsingLanguage ModelingLanguage Modelling+1Batch-Softmax Contrastive Loss for Pairwise Sentence Scoring Tasks
The use of contrastive loss for representation learning has become prominent in computer vision, and it is now getting attention in Natural Language Processing (NLP). Here, we explore the idea of using a batch-softmax co…
Representation LearningSentenceSentence EmbeddingsBatch-Softmax Contrastive Loss for Pairwise Sentence Scoring Tasks
The use of contrastive loss for representation learning has become prominent in computer vision, and it is now getting attention in Natural Language Processing (NLP). Here, we explore the idea of using a batch-softmax co…
Representation LearningSentenceSentence EmbeddingsUsing BERT Encoding and Sentence-Level Language Model for Sentence Ordering
Discovering the logical sequence of events is one of the cornerstones in Natural Language Understanding. One approach to learn the sequence of events is to study the order of sentences in a coherent text. Sentence orderi…
Document SummarizationLanguage ModelingLanguage ModellingLogical Sequence+7The RWTH Aachen University Filtering System for the WMT 2018 Parallel Corpus Filtering Task
This paper describes the submission of RWTH Aachen University for the De→En parallel corpus filtering task of the \textit{EMNLP 2018 Third Conference on Machine Translation} (WMT 2018). We use several rule-based, heuri…
Machine TranslationSentenceTranslation