LFPT5: A Unified Framework for Lifelong Few-shot Language Learning Based on Prompt Tuning of T5

Chengwei Qin, Shafiq Joty
10/14/2021
cs.CL
lora-peft-merging

Official code: qcwthu/Lifelong-Fewshot-Language-Learning (55 stars, Python, MIT, PyTorch, last commit 2022-02-17).

Abstract

Existing approaches to lifelong language learning rely on plenty of labeled data for learning a new task, which is hard to obtain in most real scenarios. Considering that humans can continually learn new tasks from a handful of examples, we expect the models also to be able to generalize well on new few-shot tasks without forgetting the previous ones.

Show full abstract

In this work, we define this more challenging yet practical problem as Lifelong Few-shot Language Learning (LFLL) and propose a unified framework for it based on prompt tuning of T5. Our framework called LFPT5 takes full advantage of PT's strong few-shot learning ability, and simultaneously trains the model as a task solver and a data generator. Before learning a new domain of the same task type, LFPT5 generates pseudo (labeled) samples of previously learned domains, and later gets trained on those samples to alleviate forgetting of previous knowledge as it learns the new domain. In addition, a KL divergence loss is minimized to achieve label consistency between the previous and the current model. While adapting to a new task type, LFPT5 includes and tunes additional prompt embeddings for the new task. With extensive experiments, we demonstrate that LFPT5 can be applied to various different types of tasks and significantly outperform previous methods in different LFLL settings.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

The code for lifelong few-shot language learning

557Python, Jupyter NotebookFeb 10, 20224 years agoMIT
lifelong-learningpytorch

Similar Papers

Cite this paper

@article{qin2021lfpt,
  title  = {LFPT5: A Unified Framework for Lifelong Few-shot Language Learning Based on Prompt Tuning of T5},
  author = {Chengwei Qin and Shafiq Joty},
  year   = {2021},
  eprint = {2110.07298},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.07298}
}

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

Discussion