Prompting ELECTRA: Few-Shot Learning with Discriminative Pre-Trained Models

Mengzhou Xia, Mikel Artetxe, Jingfei Du, Danqi Chen, Ves Stoyanov
5/30/2022
cs.CLcs.LG

Official code: facebookresearch/ELECTRA-Fewshot-Learning (48 stars, Jupyter Notebook, last commit 2022-06-07).

Abstract

Pre-trained masked language models successfully perform few-shot learning by formulating downstream tasks as text infilling. However, as a strong alternative in full-shot settings, discriminative pre-trained models like ELECTRA do not fit into the paradigm.

Show full abstract

In this work, we adapt prompt-based few-shot learning to ELECTRA and show that it outperforms masked language models in a wide range of tasks. ELECTRA is pre-trained to distinguish if a token is generated or original. We naturally extend that to prompt-based few-shot learning by training to score the originality of the target options without introducing new parameters. Our method can be easily adapted to tasks involving multi-token predictions without extra computation overhead. Analysis shows that ELECTRA learns distributions that align better with downstream tasks.

View on arXivView PDF

Code Implementations(1)

This repository contains the code for paper Prompting ELECTRA Few-Shot Learning with Discriminative Pre-Trained Models.

483Jupyter Notebook, PythonMay 24, 20224 years agoNOASSERTION

Similar Papers

Cite this paper

@article{xia2022prompting,
  title  = {Prompting ELECTRA: Few-Shot Learning with Discriminative Pre-Trained Models},
  author = {Mengzhou Xia and Mikel Artetxe and Jingfei Du and Danqi Chen and Ves Stoyanov},
  year   = {2022},
  eprint = {2205.15223},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.15223}
}

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

Discussion