[论文解读] Self-Prompt Tuning: Enable Autonomous Role-Playing in LLMs
本文提出自提示微调(self-prompt tuning),一种使大型语言模型(LLMs)通过微调自主生成专家角色扮演提示的方法。通过构建 LIMA-Role 数据集——在 LIMA 数据集基础上加入由 GPT-4 生成的角色提示——微调后的 LLM 如 Mistral-7B 和 Llama-2-7B 在大多数自然语言处理基准测试中表现优于标准指令微调基线模型,证明了通过参数调整自动化复杂提示策略的有效性。
Recent advancements in LLMs have showcased their remarkable role-playing capabilities, able to accurately simulate the dialogue styles and cognitive processes of various roles based on different instructions and contexts. Studies indicate that assigning LLMs the roles of experts, a strategy known as role-play prompting, can enhance their performance in the corresponding domains. However, the prompt needs to be manually designed for the given problem, requiring certain expertise and iterative modifications. To this end, we propose self-prompt tuning, making LLMs themselves generate role-play prompts through fine-tuning. Leveraging the LIMA dataset as our foundational corpus, we employ GPT-4 to annotate role-play prompts for each data points, resulting in the creation of the LIMA-Role dataset. We then fine-tune LLMs like Llama-2-7B and Mistral-7B on LIMA-Role. Consequently, the self-prompt tuned LLMs can automatically generate expert role prompts for any given question. We extensively evaluate self-prompt tuned LLMs on widely used NLP benchmarks and open-ended question test. Our empirical results illustrate that self-prompt tuned LLMs outperform standard instruction tuned baselines across most datasets. This highlights the great potential of utilizing fine-tuning to enable LLMs to self-prompt, thereby automating complex prompting strategies. We release the dataset, models, and code at this \href{https://anonymous.4open.science/r/Self-Prompt-Tuning-739E/}{url}.
研究动机与目标
- 为解决人工角色扮演提示的局限性,即耗时且任务特定,通过使 LLM 自主生成其自身角色提示。
- 探究微调是否能够自动化如角色扮演提示等复杂提示策略,减少对人工设计提示的依赖。
- 评估自生成的角色提示是否能在多样化的自然语言处理任务中提升 LLM 性能。
- 构建一个新数据集 LIMA-Role,将指令微调数据与专家角色描述相结合,用于微调。
- 证明自提示微调模型在极少人工干预下可实现优于标准指令微调模型的性能。
提出的方法
- 作者通过使用少样本学习(in-context learning)由 GPT-4 生成的专家角色描述,对 LIMA 指令微调数据集进行增强,构建了 LIMA-Role 数据集。
- 将角色描述添加到每个输入问题中,将标准指令提示转换为具有不同措辞和结构的角色扮演提示。
- 使用 LIMA-Role 数据集对 Mistral-7B 和 Llama-2-7B 等大型语言模型进行微调,使其学会为新问题生成合适的角色扮演提示。
- 评估多种提示设计以确定角色提示生成的最佳结构,最终选定 Prompt 8 为最有效方案。
- 在 8 个标准自然语言处理基准测试和一个开放式问题测试上评估性能,使用 GPT-4 进行偏好标注。
- 开展消融实验,评估提示设计对微调后模型性能的影响,重点关注提示引言结构的变化。
实验结果
研究问题
- RQ1微调是否能使 LLM 在无需人工设计提示的情况下,自主为新问题生成角色扮演提示?
- RQ2与标准指令微调相比,自生成的角色扮演提示是否能在多样化的自然语言处理任务中提升 LLM 性能?
- RQ3微调过程中使用的提示设计如何影响自提示微调模型的性能?
- RQ4在小规模数据集(1,030 个样本)下,是否能有效微调一个 7B 参数的 LLM,使其性能与更大规模、经 RLHF 优化的模型相当?
- RQ5自提示微调在开放式、非标准化问题上的泛化能力如何?
主要发现
- 自提示微调的 LLM 在所评估的 8 个传统自然语言处理基准测试中,多数表现优于标准指令微调基线模型。
- 在多领域问答基准测试中,Mistral-Role 在 MMLU 数据集上取得了 58.4 的得分,超过标准的 Mistral-LIMA 基线。
- 在开放式问题评估中,Mistral-Role 生成的回复在 5% 的情况下获得 GPT-4 的偏好,表明相比标准指令微调有可测量的性能提升。
- 提示设计显著影响性能,Prompt 8 在各数据集上均表现出最均衡且高效的性能。
- 尽管训练数据有限(1,030 个样本),自提示微调模型仍优于指令微调基线,表明其在自动化复杂提示方面具有强大潜力。
- 自提示微调模型与官方 RLHF 优化模型之间的性能差距仍然显著,主要源于训练数据规模和方法的差异。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。