Skip to content

Repository files navigation

Logo

M4R: Measuring Massive Multimodal Understanding and Reasoning in Open Space

Website · Code · Leaderboard · Dataset · Dataset-Zip · Issue


Content


Leaderboard

Evaluation of Open Space (Land, Water, Air) domains using M4R benchmarks

Each reported number corresponds to the average score (overall, temporal, spatial, and intent reasoning).

DifficultyModelsSizeOver. Avg.TemporalSpatialIntent
HardGPT 4o-22.2124.9227.1413.80
HardGemini 2.5 Pro 🥇-31.0138.1830.0825.20
HardGemini 1.5 Pro-19.0722.5321.5717.25
HardClaude 3.5-28.8932.8429.1823.41
HardInternVL2.526B22.4525.3327.4212.64
HardInternVL2.58B20.3921.3029.4111.42
HardInternVL2.54B17.3117.3923.0413.13
HardLLaVA Next32B17.8311.2826.0910.10
HardLLaVA Video7B17.3513.0227.4910.18
HardLLaVA OneVision7B14.279.5524.7410.15
HardQwen2.5 VL32B19.3913.1927.8514.05
HardQwen2.5 VL7B20.3412.3128.4015.48
MediumGPT 4o 🥇-41.2144.8947.0328.19
MediumGemini 2.5 Pro-41.0741.3148.3333.06
MediumGemini 1.5 Pro-37.1340.6943.8131.06
MediumClaude 3.5-37.9936.4647.3431.09
MediumInternVL2.526B36.3937.8547.5127.55
MediumInternVL2.58B35.4439.8551.0718.98
MediumInternVL2.54B36.5331.2145.3632.68
MediumLLaVA Next32B21.0713.5733.0814.24
MediumLLaVA Video7B24.0419.3330.5019.72
MediumLLaVA OneVision7B17.7617.8124.7117.12
MediumQwen2.5 VL32B29.9323.3441.9425.82
MediumQwen2.5 VL7B28.7922.1834.6422.89
EasyGPT 4o-45.0155.3338.0843.72
EasyGemini 2.5 Pro 🥇-59.3661.1654.5158.09
EasyGemini 1.5 Pro-48.0553.2247.8545.37
EasyClaude 3.5-50.1453.2848.5146.40
EasyInternVL2.526B55.0858.4153.4644.45
EasyInternVL2.58B51.0353.6454.5242.20
EasyInternVL2.54B48.9346.5552.3143.65
EasyLLaVA Next32B35.3231.2240.0934.34
EasyLLaVA Video7B30.4429.4134.1231.64
EasyLLaVA OneVision7B31.1029.4633.7829.88
EasyQwen2.5 VL32B48.3550.6847.8244.97
EasyQwen2.5 VL7B37.9738.8733.2036.45

More results can be found at the link: https://open-space-reasoning.github.io/

About the Dataset:

This benchmark includes approximately 2,000 videos and 19,000 human-annotated question-answer pairs, covering a wide range of reasoning tasks (as shown in Figure 1). We provide a sample set (approximately 4K examples) for efficiency evaluation, randomly selected from the full dataset (19K examples). All annotations were performed by highly educated annotators, each holding at least a master's degree in engineering-related fields such as mathematics or computer science. The dataset features a variety of video lengths, categories, and frame counts, and spans three primary open-space reasoning scenarios: land space, water space, and air space. An overview of the dataset’s characteristics is shown in Figure 2, which illustrates the distributions of video duration, domain coverage, and reasoning styles. During annotation, we first design the hard-level tasks and label each question with the ground-truth answer. Based on these, we then construct the medium and easy tasks. The primary differences between difficulty levels lie in the number and types of answer choices. Details of the annotation procedure and difficulty levels are provided in our paper.

Dataset Format:

{
"id": ,
"dataset": "str", // e.g., sub dataset filename"scene_name": "str", // e.g., video filename"reasoning_style": "str", // e.g., temporal_reasoning, intent_goal_reasoning, etc."question": "str", // The reasoning question related to the scene"ground_truth": "str", // Correct answer key (e.g., "A", "B", etc.)"options": ["str", "str", "str", "str", "str", "str"] // Multiple-choice options
}

One example from air space:

 {
"id": 1,
"dataset": "air_space_long",
"scene_name": "air_space_long_1.mp4",
"reasoning_style": "intent_goal_reasoning",
"question": "How many moving airplanes are observed in this video?",
"ground_truth": "A",
"options": [
"E. [0,1]",
"C. [8,9]",
"A. [4,5]",
"D. [6,7]",
"B. [10,11]",
"F. [2,3]"
]
}
Figure 1. A question and answer example: For each open-space reasoning setting, we include three types of video lengths: short, medium, and long. Each video length includes tasks designed to evaluate temporal reasoning, spatial reasoning, and intent reasoning.

Dataset Distribution:

Figure 2. Distribution of video and task properties in the M4R benchmark.

Three Space Settings

Figure 3. Examples of multimodal Understanding and Reasoning in Open-Space Scenarios.

Reasoning Settings:

Figure 4. Examples of reasoning question settings in M4R across three key reasoning types: Temporal Reasoning, which involves understanding event sequences and motion over time; Spatial Reasoning, which focuses on relative positioning and orientation in space; and Intent Reasoning, which evaluates understanding of goal-directed behaviors and decision-making in dynamic environments..

One Example in Land Space Settings:

Figure 5. Land-space traffic accident scenarios for open-space video understanding and reasoning include intersection collisions, urban road accidents, nighttime incidents, rural road accidents, snow-covered road collisions, and freeway accidents.

Installation

For development, you can install the package by cloning the repository and running the following command:

pip install uv
git clone git@github.com:SafeRL-Lab/m4r.git
cd m4r
uv venv dev
source dev/bin/activate
uv pip install -e .
uv pip install -U "qwen-vl-utils"

Download Dataset

You can download the dataset directly from our Hugging Face repository.

git lfs install
git clone https://huggingface.co/datasets/Open-Space-Reasoning/M4R

If you encounter any issues during the download, we also provide a zipped version for convenience: Download Dataset (ZIP)

Basic Usage

Here's a basic evaluation example:

Download the dataset from Hugging Face, and set the dataset path to the corresponding task file. For example, specify the dataset path as /your-dataset-path/land_space/short/hard/spatial_reasoning.json in the task configuration file located at /Open-Space-Reasoning/lmms_eval/tasks/land_space_short/land_space_hard.yaml.

accelerate launch --num_processes=1 --main_process_port=12346 -m lmms_eval \
--model qwen2_5_vl \
--model_args=pretrained=Qwen/Qwen2.5-VL-7B-Instruct,max_pixels=12845056,use_flash_attention_2=False,interleave_visuals=True \
--tasks land_space_hard \
--batch_size 1 \
--log_samples \
--output_path /pasteur2/u/xhanwang/lmms-eval/outputs/land_space_hard/

Modify the following examples to test more models as the above script.

More examples can be found in examples/models

Evaluation of OpenAI-Compatible Model

bash examples/models/openai_compatible.sh
bash examples/models/xai_grok.sh

Evaluation of vLLM

bash examples/models/vllm_qwen2vl.sh

Evaluation of LLaVA-OneVision

bash examples/models/llava_onevision.sh

Evaluation of LLaMA-3.2-Vision

bash examples/models/llama_vision.sh

Evaluation of Qwen2-VL

bash examples/models/qwen2_vl.sh
bash examples/models/qwen2_5_vl.sh

Evaluation of LLaVA on MME

If you want to test LLaVA 1.5, you will have to clone their repo from LLaVA and

bash examples/models/llava_next.sh

Evaluation with tensor parallel for bigger model (llava-next-72b)

bash examples/models/tensor_parallel.sh

Evaluation with SGLang for bigger model (llava-next-72b)

bash examples/models/sglang.sh

Evaluation with vLLM for bigger model (llava-next-72b)

bash examples/models/vllm_qwen2vl.sh

More Parameters

python3 -m lmms_eval --help

Environmental Variables Before running experiments and evaluations, we recommend you to export following environment variables to your environment. Some are necessary for certain tasks to run.

export OPENAI_API_KEY="<YOUR_API_KEY>"export HF_HOME="<Path to HF cache>"export HF_TOKEN="<YOUR_API_KEY>"export HF_HUB_ENABLE_HF_TRANSFER="1"export REKA_API_KEY="<YOUR_API_KEY>"# Other possible environment variables include # ANTHROPIC_API_KEY,DASHSCOPE_API_KEY etc.

Common Environment Issues

Sometimes you might encounter some common issues for example error related to httpx or protobuf. To solve these issues, you can first try

python3 -m pip install httpx==0.23.3;
python3 -m pip install protobuf==3.20;# If you are using numpy==2.x, sometimes may causing errors
python3 -m pip install numpy==1.26;# Someties sentencepiece are required for tokenizer to work
python3 -m pip install sentencepiece;

Citation

If you find the repository useful, please cite the study

@article{gu2025m4r,
title={Measuring Massive Multimodal Understanding and Reasoning in Open Space},
author={Gu, Shangding and Wang, Xiaohan and Ying, Donghao and Zhao, Haoyu and Yang, Runing and Li, Boyi and Jin, Ming and Pavone, Marco and Yeung-Levy, Serena and Wang, Jun and Song, Dawn and Spanos, Costas},
journal={Github},
year={2025}
}

Acknowledgment

This repository is adapted from lmms-eval for use in our benchmark. We thank the contributors of lmms-eval for their efforts and contributions.

About

🔥 Measuring Massive Multimodal Understanding and Reasoning in Open Space

Topics

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages