SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.14697 · 2026

ClinHallu: A Benchmark for Diagnosing Stage-wise Hallucinations in Medical MLLM Reasoning

Fan Wang, Wenjun Zhang, Yichen Qian, Hangjie Yuan, Lei Zhu, Weihua Chen, Jinwang Wang, Sicheng Yang

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 5 no recorded run), measured 2026-11-22; 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/2606.14697.json · badge: /api/ran/2606.14697.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
alibaba-damo-academy/ClinHallu community
Papers with Code archive
9 ran · 5 no recorded run
FunctionStatusWhere it lives
_build_support_context Ran
ran; our contract draft was wrong, not the code
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("eca71000d484ee72")
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 typing import Any, Dict, List, Optional, Sequence, Tuple

torch.manual_seed(0)

# Construct reference_sample with nested structure for gold_cot
reference_sample = {
    'gold_cot': {
        'visual_recognition': {
            'text': 'The image shows a red ball and a blue cube.'
        },
        'knowledge_recall': {
            'text': 'Balls are spherical objects that roll.'
        }
    },
    'other_field': 'some_value'
}

# Construct candidate_sample with nested structure for cot
candidate_sample = {
    'cot': {
        'visual_recognition': {
            'text': 'I see a red spherical object and a blue rectangular prism.'
        },
        'knowledge_recall': {
            'text': 'Spheres have uniform curvature and can roll.'
        }
    },
    'score': 0.85
}

ARGS = {
    'reference_sample': reference_sample,
    'candidate_sample': candidate_sample
}
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
_require_sample_identifier Ran
ran; our contract draft was wrong, not the code
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("0a141672c647d9c3")
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

# Test case 1: Sample with source_id
sample_with_source_id = {
    'source_id': 'doc_001',
    'question': 'What is this?'
}

# Test case 2: Sample with original_index
sample_with_original_index = {
    'original_index': 42,
    'question': 'Another question'
}

# Test case 3: Sample with both (source_id takes precedence)
sample_with_both = {
    'source_id': 'doc_002',
    'original_index': 99,
    'question': 'Yet another question'
}

# We'll use the first sample as the primary test case
ARGS = {
    'sample': sample_with_source_id
}
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
encode_image_to_base64 Ran
ran; our contract draft was wrong, not the code
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("c185866bf4d59925")
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 logging
import tempfile
import os
import base64

logger = logging.getLogger(__name__)

# Create a temporary image file for testing
temp_dir = tempfile.gettempdir()
test_image_path = os.path.join(temp_dir, 'test_image.png')

# Write some minimal binary data to simulate an image file
with open(test_image_path, 'wb') as f:
    f.write(b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01')

ARGS = {
    'image_path': test_image_path
}
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_step_text Ran
ran; our contract draft was wrong, not the code
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("a6c01b940da026ae")
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
from typing import Any, Dict, List, Optional, Sequence, Tuple

torch.manual_seed(0)

# Construct cot_data - a dict with step information
cot_data = {
    'step_1': {
        'text': 'This is the first reasoning step',
        'confidence': 0.95
    },
    'step_2': {
        'text': 'This is the second reasoning step',
        'confidence': 0.87
    },
    'step_3': 'not a dict',
    'step_4': {
        'other_field': 'value'
    }
}

# Construct step_name - a string identifying which step to extract
step_name = 'step_1'

ARGS = {
    'cot_data': cot_data,
    'step_name': step_name
}
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_mime_type Ran
ran; our contract draft was wrong, not the code
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("b2c16a5f2122cca0")
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.

from pathlib import Path

ARGS = {
    'image_path': '/path/to/image.png'
}
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
get_sample_identifier Ran
ran; our contract draft was wrong, not the code
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("8bfbd959ea60340b")
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 typing import Any, Dict, List, Optional

torch.manual_seed(0)

# Create a sample dictionary with source_id
sample_with_source_id = {
    'source_id': 'test_source_123',
    'original_index': 0
}

# Create another sample with original_index but no source_id
sample_with_original_index = {
    'original_index': 42
}

# Create a sample with neither source_id nor original_index
sample_empty = {}

# Create a sample with whitespace-only source_id (should be filtered)
sample_whitespace = {
    'source_id': '   ',
    'original_index': 99
}

# Use the first sample as the primary test case
ARGS = {
    'sample': sample_with_source_id
}
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_completed_sample_ids Ran
ran; our contract draft was wrong, not the code
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("f3a587e854490557")
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 set. 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 json
from pathlib import Path

# Create a temporary output file with some sample data
temp_dir = tempfile.mkdtemp()
output_file = Path(temp_dir) / "output.jsonl"

# Write some sample JSONL data with source_id and original_index
samples = [
    {"source_id": "src_001", "data": "sample1"},
    {"source_id": "src_002", "data": "sample2"},
    {"original_index": 42, "data": "sample3"},
    {"source_id": "src_003", "original_index": 100, "data": "sample4"},
    {"data": "sample_no_id"},  # This one has no source_id or original_index
]

with open(output_file, 'w', encoding='utf-8') as f:
    for sample in samples:
        f.write(json.dumps(sample) + '\n')

ARGS = {
    'output_file': str(output_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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
parse_step_hallucination_response Ran
ran; our contract draft was wrong, not the code
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("87b805dfff9a1a07")
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 logging

logging.basicConfig(level=logging.WARNING)

ARGS = {
    'raw_response': '''```json
{
  "hallucinated": 0,
  "reason": "The step is logically consistent with the problem statement"
}
'''
}
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
resolve_image_paths Ran
ran; our contract draft was wrong, not the code
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("6ffe207afa711e13")
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 logging
import os
import tempfile
from typing import Any, Dict, List, Optional

logging.basicConfig(level=logging.WARNING)

# Create a temporary directory with some test image files
temp_dir = tempfile.mkdtemp()
test_image_1 = os.path.join(temp_dir, "image1.jpg")
test_image_2 = os.path.join(temp_dir, "image2.png")
with open(test_image_1, 'w') as f:
    f.write("fake image data")
with open(test_image_2, 'w') as f:
    f.write("fake image data")

# Test case 1: Sample with 'images' list containing strings
sample_1 = {
    'images': ['image1.jpg', 'image2.png']
}

# Test case 2: Sample with 'images' list containing dicts with image_path
sample_2 = {
    'images': [
        {'image_path': 'image1.jpg'},
        {'path': 'image2.png'}
    ]
}

# Test case 3: Sample with single 'image' field
sample_3 = {
    'image': 'image1.jpg'
}

# Test case 4: Sample with 'image_path' field
sample_4 = {
    'image_path': 'image2.png'
}

# Test case 5: Sample with 'img_name' field
sample_5 = {
    'img_name': 'image1.jpg'
}

# Test case 6: Sample with 'image_name' field
sample_6 = {
    'image_name': 'image2.png'
}

# Test case 7: Sample with no images (empty)
sample_7 = {}

# Test case 8: None for image_dir
sample_8 = {
    'images': ['image1.jpg']
}

ARGS = {
    'sample': sample_1,
    'image_dir': temp_dir
}
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
CoTAPIWrapper Not yet run
unverified (harvested, no recorded run)
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("e2603e183dceec30")
How it ran

no invocation recorded.

_build_step_result Not yet run
unverified (harvested, no recorded run)
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("90027ad7ab6b9b1c")
How it ran

no invocation recorded.

judge_single_sample Not yet run
unverified (harvested, no recorded run)
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("6a690693a1f5d9e6")
How it ran

no invocation recorded.

judge_step_hallucination Not yet run
unverified (harvested, no recorded run)
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("8118726b9397dbbe")
How it ran

no invocation recorded.

process_step_judge_batch Not yet run
unverified (harvested, no recorded run)
alibaba-damo-academy/ClinHallu/src/model_evaluation/04_judge_step_hallucination.py
code served (permissive licence) · get_code("3d82d3482bca30db")
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, 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 14 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-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

Building trustworthy medical multimodal large language models (MLLMs) is critical for reliable clinical decision support. Existing medical hallucination benchmarks mainly focus on data collection, but often ignore where hallucinations originate within the reasoning process. We find that hallucination sources vary across samples: errors may arise from visual misrecognition, incorrect medical knowledge recall, or flawed reasoning integration. To enable source-level hallucination diagnosis, we introduce ClinHallu, a benchmark for stage-wise hallucination diagnosis in medical MLLM reasoning. ClinHallu contains 7,031 validated instances, where each instance is augmented with a structured reasoning trace decomposed into Visual Recognition, Knowledge Recall, and Reasoning Integration. We also use stagereplacement interventions to measure how correcting specific stages affects the final answer. Beyond evaluation, we show that trace-supervised fine-tuning reduces stage-wise hallucinations. ClinHallu provides a fine-grained hallucination testbed for diagnosing and mitigating reasoning failures in medical MLLMs. The benchmark is publicly available at https://github.com/alibaba-damo-academy/ClinHallu.

For agents

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

get_harvested_code_for_paper("2606.14697")
get_code_for_paper("2606.14697")
have("2606.14697")

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

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

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

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

Connect an agent — have() is free.