arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2201.08531cs.CL
收藏

预训练语言模型的黑盒快速学习

Black-box Prompt Learning for Pre-trained Language Models

The Hong Kong University of Science and Technology(香港科技大学);University of California, San Diego(加利福尼亚大学圣地亚哥分校)

Shizhe Diao, Zhichao Huang, Ruijia Xu, Xuechun Li, Yong Lin, Xiao Zhou, Tong Zhang

摘要:

通用预训练语言模型(PLM)的规模不断扩大,需要研究跨不同下游任务的更有效适应。在本文中,我们建立了一个黑盒离散提示学习(BDPL),以与云基础设施和边缘设备之间的务实交互产生共鸣。特别是,我们不是在云中微调模型,而是通过提示学习来适应PLM,这有效地优化了离散提示的几个参数。此外,我们考虑了这样一种情况,即我们无法访问预训练模型的参数和梯度,除了给定输入的输出。这种黑盒设置可以保护云基础设施免受潜在的攻击和误用,从而导致单点故障,这比当前基础设施的白盒对应物更可取。在此黑盒约束下,我们应用方差减少的策略梯度算法来估计每个离散提示的分类分布中的参数的梯度。根据我们的方法,用户设备可以通过查询由一系列API调用限定的PLM来有效地调整其任务。在RoBERTa和GPT-3上的实验表明,该算法在云-设备协作方式下,在8个基准测试中取得了显著的改进.最后,我们进行了深入的案例研究,全面分析我们的方法在各种数据大小,提示长度,培训预算,优化目标,提示的可移植性,以及学习提示的解释。我们的代码将在https://github.com/shizhediao/Black-Box-Prompt-Learning上提供。

英文摘要:

The increasing scale of general-purpose Pre-trained Language Models (PLMs) necessitates the study of more efficient adaptation across different downstream tasks. In this paper, we establish a Black-box Discrete Prompt Learning (BDPL) to resonate with pragmatic interactions between the cloud infrastructure and edge devices. Particularly, instead of fine-tuning the model in the cloud, we adapt PLMs by prompt learning, which efficiently optimizes only a few parameters of the discrete prompts. Moreover, we consider the scenario that we do not have access to the parameters and gradients of the pre-trained models, except for its outputs given inputs. This black-box setting secures the cloud infrastructure from potential attack and misuse to cause a single-point failure, which is preferable to the white-box counterpart by current infrastructures. Under this black-box constraint, we apply a variance-reduced policy gradient algorithm to estimate the gradients of parameters in the categorical distribution of each discrete prompt. In light of our method, the user devices can efficiently tune their tasks by querying the PLMs bounded by a range of API calls. Our experiments on RoBERTa and GPT-3 demonstrate that the proposed algorithm achieves significant improvement on eight benchmarks in a cloud-device collaboration manner. Finally, we conduct in-depth case studies to comprehensively analyze our method in terms of various data sizes, prompt lengths, training budgets, optimization objectives, prompt transferability, and explanations of the learned prompts. Our code will be available at https://github.com/shizhediao/Black-Box-Prompt-Learning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑