Saab Mansour, M Saiful, Batool Haider
We lifted 10 functions out of this paper's own repositories and ran 7 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| amazon-research/nearest-neighbor-crosslingual-classification | pwc_unofficial | 7 of 10 |
| Function | Status | Where it lives |
|---|---|---|
| compute_confidence_interval | Ran | amazon-research/nearest-neighbor-crosslingual-classification/utils.py code served (permissive licence) · get_code("81ea193467a90dc6") |
| compute_metrics | Ran | amazon-research/nearest-neighbor-crosslingual-classification/processors.py code served (permissive licence) · get_code("09bfd5739bdc89aa") |
| create_logger | Ran | amazon-research/nearest-neighbor-crosslingual-classification/logger.py code served (permissive licence) · get_code("c2908737996f7c62") |
| dist_training | Ran | amazon-research/nearest-neighbor-crosslingual-classification/evaluate.py code served (permissive licence) · get_code("6011037118e5cad1") |
| eval_checkpoint | Ran | amazon-research/nearest-neighbor-crosslingual-classification/evaluate.py code served (permissive licence) · get_code("27e546637549edd0") |
| meta_sample_data | Ran | amazon-research/nearest-neighbor-crosslingual-classification/few_shot_modules.py code served (permissive licence) · get_code("eb9737eeece5009a") |
| warp_tqdm | Ran | amazon-research/nearest-neighbor-crosslingual-classification/utils.py code served (permissive licence) · get_code("3eac0a04e50eafe0") |
| get_model_class | Not yet run | amazon-research/nearest-neighbor-crosslingual-classification/models.py code served (permissive licence) · get_code("5b438d5554e101e9") |
| load_model | Not yet run | amazon-research/nearest-neighbor-crosslingual-classification/models.py code served (permissive licence) · get_code("2a755c99df3f125f") |
| simple_accuracy | Not yet run | amazon-research/nearest-neighbor-crosslingual-classification/processors.py code served (permissive licence) · get_code("3c241ecfe3749a6d") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Even though large pre-trained multilingual models (e.g. mBERT, XLM-R) have led to significant performance gains on a wide range of cross-lingual NLP tasks, success on many downstream tasks still relies on the availability of sufficient annotated data. Traditional fine-tuning of pre-trained models using only a few target samples can cause over-fitting. This can be quite limiting as most languages in the world are under-resourced. In this work, we investigate cross-lingual adaptation using a simple nearest neighbor few-shot (< 15 samples) inference technique for classification tasks. We experiment using a total of 16 distinct languages across two NLP tasks-XNLI and PAWS-X. Our approach consistently improves traditional fine-tuning using only a handful of labeled samples in target locales. We also demonstrate its generalization capability across tasks. * Work done while Saiful was interning at Amazon AI 1 We loosely use the term LM to describe unsupervised pretrained models including Masked-LMs and Causal-LMs
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2109.02221")
get_code_for_paper("2109.02221")
have("2109.02221")
Connect an agent — have() is free.