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

通过自动提示优化实现情感条件文本生成

Emotion-Conditioned Text Generation through Automatic Prompt Optimization

Institut für Maschinelle Sprachverarbeitung, University of Stuttgart(斯图加特大学机器语言处理研究所)

Yarik Menchaca Resendiz, Roman Klinger

AI总结:

本文提出首个面向情感条件文本生成的自动提示优化方法,通过迭代增删替换词元优化提示,仅需文本分类器作为目标函数,在事件报告任务上将宏平均F1从0.22提升至0.75。

摘要:

条件自然语言生成方法通常需要昂贵的微调或从头训练大型语言模型。在没有大量数据和计算资源的情况下,这两种方法都难以取得良好结果。在不改变大型语言模型参数的情况下进行提示学习,提供了一种有前景的替代方案。这是一种成本效益高的方法,同时仍能取得有竞争力的结果。虽然这一流程目前在零样本和少样本文本分类及结构化预测中已经较为成熟,但在条件文本生成方面受到的关注有限。我们提出了首个面向指令微调模型的情感条件文本生成的自动提示优化方法。我们的方法采用迭代优化过程,通过添加、删除或替换词元来改变提示。作为目标函数,我们只需要一个文本分类器来衡量条件变量在生成文本中的实现程度。我们在以事件报告为重点的情感条件文本生成任务上评估了该方法,并将其与人工设计的提示进行比较,这些人工提示同时也作为优化过程的种子。优化后的提示在满足情感条件方面达到了0.75的宏平均F1值,而人工设计的种子提示仅为0.22的宏平均F1值。

英文摘要:

Conditional natural language generation methods often require either expensive fine-tuning or training a large language model from scratch. Both are unlikely to lead to good results without a substantial amount of data and computational resources. Prompt learning without changing the parameters of a large language model presents a promising alternative. It is a cost-effective approach, while still achieving competitive results. While this procedure is now established for zero- and few-shot text classification and structured prediction, it has received limited attention in conditional text generation. We present the first automatic prompt optimization approach for emotion-conditioned text generation with instruction-fine-tuned models. Our method uses an iterative optimization procedure that changes the prompt by adding, removing, or replacing tokens. As objective function, we only require a text classifier that measures the realization of the conditional variable in the generated text. We evaluate the method on emotion-conditioned text generation with a focus on event reports and compare it to manually designed prompts that also act as the seed for the optimization procedure. The optimized prompts achieve 0.75 macro-average F1 to fulfill the emotion condition in contrast to manually designed seed prompts with only 0.22 macro-average F1.

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

↑