Invariant Language Modeling
30711Authors
nan
Abstract
AbstractModern pretrained language models are critical components of NLP pipelines. Yet, they suffer from spurious correlations, poor out-of-domain generalization, and biases. Inspired by recent progress in causal machine learning, in particular the invariant risk minimization (IRM) paradigm, we propose invariant language modeling, a framework for learning invariant representations that generalize better across multiple environments. In particular, we adapt a game-theoretic implementation of IRM (IRM-games) to language models, where the invariance emerges from a specific training schedule in which all the environments compete to optimize their own environment-specific loss by updating subsets of the model in a round-robin fashion. We focused on controlled experiments to precisely demonstrate the ability of our method to (i) remove structured noise, (ii) ignore specific spurious correlations without affecting global performance, and (iii) achieve better out-of-domain generalization. These benefits come with a negligible computational overhead compared to standard training, do not require changing the local loss, and can be applied to any language model. We believe this framework is promising to help mitigate spurious correlations and biases in language models.
Keywords
Full Content
Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 5728 - 5743 December 7-11, 2022 ©2022 Association for Computational Linguistics Invariant Language Modeling Maxime Peyrard,♢ Sarvjeet Singh Ghotra,♠ Martin Josifoski,♢ Vidhan Agarwal,♠ Barun Patra,♠ Dean Carignan,♠ Emre Kıcıman,♠ Saurabh Tiwary,♠ Robert West♢ ♢EPFL ♠Microsoft Corporation {maxime.peyrard, martin.josifoski, robert.west}@epfl.ch {saghotra, vidhan.agarwal}@microsoft.com {barun.patra, dcarig, emrek, satiwary}@microsoft.com Abstract Large pretrained language models are critical components of modern NLP pipelines. Yet, they suffer from spurious correlations, poor out-of-domain generalization, and biases. In- spired by recent progress in causal machine learning, in particular the invariant risk mini- mization (IRM) paradigm, we propose invari- ant language modeling, a framework for learn- ing invariant representations that generalize bet- ter across multiple environments. In particu- lar, we adapt a game-theoretic formulation of IRM (IRM-games) to language models, where the invariance emerges from a specific train- ing schedule in which all the environments compete to optimize their own environment- specific loss by updating subsets of the model in a round-robin fashion. We focus on con- trolled experiments to precisely demonstrate the ability of our method to (i) remove struc- tured noise, (ii) ignore specific spurious corre- lations without affecting global performance, and (iii) achieve better out-of-domain general- ization. These benefits come with a negligible computational overhead compared to standard training, do not require changing the local loss, and can be applied to any language model. We believe this framework is promising to help mitigate spurious correlations and biases in lan- guage models. 1 Introduction While modern pretrained transformer models have led to dramatic progress on many NLP tasks, im- portant limitations remain. In particular, pretrained language models suffer from poor generalization, even under small perturbations of the input distri- bution (Moradi and Samwald, 2021). Indeed, these models encode (Moradi and Samwald, 2021) and exploit (Tu et al., 2020; Niven and Kao, 2019) spu- rious correlations, i.e., correlations that do not gen- eralize across data distributions. Since language models are trained on large unverified corpora, they … !!𝑋# !𝑒% !!𝑋& !𝑌 !!𝑋# !𝑒( !!𝑋& !𝑌 !!𝑋# !𝑒) !!𝑋& !𝑌 !!𝑋# !𝐸 !!𝑋& !𝑌 Target variable Spurious features Environment index Stable features Latent causal model Unobserved / Unknown Text. Env. 1 Text. Env. 2 Text. Env. n … Observed Training eLM ignores environments iLM finds invariant representations ℒ ∪ !!!!!!!!!!!!!!! ℒ(!!!!!) ℒ(!!!!!) ℒ(!!!!!) Figure 1: High-level overview using a simplified causal structure. The distinction between environ- ments makes it possible to separate spurious from sta- ble features. Indeed, the relationship between the tar- get variable Y and the stable features XC is invariant across environments: E[Y|XC,E] = E[Y|XC]. However, the correlation between Y and XS is spurious and does not generalize across environments: E[Y|XS,E = e] ̸= E[Y|XS,E = e′] for e ̸= e′. Language models trained with the standard ERM, denoted as eLM in this work, exploit all correlations available during training and aim to learn E[Y|XC,XS]. Our proposed invariant language models, denoted as iLM, focus on invariant features and aim to learn E[Y|XC]. In language …
Content truncated to 500 words
Labeled Text
AbstractModern pretrained language models are critical components of NLP pipelines. Yet, they suffer from spurious correlations, poor out-of-domain generalization, and biases. Inspired by recent progress in causal machine learning, in particular the invariant risk minimization (IRM) paradigm, we propose invariant language modeling, a framework for learning invariant representations that generalize better across multiple environments. In particular, we adapt a game-theoretic implementation of IRM (IRM-games) to language models, where the invariance emerges from a specific training schedule in which all the environments compete to optimize their own environment-specific loss by updating subsets of the model in a round-robin fashion. We focused on controlled experiments to precisely demonstrate the ability of our method to (i) remove structured noise, (ii) ignore specific spurious correlations without affecting global performance, and (iii) achieve better out-of-domain generalization. These benefits come with a negligible computational overhead compared to standard training, do not require changing the local loss, and can be applied to any language model. We believe this framework is promising to help mitigate spurious correlations and biases in language models.
Publication Details
- Paper ID:
- 30711
- Year:
- 2022
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan