Introduction
Code-switching (CS)—the phenomenon where bilingual speakers alternate between two languages within a single discourse—is a complex linguistic behavior. While social and grammatical constraints on CS have been extensively studied, the cognitive mechanisms that trigger a switch at a specific moment remain a subject of active research. This study investigates whether information-theoretic measures, specifically word surprisal and entropy, can predict the occurrence of code-switching in written Chinese-English text. The researchers hypothesize that code-switching may serve as a "relief valve" when the cognitive effort required to produce a specific, unpredictable word in the current language becomes too high.
Methodology
The study utilizes an observational design focused on a new dataset of online forum posts from Chinese Students and Scholars Association (CSSA) Bulletin Boards. To isolate the cognitive triggers of code-switching, the researchers employed a rigorous alignment and modeling process.
Data Processing and Syntactic Alignment
To calculate surprisal accurately, it must be measured within a single language. The authors had bilingual speakers translate the English portions of code-switched sentences back into Chinese, creating a "monolingual baseline." This allowed for the calculation of how surprising a concept was before the decision to switch languages was made. Furthermore, each code-switched sentence was paired with a "non-switched" Chinese sentence with a nearly identical grammatical structure (POS tags and dependency relations) to control for syntactic effects.
Statistical Modeling
The researchers used a 5-gram language model trained on Chinese Wikipedia to calculate:
- Word Surprisal: The unexpectedness of a specific word given its preceding context.
- Word Entropy: The average uncertainty of any word appearing next in a given context.
A binary logistic regression model was then used to determine which factors significantly predict a code-switch, controlling for word length, frequency, and sentence length.
Results
The statistical analysis revealed that word surprisal is a robust predictor of code-switching. As shown in the regression results, higher surprisal significantly increases the likelihood of a switch ($\beta = 0.37, p < .001$).
Other significant predictors included:
- Sentence Length ($\beta = 0.58, p < .001$): Longer sentences, which impose a higher cognitive load, are more likely to contain a switch.
- Word Length ($\beta = 0.47, p < .001$): Longer, more complex words are more frequently switched.
- Word Frequency ($\beta = 0.21, p = .055$): Rare words showed a trend toward being switched, though the effect was less pronounced than surprisal.
Interestingly, while surprisal was significant, word entropy (general contextual uncertainty) was not. This suggests that the trigger for code-switching is the difficulty of retrieving a specific word rather than general uncertainty about the upcoming discourse.
Discussion and Conclusion
The findings support the "Inhibition Hypothesis," which posits that bilinguals must actively inhibit their non-target language. High surprisal or increased sentence length drains the cognitive resources required for this inhibition, allowing the alternative language to "leak" through. This suggests that code-switching is not merely a social or grammatical choice but is deeply tied to the cognitive demands of language production.
While this study provides strong evidence from written text, future work could extend these findings to spoken conversation, where planning time is reduced. Additionally, utilizing modern Large Language Models (LLMs) could provide deeper semantic context for calculating surprisal and entropy, potentially uncovering more nuanced cognitive triggers.
Summary updated