SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.11804 · 2023

Adversarial Illusions in Multi-Modal Embeddings

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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; 8 failures of our instrument; 2 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/2308.11804.json · badge: /api/ran/2308.11804.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
ebagdasa/adversarial_illusions canonical (classifier label)
classifier basis: census
11 ran · 2 no recorded run
FunctionStatusWhere it lives
chroma_subsampling Ran
ran; our contract draft was wrong, not the code
ebagdasa/adversarial_illusions/DiffJPEG/compression.py
code served (permissive licence) · get_code("d0a996dc0d594c8a")
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 tuple. 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

torch.manual_seed(0)

# Create a small batch of images with shape (batch, height, width, 3)
# Using distinct sizes: batch=2, height=4, width=6, channels=3
image = torch.randn(2, 4, 6, 3)

ARGS = {
    "image": image
}
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 tuple — a tuple output has no array shape of its own; none is 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
dense_to_onehot Ran
ran; our contract draft was wrong, not the code
ebagdasa/adversarial_illusions/query_attack.py
pointer only (licence: MIT); the stored copy get_code serves, from phenetos/calibrationattack, is pointer only (licence: NONE) · get_code("176dfa1e026fb136")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from phenetos/calibrationattack, 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.

get_embeddings Ran
ran, honoured the contract we drafted
ebagdasa/adversarial_illusions/dataset_utils.py
code served (permissive licence) · get_code("996d7797acf3500c")
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 2, dtype family float, shape (3, 4) 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 as nn
import numpy as np
import tempfile
import os

torch.manual_seed(0)

class MockTextModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 4)
    
    def forward(self, batch, modality, normalize=False):
        # batch is a numpy array of strings
        # Return a tensor of embeddings
        batch_size = len(batch)
        return torch.randn(batch_size, 4)
    
    def to(self, device):
        return super().to(device)
    
    def cpu(self):
        return super().cpu()

model = MockTextModel()

labels = ['cat,feline', 'dog,canine', 'bird,avian']

device = 'cpu'

dataset_flag = 'imagenet'

# Create a temporary directory for embeddings file
temp_dir = tempfile.mkdtemp()
embs_file = os.path.join(temp_dir, 'test_embs.npy')

ARGS = {
    'embs_file': embs_file,
    'labels': labels,
    'device': device,
    'dataset_flag': dataset_flag,
    'model': model,
    'batch_size': 2,
    'device_override': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (3, 4) — shape (3, 4) 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
load_and_transform_thermal_data Ran
ran, honoured the contract we drafted
ebagdasa/adversarial_illusions/thermal_illusion_classification.py
code served (permissive licence) · get_code("8c9d8492e3dce2ec")
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, shape (2, 1, 224, 224) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from PIL import Image
import io
import numpy as np

torch.manual_seed(0)

# Create a small grayscale image and save it to a bytes buffer
def create_thermal_image_bytes():
    # Create a small 32x32 grayscale image
    img_array = np.random.randint(0, 256, (32, 32), dtype=np.uint8)
    img = Image.fromarray(img_array, mode='L')
    # Save to bytes buffer
    buffer = io.BytesIO()
    img.save(buffer, format='PNG')
    buffer.seek(0)
    return buffer.getvalue()

# Create temporary thermal image files (using in-memory approach)
thermal_image_bytes_1 = create_thermal_image_bytes()
thermal_image_bytes_2 = create_thermal_image_bytes()

# Create mock file paths - we'll monkey-patch open() to return our images
import tempfile
import os

temp_dir = tempfile.gettempdir()
thermal_path_1 = os.path.join(temp_dir, 'thermal_1.png')
thermal_path_2 = os.path.join(temp_dir, 'thermal_2.png')

# Write actual files for the function to read
with open(thermal_path_1, 'wb') as f:
    f.write(thermal_image_bytes_1)
with open(thermal_path_2, 'wb') as f:
    f.write(thermal_image_bytes_2)

thermal_paths = [thermal_path_1, thermal_path_2]
device = 'cpu'

ARGS = {
    'thermal_paths': thermal_paths,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, 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, shape (2, 1, 224, 224) — shape (2, 1, 224, 224) 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
norm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ebagdasa/adversarial_illusions/anomaly_detection.py
code served (permissive licence) · get_code("b136faae866d109f")
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, shape (2, 3, 4, 5) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 norm() takes:
# - tensor: a torch.Tensor that gets cloned and moved to device
# - mean: optional, defaults to IMG_MEAN (tuple of 3 floats)
# - std: optional, defaults to IMG_STD (tuple of 3 floats)

# Create a small input tensor with shape (batch=2, channels=3, height=4, width=5)
input_tensor = torch.randn(2, 3, 4, 5)

ARGS = {
    'tensor': input_tensor,
    'mean': (0.48145466, 0.4578275, 0.40821073),
    'std': (0.26862954, 0.26130258, 0.27577711)
}
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 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) 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
norm Ran
ran; our contract draft was wrong, not the code
ebagdasa/adversarial_illusions/utils.py
code served (permissive licence) · get_code("38d2254621bf5bec")
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, shape (2, 3, 4, 4) 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 a small tensor with shape (batch=2, channels=3, height=4, width=4)
# This matches the expected input format for the norm function
tensor = torch.randn(2, 3, 4, 4)

# Define ARGS dict with all parameters
ARGS = {
    "tensor": tensor,
    "mean": (0.48145466, 0.4578275, 0.40821073),
    "std": (0.26862954, 0.26130258, 0.27577711)
}
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 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 4) 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
rgb_to_ycbcr_jpeg Ran
ran; our contract draft was wrong, not the code
ebagdasa/adversarial_illusions/DiffJPEG/compression.py
code served (permissive licence) · get_code("e836b43eb275f963")
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, shape (2, 4, 5, 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small batch of RGB images
# Shape: batch x 3 x height x width
# Using batch=2, channels=3, height=4, width=5 for distinct dimensions
image = torch.rand(2, 3, 4, 5)

ARGS = {
    "image": image
}
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 Tensor, ndim 4, dtype family float, shape (2, 4, 5, 3) — shape (2, 4, 5, 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
softmax Ran
ran, honoured the contract we drafted
ebagdasa/adversarial_illusions/query_attack.py
pointer only (licence: MIT); the stored copy get_code serves, from GEEX-Weixing/PKD, is pointer only (licence: NONE) · get_code("8bf374c9e1999142")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from GEEX-Weixing/PKD, 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.

unnorm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ebagdasa/adversarial_illusions/anomaly_detection.py
code served (permissive licence) · get_code("c368473e2e381cfc")
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, shape (2, 3, 4, 5) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 a small normalized tensor (batch=2, channels=3, height=4, width=5)
# This should be in normalized form (values roughly in [-2, 2] range after normalization)
tensor = torch.randn(2, 3, 4, 5)

# Define ARGS with all parameters
ARGS = {
    'tensor': tensor,
    'mean': (0.48145466, 0.4578275, 0.40821073),
    'std': (0.26862954, 0.26130258, 0.27577711),
}
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 4, dtype family float, shape (2, 3, 4, 5) — shape (2, 3, 4, 5) 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
unnorm Ran
ran; our contract draft was wrong, not the code
ebagdasa/adversarial_illusions/utils.py
code served (permissive licence) · get_code("312f083d8548f733")
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, shape (2, 3, 4, 4) 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 a normalized tensor (batch=2, channels=3, height=4, width=4)
# Values should be in a reasonable normalized range
tensor = torch.randn(2, 3, 4, 4)

# Define ARGS with all parameters for the unnorm function
ARGS = {
    'tensor': tensor,
    'mean': (0.48145466, 0.4578275, 0.40821073),
    'std': (0.26862954, 0.26130258, 0.27577711)
}
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 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 4) 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
unnorm_audio Ran
ran; our contract draft was wrong, not the code
ebagdasa/adversarial_illusions/utils.py
code served (permissive licence) · get_code("f72f537462f8ab03")
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 2, dtype family float, shape (2, 4) 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 a small tensor to pass as the main argument
# Shape: (2, 4) - batch size 2, 4 dimensions
tensor = torch.randn(2, 4)

# Define ARGS dict with all parameters
ARGS = {
    "tensor": tensor,
    "mean": (0.48145466, 0.4578275, 0.40821073),
    "std": (0.26862954, 0.26130258, 0.27577711),
}
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 2, dtype family float, shape (2, 4) — shape (2, 4) 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_loss Not yet run
unverified (harvested, no recorded run)
ebagdasa/adversarial_illusions/query_attack.py
code served (permissive licence) · get_code("da99f5c09a8efea7")
How it ran

no invocation recorded.

rgb_to_ycbcr Not yet run
unverified (harvested, no recorded run)
ebagdasa/adversarial_illusions/DiffJPEG/compression.py
code served (permissive licence) · get_code("f9b6705425c9fde9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 9 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
dense_to_onehot 3 other papers
1 dated earlier, 2 later
2105.15010 (2021-05)
Query Attack by Multi-Identity Surrogates
2310.00567 (2023-10)
Understanding the Robustness of Randomized Feature Defense Against Query-Based Adversarial Attacks
2401.02718 (2024-01)
Calibration Attacks: A Comprehensive Study of Adversarial Attacks on Model Confidence
softmax 3 other papers
1 dated earlier, 2 later
2105.15010 (2021-05)
Query Attack by Multi-Identity Surrogates
2310.00567 (2023-10)
Understanding the Robustness of Randomized Feature Defense Against Query-Based Adversarial Attacks
2510.10116 (2025-10)
Preference-driven Knowledge Distillation for Few-shot Node Classification
chroma_subsampling 2 other papers
1 dated earlier, 1 later
Wu_Robust_Image_Forgery_Detection_Over_Online_Social_Network_Shared_Images_CVPR_2022_paper (2022 (year only))
Robust Image Forgery Detection over Online Social Network Shared Images
2402.06659 (2024-02)
Shadowcast: Stealthy Data Poisoning Attacks against Vision-Language Models
rgb_to_ycbcr 2 other papers
1 dated earlier, 1 later
Wu_Robust_Image_Forgery_Detection_Over_Online_Social_Network_Shared_Images_CVPR_2022_paper (2022 (year only))
Robust Image Forgery Detection over Online Social Network Shared Images
2402.06659 (2024-02)
Shadowcast: Stealthy Data Poisoning Attacks against Vision-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-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

Multi-modal embeddings encode texts, images, thermal images, sounds, and videos into a single embedding space, aligning representations across different modalities (e.g., associate an image of a dog with a barking sound). In this paper, we show that multi-modal embeddings can be vulnerable to an attack we call "adversarial illusions." Given an image or a sound, an adversary can perturb it to make its embedding close to an arbitrary, adversary-chosen input in another modality. These attacks are cross-modal and targeted: the adversary can align any image or sound with any target of his choice. Adversarial illusions exploit proximity in the embedding space and are thus agnostic to downstream tasks and modalities, enabling a wholesale compromise of current and future tasks, as well as modalities not available to the adversary. Using ImageBind and AudioCLIP embeddings, we demonstrate how adversarially aligned inputs, generated without knowledge of specific downstream tasks, mislead image generation, text generation, zero-shot classification, and audio retrieval. We investigate transferability of illusions across different embeddings and develop a black-box version of our method that we use to demonstrate the first adversarial alignment attack on Amazon's commercial, proprietary Titan embedding. Finally, we analyze countermeasures and evasion attacks.

For agents

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

get_harvested_code_for_paper("2308.11804")
get_code_for_paper("2308.11804")
have("2308.11804")

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

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

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

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

Connect an agent — have() is free.