【论文笔记】Pre-train, Prompt, and Predict

这篇具有很好参考价值的文章主要介绍了【论文笔记】Pre-train, Prompt, and Predict。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing

Prompt Template Engineering

Prompt shape

  • cloze prompts(eg:I love this movie, it is a [Z] movie): for tasks that are solved using masked LMs
  • prefix prompts(eg:I love this movie. What’s the sentiment of the review? [Z]): for generation tasks

for some tasks regarding multiple inputs such as text pair classification, prompt templates must contain space for two inputs, [X1] and [X2],ormore.

Manual Template Engineering

Automated Template Learning

Discrete Prompts(hard prompts)
  • Prompt Mining: 找到input x和output y之间的桥梁(middle words) [X] middle words [Z]
  • Prompt Paraphrasing: 复述已有的prompt
  • Gradient-based Search
  • Prompt Generation: 当成text generation task
  • Prompt Scoring
Continuous Prompts(soft prompts)(没太懂)
  • Prefix Tuning: 保持语言模型(LM)参数固定,在生成模型输入之前添加了一些特定的向量序列
  • Tuning Initialized with Discrete Prompts:
  • Hard-SoftPromptHybridTuning

Prompt Answer Engineering

Answer Shape

  • Tokens
  • Span
  • Sentence

Answer Space Design Methods

Manual Design
  • Unconstrained Spaces: 直接就是 answer z = output y
  • Constrained Spaces: calculate the probability of an output among multiple choices
Discrete Answer Search
  • Answer Paraphrasing
  • Prune-then-Search(eg: top k)
  • Label Decomposition: decompose each relation label into its constituent words and use them as an answer.
Continuous Answer Search(?)

Multi-Prompt

Prompt Ensembling

【论文笔记】Pre-train, Prompt, and Predict,论文阅读,prompt

  • Uniform averaging: selecting K prompts that achieve the highest accuracy on the training set and then use the average log probabilities obtained from the top K prompts to calculate the probability for a single token at [Z] position
  • Weighted averaging
  • Majority voting
  • Knowledge distillation: 多模型集成之后,可以把多个模型的知识蒸馏到一个模型里面。
  • Prompt ensembling for text generation: generate the output based on the ensembled probability of the next word in the answer sequence

Prompt Augmentation

【论文笔记】Pre-train, Prompt, and Predict,论文阅读,prompt

  • Sample Selection: how do we choose the most effective examples?
  • Sample Ordering: How do we properly order the chosen examples?

Prompt Composition

【论文笔记】Pre-train, Prompt, and Predict,论文阅读,prompt

Prompt Decomposition

【论文笔记】Pre-train, Prompt, and Predict,论文阅读,prompt

Training Strategies for Prompting Methods

Promptless Fine-tuning

BERT, RoBERTa

parameters of the pre-trained LM will be updated via gradients induced from downstream training samples

Disadvantages: LMs may overfit or not learn stably on smaller datasets.

Tuning-free Prompting

LAMA, GPT-3

directly generates the answers without changing the parameters of the pre-trained LMs based only on a prompt

Disadvantages: heavy engineering on prompt

Fixed-LM Prompt Tuning

Prefix-Tuning and Prompt-Tuning

语言模型的参数不进行改变,添加提示,并在提示部分引入额外参数。仅对提示部分的参数进行训练。

Disadvantages: Not applicable in zero-shot scenarios. While effective in few-shot scenarios, representation power is limited in large-data settings. Prompt engineering through choice of hyperparameters or seed prompts is necessary. Prompts are usually not human-interpretable or manipulable.

Fixed-prompt LM Tuning

PET-TC , PET-Gen , and LM-BFF

语言模型的参数参与训练,提示部分的参数固定,与上一种方法相反。

Disadvantages: Template or answer engineering are still required, although perhaps not as much as without prompting. LMs fine-tuned on one downstream task may not be effective on another one.

Prompt+LM Tuning

PADA and P-Tuning

全部参数参与微调

Disadvantages: Requires training and storing all parameters of the models. May overfit to small datasets.

Meta-Application

  • Domain Adaptation

    adapting a model from one domain (e.g., news text) to another (e.g., social media text)

  • Debiasing

    perform self-diagnosis and self-debiasing based on biased or debiased instructions

  • Dataset Construction

Challenges

Selection of Pre-trained LMs

Prompt Design

  • information extraction and text analysis tasks

  • Prompting with Structured Information

  • Entanglement of Template and Answer

    How to simultaneously search or learn for the best combination of template and answer

Prompt Answer Engineering

  • Many-class Classification Tasks.

    When there are too many classes, how to select an appropriate answer space

  • Long-answer Classification Tasks

    how to best decode multiple tokens using LMs

  • Multiple Answers for Generation Tasks

    How to better guide the learning process with multiple references文章来源地址https://www.toymoban.com/news/detail-830031.html

Selection of Tuning Strategy

Multiple Prompt Learning

Theoretical and Empirical Analysis of Prompting

Transferability of Prompts(可迁移性)

Combination of Different Paradigms

Calibration of Prompting Methods(校准)

到了这里,关于【论文笔记】Pre-train, Prompt, and Predict的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 论文阅读《Vision-Language Pre-Training with Triple Contrastive Learning》

    本文是2022年CVPR上的一篇 多模态 论文,利用对比学习和动量来进行图片与文本信息的上游预训练。 作者提出问题 简单的跨模态比对模型无法确保来自同一模态的相似输入保持相似。(模态内部语义信息损失) 全局互信息最大化的操作没有考虑局部信息和结构信息。 对于上

    2024年04月13日
    浏览(47)
  • 【论文阅读24】Better Few-Shot Text Classification with Pre-trained Language Model

    论文标题:Label prompt for multi-label text classification(基于预训练模型对少样本进行文本分类) 发表时间:2021 领域:多标签文本分类 发表期刊:ICANN(顶级会议) 相关代码:无 数据集:无 最近,预先训练过的语言模型在许多基准测试上都取得了非凡的性能。通过从一个大型的

    2024年02月14日
    浏览(41)
  • Grounded Language-Image Pre-training论文笔记

    Title:Grounded Language-Image Pre-training Code 目前的视觉识别任务通常是在一个预先定义好的类别范围内进行的,这样限制了其在真实场景中的扩展。CLIP的出现打破了这一限制,CLIP利用image-text对进行训练,从而使得模型可以根据文字prompt识别任意类别。CLIP适用于分类任务,而GLI

    2024年02月11日
    浏览(46)
  • 【论文笔记】BEIT:BERT PRE-TRAINING OF IMAGE TRANSFORMERS

    GitHub 视觉转换器的输入单元,即图像补丁,没有预先存在的词汇。 预测遮罩面片的原始像素往往会在预训练短程依赖性和高频细节上浪费建模能力 输入编码:通过tokenizer将输入的文本中的每个单词转换为固定维度的向量表示 输入Transformer 编码器:使用多层的 Transformer 编码

    2024年02月11日
    浏览(47)
  • BEiT: BERT Pre-Training of Image Transformers 论文笔记

    论文名称: BEiT: BERT Pre-Training of Image Transformers 论文地址:2106.08254] BEiT: BERT Pre-Training of Image Transformers (arxiv.org) 代码地址:unilm/beit at master · microsoft/unilm (github.com) 作者讲解:BiLiBiLi 作者PPT:文章资源 首先展示的是我基于这个算法搭建的网页 demo ,欢迎体验。https://wangqvq-be

    2024年02月11日
    浏览(40)
  • 【论文笔记】Improving Language Understanding by Generative Pre-Training

    背景: 自然语言理解 包括广泛的不同任务,如文本蕴涵、QA问答、语义相似性评估和文档分类。 问题: 尽管 大型未标记文本语料库 (corpora)非常丰富;但用于 学习特定任务的标记数据 却很少,这使得采用传统的有监督深度学习方法训练得到的模型表现较差。 解决: 通过

    2024年03月24日
    浏览(68)
  • 论文阅读【自然语言处理-预训练模型2】BART:Denoising Sequence-to-Sequence Pre-training for Natural Language Generation

    BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension BART: 用于自然语言生成、翻译和理解的去噪序列对序列预训练 【机构】:Facebook AI 【作者】:Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, Luke Zettlemoye

    2024年02月03日
    浏览(49)
  • 03-25 周一 论文阅读 Train Large, Then Compress: Rethinking Model Size for Effcient Trainning and Inference

    03-25 周一 论文阅读 Train Large, Then Compress: Rethinking Model Size for Effcient Trainning and Inference of Transformers 时间 版本 修改人 描述 V0.1 宋全恒 新建文档  Lizhuohan是单位是UC Berkeley(加州大学伯克利分校)。这可以从文献的作者信息中得到确认,其中提到了 “1UC Berkeley” 作为其隶属单

    2024年04月27日
    浏览(37)
  • 论文笔记--ERNIE 2.0: A Continual Pre-Training Framework for Language Understanding

    标题:ERNIE 2.0: A Continual Pre-Training Framework for Language Understanding 作者:Yu Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Hao Tian, Hua Wu, Haifeng Wang 日期:2020 期刊:AAAI   文章给出了一种新的NLP预训练模型的训练方法,并提出了ERNIE2.0(Enhanced Representation through kNowledge IntErgration)。ERNIE2.0在ERNIE

    2024年02月09日
    浏览(66)
  • 论文阅读-Training a Helpful and Harmless Assistant withReinforcement Learning from Human Feedback

    一、论文信息 论文名称: Training a Helpful and Harmless Assistant withReinforcement Learning from Human Feedback  Github:  GitHub - anthropics/hh-rlhf: Human preference data for \\\"Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedback\\\" 作者团队: 发表时间: 2022年4月12日,比insturctgpt晚40天,比

    2024年02月10日
    浏览(49)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包