Leveraging Closed-Access Multilingual Embedding for Automatic Sentence Alignment in Low Resource Languages

Idris Abdulmumin, Auwal Abubakar Khalid, Shamsuddeen Hassan Muhammad, Ibrahim Said Ahmad, Lukman Jibril Aliyu, Babangida Sani, Bala Mairiga Abduljalil, Sani Ahmad HassanarXiv 2023

TL;DR

This paper demonstrates that switching from standard open-source multilingual embeddings (like LASER) to high-quality closed-access embeddings (specifically Cohere’s) can lead to a massive performance leap in automatic sentence alignment for low-resource languages. For the Hausa-English pair, the authors achieved a staggering F1 score improvement from ~3.6% to ~94% on the FLORES benchmark, ultimately leading to a >5 BLEU score gain in downstream machine translation tasks.

What Problem Does This Paper Address?

Training robust machine translation (MT) models requires vast amounts of "parallel data"—sentences in one language paired with their exact translations in another. For high-resource languages like English and French, this data is abundant. However, for low-resource languages like Hausa, it is scarce.

Researchers often try to "mine" parallel data from the web by scraping multilingual news sites. The challenge lies in sentence alignment: automatically identifying which sentence in a Hausa article corresponds to which sentence in an English article. Existing tools like Meta’s LASER often struggle with low-resource pairs, frequently producing misalignments, pairing sentences of wildly different lengths, or even identifying the wrong language entirely. This "noisy" data degrades the quality of the resulting translation models.

Methods

The authors propose a simple but highly effective pipeline for sentence alignment:

  1. Embedding Generation: Instead of using open-source models, they utilize the Cohere multilingual embedding API. This model maps sentences into a 768-dimensional vector space where semantically similar sentences are positioned close together, regardless of language.
  2. Nearest Neighbor Search: To align sentences, they use a simple nearest neighbor algorithm. For every source sentence, the system finds the target sentence with the closest embedding in the vector space.
  3. Handling API Constraints: Because the free tier of the Cohere API is rate-limited (6,000 sentences/minute), the authors implemented a batching and sleeping strategy (2,000 sentences per batch with a 61-second sleep interval) and a caching system to avoid redundant API calls.
  4. Comparison Baseline: They compared their approach against the widely used LASER (Language-Agnostic Sentence Representations) toolkit.

Datasets

The study utilized several key benchmarks and a new crawled dataset:

  • FLORES-200 (dev and devtest): A high-quality benchmark for many-to-many translation.
  • MAFAND-MT: A dataset specifically focused on African news translation.
  • Crawled News Data: The authors scraped 1,000 Hausa and 1,000 English news articles from sources like the BBC, Premium Times, and Daily Trust to test the aligners in a "real-world" noisy environment.

Key Insights and Ideas

  • Embedding Quality is King: The most significant finding is that the underlying quality of the multilingual embedding is the primary bottleneck for alignment. Even a simple nearest-neighbor approach can outperform complex toolkits if the embeddings are superior.
  • Length Bias in LASER: The authors discovered that LASER has a significant "length bias" when dealing with Hausa. It frequently aligned short source sentences with very long, unrelated target sentences. In contrast, the Cohere-based aligner maintained a much more natural 1:1.2 source-to-target length ratio.
  • Unique vs. Repetitive Alignments: A major failure mode for LASER was its lack of diversity; 97% of its generated translations were identical despite different source inputs. The Cohere aligner was far more robust, with 30% of its alignments being unique.

![Fig.

  1. Demonstrating how the CoHere aligner paired sentences with similar lengths compared to the bigger sentences in the LASER aligner](/figures/art_9297366dc01b4b4ab11c2223d94cca01)

Key Results

The quantitative improvements were dramatic across all metrics:

  • Alignment Accuracy (F1 Score): On the FLORES devtest set, the Cohere-based aligner achieved an F1 score of 94.96%, compared to just 3.36% for LASER. On the more challenging MAFAND-MT test set, Cohere reached 54.83% while LASER languished at 0.43%.
  • Human Evaluation: Human reviewers found that while LASER produced almost zero usable translations from the crawled data, roughly 26% of the Cohere-aligned pairs were considered "Good," "Perfect," or at least acceptable translations.

![Fig.

  1. Distribution of quality after human evaluation of the aligned monolingual crawled sentences.](/figures/art_f88e80e2273e49ec8dfc6387ddfec60d)
  2. Downstream MT Performance: When these aligned datasets were used to fine-tune an M2M-100 translation model, the Cohere-mined data led to a +5.14 BLEU score improvement for Hausa-to-English translation on the FLORES benchmark compared to LASER-mined data.

Limitations and Future Work

  • API Dependency: The reliance on a closed-access API introduces costs and potential privacy concerns, and the rate limits make processing massive corpora (billions of sentences) slow without a paid tier.
  • Data Leakage Concerns: The authors acknowledge that Cohere's model might have seen the FLORES data during its own training. However, they argue the strong performance on the newer MAFAND-MT dataset suggests the model's multilingual capabilities are genuine, not just a result of memorization.
  • Future Algorithms: The authors plan to move beyond simple nearest neighbors to explore more sophisticated matching algorithms like CSLS (Cross-Domain Similarity Local Scaling) to further reduce false positives in alignment.

Summary updated

BibTeX
@misc{abdulmumin2023leveraging,
  author = {Idris Abdulmumin and Auwal Abubakar Khalid and Shamsuddeen Hassan Muhammad and Ibrahim Said Ahmad and Lukman Jibril Aliyu and Babangida Sani and Bala Mairiga Abduljalil and Sani Ahmad Hassan},
  title = {{Leveraging Closed-Access Multilingual Embedding for Automatic Sentence Alignment in Low Resource Languages}},
  year = {2023},
  eprint = {2311.12179},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.12179},
}
Figure