SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.00923 · 2023

Multimodal Chain-of-Thought Reasoning in Language Models

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 4 failures of our instrument; 2 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/2302.00923.json · badge: /api/ran/2302.00923.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/mm-cot canonical (classifier label)
classifier basis not recorded on the link
8 ran · 2 no recorded run
chengtan9907/mc-cot extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
bleu_score Ran
ran, honoured the contract we drafted
amazon-science/mm-cot/evaluations.py
code served (permissive licence) · get_code("ab795c060d39c540")
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 float, 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
from nltk.translate.bleu_score import sentence_bleu

def tokenize(text):
    tokens = re.split('\\s|\\.', text)
    tokens = [t for t in tokens if len(t) > 0]
    return tokens

def bleu_score(reference, hypothesis, gram):
    reference_tokens = tokenize(reference)
    hypothesis_tokens = tokenize(hypothesis)
    if gram == 1:
        bleu = sentence_bleu([reference_tokens], hypothesis_tokens, (1.0,))
    elif gram == 2:
        bleu = sentence_bleu([reference_tokens], hypothesis_tokens, (1.0 / 2.0, 1.0 / 2.0))
    elif gram == 3:
        bleu = sentence_bleu([reference_tokens], hypothesis_tokens, (1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0))
    elif gram == 4:
        bleu = sentence_bleu([reference_tokens], hypothesis_tokens, (1.0 / 4.0, 1.0 / 4.0, 1.0 / 4.0, 1.0 / 4.0))
    return bleu

ARGS = {
    "reference": "the cat sat on the mat",
    "hypothesis": "the cat is on the mat",
    "gram": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
caculate_bleu Ran
ran, honoured the contract we drafted
amazon-science/mm-cot/evaluations.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from weijingxuan/COCO-MMR, is pointer only (licence: NONE) · get_code("07349e17621c2b32")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from weijingxuan/COCO-MMR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_acc_with_contion Ran
ran on a synthesized input
amazon-science/mm-cot/utils_evaluate.py
code served (permissive licence) · get_code("cb95051c242a2b43")
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 pandas as pd

# Create a small sample DataFrame with the required columns
res_pd = pd.DataFrame({
    'category': ['A', 'B', 'A', 'C', 'B', 'A'],
    'true_false': [True, False, True, True, False, True]
})

ARGS = {
    'res_pd': res_pd,
    'key': 'category',
    'values': ['A', 'B']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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_choice_text Ran
ran; our contract draft was wrong, not the code
amazon-science/mm-cot/utils_prompt.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from thudm/moelora_riemannian, is pointer only (licence: NONE) · get_code("7a8dffc83d89cedd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from thudm/moelora_riemannian, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_context_text Ran
ran; our contract draft was wrong, not the code
amazon-science/mm-cot/utils_prompt.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from thudm/moelora_riemannian, is pointer only (licence: NONE) · get_code("85f084f6054a421e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from thudm/moelora_riemannian, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_question_text Ran
ran; our contract draft was wrong, not the code
amazon-science/mm-cot/utils_prompt.py
code served (permissive licence) · get_code("c86a79e229253816")
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) 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)

problem = {
    'question': 'What is the capital of France?'
}

ARGS = {
    'problem': problem
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
interleave_blocks Ran
ran on a synthesized input
amazon-science/mm-cot/timm/models/byobnet.py
code served (permissive licence) · get_code("8c7fc90b1bea0d98")
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 torch
import torch.nn as nn
from dataclasses import dataclass

torch.manual_seed(0)

ARGS = {
    "types": ("conv", "bottleneck"),
    "every": 2,
    "d": 5,
    "first": False,
    "c": 64,
    "s": 2,
    "gs": None,
    "br": 1.0,
    "attn_layer": None,
    "attn_kwargs": None,
    "self_attn_layer": None,
    "self_attn_kwargs": None,
    "block_kwargs": None,
}
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 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
load_data_std Ran
ran on a synthesized input
amazon-science/mm-cot/utils_data.py
code served (permissive licence) · get_code("68fb464d5cd3ca24")
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 os
import json
import tempfile
import shutil

# Create a temporary directory structure for the test data
temp_dir = tempfile.mkdtemp()
data_root = temp_dir

# Create the scienceqa subdirectory
scienceqa_dir = os.path.join(data_root, 'scienceqa')
os.makedirs(scienceqa_dir, exist_ok=True)

# Create problems.json
problems_data = {
    'q1': {'question': 'What is this?', 'answer': 'A'},
    'q2': {'question': 'What color?', 'answer': 'Blue'},
    'q3': {'question': 'How many?', 'answer': '5'},
}
with open(os.path.join(scienceqa_dir, 'problems.json'), 'w') as f:
    json.dump(problems_data, f)

# Create pid_splits.json
pid_splits_data = {
    'train': ['q1'],
    'val': ['q2'],
    'test': ['q3'],
}
with open(os.path.join(scienceqa_dir, 'pid_splits.json'), 'w') as f:
    json.dump(pid_splits_data, f)

# Create caption file
caption_file = os.path.join(data_root, 'captions.json')
captions_data = {
    'captions': {
        'q1': 'Caption for q1',
        'q2': 'Caption for q2',
        'q3': 'Caption for q3',
    }
}
with open(caption_file, 'w') as f:
    json.dump(captions_data, f)

# Create args object
class Args:
    def __init__(self):
        self.data_root = data_root
        self.caption_file = caption_file
        self.train_split = 'train'
        self.val_split = 'val'
        self.test_split = 'test'

ARGS = {
    'args': Args()
}
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, 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 Ran
ran; our contract draft was wrong, not the code
chengtan9907/mc-cot/evaluation.py
pointer only (licence: NONE) · get_code("e605721addd552ac")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chengtan9907/mc-cot when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_features Not yet run
unverified (harvested, no recorded run)
amazon-science/mm-cot/extract_features.py
code served (permissive licence) · get_code("2ca16095ff60ecfc")
How it ran

no invocation recorded.

load_data_img Not yet run
unverified (harvested, no recorded run)
amazon-science/mm-cot/utils_data.py
code served (permissive licence) · get_code("583632f48d48f596")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 6 later) and 4 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
get_choice_text 6 other papers
1 dated earlier, 5 later
2209.09513 (2022-09)
Learn to Explain: Multimodal Reasoning via Thought Chains for Science Question Answering
2307.12626 (2023-07)
Enhancing Human-like Multi-Modal Reasoning: A New Challenging Dataset and Comprehensive Framework
2402.08562 (2024-02)
Higher Layers Need More LoRA Experts
and 3 more not named here
get_context_text 6 other papers
1 dated earlier, 5 later
2209.09513 (2022-09)
Learn to Explain: Multimodal Reasoning via Thought Chains for Science Question Answering
2307.12626 (2023-07)
Enhancing Human-like Multi-Modal Reasoning: A New Challenging Dataset and Comprehensive Framework
2402.08562 (2024-02)
Higher Layers Need More LoRA Experts
and 3 more not named here
get_question_text 3 other papers
1 dated earlier, 2 later
2209.09513 (2022-09)
Learn to Explain: Multimodal Reasoning via Thought Chains for Science Question Answering
2307.12626 (2023-07)
Enhancing Human-like Multi-Modal Reasoning: A New Challenging Dataset and Comprehensive Framework
2405.05615 (2024-05)
Memory-Space Visual Prompting for Efficient Vision-Language Fine-Tuning
tokenize 3 other papers
3 later
2307.12626 (2023-07)
Enhancing Human-like Multi-Modal Reasoning: A New Challenging Dataset and Comprehensive Framework
2311.14109 (2023-11)
Boosting the Power of Small Multimodal Reasoning Models to Match Larger Models with Self-Consistency Training
2404.16789 (2024-04)
Continual Learning of Large Language Models: A Comprehensive Survey
bleu_score 2 other papers
2 later
2307.12626 (2023-07)
Enhancing Human-like Multi-Modal Reasoning: A New Challenging Dataset and Comprehensive Framework
2404.16789 (2024-04)
Continual Learning of Large Language Models: A Comprehensive Survey
caculate_bleu 1 other paper
1 later
2307.12626 (2023-07)
Enhancing Human-like Multi-Modal Reasoning: A New Challenging Dataset and Comprehensive Framework
interleave_blocks 1 other paper
1 same year, order not determinable
ijcai2023_0106 (2023 (year only))
SWAT: Spatial Structure Within and Among Tokens

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

Large language models (LLMs) have shown impressive performance on complex reasoning by leveraging chain-of-thought (CoT) prompting to generate intermediate reasoning chains as the rationale to infer the answer. However, existing CoT studies have primarily focused on the language modality. We propose Multimodal-CoT that incorporates language (text) and vision (images) modalities into a two-stage framework that separates rationale generation and answer inference. In this way, answer inference can leverage better generated rationales that are based on multimodal information. Experimental results on ScienceQA and A-OKVQA benchmark datasets show the effectiveness of our proposed approach. With Multimodal-CoT, our model under 1 billion parameters achieves state-of-the-art performance on the ScienceQA benchmark. Our analysis indicates that Multimodal-CoT offers the advantages of mitigating hallucination and enhancing convergence speed. Code is publicly available at https://github.com/amazon-science/mm-cot.

For agents

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

get_harvested_code_for_paper("2302.00923")
get_code_for_paper("2302.00923")
have("2302.00923")

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

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

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

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

Connect an agent — have() is free.