Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Code to reproduce the results described in the paper "Minimax and Neyman-Pearson Meta-Learning for Outlier Languages" (aclweb).

  1. Create conda env: conda create -n pos-bert python=3.7
  2. Install dependencies: pip install -r requirements.txt
  3. Run data creation scripts ( and See top comments in files for more details)
  4. Use the configs from the configs folder or suitably modify them as required to start training

To start training, simply pass the config path to

$ python --config_path=<config-path>

To run fast adapt, and evaluate the trained models on one outlier-language, run

$ python --test_lang=<lang> --model_path=<saved-model-path>

To run the tester on all outlier-languages, use It contains two functions, run_pos and run_qa which will evaluate POS tagging and QA on all languages, respectively. The individual language results will be stored in <saved-model-path>/result. To merge them all into a single CSV file, run

$ python --model_path=<saved-model-path>

For QA, since we split the languages into two groups and train two models. Therefore, expects 2 paths: --model_path and --model_path2


    title = "Minimax and Neyman{--}{P}earson Meta-Learning for Outlier Languages",
    author = "Ponti, Edoardo Maria  and
      Aralikatte, Rahul  and
      Shrivastava, Disha  and
      Reddy, Siva  and
      S{\o}gaard, Anders",
    booktitle = "Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021",
    month = aug,
    year = "2021",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "",
    pages = "1245--1260",