Skip to content

[NeurIPS 2022] Multitasking Models are Robust to Structural Failure: A Neural Model for Bilingual Cognitive Reserve

License

Notifications You must be signed in to change notification settings

giannisdaras/multilingual_robustness

Repository files navigation

Multitasking Models are Robust to Structural Failure: A Neural Model for Bilingual Cognitive Reserve

Abstract

We find a surprising connection between multitask learning and robustness to neuron failures. Our experiments show that bilingual language models retain higher performance under various neuron perturbations, such as random deletions, magnitude pruning and weight noise compared to equivalent monolingual ones. We provide a theoretical justification of this robustness by mathematically analyzing linear representation learning and showing that multitasking creates more robust representations. Our analysis connects robustness to spectral properties of the learned representation and proves that multitasking leads to higher robustness for diverse task vectors.

Results

Monolingual vs. Bilingual GPT-2 Experiment: Model perplexity as a function of weight deletion

Linear Representation Visual Model Experiments: MSE as a function of additive noise on model weights

CIFAR dataset

MNIST dataset

What's here

The code hosted in this repository is the one we used to run all the experiments in the paper.

  1. Multi-task Linear Classifier experimentations:
  • binary_classification.py
  1. GPT2 monolingual and bilingual fine-tuning, and perturbations test:
  • train_bilingual_gpt2.py
  • test_gpt2.py
  1. GPT2ForClassification training and test code for GLUE
  • run_glue_test.py

Installation

Install the python requirements with pip install -r requirements.txt.

Download the models and the tokenizers using the following URLs:

Acknowledgments

The code for the NLP experiments is exclusively based on the HuggingFace transformers library. We are very grateful to the authors of the library for their work.

About

[NeurIPS 2022] Multitasking Models are Robust to Structural Failure: A Neural Model for Bilingual Cognitive Reserve

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages