A General-Purpose Multilingual Document Encoder

Onur Galoğlu, Robert Litschko, Goran Glavaš
5/11/2023
cs.CL

Official code: ogaloglu/pre-training-multilingual-document-encoders (5 stars, Apache-2.0, last commit 2023-05-30).

Abstract

Massively multilingual pretrained transformers (MMTs) have tremendously pushed the state of the art on multilingual NLP and cross-lingual transfer of NLP models in particular. While a large body of work leveraged MMTs to mine parallel data and induce bilingual document embeddings, much less effort has been devoted to training general-purpose (massively) multilingual document encoder that can be used for both supervised and unsupervised document-level tasks. In this work, we pretrain a massively multilingual document encoder as a hierarchical transformer model (HMDE) in which a shallow document transformer contextualizes sentence representations produced by a state-of-the-art pretrained multilingual sentence encoder. We leverage Wikipedia as a readily available source of comparable documents for creating training data, and train HMDE by means of a cross-lingual contrastive objective, further exploiting the category hierarchy of Wikipedia for creation of difficult negatives. We evaluate the effectiveness of HMDE in two arguably most common and prominent cross-lingual document-level tasks: (1) cross-lingual transfer for topical document classification and (2) cross-lingual document retrieval. HMDE is significantly more effective than (i) aggregations of segment-based representations and (ii) multilingual Longformer. Crucially, owing to its massively multilingual lower transformer, HMDE successfully generalizes to languages unseen in document-level pretraining. We publicly release our code and models at https://github.com/ogaloglu/pre-training-multilingual-document-encoders .

View on arXivView PDF

Code Implementations(1)

Apache-2.0

This project is the codebase for the paper titled "A General-Purpose Multilingual Document Encoder".

51Shell, PythonFeb 10, 20223 years agoApache-2.0

Similar Papers

Cite this paper

@article{galolu2023generalpurpose,
  title  = {A General-Purpose Multilingual Document Encoder},
  author = {Onur Galoğlu and Robert Litschko and Goran Glavaš},
  year   = {2023},
  eprint = {2305.07016},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.07016v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.07016.svg)](https://codeofpaper.com/paper/2305.07016)

Discussion