Dataset Viewer
Full Screen
The dataset viewer is not available for this split.
Job manager crashed while running this job (missing heartbeats).
Error code:   JobManagerCrashedError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

MMCode Logo
MMCode

Note: Please find the files directly via the "Files and versions" panel. Preview is not available.

Dataset Description

MMCode is a multi-modal code generation dataset designed to evaluate the problem-solving skills of code language models in visually rich contexts (i.e. images). It contains 3,548 questions paired with 6,620 images, derived from real-world programming challenges across 10 code competition websites, with Python solutions and tests provided. The dataset emphasizes the extreme demand for reasoning abilities, the interwoven nature of textual and visual contents, and the occurrence of questions containing multiple images.

Languages

  • The primary language of the dataset content is English, with some questions translated from Japanese (raw data is provided for reference).
  • The programming language is Python.

Dataset Structure

Each problem includes a programming question paired with relevant images, Python solutions, and test cases and other metadata.

Data Fields:

Field Type Description
problem_id string A unique identifier of the problem, e.g. cf_1_A.
name string A descriptive title for the coding problem crawled from the question.
source string The origin platform of the problem.
url string A link to the original problem on the source website.
question string The textual description of the programming challenge, outlining the problem context, objectives, and constraints. Images are represented as markdown tags (e.g. ![image](1.png))
raw_problem string Contains the raw HTML of the problem description, which include formatting and embedded image tags for the online version.
solutions list[string] A list of strings representing the solutions to the problem.
input_output dict[string, list] A dict containing arrays of test inputs and the expected outputs.
images list[string] An array of base64 images associated with the problem.
picture_num int The number of images in the problem.
image_tags list A list categorizing the types of images associated with the problem.
starter_code* string Initial code of the problem. This could be an empty string if no starter code is provided.
difficulty* string A classification of the problem's difficulty level.
raw_tags* list Raw tags associated with the problem.
tags* list A list of strings representing various categories or concepts that the problem touches upon.
skill_types* list A list of strings, similar to Tags, that classify the problem based on the skills or knowledge areas required to solve it.
Expected Time Complexity* string Describes the expected time complexity of the solution, if applicable.
Expected Auxiliary Space* string Information on the auxiliary space requirement for the solution, if applicable.
time_limit*^ string The maximum allowed execution time for the solution.
memory_limit*^ string The maximum allowed memory usage for the solution.

* Fields inherited from the TACO dataset.

^ These limits are not considered by the testing framework due to hardware discrepencies.

Key Features

  • Multi-Modal Challenges: MMCode is the first work towards code generation combining textual and visual information, requiring models to interpret and integrate both modalities of data for problem-solving.

  • Rich Diversity: With 3,548 questions paired with 6,620 images, sourced from 10 different coding competition websites, the dataset offers a diverse range of real-world programming challenges.

  • Detailed Annotations: The dataset includes detailed annotations for images, categorizing them into types Linear Data Structure, Tree, Graph, 2D Geometry, 3D Geometry, Chessboard, Map, Patterns, Math, Table, Pseudocode, and Others, which allows for a detailed analysis of model performance across different visual information types.

  • Automatic Testing Framework: Each problem is accompanied by input-output pairs that serve as automated test cases to rigorously evaluate the correctness of the solutions provided by the models.

Data Split

The test set is made up of 263 problems for efficient evaluation.

Data Example

{
    "solutions": "[\"(X, Y, Z) = map(int, input().split(' ')) ... \"]",
    "starter_code": "",
    "input_output": "{\"inputs\": [\"13 3 1\\n\", \"12 3 1\\n\", \"100000 1 1\\n\"], \"outputs\": [\"3\\n\", \"2\\n\", \"49999\\n\"]}",
    "difficulty": "EASY",
    "raw_tags": "[]",
    "name": "AtCoder Beginner Contest 078 - ISU",
    "source": "atcoder",
    "tags": "[]",
    "skill_types": "[]",
    "url": "https://atcoder.jp/contests/abc078/tasks/abc078_b",
    "Expected Auxiliary Space": null,
    "time_limit": "2.0 seconds",
    "memory_limit": "256.0 megabytes",
    "Expected Time Complexity": null,
    "raw_problem": "<div id=\"task-statement\">\n<span class=\"lang\">...There is just enough room for three, as shown below:</p>\n<div style=\"text-align: center;\">\n<img src=\"https://img.atcoder.jp/abc078/4a35302937c3cbc2f625156e7834d27f.png\">\n<p>Figure</p>\n</img>...</div>",
    "question": "We have a long seat of width $X$ centimeters.\r\nThere are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length $Y$ centimeters.\nWe would like to seat as many people as possible, but they are all very shy, and there must be a gap of length at least $Z$ centimeters between two people, and between the end of the seat and a person.\nAt most how many people can sit on the seat?\n\nConstraints\n\n- All input values are integers.\n- $1 \\leq X, Y, Z \\leq 10^5$\n- $Y+2Z \\leq X$\n\nInput\nInput is given from Standard Input in the following format:\n$X$ $Y$ $Z$\r\n\nOutput\nPrint the answer.\n\nSample Input 1\n13 3 1\r\n\nSample Output 1\n3\r\n\nThere is just enough room for three, as shown below:\n\n![image](1.png)\nFigure\n\nSample Input 2\n12 3 1\r\n\nSample Output 2\n2\r\n\nSample Input 3\n100000 1 1\r\n\nSample Output 3\n49999\r\n\nSample Input 4\n64146 123 456\r\n\nSample Output 4\n110\r\n\nSample Input 5\n64145 123 456\r\n\nSample Output 5\n109",
    "images": "\\[<base 64 image>\\]",
    "picture_num": 1,
    "image_tags": [
        "Demonstration"
    ],
    "data_split": "core_test"
}

The rendered problem will look like this:

We have a long seat of width $X$ centimeters.

There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length $Y$ centimeters.

We would like to seat as many people as possible, but they are all very shy, and there must be a gap of length at least $Z$ centimeters between two people, and between the end of the seat and a person.

At most how many people can sit on the seat?

Constraints

  • All input values are integers.
  • $1 \leq X, Y, Z \leq 10^5$
  • $Y+2Z \leq X$

Input

Input is given from Standard Input in the following format:

$X$ $Y$ $Z$

Output

Print the answer.

Sample Input 1

13 3 1

Sample Output 1

3

There is just enough room for three, as shown below:

image

Sample Input 2

12 3 1

Sample Output 2

2

Sample Input 3

100000 1 1

Sample Output 3

49999

Sample Input 4

64146 123 456

Sample Output 4

110

Sample Input 5

64145 123 456

Sample Output 5

109

Data Collection

We collected statements and images from 10 coding platforms. Web crawlers extracted problem details and images, which were then filtered and standardized for consistency. Images were converted to PNG and inserted to the text using markdown tags to maintain their position. We reused metadata from the TACO dataset when possible.

Automated filtering removed questions without images or with loading issues, ensuring only high-quality, relevant data was included. Human reviewers further refined the dataset by eliminating irrelevant images, such as teasers. The final step involved annotating images into specific categories based on their content.

Data Source and License

We are sincerely grateful for the following coding platforms, and the TACO dataset.

* The problem and metadata in MMCode is expanded from existing data in TACO, which is Apache 2.0.

Please contact us if there are data license issues.

Citation

Please cite our work if you find it useful:

@misc{li2024mmcode,
      title={MMCode: Evaluating Multi-Modal Code Large Language Models with Visually Rich Programming Problems}, 
      author={Kaixin Li and Yuchen Tian and Qisheng Hu and Ziyang Luo and Jing Ma},
      year={2024},
      eprint={2404.09486},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
Downloads last month
150