SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.21659 · 2024

Cross-modality Information Check for Detecting Jailbreaking in Multimodal Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

7 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, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 1 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/2407.21659.json · badge: /api/ran/2407.21659.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
pandragonxiii/cider canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
computeIoU Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pandragonxiii/cider/code/models/minigpt4/common/eval_utils.py
code served (permissive licence) · get_code("f8e4c1c5aac977d6")
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 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 torch

torch.manual_seed(0)

# The function computeIoU takes two bounding boxes
# Each bbox is a tuple/list of 4 elements: (x1, y1, x2, y2)
# representing coordinates of opposite corners

bbox1 = (10, 20, 50, 80)
bbox2 = (30, 40, 70, 100)

ARGS = {
    "bbox1": bbox1,
    "bbox2": bbox2,
}
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 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
compute_cosine Ran
ran; our contract draft was wrong, not the code
pandragonxiii/cider/code/threshold_selection.py
code served (permissive licence) · get_code("8051b65c19e2efe3")
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 float32, 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 numpy as np

torch.manual_seed(0)

# Create two small tensors with shape (batch=2, dim=4)
# These will be converted to CPU numpy arrays in the function
a_vec = torch.randn(2, 4)
b_vec = torch.randn(2, 4)

ARGS = {
    "a_vec": a_vec,
    "b_vec": b_vec,
}
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 float32, 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
getAttMap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pandragonxiii/cider/code/models/minigpt4/common/gradcam.py
code served (permissive licence) · get_code("7d214655954e2bc6")
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 ndarray, ndim 3, dtype family float, shape (4, 3, 3) 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 numpy as np
from matplotlib import pyplot as plt
from scipy.ndimage import filters
from skimage import transform as skimage_transform

# Create a small RGB image (height=4, width=3, channels=3)
img = np.random.rand(4, 3, 3).astype(np.float32)

# Create an attention map (height=2, width=2) - smaller than img
attMap = np.random.rand(2, 2).astype(np.float32)

ARGS = {
    'img': img,
    'attMap': attMap,
    'blur': True,
    'overlap': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, scipy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (4, 3, 3) — shape (4, 3, 3) 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
log Ran
ran; our contract draft was wrong, not the code
pandragonxiii/cider/code/utils.py
code served (permissive licence) · get_code("d4a0251a20b07a47")
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 logging
import functools
import torch

# Set up logging to capture the decorator's behavior
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

def log(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        try:
            logger.info(f'running {func.__name__}')
            result = func(*args, **kwargs)
            logger.info(f'{func.__name__} DONE.')
            return result
        except Exception as e:
            logger.exception(f'Exception raised in {func.__name__}. exception: {str(e)}')
            raise e
    return wrapper


# Create a simple test function to decorate
@log
def sample_function(x, y):
    return x + y


# Set up arguments for the log decorator
# The log decorator takes a function as its only parameter
torch.manual_seed(0)

ARGS = {
    "func": sample_function
}
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
main_process Ran
ran; our contract draft was wrong, not the code
pandragonxiii/cider/code/models/minigpt4/common/dist_utils.py
code served (permissive licence) · get_code("98589643273920ba")
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
import functools

torch.manual_seed(0)

def get_dist_info():
    import torch.distributed as dist
    if torch.__version__ < '1.0':
        initialized = dist._initialized
    else:
        initialized = dist.is_initialized()
    if initialized:
        rank = dist.get_rank()
        world_size = dist.get_world_size()
    else:
        rank = 0
        world_size = 1
    return (rank, world_size)

def main_process(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        rank, _ = get_dist_info()
        if rank == 0:
            return func(*args, **kwargs)
    return wrapper

# Create a simple test function to decorate
def sample_function(x, y):
    return x + y

# Apply the decorator
decorated_func = main_process(sample_function)

# The main_process function takes a single parameter: func (a callable)
ARGS = {
    'func': sample_function
}
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
node_to_dict Ran
ran; our contract draft was wrong, not the code
pandragonxiii/cider/code/models/minigpt4/common/config.py
code served (permissive licence) · get_code("791c72070c0b1cfb")
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.

from omegaconf import OmegaConf

# Create a simple OmegaConf node to pass to node_to_dict
# The function converts an OmegaConf node to a regular Python container
node = OmegaConf.create({
    "model": {
        "name": "test_model",
        "layers": 3,
        "hidden_dim": 128
    },
    "training": {
        "lr": 0.001,
        "epochs": 100,
        "batch_size": 32
    },
    "data": ["sample1", "sample2", "sample3"]
})

ARGS = {
    "node": node
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
omegaconf — 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
prepare_texts Ran
ran; our contract draft was wrong, not the code
pandragonxiii/cider/code/models/minigpt4/common/eval_utils.py
code served (permissive licence) · get_code("1acbd898be79b27e")
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 torch
import numpy as np

torch.manual_seed(0)

class Conversation:
    def __init__(self):
        self.roles = ["user", "assistant"]
        self.messages = []
    
    def copy(self):
        new_conv = Conversation()
        new_conv.roles = self.roles.copy()
        new_conv.messages = self.messages.copy()
        return new_conv
    
    def append_message(self, role, message):
        self.messages.append((role, message))
    
    def get_prompt(self):
        prompt = ""
        for role, message in self.messages:
            if message is not None:
                prompt += f"{role}: {message}\n"
            else:
                prompt += f"{role}:"
        return prompt

texts = ["Hello world", "Test image caption"]
conv_temp = Conversation()

ARGS = {
    "texts": texts,
    "conv_temp": conv_temp
}
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 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
download_cached_file Not yet run
unverified (harvested, no recorded run)
pandragonxiii/cider/code/models/minigpt4/common/dist_utils.py
code served (permissive licence) · get_code("643539116e049080")
How it ran

no invocation recorded.

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, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 4 later) and 0 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
node_to_dict 39 other papers
29 dated earlier, 8 later, 2 same year, order not determinable
2305.04160 (2023-05)
X-LLM: Bootstrapping Advanced Large Language Models by Treating Multi-Modalities as Foreign Languages
2305.14167 (2023-05)
DetGPT: Detect What You Need via Reasoning
2305.16103 (2023-05)
ChatBridge: Bridging Modalities with Large Language Model as a Language Catalyst
and 36 more not named here
download_cached_file 37 other papers
28 dated earlier, 7 later, 2 same year, order not determinable
2305.04160 (2023-05)
X-LLM: Bootstrapping Advanced Large Language Models by Treating Multi-Modalities as Foreign Languages
2305.14167 (2023-05)
DetGPT: Detect What You Need via Reasoning
2305.16103 (2023-05)
ChatBridge: Bridging Modalities with Large Language Model as a Language Catalyst
and 34 more not named here
main_process 35 other papers
26 dated earlier, 7 later, 2 same year, order not determinable
2305.04160 (2023-05)
X-LLM: Bootstrapping Advanced Large Language Models by Treating Multi-Modalities as Foreign Languages
2305.14167 (2023-05)
DetGPT: Detect What You Need via Reasoning
2305.16103 (2023-05)
ChatBridge: Bridging Modalities with Large Language Model as a Language Catalyst
and 32 more not named here
getAttMap 28 other papers
21 dated earlier, 5 later, 2 same year, order not determinable
2305.04160 (2023-05)
X-LLM: Bootstrapping Advanced Large Language Models by Treating Multi-Modalities as Foreign Languages
2305.07558 (2023-05)
Measuring Progress in Fine-grained Vision-and-Language Understanding
2305.16103 (2023-05)
ChatBridge: Bridging Modalities with Large Language Model as a Language Catalyst
and 25 more not named here
computeIoU 6 other papers
4 dated earlier, 1 the same month, 1 same year, order not determinable
2310.09478 (2023-10)
MiniGPT-v2: large language model as a unified interface for vision-language multi-task learning
2312.16862 (2023-12)
TinyGPT-V: Efficient Multimodal Large Language Model via Small Backbones
2024.findings-emnlp.803 (2024 (year only))
Cross-modality Information Check for Detecting Jailbreaking in Multimodal Large Language Models
and 3 more not named here
compute_cosine 1 other paper
1 same year, order not determinable
2024.findings-emnlp.803 (2024 (year only))
Cross-modality Information Check for Detecting Jailbreaking in Multimodal Large Language Models
log 1 other paper
1 same year, order not determinable
2024.findings-emnlp.803 (2024 (year only))
Cross-modality Information Check for Detecting Jailbreaking in Multimodal Large Language Models
prepare_texts 1 other paper
1 same year, order not determinable
2024.findings-emnlp.803 (2024 (year only))
Cross-modality Information Check for Detecting Jailbreaking in Multimodal Large Language Models

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 Large Language Models (MLLMs) extend the capacity of LLMs to understand multimodal information comprehensively, achieving remarkable performance in many vision-centric tasks. Despite that, recent studies have shown that these models are susceptible to jailbreak attacks, which refer to an exploitative technique where malicious users can break the safety alignment of the target model and generate misleading and harmful answers. This potential threat is caused by both the inherent vulnerabilities of LLM and the larger attack scope introduced by vision input. To enhance the security of MLLMs against jailbreak attacks, researchers have developed various defense techniques. However, these methods either require modifications to the model's internal structure or demand significant computational resources during the inference phase. Multimodal information is a double-edged sword. While it increases the risk of attacks, it also provides additional data that can enhance safeguards. Inspired by this, we propose Cross-modality Information DEtectoR (CIDER), a plug-and-play jailbreaking detector designed to identify maliciously perturbed image inputs, utilizing the cross-modal similarity between harmful queries and adversarial images. CIDER is independent of the target MLLMs and requires less computation cost. Extensive experimental results demonstrate the effectiveness and efficiency of CIDER, as well as its transferability to both white-box and black-box MLLMs.

For agents

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

get_harvested_code_for_paper("2407.21659")
get_code_for_paper("2407.21659")
have("2407.21659")

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

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

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

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

Connect an agent — have() is free.