SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.14767 · 2024

DualFocus: Integrating Macro and Micro Perspectives in Multi-modal Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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, 2 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 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/2402.14767.json · badge: /api/ran/2402.14767.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
InternLM/InternLM-XComposer canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
HD_transform Ran
ran; our contract draft was wrong, not the code
InternLM/InternLM-XComposer/InternLM-XComposer-2.0/finetune/ixc_utils.py
code served (permissive licence) · get_code("6bf10298420acb23")
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 numpy as np
import torchvision.transforms as transforms
from PIL import Image

# Create a simple test image
def create_test_image():
    # Create a small PIL Image with distinct width and height
    # Using RGB mode with size 200x150 (width x height)
    img_array = np.ones((150, 200, 3), dtype=np.uint8) * 128
    img = Image.fromarray(img_array, mode='RGB')
    return img

# Test with a portrait-oriented image (width < height)
test_img_portrait = Image.new('RGB', (100, 200), color=(128, 128, 128))

# Test with a landscape-oriented image (width > height)
test_img_landscape = Image.new('RGB', (300, 150), color=(200, 100, 50))

ARGS = {
    'img': test_img_landscape,
    'hd_num': 16
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torchvision — 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
check_data Ran
ran, violated the contract we drafted
InternLM/InternLM-XComposer/InternLM-XComposer-2.5-Reward/training/finetune.py
code served (permissive licence) · get_code("b3350d09de4014cf")
How it ran

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

import torch

torch.manual_seed(0)

# Construct a valid sample for check_data
# The function expects sample[-1] to be a dict with a 'value' key
# The value should be a string that the function validates

# Create a sample that passes all checks
valid_response = "This is a valid response with normal length words separated by spaces"
sample = [
    {'value': 'some other message'},
    {'value': valid_response}
]

ARGS = {
    'sample': sample
}
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 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
conv2text Ran
ran; our contract draft was wrong, not the code
InternLM/InternLM-XComposer/InternLM-XComposer-1.0/finetune/data_mix.py
code served (permissive licence) · get_code("c5b8dbd3d9375ba7")
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)

# Construct valid arguments for conv2text function
sources = [
    {
        'from': 'human',
        'value': 'Hello, how are you?'
    },
    {
        'from': 'gpt',
        'value': 'I am doing well, thank you for asking!'
    },
    {
        'from': 'user',
        'value': 'What is your name?'
    },
    {
        'from': 'assistant',
        'value': 'My name is Bot.'
    }
]

ARGS = {
    'sources': sources
}
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
conv2text Ran
ran; our contract draft was wrong, not the code
InternLM/InternLM-XComposer/InternLM-XComposer-2.0/finetune/data_mix.py
code served (permissive licence) · get_code("b5741471e022d9ca")
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

# Define ARGS for conv2text function
ARGS = {
    'sources': [
        {
            'from': 'human',
            'value': 'Hello, how are you?'
        },
        {
            'from': 'assistant',
            'value': 'I am doing well, thank you for asking!'
        },
        {
            'from': 'user',
            'value': 'What is your name?'
        },
        {
            'from': 'bot',
            'value': 'My name is Assistant.'
        }
    ]
}
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
download_image Ran
ran, violated the contract we drafted
InternLM/InternLM-XComposer/InternLM-XComposer-1.0/demo_asset/download.py
code served (permissive licence) · get_code("c5c4e5fb5f7a294e")
How it ran

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

import urllib.request
import tempfile
import os

# Create a temporary directory for the path argument
temp_dir = tempfile.gettempdir()
temp_path = os.path.join(temp_dir, "test_image.jpg")

# Define arguments for download_image function
# url: a string representing a URL
# path: a string representing a file path
ARGS = {
    'url': '',  # Empty URL to test the first condition in the function
    'path': temp_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 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
padding_336 Ran
ran; our contract draft was wrong, not the code
InternLM/InternLM-XComposer/InternLM-XComposer-2.0/finetune/ixc_utils.py
code served (permissive licence) · get_code("b8cd050154e8b5e9")
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 numpy as np
import torchvision.transforms as transforms
from PIL import Image

# Create a small PIL Image object
# The function expects a PIL Image with .size attribute (width, height)
img = Image.new('RGB', (100, 200), color='white')

ARGS = {
    'b': img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torchvision — 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
post_process_code Ran
ran; our contract draft was wrong, not the code
InternLM/InternLM-XComposer/InternLM-XComposer-1.0/demo_asset/serve_utils.py
code served (permissive licence) · get_code("15e54d5d53ab90ac")
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

def post_process_code(code):
    sep = '\n```'
    if sep in code:
        blocks = code.split(sep)
        if len(blocks) % 2 == 1:
            for i in range(1, len(blocks), 2):
                blocks[i] = blocks[i].replace('\\_', '_')
        code = sep.join(blocks)
    return code

# Test case 1: code with markdown code blocks and escaped underscores
code_input_1 = "Some text\n```\nfoo\\_bar\n```\nmore text"

# Test case 2: code without code blocks
code_input_2 = "Just plain text with no code blocks"

# Test case 3: code with odd number of separator blocks and multiple escaped underscores
code_input_3 = "Start\n```\ntest\\_value\n```\nmiddle\n```\nanother\\_test\n```\nend"

ARGS = {
    'code': code_input_1
}
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
post_process_output Ran
ran; our contract draft was wrong, not the code
InternLM/InternLM-XComposer/InternLM-XComposer-1.0/demo_asset/serve_utils.py
code served (permissive licence) · get_code("607a861da4671ce5")
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 post_process_output(text):
    text = text.strip()
    pattern = re.compile('<unk>|<pad>|<s>|</s>|\\[PAD\\]|<\\|endoftext\\|>|\\[UNK\\]|\\[CLS\\]|\\[MASK\\]|<\\|startofpiece\\|>|<\\|endofpiece\\|>|\\[gMASK\\]|\\[sMASK\\]')
    text = pattern.sub('', text.strip()).strip()
    return text

ARGS = {
    "text": "  <unk> Hello [PAD] world </s>  "
}
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

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 3 later) and 5 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
post_process_code 5 other papers
3 dated earlier, 1 the same month, 1 later
2023.findings-emnlp.187 (2023 (year only))
UReader: Universal OCR-free Visually-situated Language Understanding with Multimodal Large Language Model
2310.05126 (2023-10)
UReader: Universal OCR-free Visually-situated Language Understanding with Multimodal Large Language Model
2312.06742 (2023-12)
Honeybee: Locality-enhanced Projector for Multimodal LLM
and 2 more not named here
post_process_output 5 other papers
3 dated earlier, 1 the same month, 1 later
2023.findings-emnlp.187 (2023 (year only))
UReader: Universal OCR-free Visually-situated Language Understanding with Multimodal Large Language Model
2310.05126 (2023-10)
UReader: Universal OCR-free Visually-situated Language Understanding with Multimodal Large Language Model
2312.06742 (2023-12)
Honeybee: Locality-enhanced Projector for Multimodal LLM
and 2 more not named here
conv2text 1 other paper
1 later
2501.13925 (2025-01)
GeoPixel: Pixel Grounding Large Multimodal Model in Remote Sensing

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

We present DualFocus, a novel framework for integrating macro and micro perspectives within multi-modal large language models (MLLMs) to enhance vision-language task performance. Current MLLMs typically singularly focus on inputs at a predefined resolution, resulting in deficiencies in detailed questions involving local regions. We introduced a DualFocus mechanism where the model concentrates on the image from a macro perspective, responses to the question, and identifies suitable sub-regions to zoom in for subsequent micro perspective analysis. Via the integration of answers from both macro and micro perspectives, the model is adept at addressing tasks that encompass global, detailed, and combined considerations. To endows the DualFocus mechanism in MLLMs, we curated a tailored dataset derived from the Visual Genome (VG) and adapted it to align with the training regimen of DualFocus. Through comparative studies across different model sizes and benchmarks, we demonstrate DualFocus's superiority in balancing detailed examination with holistic insight, significantly reducing hallucination instances in MLLMs and improving their performance in various vision-language tasks.

For agents

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

get_harvested_code_for_paper("2402.14767")
get_code_for_paper("2402.14767")
have("2402.14767")

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

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

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

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

Connect an agent — have() is free.