SEMANTIC PRESERVATION IN URDU–ENGLISH CODE-SWITCHED TRANSLATION: A BERTSCORE-BASED BENCHMARK COMPARISON OF GENERALISED AND URDU-SPECIALISED LLMS
Abstract
While large language models (LLMs) are becoming more and more popular for daily digital communication, their performance on the informal and orthographically unstandardised Urdu–English code-switching (UECS) language of bilingual Pakistanis is largely untested. Previous evaluations of multilingual LLMs have been based on monolingual high resource benchmarks and surface-matching metrics which are not well suited for code-switched text, while previous evaluations of Urdu-specialised LLMs have only been done on formal and standardised tasks. In this study, the generalised model (Llama 3.1 8B Instruct) and Urdu-specialised model (Alif 1.0 8B Instruct) were compared for their zero-shot translations of informal Urdu–English code-switched sentences into English. A stratified 400 sentence corpus was created, 100 sentences in each of four evaluation categories, which were operationalised as evaluation strata, rather than as mutually exhaustive types, that focus on different linguistic phenomena. Model outputs were compared to researcher-generated reference translations with BERTScore, an automatic, embedding-based similarity metric, which was used as a proxy for semantic preservation, and compared with a one-tailed Wilcoxon signed-rank test. Alif 1.0 outperformed Llama 3.1 with a significantly higher mean BERTScore F1 (0.9063 vs 0.8543, r = 0.515) which was present in all four categories after Bonferroni correction, but the magnitude of the difference was highly variable, being largest for inter-sentential switching and orthographic variance and smallest for cultural idiom, which was also the most difficult category for both models. The results suggest that the adaptation of the model to Urdu is more likely to be related to similarity with the reference translation of the informal code-switched input, especially for the structural and orthographic aspects, and culturally embedded meaning that is not compositional is relatively resistant to this type of adaptation. The study proposes a stratified evaluation corpus that can be used for future research on evaluating LLMs on low resource code-switched language varieties.
// Source
Authors: Esha Toheed, Shahida Naz
Institutions: Government College University, Faisalabad