Evaluating Multilingual and Code-Switched Alignment in LLMs via Synthetic Natural Language Inference

Samir Abdaljalil, Erchin Serpedin, Khalid Qaraqe, Hasan Kurban
8/20/2025
cs.CLcs.AI

Official code: KurbanIntelligenceLab/nli-stress-testing (1 star, last commit 2025-08-21).

Abstract

Large language models (LLMs) are increasingly applied in multilingual contexts, yet their capacity for consistent, logically grounded alignment across languages remains underexplored. We present a controlled evaluation framework for multilingual natural language inference (NLI) that generates synthetic, logic-based premise-hypothesis pairs and translates them into a typologically diverse set of languages. This design enables precise control over semantic relations and allows testing in both monolingual and mixed-language (code-switched) conditions. Surprisingly, code-switching does not degrade, and can even improve, performance, suggesting that translation-induced lexical variation may serve as a regularization signal. We validate semantic preservation through embedding-based similarity analyses and cross-lingual alignment visualizations, confirming the fidelity of translated pairs. Our findings expose both the potential and the brittleness of current LLM cross-lingual reasoning, and identify code-switching as a promising lever for improving multilingual robustness. Code available at: https://github.com/KurbanIntelligenceLab/nli-stress-testing

View on arXivView PDF

Code Implementations(1)

11Python, Jupyter NotebookAug 20, 20251 years ago

Similar Papers

Cite this paper

@article{abdaljalil2025evaluating,
  title  = {Evaluating Multilingual and Code-Switched Alignment in LLMs via Synthetic Natural Language Inference},
  author = {Samir Abdaljalil and Erchin Serpedin and Khalid Qaraqe and Hasan Kurban},
  year   = {2025},
  eprint = {2508.14735},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.14735v1}
}

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/2508.14735.svg)](https://codeofpaper.com/paper/2508.14735)

Discussion