Elamur Research

Surprisal Predicts Code-Switching in Chinese-English Bilingual Text

Paper · 2020 · Jesús Calvillo, Le Fang, Jeremy Cole et al.

Summary

When a bilingual writer switches from Chinese to English in the middle of a sentence, what makes that particular place a likely boundary? The paper studies whether the answer has something to do with the Chinese word the writer could have used there. The authors assemble a corpus of Chinese–English forum posts and translate each eligible switch back into Chinese. This gives them a way to estimate how readily a Chinese continuation follows from the preceding words without letting the presence of an English word drive the estimate. The final analysis uses 1476 sentences that originally contained a switch, each paired with an originally all-Chinese sentence that has a similar grammatical structure.

The authors distinguish between two ways a continuation can be unpredictable. Word surprisal asks how unexpected a particular Chinese word is given what comes before it. Word entropy asks how much uncertainty there is across the possible Chinese words at that point, before considering which one appears. A language model trained on Chinese Wikipedia supplies both measures. A statistical analysis then tests whether either measure helps distinguish translated switch cases from their all-Chinese comparisons after accounting for word frequency, word length, sentence length, and grammatical category.

The translated Chinese words at switch points tend to be more surprising in context. Adding surprisal to the control regression lowers its Akaike information criterion from 3967.3 to 3954.5, an improvement in fit after accounting for the extra predictor. Entropy offers no corresponding improvement, and the association with surprisal persists when entropy is included. Longer words and longer sentences are also associated with switches. Less frequent words show a weaker tendency in the same direction.

The authors offer two possible explanations for the surprisal result. A Chinese word that is hard to retrieve in context may make the English alternative easier to use, especially when composing the sentence already takes effort. A writer may also switch languages to draw a bilingual reader’s attention to unexpected information. The forum posts establish an association and leave both explanations open. The paper also releases the curated corpus with its Chinese translations and the code used to extract and process the data.

Deep dive: Surprisal Predicts Code-Switching in Chinese-English Bilingual Text

How the predictability of a Chinese word in context helps explain where bilingual writers switch to English in online conversations. · about 33 minutes to read

The problem and its context

Why study the boundary within a sentence?

Code-switching occurs when people alternate between languages during communication. The paper concerns switches within a sentence, specifically stretches of English inside writing that is otherwise Chinese. One forum example places the English word basement after Chinese words locating a laundry room. A writer using Chinese throughout could have used 地下室 at that position. The switch is therefore observable at a particular place in the sentence, and the Chinese alternative gives the authors something concrete to ask about that place. How easy would it have been to anticipate that Chinese word from the opening of the sentence?

The question is narrower than asking why bilinguals mix languages in general. People can choose a language to suit an audience, identify with a group, or convey an attitude toward a topic. Those circumstances can help explain why a writer is open to switching at all. The paper asks what might explain the location as well. In the laundry-room example, the preceding words are in Chinese and the location is expressed in English. A theory that relates switching to predictability needs a way to describe what changes at the location word. It also needs comparison points in sentences where a switch could plausibly have occurred and did not.

The authors test the idea using written conversation. Much of the earlier work they discuss examines speech. Writing gives a person more opportunity to consider a choice and revise an utterance, which makes it a useful setting for asking whether findings about predictability transfer. The paper also cites comparisons in which spoken utterances tend to be shorter and use shorter words and a less diverse vocabulary. These differences give the authors reason to expect the balance between spontaneous retrieval and deliberate signaling to differ across speech and writing. The study uses written data to examine that question from one side, without treating a forum post as a record of every decision that went into composing it.

What earlier accounts explain

The paper describes several sources of influence on code-switching. One is social. People can vary how they speak to express affiliation or adjust their distance from others. In an example from earlier work, Norwegian speakers moved from a local dialect toward a standard variety when they perceived outsiders to be present. The paper also discusses research relating switching to embarrassing or emotional topics. These examples put the audience and the subject matter in view. A word’s availability may matter while the choice of language still depends on who is expected to understand it and how the speaker wants the subject to be received.

Another source of influence is grammar. Earlier accounts proposed restrictions on where material from another language can enter an utterance, including constraints involving bound forms, which cannot occur independently, and the grammatical rules of the languages involved. For the authors’ purposes, this means the comparison positions matter. If switch cases regularly came from one kind of grammatical setting and comparison cases from an completely different kind, an apparent predictability effect could partly reflect the settings being compared. The study design consequently treats grammatical similarity as a condition for choosing useful examples.

Other accounts focus on access to words. One possibility is that a person switches because a word is difficult to retrieve in the language they have been using. The alternative can be easier to reach even for proficient bilinguals. The paper’s discussion of earlier work connects accessibility to frequency and word length. A familiar, short expression may be more readily available than an infrequent, long one. The authors also describe proposals under which concrete, easily pictured concepts are closely connected across a bilingual’s languages. Earlier findings that nouns are commonly switched or borrowed fit into this discussion, although raw counts of nouns and verbs address a different question from a comparison after matching and adjustment.

A related account concerns the work of maintaining a grammatical connection as a sentence unfolds. A word can depend on a governor, the word that heads its relation in a syntactic analysis. Several intervening words can separate them. In the earlier research discussed by the paper, greater separation was associated with more switching, on the account that memory makes it harder to keep track of the governor’s language across intervening material. This gives the authors a reason to consider dependency distance even though their main question is about the predictability of the next word.

The paper also describes accounts centered on the listener or reader. A change of language can make part of an utterance stand out, much as prominence in speech can guide attention. Earlier studies connected switches with new topics, discourse markers, contrasts between topic and focus, and information a speaker wants the audience to notice. In this view, a word could be fully available to the speaker in either language, and the switch could still serve a communicative purpose. In bilingual writing, the usefulness of a switch as a signal depends in part on the writer’s expectation that the reader will understand the inserted language.

From predictable meanings to predictable words

The closest earlier comparison in the paper is work by Myslín and Levy on Czech–English speech. In that work, people saw a piece of context and guessed continuations in either language. Their success in recovering the intended meaning provided a measure of its predictability. A meaning that readers seldom guessed carried more information when it appeared. The authors describe the earlier finding as evidence that switching can mark such information, potentially making it easier for the audience to notice what was unexpected.

A meaning and its wording can come apart. Readers may anticipate what a person is about to say and still have little reason to expect the exact Chinese expression used to say it. Conversely, given a specific Chinese word, it is possible to ask how strongly the preceding words favor that particular continuation. By making the expected word language-specific, the paper brings the written form into the measurement. That helps connect the results to word retrieval, while leaving room for an interpretation in terms of information conveyed to a reader.

The paper draws the concept of surprisal from prior work in psycholinguistics, where researchers have related predictability to the difficulty of processing language. The specific question here is whether a measure originally motivated in part by work on comprehension can also tell us something about what bilingual writers produce. The authors test it alongside entropy because difficulty could arise in more than one way. The particular word needed to express a message could be poorly supported by the preceding text. The writer could also face a choice across many plausible continuations. The first possibility motivates a measure of the realized word, and the second motivates a measure of uncertainty over the whole set of continuations. The paper cites Hale’s probabilistic parsing study as an earlier source for surprisal.

The method, step by step

Turn a visible switch into a Chinese word to score

It is easy to find out where an English word appears in a mainly Chinese sentence once the languages have been identified. The challenge is obtaining a probability that helps explain its appearance. Imagine estimating the probability of basement directly after a string of Chinese words. A system trained on bilingual text could give it a low probability because sentences often continue in the language already in use. That low probability would partly describe the switch that happened. The study needs a measure that can vary with the Chinese continuation, even when every word being scored is Chinese.

The authors’ solution is to translate the English span back into the language of its context. In the laundry-room example, they can score 地下室 as a continuation of the Chinese opening. The translated sentence keeps the label that records its origin. It still counts as a switch case, because the writer originally used English there. For a comparison sentence written entirely in Chinese, the authors select a position with a similar grammatical environment and score the original Chinese word at that position. Both scores are then on the same language-specific footing.

From forum posts to a test of predictability

The steps in order.

From forum posts to a test of predictabilityStep 1: Collect and segment Chinese forum sentences1. Collect and segment Chinese forum sentencesStep 2: Identify sentences containing English words2. Identify sentences containing English wordsStep 3: Translate switches with clear Chinese equivalents3. Translate switches with clear Chinese equivalentsStep 4: Pair translated cases with grammatically similar Chinese sentences4. Pair translated cases with grammatically similar Chinese sentencesStep 5: Locate the comparison word in each sentence5. Locate the comparison word in each sentenceStep 6: Score Chinese continuations and measure control variables6. Score Chinese continuations and measure control variablesStep 7: Fit the regression using the controls7. Fit the regression using the controlsStep 8: Test what surprisal and entropy add8. Test what surprisal and entropy add

Collect, translate, and clean the forum sentences

The source material was drawn from public bulletin boards run by the Chinese Students and Scholars Association at Carnegie Mellon University, the University of Pittsburgh, and Pennsylvania State University. The authors describe the participants as Chinese–English bilinguals who had studied in the United States for several years. The discussions mainly concern housing, used goods, shared experiences, and rides. That gives the data an everyday conversational setting, with messages intended for a community that regularly encounters both languages. The authors removed personal details such as names, telephone numbers, and addresses.

Before working with Chinese words, the authors had to establish their boundaries. They used Stanford’s Chinese segmenter with the Chinese Penn Treebank standard. This tokenization step defines the units that will later be counted for sentence length, tagged for grammatical category, and used as the preceding context for surprisal. It also matters for the correspondence between a switched span and its Chinese rendering. The location of the switch is analyzed in terms of words, while word length is measured separately in Chinese characters.

The initial split relied on the Google English 1-gram corpus. A sentence counted as containing a switch if it included an item found in that English word list. This rule identified 4740 candidate switch sentences and 14,956 candidate sentences without a switch. At this stage, the rule answers a simple screening question about recognizable English forms. An English item can meet that condition while denoting something with no straightforward equivalent in Chinese. The later cleaning step is necessary because the probability comparison depends on having a usable Chinese alternative.

Five Chinese–English bilinguals supplied one Chinese translation per switch sentence. The translators were international Chinese undergraduates whom the authors describe as similar to the forum writers in linguistic background and proficiency. This matters because they had to understand what the English material meant in a short, community-specific message and render that meaning naturally in Chinese. A translator could sometimes choose among several phrasings. The authors point out that more than half of the switches involved a single word, which they take as a reason to expect a relatively limited choice of translations in many cases.

During translation, many English items turned out to be proper nouns or expressions with no clear Chinese rendering. A local establishment, for example, might only be identifiable by its English name. Such a case raises a different question from choosing between two language-specific ways to express an ordinary concept. The authors classified the candidate sentences by hand into clean switches, proper-noun uses, internet slang, and a residual category that included incomplete sentences and unidentified items. They retained the clean group for analysis. It comprised 1690 sentences, with many switches involving common nouns and adjectives. The paper’s examples include English words used for a neighborhood, a basement, and availability.

The study calls the translated cases CS-sents. The label identifies the original language behavior, even though the version used for scoring is entirely Chinese. The authors use nonCS-sents for the comparison cases originally written without a switch. Keeping those meanings straight is important throughout the analysis. Both groups provide Chinese predictor values, and the original post supplies the outcome. For a switch spanning several words, the authors focus on where the writer enters English. The first word of the switch determines the position used in the analysis, which the paper calls the CS-point.

Find a plausible comparison position

An all-Chinese sentence does not come with a marked position corresponding to the beginning of a switch. Choosing a word at random could put a case and its comparison in grammatical environments that differ in ways already known to matter. The authors therefore seek a sentence with a similar grammatical outline and assign it a position where the local structure resembles that of the translated switch. Each retained case is paired with an all-Chinese comparison, and each comparison receives a single designated position for scoring.

The authors use Stanford’s parser to obtain part-of-speech tags and dependency trees for the sentences. A part-of-speech tag identifies a word’s grammatical category. A dependency tree records which words are linked grammatically and specifies the kind of link. The tag sequence gives a broad description of the order of categories across a sentence. The dependency analysis adds information about the role of the target word, including roles that a sequence of neighboring tags alone cannot identify.

To compare whole sentences, the authors use Levenshtein similarity over their tag sequences. This measures how closely the sequences correspond in terms of edits needed to turn one into the other. A candidate comparison needs at least 40% similarity. A switch case is discarded if no comparison sentence satisfies the threshold. Among eligible candidates, the search favors the closest tag sequence. The whole-sentence match allows some grammatical variation while limiting how far the comparison can stray from the structure of the case.

The authors also require a local match. The target tag and the tags immediately before and after it must make the same sequence at the proposed comparison position. At a sentence boundary, the requirement uses the neighbors that exist. In the paper’s example, English house is rendered as 房子. It is a common noun preceded by a determiner and followed by another common noun. The comparison position is 木头, meaning wood, in a sequence with the same local tags. The words refer to different things. What makes the wood example suitable for this purpose is the grammatical environment in which it occurs.

A further condition applies when a suitable match is available. The dependency relation connecting the target word to its governor should also be the same at both positions. The paper reports that candidates satisfying this condition were available for 92.2% of the switch cases. In the example with the house and the wood, the target words share the noun-compound relation. The use of this condition where feasible adds a grammatical check without requiring the two sentences to express comparable propositions. After alignment, the authors had 1476 pairs.

Check the quality of the Chinese renderings

The validity of the probability comparison depends on the translations. An odd Chinese phrase could be surprising because it sounds translated. A fluent sentence could also change the meaning of the original. The authors asked bilingual judges to evaluate these properties separately, so a high rating on one could be distinguished from a high rating on the other.

The verification used a sample of 500 translated cases. The authors used Amazon Mechanical Turk to recruit 33 participants who spoke Chinese as their first language and were highly proficient in English. The paper describes a design in which a participant saw 60 original-and-translated pairs and each pair was evaluated by 3 participants. A judge could compare the two versions and rate whether the translation conveyed the original meaning and whether its Chinese was natural. The survey included intentionally high- and low-quality controls. The authors excluded participants whose judgments did not respond to these control items. The resulting ratings provide a check on the renderings used for the corpus, while the choice of a single rendering per sentence remains part of the design.

Give frequency, length, and structure a place in the analysis

The authors measure several properties that might help distinguish the original switch cases from the comparisons. The focal word for each measurement is the Chinese word at the designated position. For a switch case it is the translation at the onset of the switch. For an originally Chinese sentence it is the word at the aligned comparison position. Measuring both classes in Chinese lets a property such as number of characters have the same interpretation throughout.

The frequency control uses relative counts from the Google Chinese 1-gram corpus. Each frequency is converted to a negative logarithm before it enters the regression. On that scale, larger values correspond to less frequent words. This predictor gives the analysis a measure of how common a word is in general, independent of the preceding words in the forum sentence. Word length is counted in Chinese characters. Sentence length is counted in segmented words across the entire sentence. The paper treats both lengths as potential correlates of effort, with word length related to lexical access and sentence length potentially reflecting the work of assembling a longer utterance.

For the grammatical category of the target word, the authors reduce the tagger’s inventory to 3 classes. Proper, common, and temporal nouns are merged into the noun group. The verb group includes the tags for forms such as equivalents of be and have, together with other verbs. All remaining tags are assigned to the other category. These broad categories give the regression a way to account for differences between word classes even after a more detailed tag sequence has been used in matching.

The authors also consider the target word’s dependency relation, its distance from its governor, and its position within the sentence. Often occurring relations, including noun compounds, nominal subjects, direct objects, and adjectival modifiers, are represented by separate categories. Less frequent relations are pooled. Dependency distance is measured as the difference in word positions when the governor precedes the target. Adjacent words have a distance of 1 under this convention, and a governor to the right yields a value of 0. Sentence position is coded as beginning, middle, or end using a 10-80-10 percent division. These measures give the regression a chance to pick up structural differences that remain after alignment.

Score an actual continuation and its alternatives

The paper’s first quantity of interest is word surprisal. The probability of a word is assessed given the words leading up to it, and the negative logarithm converts that probability into a score that increases as the word becomes less likely. An ordinary word can therefore receive high surprisal if the immediately preceding text provides little support for it. A word that is uncommon overall can receive a lower score if it is especially well supported in the context where it appears.

surp(wᵢ) = −log P(wᵢ | wᵢ₋₁, …, wᵢ₋ₜ)

Here surp(wᵢ) is the surprisal of the word wᵢ at position i. P denotes probability, and the vertical bar means that the probability to its left is conditioned on the words to its right. wᵢ₋₁ is the immediately preceding word, wᵢ₋ₜ is the earliest word in the context window, and the ellipsis covers the intervening positions. t specifies the size of the preceding window. log is the logarithm, and the minus sign makes a lower probability yield a larger surprisal score.

The study estimates probabilities with a 5-gram system trained on Chinese Wikipedia using SRILM. An n-gram is a sequence of adjacent units. Here the unit is a word, and the probability for the word of interest is based on the preceding 4 words. The authors train this probability estimator on Chinese text separately from the regression that analyzes the forum cases. The estimator supplies the values for the predictor. The regression tests whether those values are related to the forum labels. For a target word outside the estimator’s vocabulary, the authors assign 10.166, the highest surprisal value they found in the corpus.

The second quantity, word entropy, describes the same point just before the target word. It is the probability-weighted average of the surprisal of the possible next words. Each word contributes in proportion to its probability. A context in which probability is concentrated on a narrow set of continuations has lower entropy than a context in which substantial probability is spread over many alternatives. A specific word can still be very surprising in the first kind of context if it falls outside the set of expected continuations.

Hᵢ₋₁ = ∑_{w ∈ vocab} [−log P(w | wᵢ₋₁, …, wᵢ₋ₜ)] × P(w | wᵢ₋₁, …, wᵢ₋ₜ)

Hᵢ₋₁ is entropy at the point immediately before position i. ∑ instructs the reader to add a term for every w, where w is a candidate word and w ∈ vocab means that it belongs to the vocabulary. P is the conditional probability of that candidate. The vertical bar, the indexed words, t, and the ellipsis specify the preceding context as in the surprisal formula. The expression in brackets gives the candidate’s negative log probability. The multiplication sign weights that expression by the candidate’s own probability. For the reported computation, the same Chinese probability estimator supplies this distribution, again with t set to 4.

Using the same estimator makes the distinction between the predictors particularly clear. The entropy score is determined once the preceding Chinese context is fixed. Surprisal further requires a particular next word. Two different possible Chinese continuations following the same opening would inherit the same entropy for that opening. Their surprisal values could differ substantially. This is what allows the analysis to ask separately about the unpredictability of the word actually scored and about the uncertainty of the preceding context.

Fit a control regression before adding the new measures

The authors use binary logistic regression because each observation belongs to one of two groups. The response is coded as 0 for an originally all-Chinese sentence and 1 for a sentence that originally contained a switch. A regression coefficient describes how the log odds of the switch label change with a predictor, holding the other included predictors fixed. Before fitting, the numerical predictors are standardized to a mean of 0 and a standard deviation of 0.5. The resulting coefficients for frequency, lengths, surprisal, and entropy concern their standardized scales.

The authors first choose a baseline from the available control variables. The search considers the controls and their two-way interactions, where an interaction permits the relationship with one control to vary with another. A genetic algorithm searches among these candidate specifications using the Akaike information criterion, or AIC, and the Bayesian information criterion, or BIC. Both reward likelihood, which reflects how well the fitted regression accounts for the observed labels, and penalize the use of additional parameters. The BIC penalty depends on the number of observations. For a fixed set of observations, lower values of either criterion favor the corresponding specification on that criterion’s tradeoff between fit and complexity.

The authors use the BIC choice as their control regression. They then add surprisal and entropy to assess what each contributes beyond that baseline. They also examine whether the contribution of each quantity changes when the other is present. This order gives the tests their interpretation. The baseline already accounts for some properties known to be related to language choice, and the new predictors are judged on the information they add to that account.

CS ∼ postag + freq + w_length + s_length

CS is the binary outcome for the sentence’s original switch status. The tilde means that the outcome is regressed on the terms that follow. postag is the target word’s category, freq is its negative log relative frequency, and w_length is its length in Chinese characters. s_length is the sentence’s length in words. The plus signs specify that these predictors enter as separate main effects. Frequency and the length measures enter on the standardized scales described above. The category coefficients use nouns as their reference.

Experiments and results

What the comparison set contains

The regression uses the final 1476 pairs, giving the reported sample size of n = 2952 sentence observations. The sentence-length distribution in the aligned set has a mean of 11.1 words and a mode of 6 words. The minimum is 2 words and the maximum is 43. These figures describe a set with many short messages and a range of longer ones. That variation matters to the sentence-length analysis, since the immediate context used to estimate the word’s probability and the length of the whole utterance describe different features of a sentence.

The index of the designated position has a mean of 5.15, a mode of 2, and a maximum of 30. The typical position is relatively early, and the cases also include switches farther into a sentence. At the designated points, the paper reports 62% nouns, 23% verbs, and 15% for the remaining categories. These figures describe the distribution of grammatical categories in the aligned material. They are useful background for the regression, which asks what category contributes after other properties of the matched sentences enter the comparison.

In the translation survey, the mean correctness rating was 4.04 out of 5, with a standard deviation of 1.3. The mean fluency rating was 4.08 out of 5, also with a standard deviation of 1.3. The two judgments address distinct problems. Correctness concerns whether the Chinese preserved the meaning of the original bilingual sentence. Fluency concerns whether the translated sentence reads naturally as Chinese. The generally favorable averages support using the translations to estimate Chinese continuations. The variation in ratings leaves room for differences in quality among items and judgments.

What surprisal and entropy add

The control specifications preferred by AIC and BIC retained the same main effects. The AIC choice also included additional interactions. The authors selected the more compact BIC choice for the main comparison, citing the size of the dataset. This baseline retains target-word category, frequency, and length, together with sentence length. Its AIC is 3967.3, and its BIC is 4003.2. Dependency relation, dependency distance, and position within the sentence did not enter the selected baseline. The authors interpret that outcome in light of the effort to match the two groups on structural features during alignment.

Adding surprisal lowers the AIC to 3954.5. The reported BIC is also lower, although the paper gives 3996.4 in the results prose and 3996.3 in the caption of its coefficient table for this same comparison. Both reported values favor the surprisal specification over the baseline. The likelihood-ratio test gives a statistic of 14.81 with 1 degree of freedom and p < 0.001. This test evaluates the change in fit when the extra predictor is added. The fit criteria and the likelihood comparison consequently point in the same direction.

Akaike information criterion for regressions on the aligned Chinese–English forum corpus

The regression with surprisal gives the best fit after the penalty for additional parameters.

Akaike information criterion for regressions on the aligned Chinese–English forum corpusControls only: 3967.3Controls only3967.3Controls and word entropy: 3967.9Controls and word entropy3967.9Controls and word surprisal (this paper): 3954.5Controls and word surprisal (this paper)3954.5
The numbers
System or settingAIC
Controls only3967.3
Controls and word entropy3967.9
Controls and word surprisal (this paper)3954.5

The surprisal coefficient is positive. The results prose reports β = 0.37, z = 3.82, and p < .001 for the regression that adds surprisal to the controls. At a fixed value of the other predictors, a more surprising Chinese target word is associated with higher fitted odds that the sentence originally switched to English. The direction matters because a change in a fit criterion says only that the additional term improves the specification. The coefficient tells the reader which kind of Chinese continuation is associated with the original switch.

With entropy added to the baseline, AIC rises to 3967.9 and BIC to 4009.8. The entropy coefficient fails to reach statistical significance. The authors report a similar outcome when adding entropy to a regression that already includes surprisal. They also report that surprisal still contributes when added to a regression that includes entropy. Finally, entropy fails to reach significance when used on its own. The evidence therefore singles out the probability of the particular Chinese continuation under this computation. The uncertainty of the available next words, averaged across the vocabulary, provides weaker evidence across the specifications tested.

These are fit and inference results for the aligned sentence observations. AIC and BIC assess the fitted regressions against penalties for their complexity, while the likelihood-ratio and Wald tests address contributions of predictors within that analysis. The experiment reports its predictive result through these comparisons. It gives no accuracy, precision, or recall for a separately held-out set of forum posts. The phrase “predicts code-switching” refers here to an estimated association with the observed switch label after accounting for the stated controls.

What the controls contribute alongside surprisal

Word length has a positive coefficient in the regression with surprisal. The paper reports β = 0.47, z = 4.79, and p < .001. A Chinese word made up of more characters tends to occur at a site where the writer actually used English, conditional on the included predictors. The authors connect this result to earlier work relating longer words to lexical accessibility. In this experiment, the measurement is the length of the Chinese alternative. The number of characters in the English insertion plays no part in the coefficient.

Sentence length also has a positive coefficient, reported as β = 0.58, z = 7.32, and p < .001. The likelihood-ratio statistic for sentence length is 56.10, with p < .001. The effect describes the whole sentence even though the target position can occur early. The authors relate it to the effort of retrieving and organizing the additional words and structures in a longer utterance. They present length as an observable feature consistent with that account. The forum data measure the completed sentence, so the coefficient by itself gives no direct readout of how much the writer had planned at the onset of the switch.

The negative log frequency coefficient is positive but less precisely supported. The paper reports β = 0.21 and z = 1.91, with the corresponding probability value written as 0.055 in the discussion of the control factors. The direction means that lower-frequency Chinese words are associated with higher fitted odds of a switch. The authors treat the result as a tendency and suggest that overlap with surprisal could explain the relatively weak evidence. The fact that a word is uncommon can make it harder to predict from a short context, so some of the information in the frequency measure is already available through surprisal.

In the same regression, the verb coefficient is β = 0.46, with z = 4.42 and p < .001. The coefficient for the other categories is β = 0.23, with z = 2.08 and p < .05. Both coefficients are relative to nouns at fixed values of the other predictors. Nouns are frequent among the observed switch points, and the grammatical matching means that nouns also have a strong presence in the comparison material. The authors explain that noun cases are scored through the intercept and their other predictor values because noun is the reference category. The adjusted category coefficients thus have a different denominator and purpose from a count of the categories used in switches.

How much the predictors overlap

The authors check whether predictors such as frequency and surprisal are so closely related that it becomes difficult to estimate their separate contributions. They report a Spearman rank correlation of ρ = 0.62 between negative log frequency and surprisal, with p < 0.001. For negative log frequency and word length, the corresponding correlation is ρ = 0.57, again with p < 0.001. A rank correlation measures whether observations that are higher on one quantity tend also to be higher on the other. In these data, the Chinese alternatives that are rarer tend to be more surprising and tend to contain more characters.

The paper also checks the generalized variance inflation factor, a diagnostic for the extent to which dependencies among predictors can inflate uncertainty in their estimated effects. All reported values were below 2. The authors conclude that the overlap they observe is unlikely to pose a serious problem for the fitted regression. That diagnostic complements the direct comparison with the frequency-adjusted baseline. Together, they support interpreting surprisal as carrying information about the context beyond the general rarity of the target word, while allowing the two quantities to be related.

What the ablations show

A particular word carries more evidence than the spread of alternatives

The paper’s controlled comparisons change which predictors enter the regression. The central comparison holds the selected controls fixed and adds either surprisal or entropy. The input observations, their labels, and the word positions stay the same. The improvement with surprisal can therefore be attributed within this fitted comparison to giving the regression the probability of the target Chinese word in its immediate context. Because the baseline already contains the target’s overall frequency, surprisal’s contribution goes beyond knowing whether the word is rare in a large Chinese corpus.

The entropy comparison isolates a different question. Its value is available before the target word is specified and tells the regression how dispersed the probabilities of all continuations are. If a context strongly favors a particular word and the Chinese translation at the switch point is a different one, the entropy may be low while the translated word’s surprisal is high. If the context supports a wider range of continuations, entropy may be higher while the chosen word remains quite plausible. The two quantities can consequently supply different evidence about the same place in a sentence. The results favor the quantity that uses the translated target word.

The tests that put both measures into the regression sharpen that distinction. Surprisal still contributes in the presence of entropy, which shows that broad uncertainty about the context fails to account for the added information supplied by the particular word’s probability. Entropy still contributes little in the presence of surprisal. The entropy-only test further checks whether its weak result simply reflects competition from the controls. Its continued lack of statistical significance narrows the explanation within the tested specifications. The study offers little support for the version of uncertainty supplied by the Chinese Wikipedia probability distribution.

The controls clarify which interpretation the coefficients allow

Comparing the AIC and BIC choices shows that the same basic control terms are retained under both criteria, with disagreement about additional interactions. The main results then use the BIC choice. That makes the surprisal comparison straightforward to read against a baseline with separate terms for category, frequency, and lengths. The paper’s comparison of control criteria establishes what the baseline contains. It does not report a corresponding set of surprisal results for every possible control specification, so the demonstrated contribution has a defined statistical setting.

The tests of individual predictors in the regression with surprisal help distinguish the word-level result from an effect of sentence length. Longer sentences show a substantial contribution to the fitted analysis, even though the regression also takes the probability and length of the target word into account. This is consistent with the paper’s view that local accessibility and the demands of a whole utterance can both matter. The result leaves open what sentence length represents in a given message. Length can provide a usable predictor before the process that generated the association is identified.

The part-of-speech result also shows why the adjusted comparison is worth doing. There are many nouns among the designated points, yet, conditional on the other predictors, the verb and other categories receive positive coefficients relative to nouns. Matching has already shaped which sites the regression compares. The coefficient depends on switches and non-switches in that selected material and on how the remaining predictors are distributed. Reading it as a simple ranking of the natural tendency of nouns and verbs to be switched would move from the controlled comparison to a broader claim about language use that the coefficient alone cannot establish.

The alignment procedure addresses structural alternatives at the design stage. Candidate control terms for dependency relation, distance, and location are considered again during regression selection, but none survive in the chosen baseline. The authors read this as consistent with the balance introduced by matching. A direct comparison between regressions fitted to matched and unmatched datasets would address a further question about how much the matching changes the result. The paper does not report that experiment. Its evidence comes from comparisons within the aligned sample.

Why the null result matters to the authors’ explanation

The authors expected higher entropy to accompany more switching because selecting a word from many plausible candidates might be demanding. They reconsider that prediction after finding little evidence for entropy as they computed it. A writer typically knows something the probability estimator does not have explicitly. The writer has a message to express. Several next words can be plausible from the preceding text alone while only a small subset would convey the intended message. Conditioning on the words already written and conditioning on the writer’s intended meaning could therefore yield quite different distributions.

The paper expresses a possible extension by referring to a conditional distribution of the following form.

P(wᵢ | wᵢ₋₁, …, w₀, semantics)

P denotes probability and wᵢ is the candidate continuation at position i. The vertical bar introduces what that probability is conditioned on. wᵢ₋₁ is the immediately preceding word, w₀ is the earliest indexed word in the history shown, and the ellipsis represents the words between them. semantics stands for information about the meaning the writer intends to express. The commas separate the components of the conditioning information. The authors suggest taking entropy over a distribution of this kind. The empirical comparisons use the short Chinese word history without that explicit meaning information.

This distinction also limits what the surprisal improvement can explain. The word score estimates the support given to a Chinese expression by the preceding text. Its association with switches is compatible with a retrieval account in which those preceding words ease or hinder access. It is also compatible with the writer recognizing that the expression conveys unexpected information and making it salient to a reader. Changing a term in the regression separates the information contributed by the predictors. It does not intervene on the writer’s reasons for choosing English.

Limitations

Limits identified by the authors

Translation is both the main design advantage and a source of uncertainty. A monolingual Chinese rendering keeps the fact that the original word was English from mechanically lowering its estimated probability. The authors acknowledge that a translation might introduce a Chinese construction less usual than the wording a forum writer would choose. That could raise a target’s surprisal even though both groups are scored with a Chinese probability estimator. The occurrence of many single-word switches and the generally favorable survey judgments give reasons to take the renderings seriously. They do not reveal the exact Chinese sentence each forum writer would have composed.

A related limitation is the availability of suitable data for estimating probabilities. The authors explain that a large bilingual corpus of the right sort would be difficult to obtain. They also explain that scoring the original English insertions in a bilingual corpus would be hard to interpret because such insertions are relatively unusual after stretches of Chinese. The Chinese Wikipedia estimator gives the analysis a consistent way to score all the target words. Its probabilities are still estimates from Chinese text and are used as indirect measures of accessibility in the forum setting. The study does not observe a writer’s expectations directly.

The authors give particular attention to the formulation of entropy. The probabilities available to the analysis depend on preceding words, while the set considered by someone producing the message could be restricted by intended meaning. Failure to find an association for this measure therefore leaves open whether uncertainty about meaning-compatible alternatives matters to switching. The authors make a related qualification about surprisal. They interpret the measured effect as reflecting how much the preceding words facilitate production, while recognizing that semantic intent also helps determine which word a person is trying to retrieve.

The authors also leave open the mechanism behind the association. They propose that an effortful production process can leave fewer resources available to inhibit the alternative language. A longer sentence and a locally unexpected word are both compatible with that proposal. They also consider the possibility that a writer switches deliberately to highlight important information for the intended reader. The two processes could operate within the same exchange. The paper calls for further work to distinguish them because its evidence comes from completed sentences and their estimated probabilities.

Further limits of the design

The population and the range of posts define the scope of the result. The material comes from university-affiliated bilingual forums, with much of the discussion devoted to practical matters such as housing and rides. The authors treat the shared community and the writers’ broadly similar backgrounds as reasons to expect some social factors to be relatively homogeneous. A shared forum still allows differences in audience, topic, familiarity with a particular English expression, and the writer’s reason for posting. The reported regression does not identify a separate contribution for each of these circumstances. Generalizing the result to other communities or language pairs would require evidence from those settings.

The cleaning step narrows the question to switches with a recognizable Chinese counterpart. That is what makes it possible to compute a probability for a Chinese alternative. Switches involving names, internet slang, and difficult-to-translate expressions can serve other functions and are outside the final analysis. The study is therefore most informative about comparable choices of expression across Chinese and English. Its estimate does not describe the full mix of reasons why an English item appears in a Chinese forum post.

The matching procedure gives the comparisons grammatical plausibility as judged by their tags and dependencies. It permits differences in words, meaning, and discourse context. Even within a local grammatical match, the writer with a switch and the writer in the comparison sentence could be doing different things with their messages. The dependency constraint also applies where a suitable candidate is available. Grammatical matching helps make the groups comparable along the dimensions it uses and leaves other differences uncontrolled. The surprisal association is conditional on this particular way of assembling cases and comparison sites.

Each switch case has a single translated wording. Fluency and correctness ratings are valuable for checking whether it makes sense, yet several natural renderings can differ in how predictable their words are. For words outside the vocabulary, the analysis also assigns a common value of 10.166. This lets those observations remain scorable at the cost of distinguishing among their degrees of unpredictability. The paper gives no sensitivity analysis across multiple translations or alternative treatments of words outside the vocabulary. The strength of the association under those changes is open.

The fitting setup uses an outcome defined for a sentence and a word predictor defined at a designated position. In a switch case, the position is known because it is where the author entered English. In a comparison case, it is selected to align with that position. The analysis consequently estimates how properties of these designated points relate to the sentence labels in a constructed set. It gives no direct estimate of the chance of a switch at an arbitrary word in an unfiltered post. A procedure designed to locate switches without prior knowledge of their position would have to consider the other available words as well.

The length result also deserves care because it uses the full sentence. A writer producing a long utterance could face greater planning demands, as the authors propose. A longer sentence also contains more opportunities for a switch somewhere in it. The distinction matters because the dependent variable records whether the sentence contained a switch, even though several predictors are taken from a particular position. The authors’ interpretation in terms of production effort fits the observation, and the sampling and outcome leave that opportunity-based explanation open.

Finally, the probabilities come from Wikipedia and use a short word window. In a forum thread, knowledge shared by the participants or information from an earlier message can make a continuation expected to its audience. A word estimator observing the immediately preceding Chinese words has limited access to those cues. The resulting surprisal is a precise measure of expectation under the study’s probability estimate. The degree to which it reflects what the writer or reader expected depends on the relevance of that estimate to the conversation.

What came after

No subsequent studies are identified. The paper itself leaves a specific follow-up question about uncertainty in production. Its entropy measure describes continuations that are plausible from words already written. A measure that also incorporated the intended meaning would ask how uncertain the choice remains among words that could express that message. Comparing those quantities could clarify whether the weak entropy result stems from how the alternatives were defined.

The other open question is whether contextually unexpected words are switched chiefly because they are difficult to retrieve, because a change of language helps the reader notice them, or because both influences operate in the same exchange. The released corpus preserves the original switches alongside Chinese renderings, making it possible to revisit the word-level comparison. The paper establishes the association in that corpus and leaves the relative contributions of production effort and communicative strategy unresolved.

Cite

Cite as Jesús Calvillo, Le Fang, Jeremy Cole and David Reitter. 2020. Surprisal Predicts Code-Switching in Chinese-English Bilingual Text. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2020.emnlp-main.330

@inproceedings{calvillo2020surprisal,
  title = {{Surprisal Predicts Code-Switching in Chinese-English Bilingual Text}},
  author = {Jesús Calvillo, Le Fang, Jeremy Cole and David Reitter},
  booktitle = {Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.330},
  url = {https://doi.org/10.18653/v1/2020.emnlp-main.330}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/calvillo-2020-surprisal-predicts-code-switching-chinese/