Counterfactually Probing Language Identity in Multilingual Models

Anirudh Srinivasan, Venkata S Govindarajan, Kyle Mahowald
10/29/2023
cs.CL

No confident code implementation found for this paper.

Abstract

Techniques in causal analysis of language models illuminate how linguistic information is organized in LLMs. We use one such technique, AlterRep, a method of counterfactual probing, to explore the internal structure of multilingual models (mBERT and XLM-R). We train a linear classifier on a binary language identity task, to classify tokens between Language X and Language Y. Applying a counterfactual probing procedure, we use the classifier weights to project the embeddings into the null space and push the resulting embeddings either in the direction of Language X or Language Y. Then we evaluate on a masked language modeling task. We find that, given a template in Language X, pushing towards Language Y systematically increases the probability of Language Y words, above and beyond a third-party control language. But it does not specifically push the model towards translation-equivalent words in Language Y. Pushing towards Language X (the same direction as the template) has a minimal effect, but somewhat degrades these models. Overall, we take these results as further evidence of the rich structure of massive multilingual language models, which include both a language-specific and language-general component. And we show that counterfactual probing can be fruitfully applied to multilingual models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{srinivasan2023counterfactually,
  title  = {Counterfactually Probing Language Identity in Multilingual Models},
  author = {Anirudh Srinivasan and Venkata S Govindarajan and Kyle Mahowald},
  year   = {2023},
  eprint = {2310.18862},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.18862v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.18862.svg)](https://codeofpaper.com/paper/2310.18862)

Discussion