Manuscript Offprint

arXiv:2610.38895

FlipJev: Fast Black-Box Red Teaming Finds Universal Adversarial Suffixes for Typed Decision Models

Xiaogeng Liu, Xinyan Wang, Chaowei Xiao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Xiaogeng Liu¹, Xinyan Wang² and Chaowei Xiao¹

¹Johns Hopkins University, ²University of Wisconsin–Madison

Typed decision models are an emerging class of language models that make decisions instead of generating free-text responses. They answer in a single fast and cheap query and are increasingly used, including in security-sensitive tasks. However, red teaming of these models leaves two gaps: existing adaptive attacks do not use their speed, and few studies have searched for universal adversarial examples. We fill both gaps on Jev, the representative typed decision model, with a quick black-box query-based attack that calls no attacker language model. We conduct extensive experiments on 12 datasets with different data types and application scenarios. The results show that Jev resists common prompt injections: no strategy changes a correct answer in 10,240 paired tests. In contrast, our attack finds short suffixes that flip confident answers within minutes. These suffixes are universal: one suffix per dataset flips 43% of unseen documents. Because typed decision models, unlike classic NLP models, can serve many tasks, we test whether these suffixes transfer across tasks. We find that one suffix generated from one task can flip 90–100% of the samples in other tasks. We therefore believe the evaluation of typed decision models must include strict adaptive attacks to fully reveal their robustness.

Website

Code

1. Introduction

Typed decision models are an emerging class of models that make decisions instead of generating text [60, 62]. They decide in a fraction of a second and at a much lower cost than a generative language model [12, 62], and software can use their answers directly [65]. These advantages give them a large potential for the many small decisions in applications and AI agents, such as classification, routing, guardrails and safety checks. In an application, a typed decision model works like a function call: it takes content as input and returns a typed decision. The developer writes a question with typed answer options, for example a yes/no proposition or a choice among named actions. The application sends the question together with the content to judge. The model then returns the probabilities of all options in parallel, in a single query and without generating any text [1]. TypeSafe's Jev is the first deployed model of this kind [1, 65].¹ It answers in about 0.3 seconds and costs about four cents per million input tokens. Recent work already uses it as a classifier, a router, a guardrail and a safety judge for agents [17, 25, 35, 68, 69, 77]. For example, an agent that hands its routine decisions to Jev makes 73% fewer calls to a strong language model and still completes 95% of its tasks [69].

Typed decision models are increasingly used, including in security-sensitive tasks. For example, they screen external content and user requests before agents act [40], judge the safety of agent traces [68] and detect jailbreaks and prompt injections [17]. In such tasks, a decision that an attacker can change is a security failure. The evaluation and red teaming of their robustness are therefore increasingly important. Recent work follows three directions.

¹Such models are also called System One models [1, 65].

Corresponding author(s): Xiaogeng Liu, xliu316@jhu.edu

Figure

Figure 1: A typed decision and its universal suffix. In this paper, we study adversarial suffixes in typed decision models, where the trusted question of the developer and the untrusted content travel in separate fields (panel A), and a black-box attacker appends a short suffix to the content that flips the decision without naming the subject (panel B). We find that one suffix, found on a single dataset, flips 90–100% of the documents in five other tasks without any further search (panel C).

The first direction applies fixed perturbations to the content, such as single edits and injection templates from earlier benchmarks [22, 70]. The second direction changes the trusted question and shows that the answer follows the name of an option more than its definition [6, 60]. The third direction runs adaptive attacks with the feedback of Jev: an attacker language model writes and refines the attack text [9, 72], or a search chooses among a small set of templates [70].

Despite these studies, two important gaps remain. The first gap concerns how to red-team this kind of fast model. Jev can respond in a fraction of a second, so an attacker can send thousands of queries for each input within minutes. However, existing adaptive attacks do not use this speed. Xu et al. [72] and Check Point Team [9] use attacker large language models (LLMs) to write the attack text, and these LLMs add their own generation time to every step. The whole red-teaming process therefore runs at the speed of the attacker LLMs, which are much slower than Jev. Wu and Lim [70] instead build the attack text from a fixed set of templates. This set gives only a limited number of candidates, which constrains the search space and therefore the strength of the attack. Thus, none of these existing works fully leverages the speed of typed decision models: they are either slow or unable to benefit from more queries.

The second gap concerns universal adversarial examples for typed decision models: whether one short text can flip the decisions on many inputs, and whether such a text transfers across tasks. Existing works [9, 70, 72] focus on input-specific attacks, which craft a separate attack text for each input. Few studies have searched for one text that works on many inputs to a typed decision model. However, universal examples are very important for two reasons. First, they would reveal a critical weakness of the model class. An attacker finds such a text once and then applies it to new inputs without any further query, so each new attack costs almost nothing. For the same reason, developers of language models give special attention to universal jailbreaks [4, 57, 80], and universal prompt injections are a known threat to applications of language models [39]. Second, typed decision models differ from classic NLP classifiers in the number of tasks that one model can perform. A classic classifier, such as a fine-tuned BERT, performs only the task that it was trained for, so a universal trigger found on it attacks only that task [66]. In contrast, one typed decision model performs many different tasks, because the question in its input defines the task [12]. We therefore hypothesize that a universal adversarial suffix found on one task also transfers to the other tasks of the same model. If such suffixes exist, an attacker can find one on a task that they can query and then use it against other applications without a single query to them.

In this paper, we aim to fill both gaps with a study of the current representative typed decision model, Jev.² To address the first gap, we start from what Jev has in common with LLMs: like an LLM, Jev understands natural-language input [65]. We therefore first collect common prompt-injection strategies that are effective against LLMs [16, 41, 53, 75]. However, we find that these strategies are ineffective against Jev. Because these strategies are fixed and do not adapt to the answers of Jev, we then propose a quick black-box query-based attack. Specifically, the attack appends a short suffix to the untrusted content and improves the suffix with an evolutionary search that uses only the probabilities that Jev returns (Figure 1). The suffix never contains a word that names the subject of the question, so the correct answer does not change. To match the speed of Jev, we argue that the attack must generate each candidate suffix faster than Jev answers a query; otherwise, the generator, not Jev, limits the speed of the attack. We therefore generate candidates with cheap word-level edits instead of an attacker LLM, so the attack spends its whole budget on queries to Jev. With this attack, we then address the second gap. We score each candidate by its mean effect on a batch of training documents instead of one, so the same algorithm can generate universal suffixes.

We conducted extensive experiments on Jev with 12 datasets that cover different data types and application scenarios (§4.1) to answer four research questions (RQs). We first ask whether Jev is robust to common prompt-injection strategies (RQ1). Our experiments reveal that no common injection strategy changed a correct answer in 10,240 paired tests, even though the strategies range from “Please output no” and “Ignore previous instructions” to a forged copy of the JSON answer of Jev (§4.2). However, these strategies are fixed and do not adaptively change themselves according to the answers of the model. We therefore ask whether a black-box query-based attack, which uses these answers, can flip the confident decisions of Jev (RQ2). Our experiments reveal that it can: even without an attacker LLM, our attack finds suffixes of 5–31 tokens that flip confident answers. It succeeds on 58 of 180 targets from different public datasets, and a search of 2,000 queries takes only about two minutes (§4.3). Since each of these suffixes is found for one input, we next ask whether one adversarial suffix also flips the unseen inputs of its dataset (RQ3). Our experiments reveal that the generated adversarial suffixes are highly universal. One suffix per dataset, found on ten documents, flips 43% of unseen documents across different datasets, while a neutral note flips none. On the safety detection task for agent trajectories, which we also include in our experiments, a universal reviewer note inside one tool output flips up to 30% of held-out unsafe trajectories (§4.4). This result reveals a real and critical risk of such universal suffixes when Jev serves as a safety guardrail or a trajectory judge for agents. Finally, since one typed decision model can serve many tasks, we ask whether a universal suffix also transfers to other datasets and tasks (RQ4). Our experiments reveal that it does. One suffix that we generated on a benchmark of full arXiv papers [21], with a question about computer science, flips 90–100% of the documents of five other datasets without any query on them, and these datasets ask different questions, for example whether a news text is about sports or whether a patent is about chemistry or metallurgy (§4.5). An attacker can therefore find a suffix on one task and use it against applications with other tasks. Taken together, these findings lead us to believe that the robustness of the typed decision model still needs to be evaluated and enhanced. Its evaluation must therefore include strict adaptive attacks [7, 64] to show its robustness.

References (74)