SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.00523 · ICLR · 2025

VIRTUE: Visual-Interactive Text-Image Universal Embedder

Shusuke Takahashi, Yuki Mitsufuji, Qiyu Wu, Wei-Yao Wang, Kazuya Tateishi

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 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/2510.00523.json · badge: /api/ran/2510.00523.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
sony/virtue canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
batch_to_device Ran
ran; our contract draft was wrong, not the code
sony/virtue/codes/src/utils.py
code served (permissive licence) · get_code("5210e1b5ee25838a")
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 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 torch

torch.manual_seed(0)

# Create a sample batch dictionary with tensors and non-tensor values
batch = {
    "input_ids": torch.randint(0, 100, (2, 4)),
    "attention_mask": torch.ones(2, 4, dtype=torch.long),
    "labels": torch.randint(0, 10, (2,)),
    "metadata": "some_string_value",
    "count": 42,
}

device = "cpu"

ARGS = {
    "batch": batch,
    "device": device,
}
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 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
cached Ran
ran; our contract draft was wrong, not the code
sony/virtue/codes/src/grad_cache/functional.py
code served (permissive licence) · get_code("d3ca3a2a2eb093e7")
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 function. 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 torch.nn as nn
from typing import Callable, Union, Tuple

torch.manual_seed(0)

class RandContext:
    """Stand-in for random state context manager"""
    def __enter__(self):
        return self
    
    def __exit__(self, *args):
        pass

def simple_pytorch_func(x: torch.Tensor) -> torch.Tensor:
    """A simple function that takes a tensor and returns a representation tensor"""
    return x * 2.0 + 1.0

def simple_pytorch_func_multi(x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:
    """A function that returns multiple tensors"""
    return (x * 2.0, x + 1.0)

ARGS = {
    "func": simple_pytorch_func
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
cat_input_tensor Ran
ran; our contract draft was wrong, not the code
sony/virtue/codes/src/grad_cache/functional.py
code served (permissive licence) · get_code("fab5db4632e2fa87")
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 function. 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 torch import Tensor

torch.manual_seed(0)

# The function cat_input_tensor is a decorator that takes a Callable and returns a decorated function
# It doesn't actually call the function within the decorator definition itself, just wraps it
# So we need to provide a simple function that accepts tensors/lists of tensors and returns a Tensor

def dummy_loss_fn(*args, **kwargs) -> Tensor:
    """A simple function that returns a tensor, used to test the decorator"""
    # Sum all tensor arguments
    result = torch.tensor(0.0)
    for arg in args:
        if isinstance(arg, Tensor):
            result = result + arg.sum()
    for val in kwargs.values():
        if isinstance(val, Tensor):
            result = result + val.sum()
    return result

ARGS = {
    "func": dummy_loss_fn
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
dist_gather Ran
ran, honoured the contract we drafted
sony/virtue/codes/src/dist_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from RemRico/Recall, is pointer only (licence: NONE) · get_code("230ef02dd4dd96d9")
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 RemRico/Recall, 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.

dist_gather_nograd Ran
ran, honoured the contract we drafted
sony/virtue/codes/src/dist_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from RemRico/Recall, is pointer only (licence: NONE) · get_code("89f1c28d66196e80")
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 RemRico/Recall, 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.

find_latest_checkpoint Ran
ran; our contract draft was wrong, not the code
sony/virtue/codes/src/utils.py
code served (permissive licence) · get_code("2ee2dcbdf5dce10a")
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 os
import tempfile
import shutil

# Create a temporary directory structure with checkpoint subdirectories
temp_dir = tempfile.mkdtemp()

# Create some checkpoint directories with numeric suffixes
os.makedirs(os.path.join(temp_dir, 'checkpoint-100'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'checkpoint-200'), exist_ok=True)
os.makedirs(os.path.join(temp_dir, 'checkpoint-50'), exist_ok=True)

# Also create a non-checkpoint file to ensure it's filtered out
with open(os.path.join(temp_dir, 'some_file.txt'), 'w') as f:
    f.write('test')

ARGS = {
    'output_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 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
gather_input_tensor Ran
ran; our contract draft was wrong, not the code
sony/virtue/codes/src/grad_cache/functional.py
code served (permissive licence) · get_code("7917a2079ec6b095")
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 function. 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 torch.nn as nn
from torch import Tensor
from torch import distributed as dist
from unittest.mock import MagicMock, patch

torch.manual_seed(0)

# Mock distributed functions since we're not in a real distributed setup
def mock_get_world_size():
    return 2

def mock_get_rank():
    return 0

def mock_all_gather(gathered_list, tensor):
    # Simulate all_gather by filling the list with the tensor
    for i in range(len(gathered_list)):
        gathered_list[i].copy_(tensor)

# Create a simple loss function to be decorated
def simple_loss(pred: Tensor, target: Tensor) -> Tensor:
    """A simple loss function that takes two tensors and returns a scalar."""
    return torch.nn.functional.mse_loss(pred, target)

# Create another variant that uses kwargs
def loss_with_kwargs(pred: Tensor, target: Tensor, weight: Tensor = None) -> Tensor:
    """Loss function that accepts keyword arguments."""
    loss = torch.nn.functional.mse_loss(pred, target)
    if weight is not None:
        loss = loss * weight.mean()
    return loss

# Patch the distributed module
with patch('torch.distributed.get_world_size', mock_get_world_size):
    with patch('torch.distributed.get_rank', mock_get_rank):
        with patch('torch.distributed.all_gather', mock_all_gather):
            # Create test tensors
            pred_tensor = torch.randn(2, 4)
            target_tensor = torch.randn(2, 4)
            weight_tensor = torch.randn(2, 3)

ARGS = {
    'func': simple_loss,
    'axis': 0
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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_logger Ran
ran; our contract draft was wrong, not the code
sony/virtue/codes/src/logging.py
code served (permissive licence) · get_code("edac44cad40a9c53")
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 Logger. 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
from typing import Optional

torch_imported = False
try:
    import torch
    torch_imported = True
except ImportError:
    pass

# The function get_logger takes an optional name parameter
# Looking at the body:
# - If name is None, it calls _get_library_name() to get a default name
# - It then returns logging.getLogger(name)
# The function doesn't actually use the logger in any special way,
# it just returns it, so we just need to provide valid arguments

# Test case 1: name=None (uses default behavior)
ARGS = {
    "name": None
}

# Alternative test case could be:
# ARGS = {
#     "name": "my_custom_logger"
# }

# But the minimal case with None is sufficient to test the function
ARGS = {
    "name": 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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
varsize_gather_nograd Ran
ran, honoured the contract we drafted
sony/virtue/codes/src/dist_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from facebookresearch/contriever, is pointer only (licence: NOASSERTION) · get_code("b1ad8cd3a7168b7f")
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 facebookresearch/contriever, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 7 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 3 later) and 2 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
varsize_gather_nograd 10 other papers
6 dated earlier, 2 later, 2 same year, order not determinable
2402.03216 (2024-02)
M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation
2402.07867 (2024-02)
PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models
2403.06840 (2024-03)
RA-ISF: Learning to Answer and Understand from Retrieval Augmentation via Iterative Self-Feedback
and 7 more not named here
cached 3 other papers
3 dated earlier
2402.09906 (2024-02)
Generative Representational Instruction Tuning
2404.04163 (2024-04)
Dwell in the Beginning: How Language Models Embed Long Documents for Dense Retrieval
2506.11350 (2025-06)
GLAP: General contrastive audio-text pretraining across domains and languages
cat_input_tensor 3 other papers
3 dated earlier
2402.09906 (2024-02)
Generative Representational Instruction Tuning
2404.04163 (2024-04)
Dwell in the Beginning: How Language Models Embed Long Documents for Dense Retrieval
2506.11350 (2025-06)
GLAP: General contrastive audio-text pretraining across domains and languages
gather_input_tensor 3 other papers
3 dated earlier
2402.09906 (2024-02)
Generative Representational Instruction Tuning
2404.04163 (2024-04)
Dwell in the Beginning: How Language Models Embed Long Documents for Dense Retrieval
2506.11350 (2025-06)
GLAP: General contrastive audio-text pretraining across domains and languages
batch_to_device 1 other paper
1 dated earlier
2505.11293 (2025-05)
Breaking the Batch Barrier (B3) of Contrastive Learning via Smart Batch Mining
dist_gather 1 other paper
1 later
2602.01639 (2026-02)
ReCALL: Recalibrating Capability Degradation for MLLM-based Composed Image Retrieval
dist_gather_nograd 1 other paper
1 later
2602.01639 (2026-02)
ReCALL: Recalibrating Capability Degradation for MLLM-based Composed Image Retrieval

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

Multimodal representation learning models have demonstrated successful operation across complex tasks, and the integration of vision-language models (VLMs) has further enabled embedding models with instruction-following capabilities. However, existing embedding models lack visual-interactive capabilities to specify regions of interest from users (e.g., point, bounding box, mask), which have been explored in generative models to broaden their human-interactive applicability. Equipping embedding models with visual interactions not only would unlock new applications with localized grounding of user intent, which remains unexplored, but also enable the models to learn entity-level information within images to complement their global representations for conventional embedding tasks. In this paper, we propose a novel Visual-InteRactive Text-Image Universal Embedder (VIRTUE) that extends the capabilities of the segmentation model and the vision-language model to the realm of representation learning. In VIRTUE, the segmentation model can process visual prompts that pinpoint specific regions within an image, thereby enabling the embedder to handle complex and ambiguous scenarios more precisely. To evaluate the visual-interaction ability of VIRTUE, we introduce a large-scale Segmentation-and-Scene Caption Retrieval (SCaR) benchmark comprising 1M samples that aims to retrieve the text caption by jointly considering the entity with a specific object and image scene. VIRTUE consistently achieves a state-of-the-art performance with significant improvements across 36 universal MMEB (3.1%-8.5%) and five visual-interactive SCaR (15.2%-20.3%) tasks. The code, models, and benchmarks are available at https://github.com/sony/virtue.

For agents

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

get_harvested_code_for_paper("2510.00523")
get_code_for_paper("2510.00523")
have("2510.00523")

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

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

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

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

Connect an agent — have() is free.