Multilingual Native Language Identification with Large Language Models

Dhiman Goswami, Marcos Zampieri, Kai North, Shervin Malmasi, Antonios AnastasopoulosStudent Research Workshop @ NAACL 2025

Native Language Identification (NLI) is the task of determining a writer's native language (L1) based on their writing in a second language (L2). This phenomenon is driven by "language transfer," where an author's mother tongue influences their word choice, syntax, and spelling in a new language. While NLI has significant applications in forensics, author profiling, and personalized language learning, most research involving Large Language Models (LLMs) has focused exclusively on English. This paper presents the first comprehensive evaluation of LLMs for NLI across multiple languages, including Italian, Norwegian, and Portuguese.

Methodology and Experimental Setup

The researchers evaluated several classes of models to determine their effectiveness in identifying native languages:

  • Traditional Baselines: Majority Class and Random baselines.
  • Statistical Machine Learning: An ensemble of Logistic Regression (LR) and Support Vector Machines (SVM) trained on Part-of-Speech (POS) n-grams.
  • Transformer Models: Multilingual models (mBERT, XLM-R) and language-specific models (e.g., norBERT for Norwegian).
  • Large Language Models (LLMs): FLAN-T5 and GPT-4.

LLMs were tested in two distinct settings: zero-shot prompting and task-specific fine-tuning. In the zero-shot setting, models were given a persona—such as a forensic linguistics expert—and asked to classify text based on linguistic clues.

Prompt template used for zero-shot NLI classification tasks.

The study utilized five distinct NLI corpora: FCE and TOEFL11 (English), VALICO (Italian), ASK (Norwegian), and NLI-PT (Portuguese). These datasets encompass a wide variety of L1 backgrounds, including Albanian, Telugu, and Vietnamese.

Key Insights and Results

The evaluation revealed several critical findings regarding the capabilities of LLMs in the NLI domain.

The English Advantage and Data Contamination

LLMs demonstrated a clear "English Advantage," performing significantly better at zero-shot NLI for English than for any other language. This is likely due to the predominance of English data in their pre-training sets. Notably, GPT-4 achieved an unusually high zero-shot F1 score of 0.83 on the TOEFL11 dataset, suggesting potential data contamination where the model may have encountered these specific test cases during training.

The Impact of Fine-Tuning

Fine-tuning proved to be the "great equalizer" for non-English languages. While zero-shot performance on languages like Italian and Portuguese was often poor, fine-tuning GPT-4 led to dramatic improvements. For instance, Italian F1 scores rose from 0.31 in the zero-shot setting to 0.78 after fine-tuning.

Experimental results showing Accuracy and F1 scores for multilingual NLI datasets.

As shown in the results, fine-tuned GPT-4 emerged as the state-of-the-art performer across all four languages, achieving Macro F1 scores of 0.82 (English-FCE), 0.92 (English-TOEFL11), 0.78 (Italian), 0.92 (Norwegian), and 0.86 (Portuguese).

Traditional ML vs. Transformers

Interestingly, traditional SVM/LR ensembles often outperformed smaller transformer models and zero-shot LLMs. This indicates that specialized linguistic features, such as POS n-grams, remain highly effective for NLI tasks compared to general-purpose embeddings from smaller models.

Conclusion and Future Directions

This research highlights that while LLMs possess immense potential for multilingual NLI, they require task-specific instruction to recognize subtle linguistic transfer patterns in languages other than English. Future work should address the scarcity of NLI corpora for low-resource languages and investigate cross-lingual transfer—determining if a model trained on L1 patterns in one L2 can apply that knowledge to another.

Summary updated

BibTeX
@inproceedings{goswami2025multilingual,
  author = {Dhiman Goswami and Marcos Zampieri and Kai North and Shervin Malmasi and Antonios Anastasopoulos},
  title = {{Multilingual Native Language Identification with Large Language Models}},
  booktitle = {Student Research Workshop @ NAACL},
  year = {2025},
  doi = {10.18653/v1/2025.naacl-srw.19},
}
Figure