Exploring the Role of Transliteration in In-Context Learning for Low-resource Languages Written in Non-Latin Scripts

Chunlan Ma, Yihong Liu, Haotian Ye, Hinrich SchützearXiv 2024 · DOI

Introduction

Large Language Models (LLMs) like LLaMA and Mistral demonstrate remarkable capabilities in English but often struggle with low-resource languages, particularly those utilizing non-Latin scripts (e.g., Cyrillic, Devanagari). This "script barrier" stems from the scarcity of non-Latin text in pre-training corpora, leading to poor cross-lingual alignment. While machine translation is a common workaround, high-quality translation is often unavailable for truly low-resource languages. This research investigates an alternative: transliteration. By converting non-Latin scripts into the Latin alphabet (romanization), can we enable "Latin-centric" models to leverage their existing knowledge?

Methodology

The study evaluates three distinct prompt templates for In-Context Learning (ICL) to bridge the script gap:

  1. SCRIPT{Orig}: The baseline approach using text in its native script.
  2. SCRIPT{Latn}: Complete conversion of the text to the Latin alphabet using the universal romanization tool, Uroman.
  3. SCRIPT{Combined}: A "dual-view" approach providing both the original script and its Latin transliteration within the prompt.
Overview of the prompt formalization process for sentence-level and word-level tasks across the three script templates.

These templates were tested across six models, including LLaMA2-7B, Mistral-7B, and various sizes of BLOOM, across three core NLP tasks.

Experimental Setup

Performance was benchmarked using a subset of non-Latin script languages from three datasets:

  • WikiANN (NER): A named entity recognition dataset for sequential labeling.
  • SIB200: A multilingual topic classification dataset covering over 200 languages.
  • Taxi1500: A text classification dataset for extremely low-resource scenarios (1,500+ languages).

Results

The experimental results indicate that transliteration significantly boosts performance, particularly in Named Entity Recognition (NER). Every model tested saw improvements when using some form of transliteration over the original script baseline.

Average F1 scores for NER across different LLMs, comparing original, Latin, and combined script prompts.

Key findings include:

  • NER Breakthroughs: For BLOOM-1B, the Combined approach yielded a 12.4-point F1 increase (a 24% relative improvement). Even "English-centric" models like Mistral-7B saw consistent gains, outperforming the baseline in 5 out of 8 script groups.
  • Classification Gains: On the SIB200 task, LLaMA2-7B saw a 29% performance improvement with the Combined prompt compared to the original script.
  • Model Scale: Larger models (7B) generally handled the Combined script more effectively than smaller models, which often became confused by the additional information.

Discussion

The effectiveness of transliteration in NER is attributed to the "Anchor Effect." Proper nouns often have high lexical overlap across languages when romanized, allowing the model to anchor entities to its broader knowledge base.

Furthermore, the success of the Combined template suggests that knowledge in different scripts is complementary. However, for high-level semantic tasks like topic classification, transliteration alone (Latn) sometimes underperformed compared to the original script. This indicates that while transliteration aids surface-level recognition, it does not replace the deep semantic understanding developed for specific scripts during pre-training.

Conclusion

Transliteration offers a simple yet powerful "hack" to improve LLM performance on low-resource languages. Future research should explore whether these gains scale to "frontier" models (e.g., GPT-4) and extend to generative tasks like summarization. Additionally, the scarcity of high-quality evaluation data for obscure scripts remains a significant hurdle for advancing multilingual NLP.

Summary updated

BibTeX
@misc{ma2024exploring,
  author = {Chunlan Ma and Yihong Liu and Haotian Ye and Hinrich Schütze},
  title = {{Exploring the Role of Transliteration in In-Context Learning for Low-resource Languages Written in Non-Latin Scripts}},
  year = {2024},
  eprint = {2407.02320},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.02320},
}
Figure