Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/shuangliangx/learning-to-detect
Defensive ToolsVulnerability AnalysisMachine LearningAI SecurityAnomaly Detection
GitHubshuangliangx/learning-to-detect

Learning-to-Detect

Detects unknown jailbreak attacks in large vision-language models using hidden state analysis and autoencoders, with training and evaluation pipelines for robust safety monitoring.

View Repository
183 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Learning to Detect Unknown Jailbreak Attacks in Large Vision-Language Models

This repository provides the official implementation of "Learning to Detect Unknown Jailbreak Attacks in Large Vision-Language Models".

Content

  • Base model

  • Jailbreak Attack Detection

  • Dataset

Base model

Our method uses the following two base models:

LLaVA-v1.6-Vicuna is a powerful vision-language model that combines a visual encoder with the Vicuna language model to process multimodal inputs and generate natural language responses.

LlamaGuard3 is a safety guardrail model developed by Meta AI, specifically designed to detect and prevent harmful content generation and effectively identify potentially unsafe requests and responses.

Please download the model weights and place them in the code/asset/weights directory.

Jailbreak Attack Detection

1. Data Processing and Hidden State Extraction

(Optional, since the processed data and extracted states are already preserved in the repository.)

Query the model on $I^-$ (AdvBench) and $I^+$ (GQA)

root@kitploit:~
python code/vicuna/qa.py --file code/vicuna/instructions/advbench.json
python code/vicuna/qa.py --file code/vicuna/instructions/GQA.json

Assess model responses and split into training/testing datasets

root@kitploit:~
    python code/llama3_guard.py --file code/vicuna/instructions/advbench.json
    python code/vicuna/instructions/process.py 

Extract hidden states for LoD training and benchmark evaluation

root@kitploit:~
    python code/vicuna/qa-baseline.py 

2. Train and Test the MSCAV classifiers

Train and test classifiers

root@kitploit:~
    python code/vicuna/train.py --train
    python code/vicuna/train.py --test

3. Train the Safety Pattern Auto-Encoder (SPAE)

root@kitploit:~
    python code/autoencoder.py

4. Evaluate Detection Performance

root@kitploit:~
    python code/test.py

Dataset

DatasetDetails
MM-SafetyBench
HADES

Please download the datasets and place them in the code/asset directory.

Download Tool