1. 什么是prompt-based learning
示例:
- 推文:I missed the bus today.
预测情感的话就在后面加上:I felt so ____
- 翻译的x ′ :English: I missed the bus today. French: _____
术语列表:
子任务示例:
优势:可以直接应用于小样本甚至零样本学习上
1.1 Prompt Addition
- slot在template中间叫cloze prompt,在尾部叫prefix prompt
- template不一定要是自然语言tokens,也可以是假词(也能嵌入到连续向量)或者直接就是连续向量
- slots数不固定
1.2 Answer Search
基于
计算
argmax search或sampling
1.3 Answer Mapping
2. NLP学习范式的变迁
- Fully supervised learning:传统机器学习范式
为了向模型提供合适的inductive bias,早期NLP模型依赖特征工程,神经网络出现后依赖architecture engineering。
在这一阶段出现了少量预训练模型(如word2vec和GloVe),但只占模型参数的一小部分。
- pre-train and fine-tune
预训练固定结构的模型(语言模型LM),用以预测未观测到的文本数据的结果。
依赖objective engineering。
不利于探索模型架构:1. 无监督预训练使structural priors选择范围小。2. 测试不同结构的预训练代价太高。
- pre-train, prompt, and predict
通过引入文本prompt,下游任务与预训练模型更相似。可以直接不训练。
依赖prompt engineering。
3. Design Considerations for Prompting
3.1 Pre-trained Model Choice
对本文预训练模型介绍部分的笔记放在了另一篇博文中:预训练语言模型概述(持续更新ing…)
训练目标的选择取决于对特定prompting任务的适配,如left-to-right AR LMs适用于prefix prompts,reconstruction目标适用于cloze prompts。标准LM和FTR目标更适宜于文本生成任务。
prefix LM和encoder-decoder架构自然适用于文本生成任务,但也可以根据prompt修改得适用于其他任务。
3.2 Prompt Engineering
prompt template engineering→首先选择prompt shape,接下来考虑用manual or automated的方式
- Prompt Shape
cloze prompts VS. prefix prompts
- Manual Template Engineering
- Automated Template Learning
- discrete prompts / hard prompts:文本(其实这一部分总容易让我联想到传统NLG使用模板/规则的方法,本文参考文献里还真的有Re3Sum1,但是似乎在正文中没有引用过)
(1)Prompt Mining:从语料库中挖掘
(2)Prompt Paraphrasing:复述已有的seed prompt
(3)Gradient-based Search
(4)Prompt Generation:直接视作文本生成任务
(5)Prompt Scoring
- continuous prompts / soft prompts:LM嵌入域的向量
- static
- dynamic
3.3 Answer Engineering
包括对Z ZZ和mapping function的设计
- answer shape:粒度
- tokens
- spans:常用于 cloze prompts
- sentence:常用于 prefix prompts
- answer design method
- Continuous Answer Search:略
3.4 Multi-Prompt Learning
- Prompt Ensembling:连续prompts可能是通过不同初始化或随机种子学到的
- Uniform averaging
- Weighted averaging
- Majority voting
- Knowledge distillation
- Prompt ensembling for text generation:逐token ensemble:
- Prompt Augmentation / demonstration learning:细节略
提供answered prompts来类比(学习重复的模式)
- Sample Selection
- Sample Ordering
- Prompt Composition
- Prompt Decomposition
3.5 Training Strategies for Prompting Methods / Prompt-based Training Strategies
- Training Settings
不用训练:zero-shot setting(非真,详细略)
full-data learning
few-shot learning
- Parameter Update Methods
- Promptless Fine-tuning:pre-train and fine-tune strategy
问题是容易过拟合或不鲁棒,容易灾难性遗忘
- Tuning-free Prompting
可以用answered prompts增强输入:in-context learning
- Fixed-LM Prompt Tuning:缺点略
- Fixed-prompt LM Tuning
具体细节略
null prompt
- Prompt+LM Tuning:优缺点略
4. 应用
具体的论文列表略。
- Knowledge Probing
- Factual Probing / fact retrieval:计算预训练模型的表征包含多少事实知识,关注对模板的学习
- Linguistic Probing
- Classification-based Tasks:如以slot filling的形式实现
- Text Classification:常用cloze prompts, prompt engineering + answer engineering, few-shot, fixed-prompt LM Tuning
- Natural Language Inference (NLI):常用cloze prompts,prompt engineering关注少样本学习场景下的template search。answer spaces常从词表中手动提前选好。
- Information Extraction:细节略
- Relation Extraction
- Semantic Parsing
- Named Entity Recognition (NER)
- “Reasoning” in NLP:细节略
- Commonsense Reasoning
- Mathematical Reasoning
- Mathematical Reasoning
extractive QA
multiple-choice QA
free-form QA
- Text Generation:其他细节略
prefix prompts + AR预训练语言模型:文本摘要、机器翻译
in-context learning
fixed-LM prompt tuning:data-to-text generation
- Automatic Evaluation of Text Generation:建模成文本生成任务(套娃是吧)
- Multi-modal Learning
- Meta-Applications
- Domain Adaptation(感觉看起来有点像文本风格迁移,所以文本风格迁移应该也有用prompt来做的工作吧?)
- Debiasing
- Dataset Construction
数据集:
5. Prompt-relevant Topics
- Ensemble Learning VS. prompt ensembling
- Few-shot Learning
Prompt augmentation / priming-based few-shot learning
- Larger-context Learning
- Query Reformulation
- QA-based Task Formulation
- Controlled Generation
- Supervised Attention
- Data Augmentation
6. Challenges
- Prompt Design
- Tasks beyond Classification and Generation
- Prompting with Structured Information
- Entanglement of Template and Answer
- Answer Engineering
- Many-class and Long-answer Classification Tasks
- Multiple Answers for Generation Tasks
- Selection of Tuning Strategy
- Multiple Prompt Learning
- Prompt Ensembling
- Prompt Composition and Decomposition
- Prompt Augmentation
- Prompt Sharing
- Selection of Pre-trained Models
- Theoretical and Empirical Analysis of Prompting
- Transferability of Prompts
- Combination of Different Paradigms
- Calibration of Prompting Methods
概率预测?这部分没看懂这个术语实际上是什么意思?指的是一种模型对某方面的预测倾向,通过一些方式来进行修正吗?