Conditioning LLMs to Generate Code-Switched Text
Not on the map. Why?
Abstract (arXiv)
Code-switching (CS) is still a critical challenge in Natural Language Processing (NLP), due to the limited availability of large-scale, diverse CS datasets for robust training and evaluation. Despite recent advances, the capabilities and limitations of LLMs in handling CS are still not fully understood. In this work, we investigate the extent to which LLMs can be used in a framework for CS text generation, focusing on the English-Spanish language pair. Our proposed methodology consists of back-translating natural CS sentences into monolingual English, and using the resulting parallel corpus to fine-tune LLMs to turn monolingual sentences into CS. We thoroughly analyse the models' performance through a study on human preferences, a qualitative error analysis, an evaluation with popular reference-based metrics and LLM-based judgment. Results show that fine-tuning can be a key step to ensure that current LLMs consistently generate fluent code-switched text and that our methodology generates high-quality outputs, expanding research opportunities in CS communication. We find that traditional metrics do not correlate with human judgement when assessing the quality of the generated CS data, but LLM-based judgment aligns more closely with human preferences. We release our code and generated dataset under a CC-BY-NC-SA license.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 37 of its 84 references that are in the map. First posted on arXiv 18 Feb 2025.
Builds on
37 of 84 references.
References · 37
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
- 2022No Language Left Behind: Scaling Human-Centered Machine Translationcited by 1,290
- 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 896
- 2023Can Large Language Models Be an Alternative to Human Evaluations?cited by 729
- 2023Is ChatGPT a Good NLG Evaluator? A Preliminary Studycited by 420
- 2016FastText.zip: Compressing text classification modelscited by 331
- 2021Few-shot Learning with Multilingual Language Modelscited by 278
25 more
- 2018Marian: Fast Neural Machine Translation in C++cited by 202
- 2020A Survey of Evaluation Metrics Used for NLG Systemscited by 164
- 2023Multilingual Machine Translation with Large Language Models: Empirical Results and Analysiscited by 156
- 2020GLUECoS : An Evaluation Benchmark for Code-Switched NLPcited by 101
- 2020LinCE: A Centralized Benchmark for Linguistic Code-switching Evaluationcited by 92
- 2020SemEval-2020 Task 9: Overview of Sentiment Analysis of Code-Mixed Tweetscited by 62
- 2023A Survey of Code-switching: Linguistic and Social Perspectives for Language Technologiescited by 59
- 2023Investigating the Translation Performance of a Large Multilingual Language Model: the Case of BLOOMcited by 58
- 2021Are Multilingual Models Effective in Code-Switching?cited by 56
- 2023Prompting Multilingual Large Language Models to Generate Code-Mixed Texts: The Case of South East Asian Languagescited by 50
- 2022The Decades Progress on Code-Switching Research in NLP: A Systematic Survey on Trends and Challengescited by 35
- 2019Overview for the Second Shared Task on Language Identification in Code-Switched Datacited by 33
- 2021From Machine Translation to Code-Switching: Generating High-Quality Code-Switched Textcited by 29
- 2022PoeLM: A Meter- and Rhyme-Controllable Language Model for Unsupervised Poetry Generationcited by 22
- 2021Can You Traducir This? Machine Translation for Code-Switched Inputcited by 21
- 2024Predicting vs. Acting: A Trade-off Between World Modeling & Agent Modelingcited by 20
- 2021Challenges and Limitations with the Metrics Measuring the Complexity of Code-Mixed Textcited by 18
- 2024Disperse-Then-Merge: Pushing the Limits of Instruction Tuning via Alignment Tax Reductioncited by 18
- 2018Code-switched Language Models Using Dual RNNs and Same-Source Pretrainingcited by 16
- 2023NLG Evaluation Metrics Beyond Correlation Analysis: An Empirical Metric Preference Checklistcited by 16
- 2018Language Modeling for Code-Switching: Evaluation, Integration of Monolingual Data, and Discriminative Trainingcited by 14
- 2023Code-Switched Text Synthesis in Unseen Language Pairscited by 7
- 2022Detecting Unassimilated Borrowings in Spanish: An Annotated Corpus and Approaches to Modelingcited by 6
- 2024LLM-based Code-Switched Text Generation for Grammatical Error Correctioncited by 4
- 2024Prompting Towards Alleviating Code-Switched Data Scarcity in Under-Resourced Languages with GPT as a Pivotcited by 3
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.