[论文解读] LayoutPrompter: Awaken the Design Ability of Large Language Models
LayoutPrompter 是一种无需训练、通用性极强的方法,通过在上下文学习中利用大语言模型(LLMs)实现条件化图形布局生成,其核心包含三个组件:输入输出序列化、动态范例选择和布局排序。该方法在无需任何微调的情况下,于七个布局生成任务中均达到最先进或更优性能,展现出极高的数据效率和在低数据场景下的鲁棒性。
Conditional graphic layout generation, which automatically maps user constraints to high-quality layouts, has attracted widespread attention today. Although recent works have achieved promising performance, the lack of versatility and data efficiency hinders their practical applications. In this work, we propose LayoutPrompter, which leverages large language models (LLMs) to address the above problems through in-context learning. LayoutPrompter is made up of three key components, namely input-output serialization, dynamic exemplar selection and layout ranking. Specifically, the input-output serialization component meticulously designs the input and output formats for each layout generation task. Dynamic exemplar selection is responsible for selecting the most helpful prompting exemplars for a given input. And a layout ranker is used to pick the highest quality layout from multiple outputs of LLMs. We conduct experiments on all existing layout generation tasks using four public datasets. Despite the simplicity of our approach, experimental results show that LayoutPrompter can compete with or even outperform state-of-the-art approaches on these tasks without any model training or fine-tuning. This demonstrates the effectiveness of this versatile and training-free approach. In addition, the ablation studies show that LayoutPrompter is significantly superior to the training-based baseline in a low-data regime, further indicating the data efficiency of LayoutPrompter. Our project is available at https://github.com/microsoft/LayoutGeneration/tree/main/LayoutPrompter.
研究动机与目标
- 解决现有布局生成方法的局限性,这些方法通常为特定任务设计,且需要大量训练数据。
- 实现一种统一、通用的方法,无需重新训练模型即可处理多样化的条件化布局生成任务(例如,文本到布局、内容感知、约束显式等)。
- 通过减少对大规模标注数据集的依赖,提升数据效率,尤其在低资源布局领域表现更优。
- 利用预训练 LLM 的上下文学习能力,在无需参数更新的情况下生成高质量布局。
- 通过专用的布局排序机制和动态范例选择,进一步提升布局质量和约束符合度。
提出的方法
- 输入输出序列化将布局约束和输出转换为结构化的标记序列,使 LLM 能够将其作为序列到序列任务处理。
- 动态范例选择根据输入约束与范例池中示例的语义相似度,检索最相关的演示示例。
- 布局排序器通过 mIoU、FID 和对齐度等指标,评估多个 LLM 生成的布局,并选择质量最高的输出。
- 该方法完全基于上下文学习设置,无需微调或模型更新。
- 该方法在使用相同 LLM 和提示框架的前提下,统一应用于多种布局领域(如 UI、海报、文档)和任务。
- 范例检索采用密集向量检索方法,确保为每个输入选择最相关的演示。
实验结果
研究问题
- RQ1基于 LLM 的统一、无需训练的方法是否能在不进行任务特定模型适配的情况下,有效处理多种条件化布局生成任务?
- RQ2与微调基线相比,LayoutPrompter 在低数据场景下的表现如何,特别是在数据效率方面?
- RQ3输入输出序列化和动态范例选择在多大程度上提升了布局质量和约束遵守度?
- RQ4与随机选择 LLM 输出相比,布局排序组件是否显著提升了输出质量?
- RQ5当提示设计得当,LLM 是否能在未显式在布局数据上进行训练的情况下,生成视觉连贯且美观的布局?
主要发现
- LayoutPrompter 在四个公开数据集的七个布局生成任务中,无需任何模型微调,均达到最先进或更优性能。
- 在 RICO 数据集上,LayoutPrompter 在 Gen-TS 任务中 mIoU 达到 0.552,在精炼任务中达到 0.745,优于基于训练的基线模型 LayoutFormer++,尤其在低数据场景下表现更优。
- 消融实验表明,移除布局排序器后,Gen-T 任务的 mIoU 下降最高达 0.08,Refinement 任务下降 0.04,证明其在输出质量中的关键作用。
- 动态范例选择至关重要:若移除该模块,Gen-T 任务的 mIoU 降至 0.251,Gen-TS 任务降至 0.337,表明缺乏相关演示时性能显著下降。
- 当训练数据受限(仅 500 个样本)时,LayoutPrompter 在 Gen-T 任务中 mIoU 达 0.343,远超 LayoutFormer++ 的 0.176,证实其具有卓越的数据效率。
- 该方法在 UI、海报、文档等多种布局领域均保持强劲性能,表明其具备高度通用性和泛化能力。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。