SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.02969 · CVPR · 2024

Multi-modal Instruction Tuned LLMs with Fine-grained Visual Perception

Yifan Wang, Jun-Yan He, Xuansong Xie, Huchuan Lu, Jin-Peng Lan, Lijun Wang, Junwen He

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 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 0 have no contract verdict; 2 failures of our instrument; 3 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.02969.json · badge: /api/ran/2403.02969.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
jwh97nn/AnyRef canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
dice_loss Ran
ran; our contract draft was wrong, not the code
jwh97nn/AnyRef/model/anyref.py
code served (permissive licence) · get_code("a47ff1b448a12bae")
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 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)

# Create small tensor arguments
# inputs: predictions, shape (batch=2, height=4, width=3)
# After flattening(1,2) becomes (2, 12)
inputs = torch.randn(2, 4, 3, dtype=torch.float32)

# targets: binary labels, same shape as inputs
targets = torch.randint(0, 2, (2, 4, 3), dtype=torch.float32)

# num_masks: number of masks for normalization
num_masks = 2.0

# scale: hyperparameter (not used in the function body but is a parameter)
scale = 1000

# eps: epsilon value (not used in the function body but is a parameter)
eps = 1e-06

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_masks": num_masks,
    "scale": scale,
    "eps": eps
}
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 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
get_clip_timepoints Ran
ran, honoured the contract we drafted
jwh97nn/AnyRef/model/ImageBind/data.py
code served (permissive licence) · get_code("432c312da80537d6")
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 torch
import numpy as np

# Stand-in clip sampler class that mimics the behavior of a clip sampler
class MockClipSampler:
    def __init__(self, num_clips=3):
        self.num_clips = num_clips
        self.call_count = 0
    
    def __call__(self, end, duration, annotation=None):
        # Returns (start, end, _, _, is_last_clip)
        # The function calls this repeatedly until is_last_clip is True
        clip_duration = duration / self.num_clips
        start = self.call_count * clip_duration
        end = start + clip_duration
        is_last_clip = (self.call_count == self.num_clips - 1)
        
        self.call_count += 1
        
        # Return 5 values: start, end, and three underscores (unused)
        return start, end, None, None, is_last_clip

# Create the clip sampler
clip_sampler = MockClipSampler(num_clips=3)

# Duration in seconds
duration = 10.0

ARGS = {
    "clip_sampler": clip_sampler,
    "duration": duration
}
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 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
load_and_transform_vision_data Ran
ran, honoured the contract we drafted
jwh97nn/AnyRef/model/ImageBind/data.py
code served (permissive licence) · get_code("e1e69d9ba9ffcb24")
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 4, 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
from PIL import Image
import io

# Create a small dummy image in memory
def create_dummy_image():
    img = Image.new('RGB', (224, 224), color=(73, 109, 137))
    img_bytes = io.BytesIO()
    img.save(img_bytes, format='PNG')
    img_bytes.seek(0)
    return img_bytes.getvalue()

# Create temporary image files (in-memory approach)
import tempfile
import os

# Create a temporary directory and files
temp_dir = tempfile.mkdtemp()
image_paths = []

for i in range(2):
    img_path = os.path.join(temp_dir, f"test_image_{i}.png")
    img = Image.new('RGB', (256, 256), color=(73 + i*10, 109 + i*10, 137 + i*10))
    img.save(img_path)
    image_paths.append(img_path)

device = 'cpu'

ARGS = {
    'image_paths': image_paths,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:ValueError)
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
sigmoid_ce_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
jwh97nn/AnyRef/model/anyref.py
code served (permissive licence) · get_code("a9292f5d89194794")
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 Tensor, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for inputs and targets
# inputs: predictions (logits) - arbitrary shape, will be flattened in loss computation
# targets: binary labels (0 or 1) - same shape as inputs
batch_size = 2
height = 4
width = 3

inputs = torch.randn(batch_size, height, width, dtype=torch.float32)
targets = torch.randint(0, 2, (batch_size, height, width), dtype=torch.float32)

# num_masks: a float representing the number of masks
num_masks = 2.0

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_masks": num_masks,
}
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 Tensor, 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
build_sam_vit_b Not yet run
unverified (harvested, no recorded run)
jwh97nn/AnyRef/model/segment_anything/build_sam.py
code served (permissive licence) · get_code("3f50fb8374909f5f")
How it ran

no invocation recorded.

build_sam_vit_h Not yet run
unverified (harvested, no recorded run)
jwh97nn/AnyRef/model/segment_anything/build_sam.py
code served (permissive licence) · get_code("bf61a91555ac5280")
How it ran

no invocation recorded.

build_sam_vit_l Not yet run
unverified (harvested, no recorded run)
jwh97nn/AnyRef/model/segment_anything/build_sam.py
code served (permissive licence) · get_code("e2ae4c696b8c968c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 6 later) and 1 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
build_sam_vit_h 37 other papers
20 dated earlier, 15 later, 2 same year, order not determinable · 2 only as an assembly brick
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 34 more not named here
build_sam_vit_b 34 other papers
20 dated earlier, 12 later, 2 same year, order not determinable
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 31 more not named here
build_sam_vit_l 34 other papers
20 dated earlier, 12 later, 2 same year, order not determinable
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 31 more not named here
sigmoid_ce_loss 17 other papers
4 dated earlier, 12 later, 1 same year, order not determinable · 1 only as an assembly brick
2312.02228 (2023-12)
PixelLM: Pixel Reasoning with Large Multimodal Model
2312.10103 (2023-12)
GSVA: Generalized Segmentation via Multimodal Large Language Models
2312.15715 (2023-12)
Segment Every Reference Object in Spatial and Temporal Spaces
and 14 more not named here
get_clip_timepoints 6 other papers
4 dated earlier, 2 later
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2309.00615 (2023-09)
Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding, Generation, and Instruction Following
2310.01852 (2023-10)
LanguageBind: Extending Video-Language Pretraining to N-modality by Language-based Semantic Alignment
and 3 more not named here
load_and_transform_vision_data 5 other papers
3 dated earlier, 2 later
2305.16355 (2023-05)
PandaGPT: One Model To Instruction-Follow Them All
2309.00615 (2023-09)
Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding, Generation, and Instruction Following
2401.10727 (2024-01)
MLLM-Tool: A Multimodal Large Language Model For Tool Agent Learning
and 2 more not named here

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

Multimodal Large Language Model (MLLMs) leverages Large Language Models as a cognitive framework for diverse visual-language tasks. Recent efforts have been made to equip MLLMs with visual perceiving and grounding capabilities. However, there still remains a gap in providing fine-grained pixel-level perceptions and extending interactions beyond text-specific inputs. In this work, we propose AnyRef, a general MLLM model that can generate pixel-wise object perceptions and natural language descriptions from multi-modality references, such as texts, boxes, images, or audio. This innovation empowers users with greater flexibility to engage with the model beyond textual and regional prompts, without modality-specific designs. Through our proposed refocusing mechanism, the generated grounding output is guided to better focus on the referenced object, implicitly incorporating additional pixel-level supervision. This simple modification utilizes attention scores generated during the inference of LLM, eliminating the need for extra computations while exhibiting performance enhancements in both grounding masks and referring expressions. With only publicly available training data, our model achieves state-of-the-art results across multiple benchmarks, including diverse modality referring segmentation and region-level referring expression generation. Code and models are available at https: //github.com/jwh97nn/AnyRef

For agents

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

get_harvested_code_for_paper("2403.02969")
get_code_for_paper("2403.02969")
have("2403.02969")

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

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

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

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

Connect an agent — have() is free.