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

MAVIS:搭载自动数据引擎的数学视觉指令微调

MAVIS: Mathematical Visual Instruction Tuning with an Automatic Data Engine

CUHK(香港中文大学);Peking University(北京大学);Shanghai AI Laboratory(上海人工智能实验室);Oracle(甲骨文公司);ByteDance(字节跳动公司)

Renrui Zhang, Xinyu Wei, Dongzhi Jiang, Ziyu Guo, Shicheng Li, Yichi Zhang, Chengzhuo Tong, Jiaming Liu, Aojun Zhou, Bin Wei, Shanghang Zhang, Peng Gao, Chunyuan Li, Hongsheng Li

AI总结:

针对多模态大语言模型数学能力的三类短板,本研究提出MAVIS数学视觉指令微调流水线,通过自动数据引擎构建两个大规模数据集,经四阶段递进训练提升模型的数学视觉推理能力。

摘要:

多模态大语言模型(MLLMs)的数学能力仍有待深入探索,存在三方面待改进的问题:数学图表的视觉编码、图表与语言的对齐,以及思维链(CoT)推理。这催生了对有效训练范式以及带有详细CoT推理依据的大规模综合数据集的迫切需求,而这类数据集收集难度大,人工标注成本高昂。为解决这一问题,我们提出MAVIS——一种面向多模态大语言模型的数学视觉指令微调流水线,其核心特色是配备可高效生成数学视觉数据集的自动数据引擎。我们设计的数据生成流程完全无需人工干预,也不使用GPT API,同时保障了图表与说明的对应性、问答的正确性以及CoT推理的质量。借助该方法,我们构建了两个数据集:MAVIS-Caption(含55.8万组图表-说明对)和MAVIS-Instruct(含83.4万道带CoT推理依据的视觉数学题),并提出了从零开始训练多模态大语言模型的四个递进阶段。第一阶段,我们利用MAVIS-Caption通过对比学习微调一个数学专用视觉编码器(CLIP-Math),专门用于优化图表视觉编码效果。第二阶段,我们同样借助MAVIS-Caption,通过投影层将CLIP-Math与大语言模型(LLM)对齐,增强数学领域的视觉-语言对齐能力。第三阶段,我们采用MAVIS-Instruct开展指令微调,以培养稳健的解题能力,所得模型命名为MAVIS-7B。第四阶段,我们应用直接偏好优化(DPO)增强模型的CoT能力,进一步优化其逐步推理性能。代码和数据集将发布于https://github.com/ZrrSkywalker/MAVIS。

英文摘要:

The mathematical capabilities of Multi-modal Large Language Models (MLLMs) remain under-explored with three areas to be improved: visual encoding of math diagrams, diagram-language alignment, and chain-of-thought (CoT) reasoning. This draws forth an urgent demand for an effective training paradigm and a large-scale, comprehensive dataset with detailed CoT rationales, which is challenging to collect and costly to annotate manually. To tackle this issue, we propose MAVIS, a MAthematical VISual instruction tuning pipeline for MLLMs, featuring an automatic data engine to efficiently create mathematical visual datasets. We design the data generation process to be entirely independent of human intervention or GPT API usage, while ensuring the diagram-caption correspondence, question-answer correctness, and CoT reasoning quality. With this approach, we curate two datasets, MAVIS-Caption (558K diagram-caption pairs) and MAVIS-Instruct (834K visual math problems with CoT rationales), and propose four progressive stages for training MLLMs from scratch. First, we utilize MAVIS-Caption to fine-tune a math-specific vision encoder (CLIP-Math) through contrastive learning, tailored for improved diagram visual encoding. Second, we also leverage MAVIS-Caption to align the CLIP-Math with a large language model (LLM) by a projection layer, enhancing vision-language alignment in mathematical domains. Third, we adopt MAVIS-Instruct to perform the instruction tuning for robust problem-solving skills, and term the resulting model as MAVIS-7B. Fourth, we apply Direct Preference Optimization (DPO) to enhance the CoT capabilities of our model, further refining its step-wise reasoning performance. Code and data will be released at https://github.com/ZrrSkywalker/MAVIS

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

↑