AutoDAN-Turbo lifelong-strategy jailbreak optimizer for superred
Project description
superred-optimizer-autodan-turbo
An AutoDAN-Turbo lifelong-strategy jailbreak optimizer for the superred red-teaming framework.
AutoDAN-Turbo discovers jailbreak strategies from scratch, with no
human-designed seed strategies, and remembers what worked in a strategy
library that persists across attempts. One superred run is one paper "epoch"
against the goal: generate an attack (cold, or informed by retrieved
strategies), probe the target, score the response, and — if the score
improved — mine a new {Strategy, Definition} pair into the library for
future runs to retrieve.
Reference: Liu et al., "AutoDAN-Turbo: A Lifelong Agent for Strategy
Self-Exploration to Jailbreak LLMs,"
arXiv:2410.05295 (ICLR 2025 spotlight).
Official implementation:
SaFo-Lab/AutoDAN-Turbo
(MIT License; GitHub org renamed from SaFoLab-WISC since the paper's
release — old links redirect). See ASSUMPTIONS.md for the
full paper-to-code mapping and every deliberate departure.
Install
pip install superred-optimizer-autodan-turbo
Usage
from autodan_turbo_optimizer import AutoDANTurboOptimizer
optimizer = AutoDANTurboOptimizer(max_attempts=10, break_score=8.5)
The strategy library lives on the optimizer instance and persists across every run of that instance (not just within one task), matching the paper's "lifelong" framing — construct a fresh optimizer for an unrelated experiment if you don't want strategies to carry over.
Wire it into a Controller like any other superred optimizer — see the
framework's architecture overview and a
target's README (e.g. superred-target-chatbot) for a full Controller.run()
example.
Behaviour notes
- Score-based 3-tier retrieval replaces upstream's FAISS embedding
retrieval step (avg strategy score ≥5 or in [2,5) → retrieve and use;
otherwise cold/
find_new_strategy), matching upstream's post-FAISS score filter's decision boundary without the embedding-index dependency — a documented v1 simplification, not a silent behavior change. - Refusal filter. If the attacker's own output looks like a refusal, the optimizer falls back to the raw goal text as the jailbreak prompt for that turn rather than sending a refusal to the target.
- Runs in all four adversarial information-access settings: a cold attacker every run when responses aren't visible (settings 1, 2); the full lifelong loop (internal scorer + library growth + retrieval) when responses are visible (settings 3, 4). External evaluator success early-stops settings 2 and 4.
- Single-line score/JSON parsers replace upstream's two-stage wrapper LLM calls, halving scorer/summarizer cost per turn.
License
MIT for this port's code. Prompt templates (attacker ×3, scorer, summarizer) are reproduced verbatim from the upstream reference implementation (MIT License, Copyright (c) 2023 Xiaogeng Liu) — see ASSUMPTIONS.md for exact source files.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superred_optimizer_autodan_turbo-0.1.0.tar.gz.
File metadata
- Download URL: superred_optimizer_autodan_turbo-0.1.0.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b95e5a89e168309738ed2943c9416b420dfcd0469e060e2a45f17eb20e1c9a98
|
|
| MD5 |
9b3411a2f65e5f355fee521fd3be64db
|
|
| BLAKE2b-256 |
27e979e6bcfc98e5c80c4a31c8e41e6f1fe2799e1de592ae5694b728ba4f6679
|
Provenance
The following attestation bundles were made for superred_optimizer_autodan_turbo-0.1.0.tar.gz:
Publisher:
release.yml on RoldSI/superred-modules
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superred_optimizer_autodan_turbo-0.1.0.tar.gz -
Subject digest:
b95e5a89e168309738ed2943c9416b420dfcd0469e060e2a45f17eb20e1c9a98 - Sigstore transparency entry: 2214942611
- Sigstore integration time:
-
Permalink:
RoldSI/superred-modules@ff92389cd4ecc6690ecd16f410231274785c4afb -
Branch / Tag:
refs/tags/superred-optimizer-autodan-turbo-v0.1.0 - Owner: https://github.com/RoldSI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff92389cd4ecc6690ecd16f410231274785c4afb -
Trigger Event:
push
-
Statement type:
File details
Details for the file superred_optimizer_autodan_turbo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: superred_optimizer_autodan_turbo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61a8dcc620757ab78334f8bb497739ebf2851f84646082e256e6285057ecb77b
|
|
| MD5 |
21a54050c68fbd1be4afbc4aad15d0f4
|
|
| BLAKE2b-256 |
b4399ea1d5b50b4b83f05c3a99b4df4a8bb218742c9ee7f24ae412ac30a8dbff
|
Provenance
The following attestation bundles were made for superred_optimizer_autodan_turbo-0.1.0-py3-none-any.whl:
Publisher:
release.yml on RoldSI/superred-modules
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superred_optimizer_autodan_turbo-0.1.0-py3-none-any.whl -
Subject digest:
61a8dcc620757ab78334f8bb497739ebf2851f84646082e256e6285057ecb77b - Sigstore transparency entry: 2214942627
- Sigstore integration time:
-
Permalink:
RoldSI/superred-modules@ff92389cd4ecc6690ecd16f410231274785c4afb -
Branch / Tag:
refs/tags/superred-optimizer-autodan-turbo-v0.1.0 - Owner: https://github.com/RoldSI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ff92389cd4ecc6690ecd16f410231274785c4afb -
Trigger Event:
push
-
Statement type: