Natural language processing (NLP) models trained on people-generated data can be unreliable because, without any constraints, they can learn from spurious correlations that are not relevant to the task. We hypothesize that enriching models with speaker information in a controlled, educated way can guide them to pick up on relevant inductive biases. For the speaker-driven task of predicting code-switching points in EnglishSpanish bilingual dialogues, we show that adding sociolinguistically-grounded speaker features as prepended prompts significantly improves accuracy. We find that by adding influential phrases to the input, speaker-informed models learn useful and explainable linguistic information. To our knowledge, we are the first to incorporate speaker characteristics in a neural model for code-switching, and more generally, take a step towards developing transparent, personalized models that use speaker information in a controlled way. Imbalanced datasets, flawed annotation schemes, and even model architectures themselves can all cause neural models to encode and propagate biases by incorrectly correlating social information with labels for a task (Sun et al., 2019; Field et al., 2021). As a result, models may be brittle and offensive in the presence of racial or gender attributes (Kiritchenko and Mohammad, 2018; Nozza et al., 2021), unsuitable for processing mixed-language text or dialect variations (Sap et al., 2019; Kumar et al., 2021; Winata et al., 2021), or ones that can miscommunicate intents in translation setups. Contextualizing models in social factors is important for preventing these issues and building more socially intelligent and culturally sensitive NLP technologies (Hovy and Yang, 2021). useful inductive biases, thereby improving performance on person-oriented classification tasks. We test this hypothesis on the task of predicting code-switching (language mixing) in a multilingual dialogue, which is inherently linguistically and socially driven (Li, 2013). Prior approaches for predicting code-switching consider only shallow linguistic context (Dogruz et al., 2021). As we show in our experiments 1 , using a standard Transformer-based classifier (Conneau et al., 2020) trained with only linguistic context results in suboptimal and unstable models. Moreover, we believe code-switch prediction is a suitable first task for learning speaker-driven inductive biases; we can test whether models learn useful relationships between social attributes while minimizing the risk of building a model that perpetuates social prejudices. We ground the models in relevant social factors, such as age, native language, and language-mixing preference of the interlocutors, via text-based speaker descriptions or prompts (cf. Zhong et al., 2021; Wei et al., 2021). We find that prepending speaker prompts to dialogue contexts improves performance significantly, and leads to more stable generalizations. Our prompts are different from the embedding-based personas of Li et al. (2016) and the synthesized descriptions from Persona-Chat (Zhang et al., 2018), capturing theoretically grounded social and linguistic properties of speakers, as opposed to hobbies or occupations. To analyze the inductive biases that the models learn, we use SelfExplain (Rajagopal et al., 2021) an interpretable text classification model highlighting key phrases in the input text. We propose a new method for aggregating the interpretations produced by SelfExplain to explain model predictions and align them with sociolinguistic literature. We motivate our study of predicting codeswitching in 2, and describe the task and inter-1 All data and code will be available at https:// github.com/ostapen/Switch-and-Explain . pretable neural text classification models in 3. After outlining important ethical considerations in 4, we detail our experiments (5) and results (6), and provide an analysis of speaker-aware model generalizations that are grounded in prior psycholinguistic research on code-switching (7). Our overarching goal is to develop a general and theoretically-informed methodology to ground neural models in a social context, because a wide array of person-centric classification tasks, such as sentiment prediction or hate speech detection, can fail without proper social contextualization (Sap et al., 2019; Kiritchenko and Mohammad, 2018; Hovy and Yang, 2021). We choose a speaker-driven task that is ethically safer to experiment with (see a detailed discussion in 4): predicting code-switching in humanhuman dialogues. Code-switching is the alternation between languages within and between utterances (See Appendix A.1 for a detailed example of code-switched dialogue.) It is a languageand speaker-driven phenomenon, reflecting speaker identities and relationships between them, in addition to their linguistic backgrounds, preferences and topical constraints (Beatty-Martnez et al., 2020). Prior sociolinguistic work established the importance of speaker context for code-switching, and existing multilingual modelstrained with only monolingual linguistic contextare not speaker-grounded nor well-suited for dealing with mixed-language data, leaving gaps which we begin to address. Figure 1 provides a key motivating example of how global speaker features of two bilingual conversational participants influence their local speech production. Blue , whose native language is Spanish, begins speaking in Spanish, while Green responds in English. Following Green 's clarification question about the actor The Rock , Green begins in English, but will accommodate Blue (Ahn et al., 2020; Beatty-Martnez et al., 2020) to reply with el actor (Spanish), motivating the need for social context when processing mixed-language data. In this section we introduce the task of predicting code-switching points and describe the base model for it, with a self-explainable architecture as its backbone. We then describe how we incorporate speaker-grounding prompts into the model. Let d i = [ w 1 , w 2 , . . . , w u ] be an utterance (string of tokens) in the full dialogue D . Given a context window of size h , a model processes a local dialogue context: [ d i  h , . . . , d i  1 , d  i ] , where d  i := [ w 1 , w 2 , . . . , w b ] , b  { 1 , 2 , . . . , u } . In other words, we take the prefix of the current utterance d i up to an index b . Each word w j in the dialogue has a language tag l j associated with it. For the given dialogue context D up to boundary-word w b , a model must predict whether the language of the next word after w b will be code-switched (1), or the same (0). In our setup, a code-switch occurs between two consecutive words w b , w b +1 if the language of w b is English and the language of w b +1 is Spanish (or vice versa). In particular, a word with an ambiguous language, such as the proper noun Maria , cannot be a switch point; only words with unambiguous language tags are switched. This pre-3854 Prompt Speaker Description Example List ASH is first speaker, older, female, from Spanish speaking country, between English and Spanish prefers both, rarely switches languages. vents us from labeling monolingual utterances as code-switched only because they have an ambiguous term such as a proper noun. Speaker-Aware Grounding Each utterance in the dialogue context has a speaker associated with it. Let the set of all speakers in the dialogue context be S = { s 1 , s 2 , s 3 , . . . , s M } . We define a speaker-aware prompt P = { p 1 , p 2 , p 3 , . . . , p K } as a concatenation of K strings p i , each describing an attribute of a speaker in the dialogue. Together, P describes the unique attributes of all M speakers in the dialogue context. Our proposed speaker-guided models take as input P  D = [ p 1 , . . . , p K , d i  w , . . . , d  i ] , the concatenation of prompts and dialogue context. We encode the inputs with a multilingual Transformer-based architecture (Devlin et al., 2019; Conneau et al., 2020) before using a linear layer to predict the presence or absence of a code-switch. We incorporate global information about each speaker in a dialogue using different prompt styles, generating a prompt P for a given dialogue context D . In theory, these prompts have the potential to change the model's priors by contextualizing dialogue with speaker information and should be more useful for predicting upcoming language switches. We consider two aspects when designing prompts. Content The prompt describes all speakers S in the dialogue using a set of speaker attributes A = { a 1 , a 2 , . . . , a T } . To create a description P m for speaker s m  S , we combine phrases p s m 1 , p s m 2 , . . . , p s mT , such that each phrase corresponds to exactly one attribute. As Table 1 indicates, we use speaker IDs to tie a speaker to her description, and all prompts cover the full set of attributes, A , for all speakers in D . Form We consider three prompt forms: List , Sentence , and Partner . The prompt form determines both the resulting structure of prompt string P and the way we combine local attribute phrases p j to generate a speaker description P i . Table 1 provides concrete examples of List, Sentence, and Partner prompts for a pair of speakers. List and Sentence prompts do not explicitly relate speakers to each other: the final prompt P = { P 1 , . . . , P m , . . . , PM } concatenates individual speaker prompts P i . List forms combine all attributes in a speaker description P m with commas, while Sentence forms are more prose-like. These prompt forms are most straightforward to implement and simply concatenate each speaker profile without considering interactions of features. The model must implicitly learn how attributes between different speakers relate to one another in a way that influences code-switching behavior. Speaker entrainment or accommodation influences code-switching behavior (Bawa et al., 2020; Ahn et al., 2020; Mysln and Levy, 2015; Parekh 3855 et al., 2020). Thus, we also created Partner prompts to explicitly highlight relationships between speakers. We hypothesize that these are more useful than the List and Sentence forms, from which the model must implicitly learn speaker relationships. Partner prompts include an initial P i containing attribute qualities that all speakers share: P i := (cid:8) p a j | a j = v k ,  s  S (cid:9) , where a j  A and v k is a value taken on by attribute a j . As an example, all speakers may prefer Spanish, so P i will contain an attribute string p i capturing this. The final partner prompt is P partner = { P i , P 1 , P 2 , . . . , PM } , where speaker-specific descriptions P 1 , P 2 , . . . , PM highlight unique values of each speaker. We prepend prompts P to dialogue context D using [ EOS ] tokens for separation. We do not vary the feature order in a given prompt, but additional prompt tuning may reveal an optimal presentation of features in these prompts. Our proposed setup takes as input the dialogue context and a prepended speaker prompt. To explain predictions of the baseline and our speaker-aware setups, we use SelfExplain (Rajagopal et al., 2021), a framework for interpreting text-based deep learning classifiers using phrases from the input. SelfExplain incorporates a Locally Interpretable Layer (LIL) and a Globally Interpretable Layer (GIL). GIL retrieves the top-k relevant phrases in the training set for the given instance, while LIL ranks local phrases within the input according to their influence on the final prediction. LIL quantifies the effects that subtracting a local phrase representation from the full sentence have on the resulting prediction. We exclusively use LIL to highlight phrases in the speaker prompts and dialogues to identify both social factors and linguistic context influential to models; through post-hoc analysis, we can reveal whether these features can be corroborated with prior literature or indicate a model's reliance on spurious confounds. We do not use the GIL layer because we do not have instance-level speaker metadata; instead, speaker features are on the dialogue-level and will not yield useful top-k results. Figure 4 illustrates our full proposed model with two classification heads: one for prediction and one for interpretation. 7.1 describes how we score phrases according to their influence on the final prediction. Data Privacy In line with prior behavioral studies, our work illustrates that sociolinguistic cues are essential for predicting code-switching points. To deploy our speaker-informed model, we must protect the identity and privacy of users through techniques such as federated machine learning: deploying local models to end-users without sending any user information back to the cloud (Konecn et al., 2016). Local models and data should be encrypted to prevent breaches and tampering with algorithms, as well as possible reconstruction of training data (Hitaj et al., 2017; Carlini et al., 2019; Zhang et al., 2020), minimizing the risk of leaking speaker information. Additionally, deployed systems should only collect and access information if the user agrees to it. All conversational participants voluntarily shared the data we use. Moreover, this research is important to conduct because there is evidence that human users react positively to appropriately adaptive technologies (Branigan et al., 2010). Specifically, initial experiments indicate that users rate dialogue systems that incorporate code-switching higher than ones that do not (or that do it less naturally) (Ahn et al., 2020; Bawa et al., 2020). A classifier, such as the one we explore in this work, can be very useful for developing a naturalistic dialogue system that is useful and enjoyable to use by people of diverse linguistic backgrounds. Our work focuses on English-Spanish code-switching which is widespread and accepted, but different regions and cultures have varying opinions of code-switching. It is important to understand these before building an application for a new language pair (Dogruz et al., 2021). Our task requires a dataset which not only has natural, mixed-language dialogue, but includes also information about its speakers. We use the Bangor Miami (Deuchar et al., 2014) dataset (BM) containing 56 transcribed dialogues in mixed English and Spanish. Most dialogues are between two speakers, but may contain three or four; another set of dialogues records only one speaker's side of the conversation. These monologues are still useful to study how linguistic cues influence code-switching. Moreover, language IDs are provided for every token. The dataset includes a ques-3856 tionnaire of self-reported information about each conversational participant; this includes dialogue-independent, macro-social features such as age, gender, and country of origin, as well as language preferences and speaker-provided linguistic ability. We identify each country according to the primary language (English, Spanish, or neither) spoken in the country and bin age features into four comparative groups ranging from youngest to oldest. An order feature indicates which speaker spoke first, second, etc. in the global dialogue context; we hypothesize that speakers may entrain, or change their speech to match, those who start a conversation (Ahn et al., 2020). Altogether, six features define our attribute set A . For each dialogue in BM, we extract all existing code-switch points; for a given switched word, we retain all left-most context in its containing utterance and vary the number of prior utterances that are included as context between 1, 2, 3, and 5. To generate negative examples, we select monolingual utterances by sampling from a binomial distribution with p = 0 . 75 . For each retained utterance, we randomly choose three potential switch points (ex-tracting leftmost context in the same way), resulting in a dataset that is approximately 25% switched. Creating Splits Most speakers participate in only one of the 56 dialogues in the corpus. To help ensure the model sees new dialogue context in training and testing time, we split the train, validation, and test splits by conversation in a 60:20:20 ratio. For each dialogue, we compute the multilinguality index (M-Index) (Barnett et al., 2000), a measure between 0 and 1 indicating the mixedness in the text: 0 is monolingual text, while 1 is a code-switch at every word. We stratify the conversations by the M-Index and code-switching labels to enforce a more balanced distribution of monolingual and mixed-language conversations. We down-sample monolingual examples to bal-ance training and validation splits and report results on unbalanced validation and test sets. Table 2 shows the proportions of code-switched examples. Our final balanced training and validation splits have about 14,000 and 3,000 examples, while the unbalanced validation and test sets have approximately 7,000 and 9,000 examples, respectively. Marking Dialogue Turns The baseline setup does not incorporate speaker cues. Instead we use [ EOT ] and [ EOU ] tokens at the end of each utterance to signify end-of-turn and end-of-utterance, respectively. Given two consecutive utterances, an [ EOT ] signifies a change in speakers, while [ EOU ] indicates no change. In the speaker-informed setup, unique speaker IDs distinguish utterances from each speaker, and we prepend informative prompts characterizing the conversational participant(s). Prompts include user-reported metadata of personal preferences and characteristics. We use three prompt templates, as detailed in Section 3. We use XLM-RoBERTa (XLMR) (Conneau et al., 2020) to encode the text and jointly fine-tune XLMR on the code-switch prediction task. As a baseline, we use an XLMR model without prompt inputs P . Our speaker-prompted models, SP-XLMR, are trained by prepending speaker prompts to the dialogue context. The small size of our dataset results in higher variability in performance. To mitigate this, we select 10 random seeds, and train a given model setup (i.e., list prompt, no prompt, etc.) on each seed. The number of seeds is arbitrary; however, we choose a generous number of seeds to yield a tighter confidence interval for our results. We use 3 prompt types, resulting in 30 speaker-prompted models and 10 baseline models. We refer to speaker-prompted models as SP-XLMR and to the non-speaker baseline as simply XLMR . All models are trained using AdamW optimizers with a weight decay of 1 e  3 for a maximum of 10 epochs. SP-XLMR models are trained with a learning rate of 5 e  5 and XLMR models use a learning rate of 1 e  5 . To refer to a particular speaker-prompted model, we use a combination of prompt form and context size, for example, LIST -5. We report accuracy, F1, precision, and recall on the unbalanced validation and test sets. We use the Mann Whitney U significance test because it does not assume normally-distributed population means. curacy and F1 of XLMR , LIST , SENTENCE , and PARTNER models, across all context windows and seeds on the unbalanced validation and test sets. Each value is an average of 40 models. Adding prompt features boosts accuracy upwards of 5-8 percent points and F1 by .04-.05 compared to XLMR ; XLMR does not even surpass the majority baseline in accuracy. Based on validation set results, partner features are most helpful, confirming our sociolinguistically-driven hypothesis (see Section 3.2) Moreover, the standard deviation of XLMR accuracy is more than twice as large (3.66 on validation and 2.95 on test) as that of any speaker-prompted model. The improvements in accuracy and decrease in variation between models suggest that explicit speaker information guides models to learn relevant inductive biases for the codeswitching task. However, we cannot guarantee that the trained models will not reveal harmful social biases in other tasks. We see similar trends, regarding accuracy, F1, and standard deviation, in Table 4, which includes results for SP-XLMR and XLMR across the different context windows; each SP-XLMR and XLMR value is an average of 30 and 10 models, respectively. Larger context windows are helpful for both model types. Tables 8 and 9 include precision and recall scores for each prompt type and context window; in general, speaker-prompted models have upwards of .10 points higher precision than baseline XLMR , indicating that speaker information helps to identify valid switch points. As the context window increases, all speaker prompt types yield fairly similar performance. However, when context sizes are small (1 or 2 previous utterances only), Partner and Sentence prompts yield higher accuracy and precision than List models, perhaps because these prose-like formats are more useful for the model than a simple concatenate list of features. model performance. As a control, we generated synthetic descriptions for each speaker, including features such as favorite foods and weather, owned pets, and height. None of these attributes are discussed in the conversations and would not explicitly influence code-switch production. After generating descriptions in the Sentence and Partner format, we prepend them to dialogues using a context window of 5. According to the results in Table 5, these pseudo-descriptions significantly decrease performance, even relative to the baseline XLMR model Validation Test Model Acc. trained with a context window of 5. The results indicate that domain knowledge is useful to understand which speaker features to add to a model to improve performance, and they give more support to the claim that relevant speaker information helps guide models to useful inductive biases. Compared to baseline models, speaker models not only attain higher accuracy and F1 scores, but they also have a much smaller standard deviation in scores. For these experiments, we seek to explain our findings using the important phrases identified by LIL. Within a speaker prompt P , each speaker characteristic maps to its own phrase (i.e., from an English-speaking country ); in the dialogue, we extract 5-gram phrases using a sliding window. We detail our approach to scoring phrase influence and analyze key dialogue and speaker features. Our goals are to (a) identify phrases in the input whose removal will change the resulting model prediction and (b) identify phrases which contribute high confidence to the resulting model prediction. Let F be the full textual input consisting of sole dialogue context or dialogue context prepended with prompts, while ZF is the softmax output from our classifier. Let j be the index of the class predicted from the full input. LIL inputs ZF along with a series of masks, each corresponding to a local phrase in either the dialogue or the speaker prompt. Let nt be a local phrase, such that nt is either a speaker phrase p i or an n-gram in an utterance d i  D . Using LIL, we quantify the effect of removing the representation of phrase nt from the representation of F by comparing the activation differences of 3858 Validation Test SP-XLMR XLM-R SP-XLMR XLM-R Ctx Acc. Z nt and Z f at index j , and we analyze the resulting sign and magnitude to address goals (a) and (b), respectively: C := (cid:26) 1 argmax Z nt = j  1 argmax Z nt  = j (1) r ( nt ) = C | z nt j  z F j | (2) where z nt j and z F j are the softmax scores of the phrase-ablated sentence and the full sentence, respectively, at index j , and r ( nt ) is the relevance score of nt . As Equations 1 and 2 indicate, we analyze a local phrase's score as follows: Sign A positive sign ( C = 1 ) indicates that the representation without nt does not change the resulting prediction. A negative score ( C =  1 ) indicates a more influential phrase because its ablation results in a different prediction. Magnitude corresponds to the weight of the contribution of a particular phrase. If the activation difference is high in magnitude, then nt strongly influences the resulting prediction. Magnitudes near 0 indicate a non-influential phrase. Our scoring approach differs slightly from the original implementation (see Appendix A.2). Given a context size, the dialogue phrase masks are identical for SP-XLMR and XLMR; thus, we directly compare which phrases are most informative in the presence and absence of speaker features. We consider only phrases which are influential enough to change a given model's prediction after their representations are subtracted from the full-sentence representations (phrases with a negative score). Setting context size to 5, we identify examples from the validation set for which the majority of SP-XLMR models (out of 30) predicted correctly and the majority of XLMR models (out of 10) predicted incorrectly. Nearly 95% of such examples are not switched, indicating that added speaker information helps improve model precision. We sample a portion of these instances for our analysis. For a given validation set example and model setup, we track all influential phrases and count the number of models for which each phrase is influential. To account for phrase interactions, we track the agreement on co-occurring pairs and trios of important phrases. We compare only top-10 influential phrases. We use 10 phrases because all models rank at least 10 phrases as influential (but not 15 or 20). Phrase scores in the topk , where k < 10 , tend to all be very similar. We are not interested in small-scale score differences, and thus, equally consider all phrases ranked in the top-10. We hypothesize that speaker models (1) exhibit more phrase agreements compared to baseline models and (2) use more helpful and relevant linguistic features for code-switch prediction. Most speaker models agree on which phrases are important. In addition to tracking which individual phrases are in the top-10, we analyze how many pairs and trios of phrases are in the top-10 list. Figure 2 indicates that the majority of speaker-prompted models (out of 30) tend to agree on the top-10 important phrase groupings, especially across single and pairwise groupings. The speaker models likely pick up on similar inductive biases, as revealed through the higher feature agreement among these models. Only around 38-40% of baseline models tend to agree on which phrases are most important, potentially explaining the higher standard deviation in results among the baseline models compared to the speaker models. Speaker models make better use of language information. On monolingual (negative) examples, both speaker-prompted and baseline models tend to look at a majority of monolingual phrases in the same languages (English or Spanish), and these 3859 0 10 20 30 40 50 60 Single Pair Trio % of Models That Agree on Top-10 Phrases P h r a s e G r o uu p i n g SP-XLMR-5 XLMR-5 **** **** **** Figure 2: Each bar indicates the average percent and standard deviation of XLMR (dashed green, N =10 ) and SP-XLMR (green, N =30 ) models that agree on the top-10 phrases. phrases are mainly located in the first quarter of tokens preceding the potential switch point. However, speaker models successfully predict many of these negative examples correctly, unlike baselines. In many cases, the speaker models have additional access to global speaker properties of the current speaker  for example, never switches languages  and this may also influence them to make the correct prediction given prior linguistic context. Even when baseline models have strong evidence for predicting no code-switch (i.e., ranking only monolingual phrases as important), they tend to misuse this history and randomly predict code-switches. On code-switched examples, speaker models continue to favor phrases that are nearest to the switchpoint, while baseline models are sensitive to phrases in early and late dialogue context. Using phrases closer to switch points may give better structural context from which to predict a switch. In several cases, speaker models correctly predict an English-to-Spanish switch and rank prior Spanish phrases as influential, while baseline models highly rank English phrases and predict no switch. We see a similar pattern in Spanish-to-English switches. Speaker information may help models learn, linguistically, what it means to code-switch. Linguistic preference features are most influential across model setups. For all speaker-prompted models, speakers' language and codeswitching preferences are the most influential on the resulting predictions. Country of origin information is helpful, too, but may be misleading: speakers may immigrate from a Spanish country but grow up speaking English; in such cases, the language information likely helps disambiguate any confusions. Following these linguistic features are relational features (speaker order) in the dialogue, and less often, age features, especially in partner models. Gender is almost never influential. Age may be correlated with linguistic preference features and is thus not influential on its own. Gender and age can interplay to define larger, dynamic social roles, which may influence language production. On their own, these static markers of identity do not significantly characterize one's speech patterns (Eckert, 2012; Ochs, 1992). However, shared macro-social attributes (age and gender) may be influential in partner models because the partici-pant constellation influences how speakers express themselves and modulate social distance (Giles and Baker, 2008; Mysln and Levy, 2015). influential in true and predicted code-switches. To study how linguistic preferences interact with code-switch behavior, we analyzed all true and predicted code-switch points according to the preferences of speakers in the conversations. Specifically, we tracked whether speakers preferred to codeswitch, speak English, speak Spanish, or preferred both English and Spanish. Looking at each feature in isolation, we counted the number of switch points that occur when at least one speaker prefers the feature, when the current speaker prefers the feature, and when other conversational partners (aside from the current speaker) prefer the feature. Table 6 in the Appendix indicates that preference to code-switch, to speak Spanish, or to speak both English and Spanish are most dominant in influencing code-switching behavior. Speaker-prompted models are able to learn this relationship. Moreover, we found that preferences of speakers other than the current speaker tend to be more influential in driving code-switching behavior, relating to the idea of speaker entrainment or accommodation. For more details, please refer to Appendix A.4. Ablating Features Using the best-performing setups on the validation set, namely Partner and Sentence models with 5 prior utterances for context, we identify influential speaker attributes using a leave-one-out-approach to mask out each attribute a i  A . For each attribute, we train 10 ablated 3860 models and evaluate on the validation set. Note that this is different from the phrase ablations using LIL because we finetune the XLM-R encoder during the training process; in this setup, the ablated feature information is never backpropagated to update the encoder weights. The results of these experiments (see Appendix A.5) give some evidence that language preference, mixing, and age information have statistically significant effects on the performance of Partner-5 models, but this does not hold for the Sentence-5 models. We have strong evidence to believe that these speaker attributes have more complex underlying relationships and leave the exploration of these multi-feature interactions for future work. Our use of prompts 2 is similar to Zhong et al. (2021) and Wei et al. (2021), who rely on prompts to put models in different states for different tasks. Speaker Personas Open-domain dialogue agents which act according to a persona are more natural and engaging than the non-personalized baselines (Li et al., 2016); these personas can be short, superficial descriptions generated through crowd-sourcing (Zhang et al., 2018), gathered from Red-dit (Mazar et al., 2018), or self-learned (inferred) from dialogue context (Madotto et al., 2019; Cheng et al., 2019). These works, however, primarily evaluate dialogue content and only in one language (English) instead of analyzing how speaker properties influence the downstream dialogue structure. Addressing Model Bias Prior works for mitigating social biases feature adversarial learning (Pryzant et al., 2018; Elazar and Goldberg, 2018), counterfactual data augmentation (Zmigrod et al., 2019; Kaushik et al., 2020) or dataset balancing (Zhao et al., 2017), and more recently, using an interpretability-driven approach to uncover and controllably demote hidden biases (Han and Tsvetkov, 2021). Techniques for adapting to linguistic variants and mixed-language data include adversarial learning to pick up on key linguistic cues (Kumar et al., 2021), augmenting datasets with synthetic text (Winata et al., 2019) or examples of variants that models underperform on (Chopra et al., 2021), discriminative learning (Go-nen and Goldberg, 2019), and transfer learning with 2 Our prompts are data-dependent and fixed, and thus rather unrelated to the prompt tuning literature (Liu et al., 2021). Codeswitch Prediction The first work in codeswitch prediction (Solorio and Liu, 2008) uses Naive Bayes (NB) on lexical and syntactic features of shallow word context before switch boundaries from a small, self-collected dataset of English-Spanish conversations. Another NB approach predicts switch points on Turkish-Dutch social media data (Papalexakis et al., 2014), additionally using multi-word expressions and emoticons in their experiments. Piergallini et al. (2016) extend the techniques of the prior two works to Swahili-English codeswitched data. Two fine-grained logistic regression analyses (Fricke and Kootstra, 2016; Mysln and Levy, 2015) go beyond lexical information, incorporating psycholinguistic properties such as word accessibility and priming effects, and include binary features to code for properties such as speaker age and preceding utterance language. To the best of our knowledge, this is the first work incorporating sociolinguistically-grounded social factors in an interpretable neural model for codeswitch point prediction. Our speaker-aware models can better leverage mixed-language linguistic cues, compared to a text-only baseline: specifically, we showed performance gains of up to 7% in accuracy and .05 points in F1 scores on an imbalanced code-switching dataset. Our work is limited to one language pair and uses a small dataset. Thus, additional studies are necessary to assess the generalizability of our findings to other languages. Moreover, speaker identities can change dynamically in different settings. Linguistic preferences may also change over time. We could move beyond static personas, refining them using local dialogue context. In addition, speaker-grounded models must be carefully engineered to protect user privacy, using proxies for personal information and keeping private information away from shared resources. In the future, we would like to explore whether such speaker prompting can improve models in other person-centered tasks, e.g., coreference resolution (especially for datasets explicitly testing gender biases) or sentiment analysis. Using techniques such as data augmentation, we can explicitly guide models away from biases learned during training. With ethical considerations in mind, our work advances the state-of-the-art in building more adaptable and person-aware NLP technologies. We thank Vidhisha Balachandran, Dheeraj Rajo-gopal, Xiaochuang Han, Artidoro Pagnoni, and the anonymous reviewers for providing valuable feedback on our work. This work was supported in part by grant No. 2019785 from the United States-Israel Binational Science Foundation (BSF), National Science Foundation (NSF) grants No. 2007960, 2007656, 2125201 and 2040926, and by grant No. LU 856/13-1 from the Deutsche Forschungsge-meinschaft (DFG).
abstain objective result result objective abstain abstain abstain abstain method abstain result objective abstain result method result objective other abstain result abstain abstain abstain method abstain abstain abstain method abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain method method abstain method abstain method method method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain method abstain abstain abstain abstain abstain abstain abstain method abstain abstain abstain method abstain abstain abstain method abstain method method abstain abstain abstain abstain method method method method method abstain method abstain method method method method abstain method abstain method abstain method abstain method method method method method method method method method abstain abstain method method method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain method abstain abstain abstain abstain method method method abstain abstain abstain abstain abstain abstain abstain method abstain abstain other abstain abstain abstain abstain abstain abstain method method method abstain method method method method method abstain method abstain abstain method abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method method abstain abstain abstain abstain abstain method method method abstain method abstain other other other other abstain abstain abstain abstain objective result method abstain abstain abstain method abstain objective method method other other other