#2173·garak

No trajectory-aware detector exists — even GOAT, garak's most sophisticated multi-turn probe, scores only one turn per conversation

Author: ArksherXCreated Sep 10, 2026Updated Sep 29, 2026
Labelsneeds-triage

Summary

A trajectory-aware detector (or, more minimally, an aggregate scoring addition at the report layer) for garak's multi-turn probes — atkgen, goat, tap, dra, agent_breaker.

garak's multi-turn attack generation is genuinely strong. Still, detection is architecturally single-turn throughout: Detector.detect() takes exactly one attempt, with no session state parameter anywhere in the base class, and _run_detector() scores attempts one at a time regardless of which probe produced them.

Concretely, even GOAT's own detector skips every turn except one per conversation (see references below). No rate-of-change, running risk score, or turning-point concept exists anywhere in the detector/harness stack.

Basic example

No PoC built yet, happy to put one together once the direction below is confirmed. In the meantime, the current behavior is fully traceable in the existing code:

  • garak/detectors/base.py — Detector.detect(self, attempt: garak.attempt.Attempt) takes a single attempt; no conversation-history or session parameter exists anywhere in the base class.
  • garak/harnesses/base.py:136 — _run_detector() iterates attempts one at a time (for attempt in attempt_iterator: detector_instance.detect(attempt)), with no grouping by conversation.
  • garak/probes/goat.py + garak/detectors/judge.py:276 — in GOAT, every turn becomes its own Attempt, and IterativeProbe.probe() returns all of them to the harness, but JailbreakOnlyAdversarial.detect() explicitly returns None (skip) for every attempt except the one turn marked is_adversarial=True. Exactly one point in-time turn per conversation ever receives a real score.
  • garak/detectors/mitigation.py (MitigationBypass, used by TAP), scores every turn independently instead, a different manifestation of the same gap: no aggregation across turns either way. 8 goat.py:69-72 — the team's own docstring already flags a related, narrower hazard (jailbreaks becoming "invisible" under early_stop_on="all"), so this looks like the next layer of a problem you're already attentive to, not something overlooked.

Grepped all of garak/ and docs/ for "trajector*" / "turning point", zero hits, so this doesn't contradict any existing documented capability.

Related references: I've raised the equivalent proposal against two other AI-security frameworks for the same class of gap, PyRIT (microsoft/PyRIT#[XXX]) and AgentDojo (ethz-spylab/agentdojo#[XXX]) happy to share those write-ups if useful for comparing how a fix might land here.

Motivation

Why: multi-turn escalation attacks (crescendo-style, gradual goal-hijacking) are designed so no single turn crosses a policy boundary on its own; a detector that scores only one turn per conversation is structurally blind to that pattern by construction, regardless of how good the underlying classifier is.

Use case: teams using Garak's multi-turn probes (GOAT especially) to red-team conversational/agentic deployments where escalation across a session, not just a single response, is the actual risk they're testing for.

Expected outcome: open to whichever fits garak's plugin architecture better:

  • (a) a new detectors.trajectory module computing a decay-delta-style score, Δ(t) = S(t) − S(t−1), from the per-turn scores these probes already produce via previous_attempt_id chaining, surfaced as an optional detector attempts can opt into; or
  • (b) something narrower, like an aggregate "max score across the conversation" statistic added at the report layer without a new detector class at all.

Wanted to float the framing here first, happy to take this to Discord too if that's a better place to scope it before a PR.