Skip to content

FEAT: Violent Durien Refactor and Scenario Factory Update#1949

Open
rlundeen2 wants to merge 8 commits into
microsoft:mainfrom
rlundeen2:rlundeen2/violent-durian-repackage
Open

FEAT: Violent Durien Refactor and Scenario Factory Update#1949
rlundeen2 wants to merge 8 commits into
microsoft:mainfrom
rlundeen2:rlundeen2/violent-durian-repackage

Conversation

@rlundeen2
Copy link
Copy Markdown
Contributor

"Violent Durian" lived under docs as a notebook, but it isn't really a standalone attack — it's a criminal-persona RedTeamingAttack configuration. This PR repackages it as a first-class, opt-in attack technique in the canonical catalog and moves its data files into the proper dataset folders. Along the way it refactors the AttackTechniqueFactory adversarial-config API.

Previously, we used AdversarialConfig for technique factories. But in many cases (violent durien being the first) ONLY the adversarial system prompt is part of the technique, not the rest of the adversarial config. So I deprecated the adversarial config and made the overwrites more targeted to better support this. The old parameters were deprecated.

rlundeen2 and others added 8 commits June 6, 2026 20:52
Convert the standalone Violent Durian doc notebook into a reusable, opt-in
attack technique. It is a configured RedTeamingAttack (criminal-persona
adversarial system prompt + distinctive durian opener + persona-adoption
scorer), so it is registered as an AttackTechniqueFactory via a dedicated
ViolentDurianInitializer rather than living as documentation.

- Move scorer yaml into datasets (criminal_persona.yaml) + add enum entry
- Add durian seed prompt dataset file parametrized on objective
- Extend AttackTechniqueFactory with adversarial_system_prompt_path /
  adversarial_seed_prompt, keeping adversarial target resolution lazy
- Add opt-in ViolentDurianInitializer (not in default scenario catalog)
- Delete the violent_durian_attack doc notebook + myst.yml entry
- Add unit tests for the new factory params and the initializer

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the violent_durian technique from a heavyweight opt-in initializer into
the default scenario technique catalog (build_scenario_technique_factories)
using inline dataset paths. Tagged 'multi_turn' only, so it is selectable as an
option but excluded from all core/default scenario aggregates (never run by
default).

Also fix a latent test-suite hygiene bug: _scenario_factories() in
test_attack_technique_registry.py registered a mock 'adversarial_chat' into the
global TargetRegistry at collection time without resetting it, leaking into
every xdist worker and intermittently failing scam/psychosocial default-target
tests. Reset the registry after building the cached factories.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removes the eager adversarial_config param and its mutual-exclusivity rules in favor of an optional adversarial_chat target that is always lazily composed into AttackAdversarialConfig at create() time, alongside the existing custom system_prompt_path/seed_prompt params.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restores the adversarial_config parameter for backward compatibility. When supplied it emits a DeprecationWarning and is unpacked into adversarial_chat / adversarial_system_prompt_path / adversarial_seed_prompt, and raises ValueError if combined with any of those newer params.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
create() now takes a flat adversarial_chat (mirroring __init__) and keeps attack_adversarial_config_override as a deprecated alias. Supplying a create-time adversarial_chat when the factory already baked one raises instead of silently overwriting it. The adversarial benchmark passes adversarial_chat directly and excludes factories that bake their own target from the sweep.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Removes the misleading line suggesting a scenario can supply the adversarial target at create() time. Supplying a create-time adversarial_chat when the technique already bakes one is a conflict and already raises.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@romanlutz romanlutz self-assigned this Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants