SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2504.07957 · ICCV · 2025

MM-IFEngine: Towards Multimodal Instruction Following

Xiaoyi Dong, Dahua Lin, Yuhang Cao, Jiaqi Wang, Xiangyu Zhao, Haodong Duan, Yuhang Zang, Pan Zhang, Shengyuan Ding, Shenxi Wu

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2504.07957.json · badge: /api/ran/2504.07957.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
SYuan03/MM-IFEngine canonical (classifier label)
classifier basis not recorded on the link
7 ran · 3 no recorded run
FunctionStatusWhere it lives
blend Ran
ran on a synthesized input
SYuan03/MM-IFEngine/data_gen/data_filter/gene_modified_multi.py
code served (permissive licence) · get_code("84c7395a12c7e1c6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family int, shape (4, 3, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from matplotlib import pyplot as plt

# Create a small original image (4x3 RGB)
ori_img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Create a small intensity/confidence map (4x3, normalized to [0, 1])
ic_img = np.random.rand(4, 3)

# Get a colormap
cm = plt.get_cmap('magma')

# Set alpha blending parameter
alpha = 0.8

ARGS = {
    'ori_img': ori_img,
    'ic_img': ic_img,
    'alpha': alpha,
    'cm': cm
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (4, 3, 3) — shape (4, 3, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_whether_response_paragraph_number_in_range Ran
ran on a synthesized input
SYuan03/MM-IFEngine/data_gen/utils/function_and_compare.py
code served (permissive licence) · get_code("251e207ef99662b8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def check_whether_response_paragraph_number_in_range(response: str, lower_bound: int, upper_bound: int) -> bool:

    def clean_text(text: str) -> str:
        return '\n'.join((line.strip() for line in text.splitlines())).strip()
    cleaned_response = clean_text(response)
    paragraphs = [p for p in re.split('\\n\\s*\\n', cleaned_response) if p.strip()]
    actual_count = len(paragraphs)
    return lower_bound <= actual_count <= upper_bound


ARGS = {
    "response": "This is the first paragraph.\n\nThis is the second paragraph.\n\nThis is the third paragraph.",
    "lower_bound": 2,
    "upper_bound": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_cmp_pt Ran
ran on a synthesized input
SYuan03/MM-IFEngine/eval_mmifeval/score_multi_constraint_mp_with_image_v11.py
code served (permissive licence) · get_code("2f44e0bdacb86a19")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# The function takes three string parameters
constraint = "Please respond in exactly 2 sentences."
pred_with_constraint = "This is the first sentence. This is the second sentence."
pred_without_constraint = "This is a longer response that goes on and on without any particular constraint on the length or number of sentences, making it quite different from the constrained version."

ARGS = {
    "constraint": constraint,
    "pred_with_constraint": pred_with_constraint,
    "pred_without_constraint": pred_without_constraint
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_eval_pt Ran
ran on a synthesized input
SYuan03/MM-IFEngine/eval_mmifeval/score_multi_constraint_mp_with_image_v11.py
code served (permissive licence) · get_code("bfc1d1359defdfd7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

constraints = [
    {"value": "The response must be concise and under 100 words."},
    {"value": "The response must include at least one example."},
    {"value": "The response must avoid using negative language."}
]

prediction = "This is a sample AI assistant response that demonstrates how to follow constraints. For example, when given instructions, a good assistant should be helpful and clear. The response should be well-structured and informative."

ARGS = {
    "constraints": constraints,
    "prediction": prediction
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_eval_pt_vision Ran
ran on a synthesized input
SYuan03/MM-IFEngine/eval_mmifeval/score_multi_constraint_mp_with_image_v11.py
code served (permissive licence) · get_code("835e1fc79e60473f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Construct arguments for generate_eval_pt_vision
question = "What objects are visible in this image?"
prediction = "The image contains a cat sitting on a table and a book next to it."
ground_truth = '["cat", "table", "book"]'

ARGS = {
    "question": question,
    "prediction": prediction,
    "ground_truth": ground_truth
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_logger Ran
ran on a synthesized input
SYuan03/MM-IFEngine/data_gen/utils/log.py
code served (permissive licence) · get_code("7886dadebf6b2bb6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Logger. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import logging
import os
import tempfile

# Create a temporary directory for log files
temp_dir = tempfile.mkdtemp()
log_file_path = os.path.join(temp_dir, "test.log")

ARGS = {
    "name": "test_logger",
    "log_file": log_file_path,
    "log_level": logging.INFO,
    "file_mode": "a",
    "max_bytes": 10 * 1024 * 1024,
    "backup_count": 5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_real_image_key Ran
ran on a synthesized input
SYuan03/MM-IFEngine/data_gen/utils/tools.py
code served (permissive licence) · get_code("ffcf3b57894527a4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Analyze the function: get_real_image_key(item)
# - Takes a single parameter 'item'
# - Calls item.get(key, None) for various string keys
# - Returns a key if found, or None
# - 'item' must be a dict-like object with a .get() method

# Create a test dictionary that has one of the expected keys
item = {
    'image': 'path/to/image.jpg',
    'other_field': 'some_value'
}

ARGS = {
    'item': item
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_whether_each_paragraph_sentence_number_in_range Not yet run
unverified (harvested, no recorded run)
SYuan03/MM-IFEngine/data_gen/utils/function_and_compare.py
code served (permissive licence) · get_code("ac88bbff6adddd64")
How it ran

no invocation recorded.

check_whether_response_sentence_number_in_range Not yet run
unverified (harvested, no recorded run)
SYuan03/MM-IFEngine/data_gen/utils/function_and_compare.py
code served (permissive licence) · get_code("df99d5fd8c7abf1f")
How it ran

no invocation recorded.

infer_one_image Not yet run
unverified (harvested, no recorded run)
SYuan03/MM-IFEngine/data_gen/data_filter/gene_modified_multi.py
code served (permissive licence) · get_code("b60d3d0a9aefac4a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

MM-IFEval-C (300 questions) MIA-Bench (About 1k constraints) 8 32 2.6 5.1 75.4 22.7 32 Categories of Constraints 400 high-quality samples 5.1 Average constraints 3 Evaluation metrics combined Instruction Imagine you are the musician in this image. Write about your thoughts and feelings while performing. R, e, a, d, i, n, a, f, u 1. Answer as if you are facing to the audience. 2. Use No more than 60 words…… * Equal contribution. Corresponding authors. sponses and perception-level constraints tied to the input images, and (2) a comprehensive evaluation pipeline incorporating both rule-based assessment and judge model. We conduct SFT and DPO experiments and demonstrate that fine-tuning MLLMs on MM-IFInstruct-23k and MM-IFDPO-23k achieves notable gains on various IF benchmarks, such as MM-IFEval (+10.2%), MIA (+7.6%), and IFEval (+12.3%). We have fully open-sourced the datasets (both SFT and DPO), evaluation code and training scripts at https://github.com/SYuan03/MM-IFEngine.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2504.07957")
get_code_for_paper("2504.07957")
have("2504.07957")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2504.07957.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2504.07957.svg)](https://syntology.ai/paper/2504.07957)

Connect an agent — have() is free.