PADA: Example-based Prompt Learning for on-the-fly Adaptation to Unseen Domains

Eyal Ben-David, Nadav Oved, Roi Reichart
2/24/2021
cs.CLcs.AIcs.LG

Official code: eyalbd2/PADA (50 stars, Python, MIT, last commit 2022-04-17).

Abstract

Natural Language Processing algorithms have made incredible progress, but they still struggle when applied to out-of-distribution examples. We address a challenging and underexplored version of this domain adaptation problem, where an algorithm is trained on several source domains, and then applied to examples from unseen domains that are unknown at training time.

Show full abstract

Particularly, no examples, labeled or unlabeled, or any other knowledge about the target domain are available to the algorithm at training time. We present PADA: An example-based autoregressive Prompt learning algorithm for on-the-fly Any-Domain Adaptation, based on the T5 language model. Given a test example, PADA first generates a unique prompt for it and then, conditioned on this prompt, labels the example with respect to the NLP prediction task. PADA is trained to generate a prompt which is a token sequence of unrestricted length, consisting of Domain Related Features (DRFs) that characterize each of the source domains. Intuitively, the generated prompt is a unique signature that maps the test example to a semantic space spanned by the source domains. In experiments with 3 tasks (text classification and sequence tagging), for a total of 14 multi-source adaptation scenarios, PADA substantially outperforms strong baselines.

View on arXivView PDF

Code Implementations(1)

eyalbd2/PADAOfficial100%
MIT

Official code for the paper "PADA: Example-based Prompt Learning for on-the-fly Adaptation to Unseen Domains".

506Python, ShellFeb 20, 20214 years agoMIT

Similar Papers

Cite this paper

@article{bendavid2021pada,
  title  = {PADA: Example-based Prompt Learning for on-the-fly Adaptation to Unseen Domains},
  author = {Eyal Ben-David and Nadav Oved and Roi Reichart},
  year   = {2021},
  eprint = {2102.12206},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.12206}
}

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/2102.12206.svg)](https://codeofpaper.com/paper/2102.12206)

Discussion