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

集中注意力:面向语言模型的领域可泛化提示优化

Concentrate Attention: Towards Domain-Generalizable Prompt Optimization for Language Models

Faculty of Electronic and Information Engineering, Xi’an Jiaotong University(西安交通大学电子与信息工程学院);Queen Mary University of London(伦敦玛丽女王大学);University of Chicago(芝加哥大学)

Chengzhengxu Li, Xiaoming Liu, Zhaohan Zhang, Yichen Wang, Chen Liu, Yu Lan, Chao Shen

AI总结:

本文提出“Concentration”提示优化目标,通过增强解码token对提示token的回溯注意力并稳定深层注意力分布,在软提示和硬提示方法上分别提升领域泛化准确率1.42%和2.16%,同时保持域内性能。

摘要:

近年来,提示优化技术的进展显著提升了预训练语言模型(PLMs)在下游任务上的性能。然而,优化后的提示在领域泛化方面的潜力尚未得到充分探索。为探究提示在未知领域上的泛化本质,我们进行了先导实验并发现:(i) 从PLMs深层获得更多注意力权重的提示更具泛化性;(ii) 在PLMs深层中注意力分布更稳定的提示更具泛化性。因此,我们提出了一个面向领域可泛化提示优化的新目标,命名为“Concentration”,它表示当前解码token对提示token的“回溯”注意力,旨在增强对提示的注意力强度并降低注意力分布的波动。我们分别将该新目标适配到流行的软提示和硬提示优化方法中。大量实验表明,在多源领域泛化设置下,我们的思路使对比提示优化方法在软提示泛化上准确率提升1.42%,在硬提示泛化上提升2.16%,同时保持了令人满意的域内性能。这些有前景的结果验证了我们所提出的提示优化目标的有效性,并为领域可泛化提示提供了关键见解。

英文摘要:

Recent advances in prompt optimization have notably enhanced the performance of pre-trained language models (PLMs) on downstream tasks. However, the potential of optimized prompts on domain generalization has been under-explored. To explore the nature of prompt generalization on unknown domains, we conduct pilot experiments and find that (i) Prompts gaining more attention weight from PLMs' deep layers are more generalizable and (ii) Prompts with more stable attention distributions in PLMs' deep layers are more generalizable. Thus, we offer a fresh objective towards domain-generalizable prompts optimization named "Concentration", which represents the "lookback" attention from the current decoding token to the prompt tokens, to increase the attention strength on prompts and reduce the fluctuation of attention distribution. We adapt this new objective to popular soft prompt and hard prompt optimization methods, respectively. Extensive experiments demonstrate that our idea improves comparison prompt optimization methods by 1.42% for soft prompt generalization and 2.16% for hard prompt generalization in accuracy on the multi-source domain generalization setting, while maintaining satisfying in-domain performance. The promising results validate the effectiveness of our proposed prompt optimization objective and provide key insights into domain-generalizable prompts.

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

↑