论文标题

黑盒及时学习预训练的语言模型

Black-box Prompt Learning for Pre-trained Language Models

论文作者

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

论文摘要

通用预训练的语言模型(PLM)的规模不断提高,需要研究在不同下游任务中更有效的适应性。在本文中,我们建立了一个黑盒离散提示学习(BDPL),以与云基础架构和边缘设备之间的务实相互作用产生共鸣。特别是,我们没有在云中微调模型,而是通过及时学习调整PLM,这仅有效地优化了离散提示的几个参数。此外,我们考虑了我们无法访问预训练模型的参数和梯度的方案,除了其输入输入。这种黑色框设置可确保云基础架构免于潜在的攻击和滥用,从而导致单点故障,这比当前基础架构可比白色框对方更可取。在此黑框约束下,我们应用了降低差异策略梯度算法来估计每个离散提示的分类分布中参数的梯度。鉴于我们的方法,用户设备可以通过查询以一系列API调用为界的PLM来有效调整任务。我们对Roberta和GPT-3的实验表明,所提出的算法以云设备协作的方式在八个基准方面取得了重大改进。最后,我们进行深入的案例研究,以各种数据尺寸,及时的长度,培训预算,优化目标,及时的可转移性以及对学到的提示的解释来全面分析我们的方法。我们的代码将在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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源