NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Survey of Code-switching: Linguistic and Social Perspectives for Language Technologies

A. Seza Doğruöz, Sunayana Sitaram, Barbara E. Bullock, Almeida Jacqueline Toribio

TL;DR

While code-switching (C-S) is a massive focus in modern NLP, computational models frequently ignore decades of foundational linguistic and social research. This survey bridges the gap, demonstrating how massive language models fail to capture the structural and sociolinguistic nuances of language mixing. The authors call for an interdisciplinary approach to build language technologies that process code-switching the way humans actually use it.

What Problem Does This Paper Address?

As global communication shifts online, language technologies are increasingly expected to handle code-switching—the practice of alternating between two or more languages within a single conversation or text. However, current Natural Language Processing (NLP) research treats C-S primarily as an algorithmic optimization problem.

By ignoring the structural, cognitive, and social constraints of language mixing, computer scientists often rely on oversimplified models. This creates a massive gap: state-of-the-art language models struggle with complex code-switching, suffer from a lack of diverse training data, and fail to understand why or how multilingual communities (specifically focusing on European and Indian contexts) switch languages.

Methods

As a survey paper, the authors do not introduce a new algorithm. Instead, they synthesize decades of literature from formal linguistics, sociolinguistics, and computational linguistics. They contrast the dominant computational framework—the Matrix Language Frame (MLF) model—with alternative linguistic theories like the Equivalence Constraint, Functional Head Constraint, and constraint-free theories. Furthermore, they analyze the structural boundaries between true code-switching, borrowing (e.g., using a single foreign word), transfer, and loan translation to show where current NLP tokenization and tagging schemas fall short.

Datasets

The paper reviews existing evaluation benchmarks rather than introducing new ones, highlighting the limitations of current evaluation data:

  • GLUECoS: A benchmark spanning Spanish-English and Hindi-English for tasks like Language Identification (LID), Part-of-Speech (POS) tagging, Named Entity Recognition (NER), Sentiment Analysis, Question Answering, and Natural Language Inference (NLI).
  • LINCE: A centralized benchmark covering LID, NER, POS tagging, and Sentiment Analysis across four language pairs: Spanish-English, Nepali-English, Hindi-English, and Modern Standard Arabic-Egyptian Arabic.

The authors point out a major dataset bias: the vast majority of these benchmarks consist entirely of annotated tweets, which fail to represent the full spectrum of natural spoken or written code-switching.

Key Insights and Ideas

  • NLP’s Favorite Model is Flawed: The Matrix Language Frame (MLF) model dominates NLP because it is computationally convenient to assume one "dominant" language provides the grammatical frame. However, linguists argue it fails to account for balanced, complex language mixing where a single matrix language cannot be identified.
  • Borrowing $\neq$ Code-Switching: Dropping a single Spanish word into an English sentence ("This is a good baile!") is a simple lexical borrowing. Attaching a Turkish possessive suffix to a German noun requires complex grammatical integration. NLP models often lump these together, failing to recognize the structural complexity of the latter.
  • The "Negative Evidence" Blindspot: Both computer scientists and linguists suffer from selection bias—they only study where code-switching does happen. In some highly multilingual communities (such as Konkani-Kannada speakers in India), bilinguals strictly avoid code-switching due to historical and social prestige factors. Models need "negative evidence" to learn when not to code-switch.
  • Social Context Dictates Structure: Code-switching is rarely random. It is driven by identity, politeness, and topic. For instance, data shows Hindi-English bilinguals on Twitter consistently prefer Hindi for swearing or expressing negative sentiments, a nuance lost on purely statistical models.

Key Results

While primarily a qualitative survey, the paper highlights telling quantitative trends from recent NLP literature:

  • The Complexity Ceiling: While massive multilingual models (like mBERT and XLM-R) perform well on shallow C-S tasks like Language Identification and POS tagging, they perform only slightly better than chance on harder semantic tasks like Natural Language Inference (NLI).
  • The Publishing Disconnect: A core reason for NLP's blindspot is cultural. Computational linguistics prioritizes rapidly published conference proceedings, whereas linguistics relies heavily on books and journals. This mismatch means foundational linguistic insights are frequently left uncited and unread by AI researchers.

Limitations and Future Work

The authors identify three critical bottlenecks for the field:

  1. Data Scarcity: Current models are trained on monolingual data (like Wikipedia) and fine-tuned on narrow social media datasets. True progress requires corpora from diverse, less-known language pairs and natural spoken contexts.
  2. Lack of End-to-End Systems: There are virtually no widely used spoken dialogue systems or chatbots capable of naturally producing or adapting to a user's specific code-switching style.
  3. Need for Finer Annotations: NLP tag sets are often too coarse (e.g., misclassifying functional elements as standard lexical words), which strips away the exact syntactic markers that dictate how languages can legally mix. Future work must integrate these sociolinguistic and structural constraints directly into model architectures.

Summary updated

BibTeX
@inproceedings{dogruoz2021survey,
  author = {A. Seza Doğruöz and Sunayana Sitaram and Barbara E. Bullock and Almeida Jacqueline Toribio},
  title = {{A Survey of Code-switching: Linguistic and Social Perspectives for Language Technologies}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  url = {https://openreview.net/forum?id=62AGN7PHuG0},
}
Figure