SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.04842 · 2024

MJ-Bench: Is Your Multimodal Reward Model Really a Good Judge for Text-to-Image Generation?

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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; 3 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 7 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2407.04842.json · badge: /api/ran/2407.04842.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
MJ-Bench/MJ-Bench canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
check_demographic_group Ran
ran, violated the contract we drafted
MJ-Bench/MJ-Bench/finetune_datasets/bias_dataset_select.py
code served (permissive licence) · get_code("ec77e2763d61573c")
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.

# Define ARGS dictionary with valid test inputs for check_demographic_group

ARGS = {
    "caption": "The young female doctor is a talented professional."
}
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
extract_first_number Ran
ran; our contract draft was wrong, not the code
MJ-Bench/MJ-Bench/evaluate_bias_avg.py
code served (permissive licence) · get_code("52cb1c4da16603c7")
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 re

number_map = {'zero': '0', 'one': '1', 'two': '2', 'three': '3', 'four': '4', 'five': '5', 'six': '6', 'seven': '7', 'eight': '8', 'nine': '9', 'ten': '10'}

def extract_first_number(text):
    text = text.lower()
    match = re.search('\\d+', text)
    if match:
        return match.group()
    words = text.split()
    for word in words:
        if word in number_map:
            return number_map[word]
    return 'not extracted'

ARGS = {
    'text': 'The answer is forty-two or five'
}
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 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
extract_narrative_score Ran
ran, honoured the contract we drafted
MJ-Bench/MJ-Bench/evaluate_bias_avg.py
code served (permissive licence) · get_code("bf0c454d7dfe9150")
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 int, ndim 0, dtype family int, 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 torch

torch.manual_seed(0)

# The function takes a single parameter: text (a string)
# It checks for various keywords in the text and returns a score or 'not extracted'

text_example = "This performance was Outstanding and extremely well done."

ARGS = {
    "text": text_example
}
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 int, ndim 0, dtype family int, 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
get_dirs Ran
ran; our contract draft was wrong, not the code
MJ-Bench/MJ-Bench/bias/get_finetune_prompt.py
code served (permissive licence) · get_code("8957ed6aa5f44109")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_base = tempfile.mkdtemp()

# Create some subdirectories with files
os.makedirs(os.path.join(temp_base, "subdir1", "nested1"), exist_ok=True)
os.makedirs(os.path.join(temp_base, "subdir2", "nested2"), exist_ok=True)
os.makedirs(os.path.join(temp_base, "subdir3"), exist_ok=True)

# Add some files to leaf directories
with open(os.path.join(temp_base, "subdir1", "nested1", "file.txt"), "w") as f:
    f.write("test")
with open(os.path.join(temp_base, "subdir2", "nested2", "file.txt"), "w") as f:
    f.write("test")
with open(os.path.join(temp_base, "subdir3", "file.txt"), "w") as f:
    f.write("test")

ARGS = {
    "path": temp_base
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
get_label Ran
ran; our contract draft was wrong, not the code
MJ-Bench/MJ-Bench/experimental/ddpo_finetune_with_vlm.py
code served (permissive licence) · get_code("113f20f07f1ceea2")
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)

example = {
    'label_0': 0.5
}

ARGS = {
    'example': example
}
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
get_pred Ran
ran; our contract draft was wrong, not the code
MJ-Bench/MJ-Bench/experimental/ddpo_finetune_with_vlm.py
code served (permissive licence) · get_code("17ad7536db5b4682")
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)

# Analyze the function: get_pred takes three parameters
# - prob_0: a probability value (float)
# - prob_1: a probability value (float)
# - threshold: a threshold value (float)
# The function compares these values and returns a string prediction

ARGS = {
    'prob_0': 0.3,
    'prob_1': 0.7,
    'threshold': 0.1
}
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
load_json_dataset Ran
ran; our contract draft was wrong, not the code
MJ-Bench/MJ-Bench/inference.py
code served (permissive licence) · get_code("cc893884872e9eda")
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 dict. 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 json
import tempfile
import os

# Create a temporary JSON file with sample data
temp_dir = tempfile.mkdtemp()
json_file = os.path.join(temp_dir, "sample_dataset.json")

sample_data = {
    "samples": [
        {"id": 1, "text": "hello", "label": 0},
        {"id": 2, "text": "world", "label": 1}
    ],
    "metadata": {"version": "1.0"}
}

with open(json_file, 'w') as f:
    json.dump(sample_data, f)

ARGS = {
    "path": json_file
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
load_prompt_template Ran
ran; our contract draft was wrong, not the code
MJ-Bench/MJ-Bench/inference.py
code served (permissive licence) · get_code("4fb4a653fefe74ee")
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 tempfile
import os

# Create a temporary directory and file for the prompt template
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "prompt_template.txt")

# Write a sample prompt template to the file
with open(temp_file, 'w') as f:
    f.write("Hello, this is a prompt template.\nYou can use {variable} placeholders here.")

ARGS = {
    "path": temp_file
}
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 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
open_image Ran
ran, honoured the contract we drafted
MJ-Bench/MJ-Bench/experimental/ddpo_finetune_with_vlm.py
code served (permissive licence) · get_code("cb76eb23e440636a")
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 Image. 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
from PIL import Image
from io import BytesIO

# Create a small test image as bytes
test_image = Image.new('RGBA', (4, 3), color=(255, 0, 0, 255))
image_bytes = BytesIO()
test_image.save(image_bytes, format='PNG')
image_bytes.seek(0)
image_bytes_data = image_bytes.getvalue()

ARGS = {
    'image': image_bytes_data,
    'image_path': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
prompt_fn Ran
ran; our contract draft was wrong, not the code
MJ-Bench/MJ-Bench/experimental/ddpo_finetune.py
code served (permissive licence) · get_code("54ca6c2611c3c399")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

# The function takes 'prompts' as a parameter
# It calls np.random.choice(prompts), so prompts should be a sequence/array
# that can be passed to np.random.choice

prompts = [
    "What is the capital of France?",
    "How does photosynthesis work?",
    "Explain quantum computing",
    "What is machine learning?"
]

ARGS = {
    "prompts": prompts
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
tokenize_captions Ran
ran, honoured the contract we drafted
MJ-Bench/MJ-Bench/experimental/dpo_finetune.py
code served (permissive licence) · get_code("eb28e9ec2502d447")
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 Tensor, ndim 2, dtype family int, shape (2, 8) 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockTokenizer:
    def __init__(self):
        self.model_max_length = 8
    
    def __call__(self, captions, truncation=True, padding='max_length', max_length=8, return_tensors='pt'):
        batch_size = len(captions)
        # Return a mock tokenized output with input_ids
        input_ids = torch.randint(0, 1000, (batch_size, max_length))
        
        class TokenizerOutput:
            def __init__(self, ids):
                self.input_ids = ids
        
        return TokenizerOutput(input_ids)

tokenizer = MockTokenizer()

examples = {
    'caption': [
        'a cat sitting on a mat',
        'a dog playing in the park'
    ]
}

ARGS = {
    'tokenizer': tokenizer,
    'examples': examples
}
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 Tensor, ndim 2, dtype family int, shape (2, 8) — shape (2, 8) 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
fit_gaussian_and_report_properties Not yet run
unverified (harvested, no recorded run)
MJ-Bench/MJ-Bench/evaluate_bias_type.py
code served (permissive licence) · get_code("1b1556b0ebaba73c")
How it ran

no invocation recorded.

import_model_class_from_model_name_or_path Not yet run
unverified (harvested, no recorded run)
MJ-Bench/MJ-Bench/experimental/dpo_finetune.py
code served (permissive licence) · get_code("1f631e56c6e042ac")
How it ran

no invocation recorded.

parse_args Not yet run
unverified (harvested, no recorded run)
MJ-Bench/MJ-Bench/experimental/dpo_finetune.py
code served (permissive licence) · get_code("38e20568bab6256d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 13 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.

FunctionAlso present inEarliest-datedOthers named
import_model_class_from_model_name_or_path 3 other papers
1 dated earlier, 1 later, 1 same year, order not determinable
01705 (2024 (year only))
Pixel-Aware Stable Diffusion for Realistic Image Super-Resolution and Personalized Stylization
2402.11929 (2024-02)
DiLightNet: Fine-grained Lighting Control for Diffusion-based Image Generation
2408.06070 (2024-08)
ControlNeXt: Powerful and Efficient Control for Image and Video Generation

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-22.

Repositories linked to this paper

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

Abstract

While text-to-image models like DALLE-3 and Stable Diffusion are rapidly proliferating, they often encounter challenges such as hallucination, bias, and the production of unsafe, low-quality output. To effectively address these issues, it is crucial to align these models with desired behaviors based on feedback from a multimodal judge. Despite their significance, current multimodal judges frequently undergo inadequate evaluation of their capabilities and limitations, potentially leading to misalignment and unsafe fine-tuning outcomes. To address this issue, we introduce MJ-Bench, a novel benchmark which incorporates a comprehensive preference dataset to evaluate multimodal judges in providing feedback for image generation models across four key perspectives: alignment, safety, image quality, and bias. Specifically, we evaluate a large variety of multimodal judges including smaller-sized CLIP-based scoring models, open-source VLMs (e.g. LLaVA family), and close-source VLMs (e.g. GPT-4o, Claude 3) on each decomposed subcategory of our preference dataset. Experiments reveal that close-source VLMs generally provide better feedback, with GPT-4o outperforming other judges in average. Compared with open-source VLMs, smaller-sized scoring models can provide better feedback regarding text-image alignment and image quality, while VLMs provide more accurate feedback regarding safety and generation bias due to their stronger reasoning capabilities. Further studies in feedback scale reveal that VLM judges can generally provide more accurate and stable feedback in natural language (Likert-scale) than numerical scales. Notably, human evaluations on end-to-end fine-tuned models using separate feedback from these multimodal judges provide similar conclusions, further confirming the effectiveness of MJ-Bench. All data, code, models are available at https://huggingface.co/MJ-Bench.

For agents

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

get_harvested_code_for_paper("2407.04842")
get_code_for_paper("2407.04842")
have("2407.04842")

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

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

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

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

Connect an agent — have() is free.