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.
Metadata
Release files for superred-optimizer-autodan-turbo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| superred_optimizer_autodan_turbo-0.1.0.tar.gz | 39.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| superred_optimizer_autodan_turbo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.7 kB
Release files / superred_optimizer_autodan_turbo-0.1.0.tar.gz
| Download URL | superred_optimizer_autodan_turbo-0.1.0.tar.gz |
|---|---|
| Size | 39.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b95e5a89e168309738ed2943c9416b420dfcd0469e060e2a45f17eb20e1c9a98
|
|
BLAKE2b-256 checksum How to use checksums |
27e979e6bcfc98e5c80c4a31c8e41e6f1fe2799e1de592ae5694b728ba4f6679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logRelease files / superred_optimizer_autodan_turbo-0.1.0-py3-none-any.whl
| Download URL | superred_optimizer_autodan_turbo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61a8dcc620757ab78334f8bb497739ebf2851f84646082e256e6285057ecb77b
|
|
BLAKE2b-256 checksum How to use checksums |
b4399ea1d5b50b4b83f05c3a99b4df4a8bb218742c9ee7f24ae412ac30a8dbff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logSecurity for superred-optimizer-autodan-turbo 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for superred_optimizer_autodan_turbo-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.