<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Generalized Funnelling: Ensemble Learning and Heterogeneous Document Embeddings for Cross-Lingual Text Classification</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Discussion Paper</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alejandro Moreo</string-name>
          <email>alejandro.moreo@isti.cnr.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrea Pedrotti</string-name>
          <email>andrea.pedrotti@phd.unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabrizio Sebastiani</string-name>
          <email>fabrizio.sebastiani@isti.cnr.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Transfer Learning, Cross-Lingual Text Classification, Ensemble Learning, Word Embeddings</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dipartimento di Informatica, Università di Pisa</institution>
          ,
          <addr-line>56127 Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Fun) aggregated to</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Istituto di Scienza e Tecnologie dell'Informazione, Consiglio Nazionale delle Ricerche</institution>
          ,
          <addr-line>56124 Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Funnelling (Fun) is a method for cross-lingual text classification (CLTC) based on a two-tier learning ensemble for heterogeneous transfer learning (HTL). In this ensemble method, 1st-tier classifiers, each working on a diferent and language-dependent feature space, return a vector of calibrated posterior probabilities (with one dimension for each class) for each document, and the final classification decision is taken by a metaclassifier that uses this vector as its input. In this paper we describe (gFun), a generalization of Fun consisting of a HTL architecture in which 1st-tier components can be arbitrary view-generating functions, i.e., language-dependent functions that each produce a languageindependent representation (“view”) of the document. We describe an instance of gFun in which the metaclassifier receives as input a vector of calibrated posterior probabilities (as in other embedded representations that embody other types of correlations. We describe preliminary results that we have obtained on a large standard dataset for multilingual multilabel text classification.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        According to [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the amount of (labelled and unlabelled) resources for the more than 7,000
languages spoken around the world follows (somehow unsurprisingly) a power-law distribution.
That is, while a small set of languages account for most of the available data, a very long tail of
other languages sufer from data scarcity, despite the fact that many languages belonging to
this long tail have large speaker bases.
      </p>
      <p>Bearing in mind that most of the languages in the world are low-resource, it is appealing
to develop methods and techniques capable of exploiting the high-quality resources available
for the few resource-rich languages, in order to improve the performance on tasks carried out
on the resource-poor languages. Cross-Lingual Transfer Learning (CLTL) is a class of machine
learning tasks in which, given a training set of textual labelled data sampled from one or more
nEvelop-O
source languages, we must issue predictions for unlabelled documents written in one or more
target languages. In other words, the goal of CLTL is to transfer (i.e., reuse) the knowledge that
has been obtained from the training data in the source languages, to the target languages of
interest, for which few labelled data (or no labelled data at all) exist.</p>
      <p>Cross-Lingual Text Classification (CLTC) is a specific instance of CLTL, in which classification
is the task to be carried out. In CLTC, documents are written in one of a finite set ℒ = { 1, ...,
 |ℒ |} of languages, and labelled according to a shared codeframe (a.k.a. classification scheme )  =
{ 1, ...,  | | }. In such a scenario, it is common to have diferent numbers of training documents
for the diferent languages, with the languages with fewer training documents usually being also
the ones with fewer (if at all) available external resources (such as bilingual dictionaries, thesauri,
pre-trained sets of word-embeddings, language models) that could otherwise be leveraged for
this task.</p>
      <p>
        Funnelling (Fun – [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]) is an ensemble learning architecture for CLTC especially designed
to learn from heterogeneous sources of data and efectively transfer information from one
language to another. In other words, Fun operates in an all-to-all fashion since all training
languages contribute to the classification of the other languages while, at the same time, all
languages benefit from the training data which is available for other languages. In this work
we expand over this architecture by injecting into the algorithm new heterogeneous sources of
information.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Funnelling and Generalized Funnelling</title>
      <p>
        Fun is a two-level architecture [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], where the first tier takes care of translating documents from
their original language-dependent domain to a language-independent one. Subsequently, the
second tier operates on the newly encoded documents and outputs the final prediction scores.
      </p>
      <p>The main intuition behind Fun is to leverage the fact that all the documents are classified
according to the same set of labels. Documents, regardless of the language they are written in,
can be represented as vectors of posterior probabilities, i.e., vectors encoding, at each dimension
 , the probability for a given document to be labeled as belonging to the respective class   .
Once all the documents are homogenized (i.e., they are all represented as vectors of posterior
probabilities), they can be stacked vertically and fed to the second-tier (the metaclassifier)
regardless of the language they were originaly written in.</p>
      <p>We generalize this architecture, and call it Generalized Funnelling (gFun). The first tier of
Fun is redesigned in order to accommodate for a a set Ψ of view-generating functions (VGFs) that
can expand the shared vector space on which the meta-classifier operates. VGFs are
languagedependent functions that map documents into language-independent vectorial representations
(views) aligned across languages. Since each view is aligned across languages, it is easy to
aggregate (e.g., by concatenation) the diferent views into a single representation aligned across
languages, that is then given as input to the metaclassifier. Notice that, according to this
definition, the original implementation of Fun can be seen as a specific setting of gFun equipped
with one single VGF.</p>
      <p>
        The key idea is to leverage the VGFs in order to inject into the model information about
diferent correlations between the main elements of a Text Classification task.In this research,
we consider four kinds of correlations: Class-Class correlation, Document-Class correlation,
WordClass correlation, Word-Word correlation, Document-Word correlation. We bring to bear these
stochastic correlations by means of the following VGFs:
• the Posteriors VGF (encoding document-class correlations): it maps documents into the
space defined by calibrated posterior probabilities (as in the original Fun).
• the MUSEs VGF (encoding word-word correlations): it uses the Multilingual Unsupervised
/ Supervised Embeddings (MUSEs) made available by the authors of [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], a set of word
embeddings aligned for 30 languages.
• the WCEs VGF (encoding word-class correlations): it uses Word-Class Embeddings
(WCE) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], a form of supervised word embeddings based on the class-conditional
distributions observed in the training set which is natively aligned across languages.
• the BERT VGF (encoding document-word correlations): it uses the contextualized
wordembeddings generated by multilingual BERT [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], a deep pretrained language model based
on the transformer architecture.
      </p>
      <p>The diferent views produced by the VGFs need to be aggregated before being issued to the
metaclassifier. In this work, we propose to</p>
      <p>average the diferent views. 1 Before averaging the
representations, we must ensure all views to have same dimensionality, and to be aligned.2
In order to do so, we learn additional mappings of the views to the space of class-conditional
posterior probabilities, i.e., for each VGF (other than the Posteriors VGF, which already returns
vectors of | |</p>
      <p>calibrated posterior probabilities) we train a classifier that maps the view of a
document into a vector of | |</p>
      <p>calibrated posterior probabilities.</p>
      <p>
        Finally, we have found that applying some routine normalization techniques consistently
increases the performance of gFun. This normalization consists of imposing unit L2-norm to
the vectors computed by the view generators, removing the first principal component of the
document embeddings obtained via WCEs or MUSEs, and standardizing the columns of the
shared space before passing the vectors [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] to the metaclassifier. 3
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Experiments</title>
      <p>
        In order to maximize comparability with the previous results, we adopt an experimental setup
identical to the one used in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] including the evaluation metrics, i.e.,  1 score and  , in both
their micro ( ) and macro-averaged ( ) versions.
      </p>
      <p>We carry out experiments on JRC-Acquis, a parallel corpus of legislative texts published by
the European Union, consisting of 11 diferent languages. We retain the 300 most frequent
simply concatenating the diferent views.
both views.</p>
      <p>1In preliminary work, we have observed experimentally that avaraging tends to produce better results than
2Two views are said to be aligned when the semantics of the dimensions (whatever it may be) is common to

3Standardizing (a.k.a. “z-scoring”, or “z-transforming”) consists of having a random variable  , with mean  and
standard deviation  , translated and scaled as  =</p>
      <p>
        − , so that the new random variable  has zero mean and unit
variance. The statistics  and  are unknown, and are thus estimated on the training set.
target classes and use the same splits as in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].4
      </p>
      <p>In Table 1, we directly compare our results with the naïve solution (i.e., one monolingual
classifier for each language), Fun and multilingual BERT (mBERT). We group gFun results in
three diferent batches: the first one groups the results obtained by deploying one single VGF at
the time; in the second one we report the results combining multiple generators; in the latter
we deployed all the proposed VGFs jointly. We use the notation -X to refer to the Posteriors
VGF, -M denotes the MUSEs VGF, -W the WCEs VGF, and -B the BERT VGF.</p>
      <p>The superior results of gFun-Xwith respect to Fun indicate that the normalization steps are
beneficial. It is noteworthy how by simply leveraging the class-class correlations (brought to
bear by the metaclassifier) gFun-B outperforms its counterpart mBERT. The best results are
obtained by the combination of Posterior, MUSEs, and BERT VGFs.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusions</title>
      <p>
        In this paper we propose Generalized Funnelling (gFun), a revised variant of Fun [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] that allows
a set of view-generating functions (VGFs) to provide the metaclassifier with diferent views of
the same document, each embodying a diferent type of correlation in the data. We explore
views leveraging the multilingual unsupervised-supervised embeddings (MUSE) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], word-class
embeddings (WCE) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and the contextualized embeddings of multilingual BERT [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The results
confirm that injecting in the process heterogeneous information in the form of diferent types
of embeddings aligned across languages improves performance in CLTL.
      </p>
      <p>4We have validated our method also using RCV1/2, but we leave the discussion of this dataset out of this short
paper for the sake of brevity.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Joshi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Santy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Budhiraja</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Bali</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Choudhury</surname>
          </string-name>
          ,
          <article-title>The state and fate of linguistic diversity and inclusion in the NLP world, in: Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL</article-title>
          <year>2020</year>
          ),
          <year>2020</year>
          , pp.
          <fpage>6282</fpage>
          -
          <lpage>6293</lpage>
          . doi:
          <article-title>1 0 . 1 8 6 5 3 / v 1 / 2 0 2 0 . a c l - m a i n . 5 6 0</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>Esuli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Moreo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Sebastiani</surname>
          </string-name>
          ,
          <article-title>Funnelling: A new ensemble method for heterogeneous transfer learning and its application to cross-lingual text classification</article-title>
          ,
          <source>ACM Transactions on Information Systems</source>
          <volume>37</volume>
          (
          <year>2019</year>
          )
          <article-title>Article 37</article-title>
          . doi:h t t p s : / / d o i .
          <source>o r g / 1 0 . 1 1</source>
          <volume>4 5 / 3 3 2 6 0 6 5 .</volume>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Conneau</surname>
          </string-name>
          , G. Lample,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ranzato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Denoyer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Jégou</surname>
          </string-name>
          ,
          <article-title>Word translation without parallel data</article-title>
          ,
          <source>in: Proceedings of the 6th International Conference on Learning Representations (ICLR</source>
          <year>2018</year>
          ), Vancouver, CA,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Moreo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Esuli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Sebastiani</surname>
          </string-name>
          ,
          <article-title>Word-class embeddings for multiclass text classification</article-title>
          ,
          <source>Data Mining and Knowledge Discovery</source>
          <volume>353</volume>
          (
          <year>2021</year>
          )
          <fpage>911</fpage>
          -
          <lpage>963</lpage>
          .
          <source>doi: 1 0 . 1 0 0 7 / s 1 0</source>
          <volume>6 1 8 - 0 2 0 - 0 0 7 3 5 - 3</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J.</given-names>
            <surname>Devlin</surname>
          </string-name>
          , M.-
          <string-name>
            <given-names>W.</given-names>
            <surname>Chang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Toutanova</surname>
          </string-name>
          , BERT:
          <article-title>Pre-training of deep bidirectional transformers for language understanding, in: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (HLT-NAACL</article-title>
          <year>2019</year>
          ), Minneapolis,
          <string-name>
            <surname>US</surname>
          </string-name>
          ,
          <year>2019</year>
          , pp.
          <fpage>4171</fpage>
          -
          <lpage>4186</lpage>
          .
          <source>doi:1 0 . 1 8</source>
          <volume>6 5 3</volume>
          / v 1 / N 1 9
          <article-title>- 1 4 2 3</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>S.</given-names>
            <surname>Arora</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liang</surname>
          </string-name>
          , T. Ma,
          <article-title>A simple but tough-to-beat baseline for sentence embeddings</article-title>
          ,
          <source>in: Proceedings of the 5th International Conference on Learning Representations (ICLR</source>
          <year>2017</year>
          ), Toulon,
          <string-name>
            <surname>FR</surname>
          </string-name>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>