Paraphrastic Representations at Scale

John Wieting\(^1\), Kevin Gimpel\(^2\), Graham Neubig\(^3\), and Taylor Berg-Kirkpatrick\(^4\)
\(^1\)Google Research
\(^2\)Toyota Technological Institute at Chicago, Chicago, IL, 60637, USA
\(^3\)Carnegie Mellon University, Pittsburgh, PA, 15213, USA
\(^4\)University of California San Diego, San Diego, CA, 92093, USA
jwieting@alumni.cmu.edu, kgimpel@ttic.edu, gneubig@cs.cmu.edu, tberg@eng.ucsd.edu


Abstract

We present a system that allows users to train their own state-of-the-art paraphrastic sentence representations in a variety of languages. We release trained models for English, Arabic, German, Spanish, French, Russian, Turkish, and Chinese. We train these models on large amounts of data, achieving significantly improved performance from our original papers on a suite of monolingual semantic similarity, cross-lingual semantic similarity, and bitext mining tasks. Moreover, the resulting models surpass all prior work on efficient unsupervised semantic textual similarity, even significantly outperforming supervised BERT-based models like Sentence-BERT [1]. Most importantly, our models are orders of magnitude faster than other strong similarity models and can be used on CPU with little difference in inference speed (even improved speed over GPU when using more CPU cores), making these models an attractive choice for users without access to GPUs or for use on embedded devices. Finally, we add significantly increased functionality to the code bases for training paraphrastic sentence models, easing their use for both inference and for training them for any desired language with parallel data. We also include code to automatically download and preprocess training data.1

1 Introduction↩︎

Measuring sentence similarity [2] is an important task in natural language processing, and has found many uses including paraphrase detection [3], bitext mining [4], language modelling [5], question-answering [6], and as reward functions or evaluation metrics for language generation tasks [7]. Within this context, fast and light-weight methods are particularly useful as they make it easy to compute similarity over the ever-increasing volumes of web text available. For instance, we may want to mine a hundred million parallel sentences [8] or use a semantic similarity reward when fine-tuning language generation models on tens of millions of training examples. These tasks are much more feasible when using approaches that are fast, can be run on CPU, and use little RAM, allowing for increased batch size.

This need for fast inference is one motivation for using sentence embeddings. Sentence embeddings allow the search for similar sentences to be linear in the number of sentences, or even sub-linear when using highly optimized tools like Faiss [9] that allow for efficient nearest neighbor search. This is contrast to models, like cross-attention models, which are quadratic during inference as they require both of the texts being compared as inputs. As we show in this paper, our simple and interpretable word-averaging sentence embedding models [10][12], are orders of magnitude faster to compute than prior embedding approaches while simultaneously possessing significantly stronger performance on monolingual and cross-lingual semantic similarity tasks. Since we are simply averaging embeddings and have no neural architecture, any models based on neural architectures, especially large pretrained neural architectures which are increasingly used, will not be as fast as the models described in this paper. Lastly, we also show that this approach is competitive with LASER [13], a state-of-the-art multilingual model, on mining bitext and has stronger performance on cross-lingual semantic similarity, while having inference speeds that are twice as fast on GPU and orders of magnitude faster on CPU.

We make several contributions in this paper that go beyond our prior work. Firstly, we reformat the code to support training models on tens of millions of sentence pairs efficiently and with low RAM usage. Secondly, we train an English model on 25.85 million paraphrase pairs from ParaNMT [11], a paraphrase corpus we previously constructed automatically from bitext. We then train models directly on X-English bitext for Arabic, German, Spanish, French, Russian, Turkish, and Chinese, producing models that are able to distinguish both paraphrases in English and their respective languages as well as cross-lingual X-English paraphrases. Even though all models are able to model semantic similarity in English, we find that training on ParaNMT specifically leads to stronger models as it is easier to filter the data to remove noise and sentence pairs with little to no diversity. We refer to our models as Paragram-SP, abbreviated as P-SP,2 referring to how the models are based on averaging subword units generated by sentencepiece [14]. We make all of these models available to the community for use on downstream tasks.

We also add functionality to our implementation. Besides the support for efficient, low-memory training on tens of million of sentence pairs described above, we add code to support (1) reading in a list of sentences and producing a saved numpy array of the sentence embeddings; (2) reading in a list of sentence pairs and producing cosine similarity scores; and (3) downloading and preprocessing evaluation data, bitext, and paraphrase data. For bitext and paraphrase data, we provide support for training using either text files or HDF5 files.

Lastly, this paper contains new experiments showcasing the limits of these scaled-up models and detailed comparisons with prior work on a suite of semantic similarity tasks in a variety of languages. We release our code and models to the community in the hope that they will be found useful for research and applications, as well as using them as a base to build stronger, faster models covering more of the languages of the world.

2 Related Work↩︎

2.1 English Semantic Similarity↩︎

Our learning and evaluation setting is the same as that of our earlier work that seeks to learn paraphrastic sentence embeddings that can be used for downstream tasks [10], [11], [15][17]. We trained models on noisy paraphrase pairs and evaluated them primarily on semantic textual similarity (STS) tasks. More recently, we made use of parallel bitext for training paraphrastic representations for other languages as well that are also able to model cross-lingual semantic similarity [7], [18]. Prior work in learning general sentence embeddings has used autoencoders [19], [20], encoder-decoder architectures [21], [22], and other sources of supervision and learning frameworks [23][26].

For English semantic similarity, we compare to well known sentence embedding models such as InferSent [27], GenSen [28], the Universal Sentence Encoder (USE) [29], as well as BERT [30].3 We use the pretrained BERT model in two ways to create a sentence embedding. The first way is to concatenate the hidden states for the CLS token in the last four layers. The second way is to concatenate the hidden states of all word tokens in the last four layers and mean pool these representations. Both methods result in a 4096 dimension embedding. We also compare to a more recently released model called Sentence-BERT [1]. This model is similar to InferSent in that it is trained on natural language inference data (SNLI; [31]). However, instead of using pretrained word embeddings, they fine-tune BERT in a way to induce sentence embeddings. Lastly, we also compare to the unsupervised version of SimCSE [32], which fine-tunes a pretrained encoder on contrastive pairs, where positive pairs are obtained by using dropout on a single input sentence.

2.2 Cross-Lingual Semantic Similarity and Semantic Similarity in Non-English Languages↩︎

Most previous work for cross-lingual representations has focused on models based on encoders from neural machine translation [4], [33], [34] or deep architectures using contrastive losses [35][37]. Recently, other approaches using large Transformer [38] have been proposed, trained on vast quantities of text [39][41]. We primarily focus our comparison for these settings on LASER [13], a model trained for semantic similarity across more than 100 languages. Their model uses an LSTM encoder-decoder trained on hundreds of millions of parallel sentences. They achieve state-of-the-art performance on a variety of multilingual sentence embeddings tasks including bitext mining. We also compare to LaBSE [42], a contrastive model trained on six billion parallel pairs across languages and was also trained on monolingual text using a masked language modelling objective.

3 Methods↩︎

We first describe our objective function and then describe our encoder.

3.0.0.1 Training.

The training data consists of a sequence of parallel sentence pairs \((s_i, t_i)\) in source and target languages respectively. Note that for training our English model, the source and target languages are both English as we are able to make use of an existing paraphrase corpus. For each sentence pair, we randomly choose a negative target sentence \(t_i'\) during training that is not a translation or paraphrase of \(s_i\). Our objective is to have source and target sentences be more similar than source and negative target examples by a margin \(\delta\): \[\begin{align} \min_{\theta_\textrm{src}, \theta_\textrm{tgt}} \sum_i\Big[\delta - &f_{\theta}(s_i,t_i) + f_{\theta}(s_i,t_i'))\Big]_+ \label{eq:obj} \end{align}\tag{1}\] where the similarity function is defined as: \[\begin{align} f_\theta(s,t) = \textrm{cos}\Big(&g(s;\theta_\textrm{src}), g(t; \theta_\textrm{tgt})\Big) \end{align}\] where \(g\) is the sentence encoder with parameters for each language \(\theta = (\theta_\textrm{src}, \theta_\textrm{tgt})\). To select \(t_i'\) we choose the most similar sentence in some set according to the current model parameters, i.e., the one with the highest cosine similarity. We found we could achieve the strongest performance by tying all parameters together for each language, more precisely, \(\theta_\textrm{src}\) and \(\theta_\textrm{tgt}\) are the same.

3.0.0.2 Negative Sampling.

Negative examples are selected from the sentences in the batch from the opposing language when training with bitext and from any sentence in the batch when using paraphrase data. In all cases, we choose the negative example with the highest cosine similarity to the given sentence \(s\), ensuring that the negative is not in fact paired with \(s\) in the batch. To select even more difficult negative examples that aid training, we use the mega-batching procedure of [11], which aggregates \(M\) mini-batches to create one “mega-batch” and selects negative examples from this mega-batch. Once each pair in the mega-batch has a negative example, the mega-batch is split back up into \(M\) mini-batches for training. Additionally, we anneal the mega-batch size by slowly increasing it during training. This yields improved performance by a significant margin.

3.0.0.3 Encoder.

Our sentence encoder \(g\) simply averages the embeddings of subword units generated by sentencepiece [14]; we refer to our model as Paragram-SP, abbreviated as P-SP. This means that the sentence piece embeddings themselves are the only learned parameters of this model.

4 Code and Usage↩︎

We added a number of features to the code base to improve performance and make it easier to use. First, we added code to support easier inference. Examples of using the code programmatically to embed sentences and score sentence pairs (using cosine similarity) are shown in Figure 1.

None

Figure 1: Usage example of programmatically loading one of our pretrained models and obtaining sentence embeddings and scores for two sentences..

Our code base also supports functionality that allows one to read in a list of sentences and produce a saved numpy array of the sentence embeddings. We also included functionality that allows one to read in a list of sentence pairs and produce the sentence pairs along with their cosine similarity scores in an output file. These scripts allow our models to be used without any programming for the two most common use cases: embedding sentences and scoring sentence pairs. Examples of their usage with a trained model are shown in Figure 2.

None

Figure 2: Usage examples to embed sentences and score sentence pairs. The first command is a usage example of scoring a list of sentence pairs. The file example-sentences-pairs.txt contains a list of sentences, one per line. The output of the script is a saved numpy array of sentence embeddings in the same order of the input sentences. The second command is a usage example of scoring a list of sentence pairs. The file example-sentences-pairs.txt contains pairs of tab-separated sentences, one per line. The output of the script is a text file containing the tab separated list of sentences along with their cosine scores in the same order of the input sentences..

Secondly, we added a training mode using HDF54 format, allowing training data to remain on disk during training. This leads to a significant reduction in RAM usage during training, which is especially true when using more than 10 million training examples. Efficient training can now be done on CPU only using only a few gigabytes of RAM.

None

Figure 3: Usage examples to download and preprocess bilingual and ParaNMT data. The first command downloads and preprocesses (filters, trains sentencepiece models, tokenizes if language is zh, converts files to hdf5 format) en-X bilingual data. The third command downloads and preprocesses ParaNMT data. The arguments are used to filter the data (semantic similarity scores between 0.4 and 1.0 and trigram overlap below 0.7, which have been used in prior papers when generating training data for paraphrase generation [43], [44])..

Lastly, we also added code for preprocessing data, including scripts to download and evaluate on the STS data (English, non-English, and cross-lingual), as well as code to download and process bitext and ParaNMT automatically. For bitext, our scripts download the data, filter the data by length,5 lowercase, remove duplicates, train a sentencepiece model, encode the data with the sentencepiece model, shuffle the data, and process the data into HDF5 format for efficient use. For ParaNMT, our scripts download the data, use a language classifier to filter out non-English sentences6 [45], filter the data by paraphrase score, trigram overlap, and length,7 train a sentencepiece model, encode the data with the sentencepiece model, and process the data into HDF5 format. Examples are shown in Figure 3.

5 Experiments↩︎

5.1 Experimental Setup↩︎

5.1.0.1 Data.

1.4pt

Table 1: The number of sentence pairs used to train our models. For English, the data is ParaNMT, and for the other languages, the data is a collection of bitext detailed in Section 5.1.
en ar de es fr ru tr zh
25.85M 8.23M 6.47M 6.75M 6.46M 9.09M 5.12M 4.18M

For our English model, we train on selected sentence pairs from ParaNMT [11]. We filter the corpus by only including sentence pairs where the paraphrase score for the two sentences is \(\geq 0.4\). We additionally filtered sentence pairs by their trigram overlap [17], which is calculated by counting trigrams in the two sentences, and then dividing the number of shared trigrams by the total number in the sentence with fewer tokens. We only include sentence pairs where the trigram overlap score is \(\leq 0.7\). The paraphrase score is calculated by averaging paragram-phrase embeddings [10] for the two sentences in each pair and then computing their cosine similarity. The purpose of the lower threshold is to remove noise while the higher threshold is meant to remove paraphrases that are too similar.

Our training data is a mixture of Open Subtitles 20188 [46], Tanzil corpus9 [47], Europarl10 for Spanish, Global Voices11 [47], and the MultiUN corpus.12 We follow the same distribution for our languages of interest across data sources as [13] for a fair comparison. One exception, though, is we do not include training data from Tatoeba13 [47] as they do, since this domain is also in the bitext mining evaluation set. The amount of data used to train each of our models is shown in Table 1.

5.1.0.2 Hyperparameters.

For all models, we fix the batch size to 128, margin \(\delta\) to 0.4, and the annealing rate to 150.14 We set the size of the sentencepiece vocabulary to 50,000, using a shared vocabulary for the models trained on bitext. If a word is not in vocabulary, we simply exclude it, unless the text only consists of unknown words in which case we use a single unknown-word token. We optimize our models using Adam [48] with a learning rate of 0.001 and train models for 25 epochs.

For training on the bilingual corpora, we tune each model on the 250 example 2017 English STS task [49]. We vary dropout on the embeddings over \(\{0, 0.1, 0.3\}\) and the mega-batch size \(M\) over \(\{60, 100, 140\}\).

For training on ParaNMT, we fix the hyperparameters in our model due to the increased data size making tuning more expensive. We use a mega-batch size \(M\) of 100 and set the dropout on the embeddings to 0.0.

5.2 Evaluation↩︎

Table 2: Results of our models and models from prior work on English STS. In the first part of the table, we show results, measured in Pearson’s \(r \times 100\), for each year of the STS tasks 2012-2016 as well as the average performance across all years. In the second part, we evaluate based on the Spearman’s \(\rho \times 100\) of the concatenation of the datasets of each year with the 2013 SMT dataset removed following [1].
Model Semantic Textual Similarity (STS)
2012 2013 2014 2015 2016 Avg.
BERT (CLS) 33.2 29.6 34.3 45.1 48.4 38.1
BERT (Mean) 48.8 46.5 54.0 59.2 63.4 54.4
InferSent 61.1 51.4 68.1 70.9 70.7 64.4
GenSen 60.7 50.8 64.1 73.3 66.0 63.0
USE 61.4 59.0 70.6 74.3 73.9 67.8
Sentence-BERT 66.9 63.2 74.2 77.3 72.8 70.9
LASER 63.1 47.0 67.7 74.9 71.9 64.9
P-SP 68.7 64.7 78.1 81.4 80.0 74.6
Sentence-BERT 71.0 76.5 73.2 79.1 74.3 74.8
P-SP 71.2 76.5 74.6 83.0 79.1 76.9

We evaluate sentence embeddings using the SemEval semantic textual similarity (STS) tasks from 2012 to 2016 [2], [50][53] as was done initially for sentence embeddings in [10]. Given two sentences, the aim of the STS tasks is to predict their similarity on a 0-5 scale, where 0 indicates the sentences are on different topics and 5 means they are completely equivalent. As our test set, we report the average Pearson’s \(r\) over each year of the STS tasks from 2012-2016 as is convention.

Most work evaluating accuracy on STS tasks has averaged the Pearson’s \(r\) over each individual dataset for each year of the STS competition. However, [1] computed Spearman’s \(\rho\) over concatenated datasets for each year of the STS competition. To be consistent with previous work, we re-ran their model and calculated results using the standard method, and thus our results are not the same as those reported [1]. However, we also include results using their approach for completeness. One other difference between these two ways of calculating the results is the inclusion of the SMT dataset of the 2013 task, which we also exclude when replicating the approach in [1].

For cross-lingual semantic similarity and semantic similarity in non-English languages, we evaluate on the STS tasks from SemEval 2017. This evaluation contains Arabic-Arabic, Arabic-English, Spanish-Spanish, Spanish-English, and Turkish-English datasets. The datasets were created by translating one or both pairs of an English STS pair into Arabic (ar), Spanish (es), or Turkish (tr). Following convention, we report results with Pearson’s \(r\) for all systems, but also include results in Spearman’s \(\rho\) for LASER, LaBSE, and P-SP.

We also evaluate on the Tatoeba bitext mining task introduced by [13]. The dataset consists of up to 1,000 English-aligned sentence pairs for over 100 languages. The aim of the task is to find the nearest neighbor for each sentence in the other language according to cosine similarity. Performance is measured by computing the error rate.

6 Results↩︎

Table 3: Comparison of our models with those in the literature on non-English and cross-lingual STS. We also include the top 3 systems for each dataset from the SemEval 2017 STS shared task.Performance is measured in Pearson’s \(r\) \(\times 100\). We also include results in Spearman’s \(\rho\) \(\times 100\) for LASER, LaBSE, and P-SP.
Model Dim. ar-ar ar-en es-es es-en tr-en
\(r\) \(\rho\) \(r\) \(\rho\) \(r\) \(\rho\) \(r\) \(\rho\) \(r\) \(\rho\)
LASER 1024 69.3 68.8 65.5 66.5 79.7 79.7 59.7 58.0 72.0 72.1
LaBSE 768 68.6 69.1 72.2 74.5 79.5 80.8 65.5 65.7 72.9 72.1
[33] 2048 59 - 44 - 78 - 49 - 76 -
[37] 512 - - - - 64.2 - 58.7 - - -
2017 STS 1st Place - 75.4 - 74.9 - 85.6 - 83.0 - 77.1 -
2017 STS 2nd Place - 75.4 - 71.3 - 85.0 - 81.3 - 74.2 -
2017 STS 3rd Place - 74.6 - 70.0 - 84.9 - 79.1 - 73.6 -
P-SP 1024 76.2 76.7 78.3 78.4 85.8 85.6 78.4 77.8 79.2 79.5

6.0.0.1 English Semantic Similarity.

The results for our English semantic similarity evaluation are shown in Table 2. Our P-SP model has the best performance across each year of the task, significantly outperforming all prior work. We outperform methods that use large pre-trained models including Sentence-BERT which is supervised, as it is trained on NLI data [31].

We also include results from SimCSE [32]. We compare to the unsupervised version, since our model is also unsupervised. We evaluate using the Spearman’s \(\rho\) of the concatenation of the datasets for each year, and find our average performance over the 2012-2016 datasets to be 76.9, compared to 77.4 and 77.9 for the RoBERTa-base [54] and RoBERTa-large versions of SimCSE. While our performance is slightly lower, we note that they tune their model on the dev set of the STS Benchmark [49], which contains a subset of the data from STS tasks which we use for evaluation. Therefore, they are tuning on a subset of the evaluation data, and it is unclear how tuning on this test data affects model performance.

6.0.0.2 Cross-Lingual Semantic Similarity.

The results for the non-English and cross-lingual semantic similarity evaluation are shown in Table 3. From the results, our model again outperforms all prior work using sentence embeddings. The only systems that have better performance are the top (non-embedding based) systems from SemEval 2017 for Spanish-English.15

6.0.0.3 Bitext Mining.

1.5pt

Table 4: Results on the Tatoeba bitext mining task [13]. Results are measured in error rate \(\times 100\).
Language LASER XLM-R mBART CRISS LaBSE P-SP
ar 7.8 52.5 61.0 22.0 9.1 8.8
de 1.0 11.1 13.2 2.0 0.7 1.5
es 2.1 24.3 39.6 3.7 1.6 2.4
fr 4.3 26.3 39.6 7.3 4.0 5.4
ru 5.9 25.9 31.6 9.7 4.7 5.6
tr 2.6 34.3 48.8 7.1 1.6 1.4
Avg. 4.0 29.1 39.0 8.6 3.6 4.2

The results on the Tatoeba bitext mining task from [13] are shown in Table 4. The results show that our embeddings are competitive, but have slightly higher error rates than LASER. The models are so close that the difference in error rate for the two models across the 6 evaluations is 0.2, corresponding to a difference of about 2 mismatched sentence pairs per dataset. LaBSE performs a bit better, but was trained on much more data then both LASER and our method. We also compare to mBART, XLM-R, and CRISS.16

This bitext mining result is in contrast to the results on cross-lingual semantic similarity, suggesting that our embeddings account for a less literal semantic similarity, making them more adept at detecting paraphrases but slightly weaker at identifying translations. It is also worth noting that LASER was trained on Tatoeba data outside the test sets, which could also account for some of the slight improvement over our model.

7 Speed Analysis↩︎

Table 5: Speed as measured in sentences/second on both GPU (Nvidia 1080 TI) and CPU (single core).
Model GPU CPU
P-SP 13,863 12,776
LASER 6,033 26
Sentence-Bert 288 2
InferSent 4,445 16

We analyze the speed of our models as well as selected popular sentence embedding models from prior work. To evaluate inference speed, we measure the time required to embed 120,000 sentences from the Toronto Book Corpus [55]. Preprocessing of sentences is not factored into the timing, and each method sorts the sentences by length prior to computing the embeddings to reduce padding and extra computation. We use a batch size of 64 for each model. The number of sentences embedded per second is shown in Table 5.

From the results, we see that our model is easily the fastest on GPU, sometimes by an order of magnitude. Interestingly, using a single core of CPU, we achieve similar speeds to inference on GPU, which is not the case for any other model. Moreover, we repeated the experiment, this time using 32 cores and achieved a speed of 15,316 sentences/second. This is even faster than when using a GPU and indicates that our model can effectively be used at scale when GPUs are not available. It also suggests our model would be appropriate for use on embedded devices.

8 Conclusion↩︎

In this paper, we present a system for the learning and inference of paraphrastic sentence embeddings in any language for which there is paraphrase or bilingual parallel data. Additionally, we release our trained sentence embedding models in English, as well as Arabic, German, Spanish, French, Russian, Turkish, and Chinese. These models are trained on tens of million of sentence pairs resulting in models that achieve state-of-the-art performance on unsupervised English semantic similarity and are state-of-the-art or competitive on non-English semantic similarity, cross-lingual semantic similarity, and bitext mining.

Moreover, our models are significantly faster than prior work owing to their simple architecture. They can also be run on CPU with little to no loss in speed from running them on GPU—-something that no strong models from prior work are able to do. Lastly, we release our code that has been modified to make training and inference easier, with support for training on large corpora, preprocessing paraphrase and bilingual corpora and evaluation data, as well as scripts for easy inference that can generate embeddings or semantic similarity scores for sentences supplied in a text file.

References↩︎

[1]
Nils Reimers and Iryna Gurevych. 2019. https://doi.org/10.18653/v1/D19-1410. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3982–3992, Hong Kong, China. Association for Computational Linguistics.
[2]
Eneko Agirre, Daniel Cer, Mona Diab, and Aitor Gonzalez-Agirre. 2012. https://aclanthology.org/S12-1051. In *SEM 2012: The First Joint Conference on Lexical and Computational Semantics Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation (SemEval 2012), pages 385–393, Montréal, Canada. Association for Computational Linguistics.
[3]
Bill Dolan, Chris Quirk, and Chris Brockett. 2004. https://aclanthology.org/C04-1051. In COLING 2004: Proceedings of the 20th International Conference on Computational Linguistics, pages 350–356, Geneva, Switzerland. COLING.
[4]
Holger Schwenk and Matthijs Douze. 2017. https://doi.org/10.18653/v1/W17-2619. In Proceedings of the 2nd Workshop on Representation Learning for NLP, pages 157–167, Vancouver, Canada. Association for Computational Linguistics.
[5]
Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. 2019. Generalization through memorization: Nearest neighbor language models. arXiv preprint arXiv:1911.00172.
[6]
Patrick Lewis, Yuxiang Wu, Linqing Liu, Pasquale Minervini, Heinrich Küttler, Aleksandra Piktus, Pontus Stenetorp, and Sebastian Riedel. 2021. https://doi.org/10.1162/tacl_a_00415. Transactions of the Association for Computational Linguistics, 9:1098–1115.
[7]
John Wieting, Taylor Berg-Kirkpatrick, Kevin Gimpel, and Graham Neubig. 2019. https://doi.org/10.18653/v1/P19-1427. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4344–4355, Florence, Italy. Association for Computational Linguistics.
[8]
Holger Schwenk, Vishrav Chaudhary, Shuo Sun, Hongyu Gong, and Francisco Guzmán. 2021. https://doi.org/10.18653/v1/2021.eacl-main.115. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 1351–1361, Online. Association for Computational Linguistics.
[9]
Jeff Johnson, Matthijs Douze, and Hervé Jégou. 2017. Billion-scale similarity search with GPUs. arXiv preprint arXiv:1702.08734.
[10]
John Wieting, Mohit Bansal, Kevin Gimpel, and Karen Livescu. 2016. Towards universal paraphrastic sentence embeddings. In Proceedings of the International Conference on Learning Representations.
[11]
John Wieting and Kevin Gimpel. 2018. https://doi.org/10.18653/v1/P18-1042. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 451–462, Melbourne, Australia. Association for Computational Linguistics.
[12]
John Wieting, Kevin Gimpel, Graham Neubig, and Taylor Berg-Kirkpatrick. 2019. https://doi.org/10.18653/v1/P19-1453. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4602–4608, Florence, Italy. Association for Computational Linguistics.
[13]
Mikel Artetxe and Holger Schwenk. 2019. https://doi.org/10.1162/tacl_a_00288. Transactions of the Association for Computational Linguistics, 7:597–610.
[14]
Taku Kudo and John Richardson. 2018. https://doi.org/10.18653/v1/D18-2012. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 66–71, Brussels, Belgium. Association for Computational Linguistics.
[15]
John Wieting, Mohit Bansal, Kevin Gimpel, and Karen Livescu. 2016. https://doi.org/10.18653/v1/D16-1157. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1504–1515, Austin, Texas. Association for Computational Linguistics.
[16]
John Wieting and Kevin Gimpel. 2017. https://doi.org/10.18653/v1/P17-1190. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2078–2088, Vancouver, Canada. Association for Computational Linguistics.
[17]
John Wieting, Jonathan Mallinson, and Kevin Gimpel. 2017. https://doi.org/10.18653/v1/D17-1026. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 274–285, Copenhagen, Denmark. Association for Computational Linguistics.
[18]
John Wieting, Graham Neubig, and Taylor Berg-Kirkpatrick. 2020. https://doi.org/10.18653/v1/2020.emnlp-main.122. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1581–1594, Online. Association for Computational Linguistics.
[19]
Richard Socher, Eric H. Huang, Jeffrey Pennington, Andrew Y. Ng, and Christopher D. Manning. 2011. Dynamic pooling and unfolding recursive autoencoders for paraphrase detection. In Advances in Neural Information Processing Systems.
[20]
Felix Hill, Kyunghyun Cho, and Anna Korhonen. 2016. https://doi.org/10.18653/v1/N16-1162. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1367–1377, San Diego, California. Association for Computational Linguistics.
[21]
Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Skip-thought vectors. In Advances in Neural Information Processing Systems 28, pages 3294–3302.
[22]
Zhe Gan, Yunchen Pu, Ricardo Henao, Chunyuan Li, Xiaodong He, and Lawrence Carin. 2017. https://doi.org/10.18653/v1/D17-1254. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2390–2400, Copenhagen, Denmark. Association for Computational Linguistics.
[23]
Quoc V. Le and Tomas Mikolov. 2014. Distributed representations of sentences and documents. arXiv preprint arXiv:1405.4053.
[24]
Nghia The Pham, Germán Kruszewski, Angeliki Lazaridou, and Marco Baroni. 2015. https://doi.org/10.3115/v1/P15-1094. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 971–981, Beijing, China. Association for Computational Linguistics.
[25]
Sanjeev Arora, Yingyu Liang, and Tengyu Ma. 2017. A simple but tough-to-beat baseline for sentence embeddings. In Proceedings of the International Conference on Learning Representations.
[26]
Matteo Pagliardini, Prakhar Gupta, and Martin Jaggi. 2017. Unsupervised learning of sentence embeddings using compositional n-gram features. arXiv preprint arXiv:1703.02507.
[27]
Alexis Conneau, Douwe Kiela, Holger Schwenk, Loı̈c Barrault, and Antoine Bordes. 2017. https://doi.org/10.18653/v1/D17-1070. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 670–680, Copenhagen, Denmark. Association for Computational Linguistics.
[28]
Sandeep Subramanian, Adam Trischler, Yoshua Bengio, and Christopher J Pal. 2018. Learning general purpose distributed sentence representations via large scale multi-task learning. arXiv preprint arXiv:1804.00079.
[29]
Daniel Cer, Yinfei Yang, Sheng-yi Kong, Nan Hua, Nicole Limtiaco, Rhomni St. John, Noah Constant, Mario Guajardo-Cespedes, Steve Yuan, Chris Tar, Brian Strope, and Ray Kurzweil. 2018. https://doi.org/10.18653/v1/D18-2029. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 169–174, Brussels, Belgium. Association for Computational Linguistics.
[30]
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. https://doi.org/10.18653/v1/N19-1423. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.
[31]
Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. https://doi.org/10.18653/v1/D15-1075. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 632–642, Lisbon, Portugal. Association for Computational Linguistics.
[32]
Tianyu Gao, Xingcheng Yao, and Danqi Chen. 2021. https://doi.org/10.18653/v1/2021.emnlp-main.552. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6894–6910, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
[33]
Cristina Espana-Bonet, Adám Csaba Varga, Alberto Barrón-Cedeño, and Josef van Genabith. 2017. An empirical analysis of nmt-derived interlingual embeddings and their use in parallel sentence identification. IEEE Journal of Selected Topics in Signal Processing, 11(8):1340–1350.
[34]
Holger Schwenk. 2018. https://doi.org/10.18653/v1/P18-2037. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 228–234, Melbourne, Australia. Association for Computational Linguistics.
[35]
Francis Grégoire and Philippe Langlais. 2018. https://aclanthology.org/C18-1122. In Proceedings of the 27th International Conference on Computational Linguistics, pages 1442–1453, Santa Fe, New Mexico, USA. Association for Computational Linguistics.
[36]
Mandy Guo, Qinlan Shen, Yinfei Yang, Heming Ge, Daniel Cer, Gustavo Hernandez Abrego, Keith Stevens, Noah Constant, Yun-Hsuan Sung, Brian Strope, and Ray Kurzweil. 2018. https://doi.org/10.18653/v1/W18-6317. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 165–176, Brussels, Belgium. Association for Computational Linguistics.
[37]
Muthu Chidambaram, Yinfei Yang, Daniel Cer, Steve Yuan, Yunhsuan Sung, Brian Strope, and Ray Kurzweil. 2019. https://doi.org/10.18653/v1/W19-4330. In Proceedings of the 4th Workshop on Representation Learning for NLP (RepL4NLP-2019), pages 250–259, Florence, Italy. Association for Computational Linguistics.
[38]
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems, pages 5998–6008.
[39]
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. 2020. https://doi.org/10.18653/v1/2020.acl-main.747. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8440–8451, Online. Association for Computational Linguistics.
[40]
Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, and Luke Zettlemoyer. 2020. https://doi.org/10.1162/tacl_a_00343. Transactions of the Association for Computational Linguistics, 8:726–742.
[41]
Chau Tran, Yuqing Tang, Xian Li, and Jiatao Gu. 2020. Cross-lingual retrieval for iterative self-supervised training. arXiv preprint arXiv:2006.09526.
[42]
Fangxiaoyu Feng, Yinfei Yang, Daniel Cer, Naveen Arivazhagan, and Wei Wang. 2022. https://doi.org/10.18653/v1/2022.acl-long.62. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 878–891, Dublin, Ireland. Association for Computational Linguistics.
[43]
Mohit Iyyer, John Wieting, Kevin Gimpel, and Luke Zettlemoyer. 2018. https://doi.org/10.18653/v1/N18-1170. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1875–1885, New Orleans, Louisiana. Association for Computational Linguistics.
[44]
Kalpesh Krishna, John Wieting, and Mohit Iyyer. 2020. https://doi.org/10.18653/v1/2020.emnlp-main.55. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 737–762, Online. Association for Computational Linguistics.
[45]
Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. 2017. https://aclanthology.org/E17-2068. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 427–431, Valencia, Spain. Association for Computational Linguistics.
[46]
Pierre Lison and Jörg Tiedemann. 2016. https://aclanthology.org/L16-1147. In Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC’16), pages 923–929, Portorož, Slovenia. European Language Resources Association (ELRA).
[47]
Jörg Tiedemann. 2012. http://www.lrec-conf.org/proceedings/lrec2012/pdf/463_Paper.pdf. In Proceedings of the Eighth International Conference on Language Resources and Evaluation (LREC’12), pages 2214–2218, Istanbul, Turkey. European Language Resources Association (ELRA).
[48]
Diederik Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
[49]
Daniel Cer, Mona Diab, Eneko Agirre, Iñigo Lopez-Gazpio, and Lucia Specia. 2017. https://doi.org/10.18653/v1/S17-2001. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 1–14, Vancouver, Canada. Association for Computational Linguistics.
[50]
Eneko Agirre, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, and Weiwei Guo. 2013. https://aclanthology.org/S13-1004. In Second Joint Conference on Lexical and Computational Semantics (*SEM), Volume 1: Proceedings of the Main Conference and the Shared Task: Semantic Textual Similarity, pages 32–43, Atlanta, Georgia, USA. Association for Computational Linguistics.
[51]
Eneko Agirre, Carmen Banea, Claire Cardie, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Weiwei Guo, Rada Mihalcea, German Rigau, and Janyce Wiebe. 2014. https://doi.org/10.3115/v1/S14-2010. In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014), pages 81–91, Dublin, Ireland. Association for Computational Linguistics.
[52]
Eneko Agirre, Carmen Banea, Claire Cardie, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Weiwei Guo, Iñigo Lopez-Gazpio, Montse Maritxalar, Rada Mihalcea, German Rigau, Larraitz Uria, and Janyce Wiebe. 2015. https://doi.org/10.18653/v1/S15-2045. In Proceedings of the 9th International Workshop on Semantic Evaluation (SemEval 2015), pages 252–263, Denver, Colorado. Association for Computational Linguistics.
[53]
Eneko Agirre, Carmen Banea, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Rada Mihalcea, German Rigau, and Janyce Wiebe. 2016. https://doi.org/10.18653/v1/S16-1081. In Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), pages 497–511, San Diego, California. Association for Computational Linguistics.
[54]
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
[55]
Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In The IEEE International Conference on Computer Vision (ICCV).

  1. Code, including an easy to install PyPi package, released models including Hugging Face implementations, demo, and data are available at https://github.com/jwieting/paraphrastic-representations-at-scale.↩︎

  2. Our English model is P-SP, and the cross-lingual models are P-SP-ar, P-SP-de, P-SP-es, P-SP-fr, P-SP-ru, P-SP-tr, and P-SP-zh.↩︎

  3. Note that in all experiments using BERT, including Sentence-BERT, the large, uncased version is used.↩︎

  4. https://docs.h5py.org/en/stable/↩︎

  5. We remove sentences with the number of tokens (untokenized) smaller than 3 or greater than 100.↩︎

  6. https://fasttext.cc↩︎

  7. We remove sentences with the number of tokens (untokenized) smaller than 5 or greater than 40.↩︎

  8. http://opus.nlpl.eu/OpenSubtitles.php↩︎

  9. http://opus.nlpl.eu/Tanzil.php↩︎

  10. http://opus.nlpl.eu/Europarl.php↩︎

  11. https://opus.nlpl.eu/GlobalVoices.php↩︎

  12. http://opus.nlpl.eu/MultiUN.php↩︎

  13. https://opus.nlpl.eu/Tatoeba.php↩︎

  14. Annealing rate is the number of minibatches that are processed before the megabatch size is increased by 1.↩︎

  15. The top systems for this task used supervision and relied on state-of-the-art translation models to first translate the non-English sentences to English.↩︎

  16. Results are copied from [41].↩︎