Universal Cross-Lingual Text Classification

Riya Savant, Anushka Shelke, Sakshi Todmal, Sanskruti Kanphade, Ananya Joshi, Raviraj JoshiarXiv 2024 · DOI · arXiv

Abstract

Cross-lingual text classification for low-resource languages often suffers from limited data and restricted label sets. This paper introduces a universal approach that blends datasets and labels from multiple languages during training. Utilizing multilingual Sentence-BERT (SBERT) and K-Nearest Neighbors (KNN), the model generalizes to unseen languages using a label set formed by the union of all training sources. Results on Indic languages demonstrate high accuracy (up to 0.99) and superior performance over global models like LASER.

Introduction

In Natural Language Processing (NLP), text classification is a foundational task. However, for "low-resource" languages—those lacking extensive annotated data, lexicons, or formal grammar resources—building effective classifiers remains a significant challenge. Current cross-lingual techniques typically involve training a model on a high-resource language (e.g., English) and transferring that knowledge to a low-resource target. A major limitation of this approach is that the model is constrained by the label space of the source language. For instance, an English dataset focused on "Sports" and "Politics" cannot help a model classify "Lifestyle" content in Marathi. This research addresses these dual challenges of data scarcity and restricted label spaces by proposing a unified, "universal" classification model.

Methodology

The core of the proposed approach is a training strategy involving label and language blending. Instead of training on a single language, the researchers pool supervised data from several different languages, each contributing a distinct subset of labels. The objective is to create a model whose final label set is the union of all labels present across the training languages.

The universal training workflow: combining diverse languages and labels to train a unified multilingual SBERT model.

The technical framework relies on Sentence-BERT (SBERT). Specifically, the authors utilize the L3Cube-IndicSBERT model, which is pre-trained on various Indian languages. The workflow consists of two primary stages:

  1. Embedding Generation: SBERT converts sentences into high-dimensional vectors (embeddings) that represent semantic meaning in a language-agnostic space.
  2. Classification: A K-Nearest Neighbors (KNN) algorithm is applied to these embeddings. The researchers systematically tuned the 'k' parameter (ranging from 1 to 100) to optimize classification accuracy.

The performance of IndicSBERT was compared against established multilingual models, including LaBSE (Language-agnostic BERT Sentence Embedding) and LASER (Language-Agnostic SEntence Representations).

Experimental Setup and Datasets

The study employs the IndicNLP News Article Classification dataset, covering nine distinct Indic languages: Bengali, Gujarati, Kannada, Malayalam, Marathi, Oriya, Punjabi, Tamil, and Telugu. The categories vary by language and include labels such as entertainment, sports, business, lifestyle, technology, crime, and politics.

The experimental setup for universal classification, where the model is trained on subsets of labels across different languages and tested on unseen languages with the full label union.

In the "Universal" experiment, the training set was curated such that different labels were sourced from different languages (e.g., 'Entertainment' from Telugu, 'Sports' from Oriya). This setup tests whether the model can generalize these concepts across the entire language family, even for languages not seen during training for a specific label.

Key Results and Discussion

The quantitative evaluation highlights the effectiveness of the SBERT-based approach:

  • Zero-Shot Generalization: The model showed a remarkable ability to classify text in "unseen" languages. For example, when testing on Marathi (which was excluded from training), IndicSBERT-STS and IndicSBERT achieved accuracy scores between 0.97 and 0.99 for specific labels like 'entertainment' and 'sports'.
  • Outperforming Baselines: IndicSBERT consistently outperformed LASER and LaBSE. LASER, in particular, struggled with certain Indic languages, with accuracy dropping as low as 0.46 in some Oriya and Gujarati tests. This suggests that regional specialization is beneficial for low-resource scenarios.
  • Robust Universal Performance: When tested on four languages entirely excluded from the training set (Bengali, Gujarati, Kannada, and Punjabi), the "Universal" model maintained an overall accuracy of 0.9035, validating the robustness of the label-blending strategy.

Conclusion

This research demonstrates that a model does not need to see every label in every language to achieve high performance. By training on a union of labels across a language family, models can learn language-agnostic representations of semantic concepts. While currently focused on the Indic language family, future work could expand this methodology to more diverse language groups and explore more complex neural classification heads beyond KNN.

Summary updated

BibTeX
@misc{savant2024universal,
  author = {Riya Savant and Anushka Shelke and Sakshi Todmal and Sanskruti Kanphade and Ananya Joshi and Raviraj Joshi},
  title = {{Universal Cross-Lingual Text Classification}},
  year = {2024},
  eprint = {2406.11028},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.11028},
}
Figure