SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.11523 · EMNLP · 2023

ToViLaG: Your Visual-Language Generative Model is Also An Evildoer

Xing Xie, Xiaoyuan Yi, Xinpeng Wang, Han Jiang, Zhihua Wei, Shanlin Zhou

arXiv · PDF · Open in the Atlas

Code that ran

15 of 18 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, 1 violated it and 0 have no contract verdict; 14 failures of our instrument; 3 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/2312.11523.json · badge: /api/ran/2312.11523.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
borisdayma/dalle-mini canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
victorup/ToViLaG canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
autocontrast_func Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
victorup/ToViLaG/method/BLIP/transform/randaugment.py
pointer only (licence: NONE) · get_code("78ca1debd9c4ed87")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, victorup/ToViLaG 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.

blank_caption_function Ran
ran; our contract draft was wrong, not the code
borisdayma/dalle-mini/src/dalle_mini/data.py
code served (permissive licence) · get_code("b46bc8a69ab97b12")
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.

import numpy as np

np.random.seed(0)

# Create a simple example dictionary with a text field
example = {
    'caption': 'This is a sample caption',
    'id': 1
}

# Define the text column name
text_column = 'caption'

# Define the probability of blanking the caption
blank_caption_prob = 0.5

# Create a random number generator
rng = np.random.RandomState(42)

ARGS = {
    'example': example,
    'text_column': text_column,
    'blank_caption_prob': blank_caption_prob,
    'rng': rng
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
compute_acc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
victorup/ToViLaG/method/BLIP/utils.py
pointer only (licence: NONE) · get_code("aa81d03f07735ab8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, victorup/ToViLaG 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.

compute_n_params Ran
ran; our contract draft was wrong, not the code
victorup/ToViLaG/method/BLIP/utils.py
pointer only (licence: NONE) · get_code("ad12a494674d23fb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, victorup/ToViLaG 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.

deepnet_init Ran
ran; our contract draft was wrong, not the code
borisdayma/dalle-mini/src/dalle_mini/model/modeling.py
code served (permissive licence) · get_code("e254827ef156f929")
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 jax
import jax.numpy as jnp

def deepnet_init(init_std, gain=1):
    init = jax.nn.initializers.normal(init_std)

    def _init(*args, **kwargs):
        return gain * init(*args, **kwargs)
    return _init

# Setup code to construct valid arguments
ARGS = {
    "init_std": 0.01,
    "gain": 2.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
equalize_func Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
victorup/ToViLaG/method/BLIP/transform/randaugment.py
pointer only (licence: NONE) · get_code("4c53169f63a1fcef")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, victorup/ToViLaG 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.

fix_html Ran
ran; our contract draft was wrong, not the code
borisdayma/dalle-mini/src/dalle_mini/model/text.py
code served (permissive licence) · get_code("848d81c889bb92eb")
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 html

def fix_html(t):
    return html.unescape(html.unescape(t))

# The function takes a single parameter 't' which is a string
# It applies html.unescape twice to decode HTML entities
# We need to provide a string with HTML entities

ARGS = {
    "t": "<div> </div>"
}
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
identity_func Ran
ran, violated the contract we drafted
victorup/ToViLaG/method/BLIP/transform/randaugment.py
pointer only (licence: NONE); the stored copy get_code serves, from kesenzhao/uv-cot, is pointer only (licence: NONE) · get_code("1dd2ab205689d45b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, victorup/ToViLaG 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.

interpolate_pos_embed Ran
ran; our contract draft was wrong, not the code
victorup/ToViLaG/method/BLIP/models/vit.py
pointer only (licence: NONE) · get_code("c6ec173f19f5c34d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, victorup/ToViLaG 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.

norm Ran
ran; our contract draft was wrong, not the code
borisdayma/dalle-mini/src/dalle_mini/model/modeling.py
code served (permissive licence) · get_code("405ba2d3a0e6b5b3")
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 RMSNorm. 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 jax
import jax.numpy as jnp
import flax.linen as nn

ARGS = {
    'type': 'rmsnorm',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type RMSNorm — a RMSNorm output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RMSNorm 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
normalize_function Ran
ran; our contract draft was wrong, not the code
borisdayma/dalle-mini/src/dalle_mini/data.py
code served (permissive licence) · get_code("a2d6ee58be3c306d")
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.

import torch
import numpy as np

torch.manual_seed(0)

# Define a simple text normalizer function
def text_normalizer(text):
    """Simple normalizer that converts text to lowercase and strips whitespace."""
    return text.lower().strip()

# Create an example dictionary with a text field
example = {
    "text": "  HELLO WORLD  ",
    "other_field": 123
}

# Define the text column name
text_column = "text"

# Construct ARGS dictionary
ARGS = {
    "example": example,
    "text_column": text_column,
    "text_normalizer": text_normalizer
}
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 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
replace_person_token Ran
ran; our contract draft was wrong, not the code
borisdayma/dalle-mini/src/dalle_mini/model/text.py
code served (permissive licence) · get_code("745c9aa603dc8439")
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 random
import re

person_token = [('a person', 282265), ('someone', 121194), ('somebody', 12219)]

def replace_person_token(t):
    """Used for CC12M"""
    t = re.sub('<person>([,\\s]*(and)*[,\\s]*<person>)+', ' people ', t)
    while '<person>' in t:
        t = t.replace('<person>', f' {random.choices(*tuple(zip(*person_token)))[0]} ', 1)
    return t

ARGS = {
    't': 'I saw <person> and <person> at the store with <person>.'
}
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
replace_punctuation_with_commas Ran
ran; our contract draft was wrong, not the code
borisdayma/dalle-mini/src/dalle_mini/model/text.py
code served (permissive licence) · get_code("8af7dc10bc707987")
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 replace_punctuation_with_commas(t):
    return re.sub('[()[\\].,|:;?!=+~\\-\\/{}]', ',', t)

# The function takes a single parameter 't' which is a string
# It applies regex substitution to replace punctuation with commas
# We need to provide a string with various punctuation marks

ARGS = {
    't': 'Hello, world! (This is a test) [with various punctuation: like ; and ? and !'
}
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
shift_tokens_right Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
borisdayma/dalle-mini/src/dalle_mini/data.py
code served (permissive licence) · get_code("45e195f64c082f0e")
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 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 numpy as np

# Create sample input_ids with shape (batch_size=2, sequence_length=4)
input_ids = np.array([
    [101, 2054, 2003, 102],
    [101, 2054, 2003, 102]
], dtype=np.int64)

# decoder_start_token_id is typically a special token ID
decoder_start_token_id = 102

ARGS = {
    "input_ids": input_ids,
    "decoder_start_token_id": decoder_start_token_id
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, 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
smelu Ran
ran; our contract draft was wrong, not the code
borisdayma/dalle-mini/src/dalle_mini/model/modeling.py
code served (permissive licence) · get_code("9914ba32442bd58d")
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 custom_jvp. 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 jax
import jax.numpy as jnp

ARGS = {
    "beta": 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type custom_jvp — a custom_jvp output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a custom_jvp 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
detect Not yet run
unverified (harvested, no recorded run)
victorup/ToViLaG/metrics/toxicity/inference_imgclf.py
pointer only (licence: NONE) · get_code("daa6e468bb6841f2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, victorup/ToViLaG 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. No invocation recorded.

get_images_from_backend Not yet run
unverified (harvested, no recorded run)
borisdayma/dalle-mini/app/gradio/backend.py
code served (permissive licence) · get_code("6189300424354113")
How it ran

no invocation recorded.

get_model_version Not yet run
unverified (harvested, no recorded run)
borisdayma/dalle-mini/app/gradio/backend.py
code served (permissive licence) · get_code("7d648505413976ce")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 6 the same month, 6 later) and 12 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
interpolate_pos_embed 52 other papers
24 dated earlier, 3 the same month, 25 later
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
2111.09452 (2021-11)
Open Vocabulary Object Detection with Pseudo Bounding-Box Labels
2205.11169 (2022-05)
PEVL: Position-enhanced Pre-training and Prompt Tuning for Vision-language Models
and 49 more not named here
compute_n_params 29 other papers
15 dated earlier, 3 the same month, 11 later
2111.09452 (2021-11)
Open Vocabulary Object Detection with Pseudo Bounding-Box Labels
2211.09790 (2022-11)
ConStruct-VL: Data-Free Continual Structured VL Concepts Learning
2211.13594 (2022-11)
Self-supervised vision-language pretraining for Medical visual question answering
and 26 more not named here
compute_acc 28 other papers
15 dated earlier, 3 the same month, 10 later
2111.09452 (2021-11)
Open Vocabulary Object Detection with Pseudo Bounding-Box Labels
2211.09790 (2022-11)
ConStruct-VL: Data-Free Continual Structured VL Concepts Learning
2211.13594 (2022-11)
Self-supervised vision-language pretraining for Medical visual question answering
and 25 more not named here
equalize_func 15 other papers
8 dated earlier, 1 the same month, 6 later
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2207.05333 (2022-07)
IDEA: Increasing Text Diversity via Online Multi-Label Recognition for Vision-Language Pre-training
and 12 more not named here
identity_func 15 other papers
8 dated earlier, 1 the same month, 6 later · 1 only as an assembly brick
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2207.05333 (2022-07)
IDEA: Increasing Text Diversity via Online Multi-Label Recognition for Vision-Language Pre-training
and 12 more not named here
autocontrast_func 12 other papers
7 dated earlier, 1 the same month, 4 later
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2207.05333 (2022-07)
IDEA: Increasing Text Diversity via Online Multi-Label Recognition for Vision-Language Pre-training
and 9 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-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

Warning: this paper includes model outputs showing offensive content. Recent large-scale Visual-Language Generative Models (VLGMs) have achieved unprecedented improvement in multimodal image/text generation. However, these models might also generate toxic content, e.g., offensive text and pornography images, raising significant ethical risks. Despite exhaustive studies on toxic degeneration of language models, this problem remains largely unexplored within the context of visual-language generation. This work delves into the propensity for toxicity generation and susceptibility to toxic data across various VLGMs. For this purpose, we built ToViLaG, a dataset comprising 32K co-toxic/mono-toxic text-image pairs and 1K innocuous but evocative text that tends to stimulate toxicity. Furthermore, we propose WInToRe, a novel toxicity metric tailored to visual-language generation, which theoretically reflects different aspects of toxicity considering both input and output. On such a basis, we benchmarked the toxicity of a diverse spectrum of VLGMs and discovered that some models do more evil than expected while some are more vulnerable to infection, underscoring the necessity of VLGMs detoxification. Therefore, we develop an innovative information bottleneckbased detoxification method. Our method reduces toxicity while maintaining acceptable generation quality, providing a promising initial solution to this line of research.

For agents

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

get_harvested_code_for_paper("2312.11523")
get_code_for_paper("2312.11523")
have("2312.11523")

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

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

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

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

Connect an agent — have() is free.