Math-LLaVA: Bootstrapping Mathematical Reasoning for Multimodal Large Language Models

Wenhao Shi, Zhiqiang Hu, Yi Bin, Junhua Liu, Yang Yang, See-Kiong Ng, Lidong Bing, Roy Ka-Wei Lee

Abstract

Large Language Models (LLMs) have demonstrated significant proficiency in text-based mathematical reasoning, yet Multimodal Large Language Models (MLLMs) continue to struggle with problems involving visual components like diagrams, charts, and tables. This paper introduces Math-LLaVA, a model designed to bridge this gap through a novel data bootstrapping approach. By creating MathV360K—a dataset of 360,000 high-quality visual-math question-answer pairs—the researchers significantly enhance the reasoning capabilities of LLaVA-1.5. Math-LLaVA achieves a 19-point improvement on the MathVista benchmark, reaching performance levels comparable to proprietary models like GPT-4V.

Introduction

The authors identify a "data scarcity" problem in multimodal instruction tuning: existing open-source datasets are often "thin," providing only one or two simple questions per image. This prevents models from fully exploiting the rich visual information available, leading to failures in complex reasoning tasks. Math-LLaVA addresses this by "mining" images for multiple, diverse questions, ranging from simple identification to multi-step logical reasoning, ensuring the model learns a stronger mapping between visual features and logical deduction.

Methodology

The development of Math-LLaVA follows a two-stage bootstrapping process designed to maximize the utility of existing visual data.

1. Smart Data Selection

Instead of using raw data, the researchers filtered 40,000 high-quality images from 24 existing datasets (including FigureQA, Geometry3K, and TabMWP). They employed fine-tuned Vision Transformer (ViT) models to classify these images based on clarity and comprehension complexity (ranking them from 0 to 3 based on object count and required logic).

2. The MathV360K Pipeline

Using the selected images, the team utilized GPT-4V to synthesize 320,000 new question-answer pairs through four specific strategies:

  • AskImg (New Asked Question): Mining the image for additional information not covered by the original question.
  • CompQ (Complexity): Posing more difficult, multi-step questions to challenge the model's logic.
  • RephQ (Logical Consistency): Rephrasing existing questions to ensure consistent answers regardless of wording.
  • SimpQ (Underspecification): Simplifying questions to test if the model can reason correctly with minimal linguistic cues, forcing it to rely on visual evidence.
The Math-LLaVA pipeline: from source data selection and complexity classification to multi-strategy data augmentation and final model fine-tuning.

Visual Mining and Dataset Diversity

A core insight of the paper is that a single image can support many different reasoning paths. By generating a wide variety of questions for each image, the MathV360K dataset provides a dense training signal. This diversity is reflected in the clustering of questions across different logical domains, such as counting, measurement, and spatial reasoning.

Clustering of questions from the IconQA dataset, illustrating the diversity of reasoning tasks (counting, measuring, logic, etc.) extracted from visual data through the bootstrapping process.

Key Results

Math-LLaVA demonstrates state-of-the-art performance among open-source models across several rigorous benchmarks:

  • MathVista: Achieved 46.6% accuracy, a 19-point jump over the base LLaVA-1.5 (27.7%). This outperformed Gemini 1.0 Pro and Claude 3 Haiku, moving within striking distance of GPT-4V (49.9%).
  • Math-V & MathVerse: Reached 15.7% and 19.8% respectively, leading the pack among open-source competitors.
  • MMMU: Improved from 36.4% to 38.3%, suggesting that specialized mathematical training enhances a model's general cognitive capabilities without causing overfitting.

Conclusion and Future Work

Math-LLaVA proves that high-quality, diverse visual instruction data is key to unlocking mathematical reasoning in MLLMs. While the current model provides final answers, the authors acknowledge the lack of intermediate reasoning steps. Future work will focus on incorporating Chain-of-Thought (CoT) rationales into the dataset to help models provide transparent, step-by-step explanations of their mathematical logic.

Summary updated

BibTeX
@inproceedings{shi2024math,
  author = {Wenhao Shi and Zhiqiang Hu and Yi Bin and Junhua Liu and Yang Yang and See-Kiong Ng and Lidong Bing and Roy Ka-Wei Lee},
  title = {{Math-LLaVA: Bootstrapping Mathematical Reasoning for Multimodal Large Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.268},
}
Figure