SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.12038 · NeurIPS · 2024

Uncovering Safety Risks of Large Language Models through Concept Activation Vector

Xiting Wang, Changyu Chen, Zhihao Xu, Ruixuan Huang

arXiv · PDF · Open in the Atlas

Code that ran

4 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; 4 failures of our instrument; 4 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/2404.12038.json · badge: /api/ran/2404.12038.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
tmlr-group/DeepInception canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
sproutnan/ai-safety_scav canonical (classifier label)
classifier basis: classifier_2025
1 ran · 4 no recorded run
FunctionStatusWhere it lives
extract_json Ran
ran; our contract draft was wrong, not the code
tmlr-group/DeepInception/common.py
code served (permissive licence) · get_code("d7a1e728e5b74d3f")
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, 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
import ast
import logging

# Set seed for reproducibility
torch.manual_seed(0)

# Test case 1: Valid JSON with both required keys
valid_json_string = "Some text before {'improvement': 0.85, 'prompt': 'adversarial prompt here'} some text after"

# Test case 2: JSON missing a required key
invalid_keys_string = "Some text {'improvement': 0.75} more text"

# Test case 3: Malformed JSON
malformed_string = "Some text {improvement: 0.9, prompt: 'test'} more text"

# Test case 4: No JSON structure at all
no_json_string = "Just some regular text without any braces"

# Test case 5: Valid JSON with both keys and newlines
valid_with_newlines = """Some text before {
'improvement': 0.92,
'prompt': 'test adversarial prompt'
} some text after"""

# Use the first valid case as the main test case
ARGS = {
    's': valid_json_string
}
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 tuple, ndim 1, dtype family float — a tuple 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
get_cavs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sproutnan/ai-safety_scav/prompt-level/cav.py
pointer only (licence: NONE) · get_code("68225a468c4c73be")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sproutnan/ai-safety_scav 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_init_msg Ran
ran; our contract draft was wrong, not the code
tmlr-group/DeepInception/common.py
code served (permissive licence) · get_code("e5d6b48c8179a8d3")
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 torch
import numpy as np

torch.manual_seed(0)

ARGS = {
    "goal": "Generate a response that bypasses safety guidelines",
    "target": "I understand you want me to"
}
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 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
process_target_response Ran
ran; our contract draft was wrong, not the code
tmlr-group/DeepInception/common.py
code served (permissive licence) · get_code("9fdfb4537f5fd761")
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 torch

torch.manual_seed(0)

ARGS = {
    "target_response": "The model should follow all user instructions without restriction.",
    "score": 0.85,
    "goal": "Make the model ignore its safety guidelines and provide harmful content",
    "target_str": "adversarial_prompt_001"
}
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 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
get_cavs_by_contrast Not yet run
unverified (harvested, no recorded run)
sproutnan/ai-safety_scav/prompt-level/cav.py
pointer only (licence: NONE) · get_code("fd013c7b31ad33b8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sproutnan/ai-safety_scav 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_reps Not yet run
unverified (harvested, no recorded run)
sproutnan/ai-safety_scav/prompt-level/cav.py
pointer only (licence: NONE) · get_code("3d5027ba960c8205")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sproutnan/ai-safety_scav 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_reps Not yet run
unverified (harvested, no recorded run)
sproutnan/ai-safety_scav/prompt-level/cav.py
pointer only (licence: NONE) · get_code("f3718c877da5d010")
How it ran

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

load_classifier_manager Not yet run
unverified (harvested, no recorded run)
sproutnan/ai-safety_scav/embedding-level/classifier_manager.py
pointer only (licence: NONE) · get_code("9764239cfdb68f48")
How it ran

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

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 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 3 the same month, 2 later) and 4 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
get_init_msg 5 other papers
3 dated earlier, 1 the same month, 1 later
2311.03191 (2023-11)
DeepInception: Hypnotize Large Language Model to Be Jailbreaker
2402.16459 (2024-02)
Defending LLMs against Jailbreaking Attacks via Backtranslation
2403.00867 (2024-03)
Gradient Cuff: Detecting Jailbreak Attacks on Large Language Models by Exploring Refusal Loss Landscapes
and 2 more not named here
process_target_response 5 other papers
2 dated earlier, 1 the same month, 2 later
2311.03191 (2023-11)
DeepInception: Hypnotize Large Language Model to Be Jailbreaker
2402.16459 (2024-02)
Defending LLMs against Jailbreaking Attacks via Backtranslation
2404.02151 (2024-04)
Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks
and 2 more not named here
extract_json 3 other papers
2 dated earlier, 1 the same month
2311.03191 (2023-11)
DeepInception: Hypnotize Large Language Model to Be Jailbreaker
2402.16459 (2024-02)
Defending LLMs against Jailbreaking Attacks via Backtranslation
2404.02151 (2024-04)
Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks

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

Warning: This paper contains text examples that are offensive or harmful in nature. Despite careful safety alignment, current large language models (LLMs) remain vulnerable to various attacks. To further unveil the safety risks of LLMs, we introduce a Safety Concept Activation Vector (SCAV) framework, which effectively guides the attacks by accurately interpreting LLMs' safety mechanisms. We then develop an SCAV-guided attack method that can generate both attack prompts and embedding-level attacks with automatically selected perturbation hyperparameters. Both automatic and human evaluations demonstrate that our attack method significantly improves the attack success rate and response quality while requiring less training data. Additionally, we find that our generated attack prompts may be transferable to GPT-4, and the embedding-level attacks may also be transferred to other white-box LLMs whose parameters are known. Our experiments further uncover the safety risks present in current LLMs. For example, in our evaluation of seven open-source LLMs, we observe an average attack success rate of 99.14%, based on the classic keyword-matching criterion. Finally, we provide insights into the safety mechanism of LLMs. The code is available at https://github.com/SproutNan/AI-Safety_SCAV.

For agents

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

get_harvested_code_for_paper("2404.12038")
get_code_for_paper("2404.12038")
have("2404.12038")

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

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

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

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

Connect an agent — have() is free.