SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.03194 · NAACL · 2024

MAGID: An Automated Pipeline for Generating Synthetic Multi-modal Datasets

Hang Su, Nikolaos Pappas, Hossein Aboutalebi, Hwanjun Song, Yusheng Xie, Saab Mansour, Arshit Gupta, Siffi Singh, Igor Shalyminov, Justin Sun

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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 0 have no contract verdict; 11 failures of our instrument; 2 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/2403.03194.json · badge: /api/ran/2403.03194.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
amazon-science/MAGID canonical (classifier label)
classifier basis: census
11 ran · 2 no recorded run
FunctionStatusWhere it lives
add_image_border Ran
ran; our contract draft was wrong, not the code
amazon-science/MAGID/src/multimodal_dataset/graphics/chat_vis.py
code served (permissive licence) · get_code("370ffa9124b58516")
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.

from PIL import Image
import numpy as np

# Create a small test image
image_array = np.random.randint(0, 256, (10, 8, 3), dtype=np.uint8)
input_image = Image.fromarray(image_array, mode='RGB')

# Define border and color parameters
border = 5
color = (128, 128, 128)

ARGS = {
    'input_image': input_image,
    'border': border,
    'color': color
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — 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
evaluate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
amazon-science/MAGID/src/tools.py
code served (permissive licence) · get_code("c382afdeac958e47")
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 numpy as np

# Generate synthetic binary classification labels
np.random.seed(0)

# Create target labels (ground truth)
target_label = np.array([0, 1, 1, 0, 1, 0, 1, 1, 0, 0])

# Create model predictions
model_label = np.array([0, 1, 0, 0, 1, 0, 1, 0, 0, 1])

ARGS = {
    'target_label': target_label,
    'model_label': model_label
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
evaluate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
amazon-science/MAGID/src/multimodal_dataset/tools.py
code served (permissive licence) · get_code("021bd99e595c6897")
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
from sklearn.metrics import recall_score, precision_score, accuracy_score, confusion_matrix, f1_score

torch.manual_seed(0)

# Create target labels and model predictions
# These should be 1D arrays of class labels (binary classification example)
target_label = np.array([0, 1, 0, 1, 1, 0, 1, 0])
model_label = np.array([0, 1, 0, 0, 1, 0, 1, 1])

ARGS = {
    'target_label': target_label,
    'model_label': model_label
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, 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_prompts Ran
ran; our contract draft was wrong, not the code
amazon-science/MAGID/src/multimodal_dataset/datasets/MMDialog/tools.py
code served (permissive licence) · get_code("6ac2145bebd8c2f5")
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 2, 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 re

def get_prompts(answer):
    assert type(answer) == str
    prompts = []
    if '<result>' not in answer:
        return ''
    filtered_answer = re.findall('<result>(.*?)</result>', answer, re.DOTALL)[0]
    for i, element in enumerate(filtered_answer.split('\n')):
        if len(element) <= 4 or re.search('\\d+', element) is None:
            continue
        index = re.search('\\d+', element).group()
        prompts.append([index, element[element.index(':') + 1:]])
    return prompts


# Setup valid arguments
answer_with_result = '<result>\n1: sample prompt text\n2: another prompt here\n12: third prompt\n</result>'

ARGS = {
    'answer': answer_with_result
}
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 2, 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
lighten_color Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
amazon-science/MAGID/src/multimodal_dataset/graphics/chat_vis.py
code served (permissive licence) · get_code("6ab6eeb90e811295")
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 int; 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 torch

ARGS = {
    "color": (100, 150, 200),
    "ratio": 1.6
}
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 tuple, ndim 1, dtype family int — 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
prepare_content Ran
ran; our contract draft was wrong, not the code
amazon-science/MAGID/src/multimodal_dataset/datasets/MMDialog/tools.py
code served (permissive licence) · get_code("cfea196b35b44235")
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. 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

def remove_emoji(text):
    return re.sub(':.*?:', '', text)

def prepare_content(chat):
    assert type(chat) == list and len(chat) > 0
    content = ''
    content2 = []
    for i, element in enumerate(chat):
        temp_content = ''
        for utternece in element['turn']:
            if '__TEXT__' in utternece:
                temp_content += remove_emoji(utternece['__TEXT__']) + ' '
        if i == len(chat) - 1:
            content += 'Utterance: ' + str(i) + ': ' + temp_content.strip()
        else:
            content += 'Utterance: ' + str(i) + ': ' + temp_content.strip() + ' \n '
        content2.append(temp_content.strip())
    return (content, content2)


# Construct a valid chat argument
chat = [
    {
        'turn': [
            {'__TEXT__': 'Hello :smile: world'},
            {'__TEXT__': 'How are :you: you?'},
            {'other_key': 'ignored'}
        ]
    },
    {
        'turn': [
            {'__TEXT__': 'I am :fine: fine'},
            {'__TEXT__': 'Thanks :thanks: for asking'}
        ]
    }
]

ARGS = {
    'chat': chat
}
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 tuple — a tuple output has no array shape of its own; none is 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
prepare_content_DialyDialog Ran
ran; our contract draft was wrong, not the code
amazon-science/MAGID/src/multimodal_dataset/datasets/DailyDialog/tools.py
code served (permissive licence) · get_code("a10d8df414b8f84b")
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. 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

def prepare_content_DialyDialog(chat):
    assert type(chat) == list and len(chat) > 0
    content = ''
    for i, element in enumerate(chat):
        if i == len(chat) - 1:
            content += 'Utterance: ' + str(i) + ': ' + element
        else:
            content += 'Utterance: ' + str(i) + ': ' + element + ' \n '
    return (content, chat)

# Construct valid arguments
ARGS = {
    'chat': [
        'Hello, how are you?',
        'I am doing well, thanks for asking.',
        'That is great to hear!'
    ]
}
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 tuple — a tuple output has no array shape of its own; none is 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
prepare_content_MMDD Ran
ran; our contract draft was wrong, not the code
amazon-science/MAGID/src/multimodal_dataset/datasets/MMDD/tools.py
code served (permissive licence) · get_code("cf47f8fcc346c0ee")
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. 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:
# - Takes 'chat' parameter which must be a list with len > 0
# - Each element is converted to string and concatenated
# - Returns tuple of (content string, chat list)

# Create a valid chat list - list of strings or string-convertible elements
chat = [
    "Hello, how are you?",
    "I'm doing well, thanks for asking",
    "That's great to hear!"
]

ARGS = {
    "chat": chat
}
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 tuple — a tuple output has no array shape of its own; none is 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
remove_emoji Ran
ran; our contract draft was wrong, not the code
amazon-science/MAGID/src/multimodal_dataset/datasets/MMDialog/tools.py
code served (permissive licence) · get_code("4adaf57c7ec195f8")
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

def remove_emoji(text):
    return re.sub(':.*?:', '', text)

ARGS = {
    'text': 'Hello :smile: world :heart: test'
}
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
truncate_text Ran
ran; our contract draft was wrong, not the code
amazon-science/MAGID/src/tools.py
code served (permissive licence) · get_code("e050e890812a53b4")
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 torch
import numpy as np

# Analyze the function:
# - list_text: a list of strings
# - max_tokens: an integer (default 75)
# The function splits each text by whitespace and truncates if needed

# Create test data
list_text = [
    "The quick brown fox jumps over the lazy dog and continues with more words to exceed the token limit threshold",
    "Short text here"
]

ARGS = {
    "list_text": list_text,
    "max_tokens": 10
}
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 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
wrap_text Ran
ran; our contract draft was wrong, not the code
amazon-science/MAGID/src/multimodal_dataset/graphics/chat_vis.py
code served (permissive licence) · get_code("a375d23d939133a9")
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.

class MockFont:
    def getsize(self, text):
        # Return a tuple (width, height) based on text length
        # Approximate: 10 pixels per character
        return (len(text) * 10, 20)

text = "Hello world this is a test"
font = MockFont()
max_width = 100

ARGS = {
    "text": text,
    "font": font,
    "max_width": max_width
}
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_prompts Not yet run
unverified (harvested, no recorded run)
amazon-science/MAGID/src/multimodal_dataset/datasets/MMDD/tools.py
code served (permissive licence) · get_code("50c4dee73b4909b4")
How it ran

no invocation recorded.

set_seed Not yet run
unverified (harvested, no recorded run)
amazon-science/MAGID/src/tools.py
code served (permissive licence) · get_code("b3acc0c403d224d3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 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 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.

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

Development of multimodal interactive systems is hindered by the lack of rich, multimodal (text, images) conversational data, which is needed in large quantities for LLMs. Previous approaches augment textual dialogues with retrieved images, posing privacy, diversity, and quality constraints. In this work, we introduce Multimodal Augmented Generative Images Dialogues (MAGID), a framework to augment text-only dialogues with diverse and high-quality images 1 . Subsequently, a diffusion model is applied to craft corresponding images, ensuring alignment with the identified text. Finally, MAGID incorporates an innovative feedback loop between an image description generation module (textual LLM) and image quality modules (addressing aesthetics, image-text matching, and safety), that work in tandem to generate high-quality and multi-modal dialogues. We compare MAGID to other SOTA baselines on three dialogue datasets, using automated and human evaluation. Our results show that MAGID is comparable to or better than baselines, with significant improvements in human evaluation, especially against retrieval baselines where the image database is small. You left your Halloween costume at my place Hey, did I leave anything at your house? I was worried it was lost forever. LLM-based Scanner Diffusion-based Image Generator Quality Assurance Module Selected Image of a 6-foot tall pink men's bunny outfit.

For agents

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

get_harvested_code_for_paper("2403.03194")
get_code_for_paper("2403.03194")
have("2403.03194")

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

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

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

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

Connect an agent — have() is free.