Learning How To Ask: Cycle-Consistency Refines Prompts in Multimodal Foundation Models

📄 arXiv: 2402.08756v1 📥 PDF

作者: Maurice Diesendruck, Jianzhe Lin, Shima Imani, Gayathri Mahalingam, Mingyang Xu, Jie Zhao

分类: cs.CL, cs.CV

发布日期: 2024-02-13


💡 一句话要点

提出CyclePrompt以优化多模态基础模型的提示生成

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 多模态学习 循环一致性 自监督学习 提示生成 代码生成 图像描述

📋 核心要点

  1. 当前大语言模型在零-shot 推理中依赖于任务提示生成结果,缺乏从结果反推任务的研究。
  2. 本文提出CyclePrompt,通过循环一致性学习优化提示生成,避免了昂贵的微调和外部环境的复杂性。
  3. 实验结果显示,CyclePrompt在HumanEval基准测试中提升了代码生成准确率,并在视觉-语言任务中生成了更详细的图像描述。

📝 摘要(中文)

在大语言模型进行零-shot 推理时,通常使用任务规范的提示生成结果。然而,尚未有研究探讨从结果反推任务规范的可能性。本文采用双向方法进行循环监督学习,旨在创建前向映射f: X -> Y(如图像到生成的标题),以及反向映射g: Y -> X(如标题到生成的图像),构建循环一致性损失以强化提示生成。CyclePrompt技术利用循环一致性作为免费的监督信号,迭代优化提示,显著提升模型性能,无需昂贵的微调或额外训练数据。我们在代码生成和图像描述两个领域展示了CyclePrompt的有效性,尤其在HumanEval基准测试中取得了优异成绩。

🔬 方法详解

问题定义:本文旨在解决现有大语言模型在零-shot 推理中仅依赖任务提示的问题,缺乏从生成结果反推任务规范的研究,导致模型性能受限。

核心思路:CyclePrompt通过建立前向和反向映射,利用循环一致性损失来优化提示生成,确保生成的结果与输入保持一致,从而提升模型的推理能力。

技术框架:整体架构包括前向映射f和反向映射g,形成循环一致性损失。该方法在无须额外训练数据的情况下,通过迭代优化提示来提升模型性能。

关键创新:CyclePrompt是首次将自监督学习应用于提示生成,利用循环一致性作为监督信号,显著区别于传统的微调方法。

关键设计:在损失函数设计上,CyclePrompt通过g(f(X)) ≈ X的约束来优化提示,确保生成的内容与原始输入保持一致,避免了对外部环境的依赖。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

在HumanEval基准测试中,CyclePrompt在不依赖额外训练数据的情况下,准确率从80.5%提升至87.2%,在视觉-语言任务中生成的图像描述超越了基线的GPT4V描述,展示了显著的性能提升。

🎯 应用场景

该研究的潜在应用领域包括代码生成、图像描述等多模态任务,能够在无需额外训练数据的情况下提升模型性能,具有广泛的实际价值。未来,CyclePrompt可能推动更多自监督学习方法在提示生成中的应用,促进多模态基础模型的发展。

📄 摘要(原文)

When LLMs perform zero-shot inference, they typically use a prompt with a task specification, and generate a completion. However, there is no work to explore the possibility of the reverse - going from completion to task specification. In this paper, we employ both directions to perform cycle-supervised learning entirely in-context. Our goal is to create a forward map f : X -> Y (e.g. image -> generated caption), coupled with a backward map g : Y -> X (e.g. caption -> generated image) to construct a cycle-consistency "loss" (formulated as an update to the prompt) to enforce g(f(X)) ~= X. The technique, called CyclePrompt, uses cycle-consistency as a free supervisory signal to iteratively craft the prompt. Importantly, CyclePrompt reinforces model performance without expensive fine-tuning, without training data, and without the complexity of external environments (e.g. compilers, APIs). We demonstrate CyclePrompt in two domains: code generation and image captioning. Our results on the HumanEval coding benchmark put us in first place on the leaderboard among models that do not rely on extra training data or usage of external environments, and third overall. Compared to the GPT4 baseline, we improve accuracy from 80.5% to 87.2%. In the vision-language space, we generate detailed image captions which outperform baseline zero-shot GPT4V captions, when tested against natural (VQAv2) and diagrammatic (FigureQA) visual question-answering benchmarks. To the best of our knowledge, this is the first use of self-supervised learning for prompting.