Detecting Language Model Attacks with Perplexity
Paper · 2023 · Gabriel Alon and Michael Kamfonas
Summary
A harmful request can be rejected in its ordinary form and accepted after an attacker appends a peculiar string. Detecting Language Model Attacks with Perplexity investigates whether the strangeness of these additions provides a useful defensive signal. Gabriel Alon and Michael Kamfonas study adversarial suffixes: token sequences optimized to make a protected language model answer requests that its safeguards would otherwise reject. Rather than examining the protected system’s internal operation, they measure how surprising the submitted text appears to GPT-2. Their central finding is that generated suffixes frequently leave a recognizable statistical footprint, but identifying that footprint requires more than rejecting everything with a high surprise score.
The authors produce 1407 candidate attack prompts using the released Greedy Coordinate Gradient procedure, usually abbreviated GCG, against Vicuna-7b-1.5. The generation draws on 67 randomly selected harmful objectives and takes 50 hours on an A100 with 40GiB of memory. For comparison, they assemble ordinary inputs from document passages, comprehension questions, instruction-following collections, conversations, and programming tasks. They also examine 79 manually written jailbreak prompts. GPT-2 assigns large perplexity values to most substantive machine-generated candidates. Perplexity summarizes the improbability of an observed token sequence according to a particular predictor; it is not a direct assessment of malicious intent. The distinction becomes crucial because legitimate mathematical notation, code, unfamiliar languages, and brief conversational fragments can also receive extreme scores.
The proposed detector therefore uses a pair of measurements: GPT-2 perplexity and token count. A LightGBM classifier learns their relationship to the attack labels. The motivation is visible in the data: an optimized attack usually contains an instruction followed by a substantial suffix, whereas many ordinary inputs with very high perplexity are brief. The authors select a decision threshold on validation data using F₂, a measure that prioritizes recovering attacks over making every positive prediction correct. They report validation F₂ of 95.6% and test F₂ of 94.2%. On the mixed test collection, perplexity cutoffs of 400 and 1000 yield F₂ values of 83.3% and 87.2%, respectively.
The apparent success has a sharp boundary. Manually composed jailbreaks resemble ordinary writing under these measurements, and the detector fails to recognize the tested human-written category. Excluding that category raises the classifier’s reported test F₂ to 99.1%; this is a narrower evaluation, not a repair of the failure. The paper consequently supports a compact detector for the particular generated-suffix distribution examined. It does not establish general recognition of jailbreaks, robustness to an attacker adapting to the detector, or a measured reduction in harmful answers from a deployed service. Its broader contribution is methodological: a promising anomaly signal must be tested against legitimate variation, and its failures can reveal exactly what the signal measures.
Interesting ideas
Look for by-products of optimization. An attack can exploit one system while producing text that looks unusual to another. The useful detection feature may therefore be an incidental consequence of attack construction instead of a representation of the attacker’s objective. This approach applies whenever a generation process leaves recognizable artifacts. Its validity depends on checking whether successful examples can also be produced without those artifacts.
Give an anomaly an explanatory companion. A large surprise score is ambiguous until something about the input’s circumstances helps interpret it. Here, length distinguishes some short legitimate fragments from longer requests containing optimized suffixes. The reusable principle is to search for a small, meaningful companion feature before assuming that a much larger representation is necessary. In text classification, such combinations can improve discrimination while keeping the decision inspectable.
Make the ordinary class difficult. A detector tested only against polished prose may confuse unfamiliarity with abuse. The paper’s inclusion of coding requests, symbolic material, and conversational turns exposes this problem. Engineers can borrow the same approach for spam screening, data validation, or corpus cleaning: populate the accepted class with legitimate cases that resemble the suspected defect. Those cases determine whether a useful signal becomes an obstructive filter.
Treat the decision threshold as a policy choice. Learning a score and choosing when to act on it are separate tasks. The authors use validation data to select an operating point that favors recall through F₂. Elsewhere, this separation allows the same underlying detector to support different costs of missed threats and unnecessary intervention. It also forces an explicit account of what other safeguards can do after a detection failure.
Distinguish an attempted attack from a demonstrated breach. The paper labels adversarial purpose rather than requiring success against every possible target. That is a coherent choice for detecting attempted misuse, but it answers a different question from measuring prevented harmful outputs. The distinction is reusable in security evaluation more generally: record the submitted attempt, the detector’s response, and the target’s behavior as separate observations.
Use a difficult neighboring category to test the explanation. Human-written jailbreaks are especially informative because they preserve adversarial purpose while frequently avoiding conspicuous statistical irregularity. Their failure shows that the detector is recognizing a property of the generated strings rather than malicious purpose in general. Similar comparisons can clarify whether a system has learned a task-relevant relationship or a convenient artifact of the data.
Deep dive: Detecting Language Model Attacks with Perplexity
How GPT-2 perplexity and prompt length expose generated jailbreak suffixes, why ordinary text triggers false alarms, and where detection fails. · about 38 minutes to read
How Mova uses it
Mova is a small, transparent language system implemented in Rust. Its native understanding proceeds through dependency trees, event frames, and a maintained representation of the text’s world. The connections below are proposed transfers of the paper’s ideas, assessed against documented Mova mechanisms. The status marks describe that comparison; they do not certify exhaustive implementation coverage or establish measured benefits from this paper. In particular, the documented native pipeline does not establish an implementation of the GPT-2–LightGBM detector.
Idea: Examine the residue left by a generator. Where: Introduction, Related Work, and Figure 1. Area: security analysis. Mova: нове. A worker receiving externally generated text could retain a separate observation about unusual input form before attempting task interpretation. The proposal concerns generator artifacts, not a conclusion that unusual text is hostile; the exact detector’s implementation status is unknown. Why Mova: a bounded warning could help diagnose suspicious inputs without changing the native reader’s account of their meaning.
Idea: Combine a weak signal with an interpretable contextual feature. Where: Methods and Analysis. Area: statistics. Mova: частково є (en feature-based parsing and documented rule conditions). The paper’s perplexity–length interaction suggests investigating similarly small combinations for native diagnostics. For instance, an unfamiliar sequence and its structural context could be assessed together instead of using unfamiliarity alone. This would be a new application of an existing feature-based approach, with no established transfer of the paper’s scores.
Idea: Include legitimate look-alikes in evaluation. Where: Data, Analysis, and Appendix B. Area: evaluation. Mova: частково є (negative controls and held-out checks described in README.md and docs/architecture.md). A proposed input diagnostic should be tested on ordinary code, notation, multilingual material, and short replies. These examples would challenge the suspected detection signal directly. Existing regression discipline provides a place for such checks, but the digest does not establish this particular evaluation collection.
Idea: Separate the learned score from the action threshold. Where: Methods, Equation 1. Area: decision policy. Mova: частково є (layers routing thresholds and explicit escalation outcomes). A statistical input score could remain an observation until a configured policy decides whether it warrants review, abstention, or another bounded response. Mova already exposes threshold-based routing decisions, but this does not demonstrate a security classifier or a suitable operating point for one.
Idea: Keep attempted misuse separate from successful execution. Where: Methods and Appendix A.1. Area: operational evidence. Mova: вже є (docs/hybrid-system.md, worker receipts and admitted outcomes). Mova distinguishes a request, a tool result, and evidence sufficient for the next action. The paper supplies a closely related evaluation lesson: an attempted jailbreak, a detected input, and a harmful answer are different events. A worker report should preserve those distinctions rather than treating a suspicious request as proof of a breach.
Idea: Test an explanation with a neighboring failure category. Where: Section 4.3, Figure 2, and Table 1. Area: evaluation design. Mova: частково є (school controls and rule regression gates). A native diagnostic should face cases sharing the relevant intent while differing in surface appearance. Fluent adversarial requests would test whether a filter detects abnormal form or something broader. This extends Mova’s existing control-based assessment; the specific paired security evaluation remains a proposal.
Idea: Identify the scoring source in every observation. Where: Methods, Equation 2, and Limitations. Area: provenance. Mova: вже є (source-bound groupants and explicit consultant boundaries in docs/hybrid-system.md). A perplexity result would need to retain the scorer’s identity, tokenization assumptions, and input scope. Mova’s evidence design already supports source-bound observations. The new application would prevent a number produced by an external predictor from being presented as a native proof of danger.
Idea: Keep statistical irregularity apart from semantic interpretation. Where: Analysis and Conclusion. Area: pragmatics. Mova: вже є (separation of linguistic observations, task concretization, and admitted actions in docs/hybrid-system.md). An unusual token sequence might still have an ordinary meaning, while a fluent request could seek an impermissible action. Mova’s tree and frame analysis should therefore remain distinct from an anomaly flag. The paper gives a concrete reason to preserve this separation during any future screening experiment.
Idea: Make the evaluated input unit explicit. Where: Appendix B.5. Area: dialogue and data processing. Mova: частково є (world document context and bounded planner referent handling). A conversational fragment should carry a record of whether it was assessed alone or with preceding turns. Mova already maintains context and can refuse task concretization when a referent is missing. Applying the same discipline to statistical scoring could distinguish context loss from a genuinely exceptional input.
Idea: Give undefined measurements their own outcome. Where: Appendix B.5. Area: numerical robustness. Mova: нове. Some ordinary conversational items produce NaN perplexity in the paper. A proposed Mova screening adapter should expose an unavailable measurement explicitly rather than silently converting it into a safe or unsafe label. The digest does not establish that adapter or its handling of undefined scores. Why Mova: explicit measurement failure fits Mova’s preference for reported gaps and avoids invented certainty at an operational boundary.
Idea: Audit initialization artifacts before assigning labels. Where: Section 4.2, Figure 1, and Table 1. Area: dataset quality. Mova: частково є (validated staging in mova-enrich and reviewed admission boundaries). The repeated-mark starter strings show why a generator’s output directory is not automatically a collection of valid positive examples. Proposed training material should retain candidate status until its role is checked. Mova already separates staged drafts from admitted knowledge; this paper suggests another concrete source of mislabeled candidates to guard against.
Idea: Record adversarial purpose and observed efficacy separately. Where: Methods and Appendix A.1. Area: annotation. Mova: частково є (source and outcome distinctions in groupants and worker reports). A security annotation could say that an input was constructed as an attack while leaving its success against a particular target unknown. This would preserve information without fabricating verification. The proposed annotation schema is not established by the digest, although the evidence separation needed to support it already exists.
Idea: Preserve the exact prompt-construction procedure. Where: Appendices B.2, B.3, and B.6. Area: reproducible data preparation. Mova: вже є (tools/sources provenance and version-bound dictindex imports). Joining instructions, passages, and questions changes the sequence being measured. A Mova experiment should therefore bind observations to the actual constructed input and its source version. Existing source fingerprints and immutable import identities provide a relevant mechanism, though not an existing perplexity experiment.
Idea: Reserve validation for operating-point selection. Where: Methods. Area: evaluation. Mova: вже є (held-out development and release assessment boundaries described in README.md and docs/architecture.md). A proposed detector could choose its threshold on development evidence while keeping final assessment separate. This matches Mova’s stated restriction against repeatedly consulting release tests. The paper does not supply a threshold that can be imported unchanged into Mova’s different input distribution.
Idea: Report the prevalence of the evaluated event. Where: Methods. Area: statistics. Mova: нове. The paper states that adversarial prompts form less than 1% of its combined collection, making the mixture important to interpretation. A Mova security report could retain the observed class composition alongside its detection metrics. The digest does not establish such a report. Why Mova: prevalence helps explain whether a useful-looking score corresponds to manageable review volume or frequent unnecessary intervention.
Idea: Report performance by attack family. Where: Table 1 and Table 2. Area: error analysis. Mova: частково є (per-question school traces and categorized diagnostic gaps). Mova could keep generated-suffix attempts, fluent jailbreaks, and legitimate unusual inputs in separate report categories. This would prevent an aggregate score from hiding a complete category failure. Existing traces support inspection, but the particular security taxonomy and measurements remain unverified.
Idea: Treat population removal as a diagnostic, not a repair. Where: Analysis and Table 2. Area: evaluation interpretation. Mova: частково є (same-question comparisons required by mova-enrich). Removing human-written attacks improves the reported score because the evaluation changes. Mova should retain an explicit distinction between improvement on unchanged cases and a result obtained from a narrower population. Its enrichment guidance already rejects score changes alone as sufficient evidence of progress.
Idea: Compare a learned boundary with a simple baseline. Where: Analysis and Table 2. Area: experimental design. Mova: вже є (negative controls and comparative gates described in README.md). Before accepting a statistical addition, Mova can compare it with a transparent rule using the same held-out inputs. Here, the paper contrasts a classifier with perplexity cutoffs. The transferable requirement is a meaningful baseline, not an assumption that the more flexible method must win.
Idea: Isolate feature value from learner flexibility. Where: Methods and Table 2. Area: ablation design. Mova: нове. The reported comparison changes both the feature set and the kind of decision boundary. A Mova study could separately test a single-feature learner, a contextual feature alone, and their combination. These experiments are not supplied by the paper or established in the digest. Why Mova: separate controls would show whether a proposed statistic contributes information or merely benefits from a more flexible selector.
Idea: Declare the adversary’s knowledge and budget. Where: Related Work, Section 4.1, and Limitations. Area: threat modeling. Mova: частково є (explicit budgets and configuration boundaries in recursive self-use). Mova already bounds worker operations, but a detector evaluation would additionally need to state whether the attacker knows the screen and can optimize against it. A default-generator result should remain distinct from an adaptive test. The paper’s own experiment supports only the former setting.
Idea: Keep offline generation cost separate from online screening cost. Where: Section 4.1 and Methods. Area: systems measurement. Mova: частково є (tools/twin cost prediction and measured execution). The attack collection’s generation time is not a measurement of request-filter latency. A Mova implementation could use its execution accounting to report preparation, feature extraction, and decision costs separately. No such timing for this detector is established, and the paper does not supply an online performance benchmark to inherit.
Idea: Evaluate unfamiliar languages without treating them as attacks. Where: Analysis and Appendix B. Area: multilingual evaluation. Mova: частково є (English assessed core, French repair work, and explicit language limits). A statistical screen introduced into Mova should disclose where its scorer is less comfortable with legitimate language. This matters especially when separate experimental tools process material beyond the English core. The proposal is to measure false alarms by language scope, not to infer maliciousness from a failed native parse.
Idea: Preserve technical notation as legitimate evidence. Where: Analysis and Appendices B.4 and B.7. Area: mathematics and programming. Mova: частково є (math, mlab, and structured mathematical input handling). A future filter must be tested on the kinds of symbols and code that Mova’s supported tasks legitimately require. The paper shows why prose-based expectations can conflict with those inputs. Existing mathematical capability does not establish compatibility with a new anomaly screen.
Idea: Avoid transferring a score to an untested scorer. Where: Limitations. Area: measurement validity. Mova: вже є (exact and approximant distinctions in documented execution modes). Replacing GPT-2 with a native rule statistic would create a different measurement procedure. Mova’s existing requirement to distinguish exact behavior from measured approximation offers an appropriate standard: any replacement needs its own comparison. The published detection results cannot establish agreement for that replacement.
Idea: Keep safety filtering outside knowledge admission. Where: Methods and Conclusion. Area: learning boundaries. Mova: вже є (reviewed enrichment staging, dictionary admission gates, and consultant separation). A prompt’s classification should not make its content true, false, or eligible for training. The paper studies detection labels, not knowledge validation. Mova’s existing admission boundaries should continue to govern any information obtained from flagged inputs or their analysis.
Idea: Test downstream consequences separately from input classification. Where: Methods, Table 1, and Conclusion. Area: end-to-end evaluation. Mova: частково є (operational checks that require an admitted outcome instead of a successful exit). A proposed screen could be evaluated first as a classifier and then as part of a bounded worker workflow. The latter would ask whether it changes completed actions or harmful responses. The paper provides classification evidence; it does not establish those operational effects for Mova.
The problem and its context
A refusal can depend on the surrounding tokens
The paper starts from an uncomfortable property of aligned assistants. A direct request for prohibited assistance may trigger a refusal, yet appending apparently incoherent material can change the continuation. The added material need not supply a convincing argument or a meaningful clarification. Its effectiveness can arise from an optimization procedure searching over tokens.
This places the problem between bias, fairness, and safety and the mechanics of language generation. The harmful objective remains recognizable to a reader. What changes is the exact sequence presented to the system. A safeguard that appears reliable on ordinary wording may consequently fail when that wording is embedded in an adversarially chosen prompt.
The immediate attack source is Universal and Transferable Adversarial Attacks on Aligned Language Models. Alon and Kamfonas use its released procedure instead of proposing a new optimizer. As they describe the earlier findings, suffixes developed against an accessible system can also affect other systems. This transferability makes local attack generation relevant even when the eventual target does not expose its internals.
Their defensive question follows from the appearance of those suffixes. The strings may be effective against a target while remaining conspicuously unlike ordinary text. Could a separate predictor recognize that difference before the request reaches the protected service? The paper investigates this possibility without assuming that a statistical irregularity is sufficient evidence of harmful purpose.
Alignment supplies the behavior being attacked
The authors situate jailbreaks after efforts to reduce abusive outputs. They discuss reinforcement learning from human feedback and related alignment work, including Training language models to follow instructions with human feedback. These procedures help explain why a system refuses a harmful request in the first place.
The GPT-4 Technical Report appears in this context as a reference for safeguards and refusals. The detector does not replace those safeguards or retrain the protected assistant. It proposes an additional input-side decision based on the submitted text.
The authors also discuss the argument of Fundamental Limitations of Alignment in Large Language Models. Their account is that undesirable behavior can remain accessible when alignment has not removed it entirely. They connect this concern with evidence from Jailbroken: How Does LLM Safety Training Fail? and the transferable-suffix work.
Those references motivate the search for additional protection. They do not make the present detector a general solution to alignment failure. Its evidence concerns a recognizable class of inputs, and its strongest results depend on the distinctive form of those inputs.
Why perplexity seemed promising
Perplexity measures how well a predictor anticipates an observed sequence. The authors choose GPT-2 partly because its training sought good predictions on ordinary text. Their hypothesis is that optimized suffixes depart from the patterns that such a predictor expects.
The analogy to human perception is limited but useful. People can often see that an appended string has an unusual mixture of punctuation, word fragments, and abrupt transitions. GPT-2 offers a numerical way to register some departures from familiar textual patterns. The numerical result remains conditional on its own probability assignments.
The related-work discussion traces token optimization back to AutoPrompt. The authors describe GCG as broadening that search strategy by considering replacements across coordinates. The important continuity is systematic manipulation of discrete input tokens, rather than the construction of a persuasive message by a person.
They also mention a genetic attack procedure whose examples contain similarly strange suffixes. That observation motivates possible use beyond GCG, but the paper does not evaluate a second generated-attack algorithm. Similar appearance is a hypothesis about transfer of the detector, not an additional result.
Language changes the robustness question
The authors discuss earlier criticism of a narrow focus on small, norm-bounded perturbations. In image research, the goal can be to alter an input while keeping the change difficult for a person to notice. With text, replacing or appending a token produces something inspectable.
The suffix attacks exploit many such perceptible changes. This suggests that a defense may benefit from detecting the visible artifact even if it cannot make the underlying assistant robust to every possible adversarial input. The paper treats this as a practically relevant problem instead of requiring a complete robustness guarantee.
It also recognizes a counterexample to the entire intuition. Earlier attacks on structured prediction deliberately minimized GPT-2 perplexity to encourage fluent adversarial text. The targeted tasks included part-of-speech tagging and dependency parsing. If adversarial text is made statistically similar to ordinary writing, a high-perplexity detector may have little useful signal.
Existing defenses already raised the adaptive question
Baseline Defenses for Adversarial Attacks Against Aligned Language Models is the closest defensive comparison discussed. The authors describe a windowed perplexity filter alongside other defenses. They attribute blocking 80% of adaptive white-box attacks to that work and report its average benign rejection rate on AlpacaEval as roughly 7%.
Those measurements belong to the earlier study. They are not a direct baseline produced with the data and classifier used by Alon and Kamfonas. Their importance is that the attacker explicitly knew about perplexity filtering and incorporated perplexity reduction into optimization.
The authors contrast that computational setting with their more modest attack-generation effort. They also discuss RAIN, which changes response generation through evaluation and rewinding, and attribute an attack success rate of 19% to its reported experiment. This represents another defensive location. Input screening and response-generation control address different observations, so the cited results cannot be ranked as though they measured an identical task.
The method, step by step
The proposed procedure has an offline preparation stage and a subsequent classification stage. Offline work supplies labeled prompts, computes their measurements, fits a classifier, and chooses an operating threshold. The resulting detector then evaluates an incoming prompt through those same measurements.
Building and evaluating the prompt detector
The steps in order.
Decide what the label means
The positive class represents adversarial prompts. The authors define this in terms of the input’s purpose instead of its success against a particular protected system. A failed attempt can still matter if the goal is to identify malicious activity.
This is a deliberate separation between detection and exploitation. The same prompt may succeed against one target and fail against another, but its adversarial construction need not change. The paper therefore does not require a successful harmful response from every candidate before including it in the attack analysis.
There is a further distinction within the generated material. The starter suffix consists of repeated punctuation, and some records retain that initialization. The authors do not regard those records as substantive attacks. Their treatment affects how the low-perplexity cluster and the category-level results should be read.
Obtain machine-generated examples
The authors run GCG in its individual setting with Vicuna-7b-1.5. They select 67 objectives at random from the harmful-behavior objectives distributed with the attack code. The paper describes producing 20 suffix predictions for an objective and reports an overall collection of 1407 prompts.
Each run starts from 20 exclamation marks separated by spaces. This detail later explains why the generated collection contains statistically different groups. A record that still contains the starter is not equivalent to a record containing an optimized irregular string.
The authors treat GCG as an existing mechanism. They do not modify its objective to evade their proposed detector. Their collection consequently represents attacks produced under the chosen default configuration, rather than an adversary explicitly optimizing against the fitted classifier.
Producing the collection requires 50 hours on an A100 with 40GiB of memory. That describes preparation of the experimental attack data. It does not measure how long GPT-2 takes to score a new prompt or how quickly the classifier returns a decision.
Add a contrasting adversarial category
The manually written collection contains 79 jailbreak prompts associated with GPT-4. Its role is not simply to enlarge the attack class. It tests whether adversarial inputs that read more like ordinary language exhibit the same statistical signature.
The appendix describes these examples as prompts claimed to bypass GPT-4 safeguards. The distinction between a source’s claim and independent verification matters. The detector experiment studies their assigned category and measured form; it does not provide a fresh comprehensive validation of every claimed jailbreak.
Their inclusion makes the paper more informative than a generated-suffix experiment alone. If the features worked equally well on both categories, the interpretation might extend further. Their failure instead helps locate the feature pair’s boundary.
Construct ordinary prompts from heterogeneous sources
The benign comparison includes passages as well as explicit requests. This is appropriate to the question being asked: can a statistical measure separate generated attacks from a realistic range of text that a service might legitimately receive?
Different datasets require different assembly procedures. Some records are used as they stand. Others become prompts by joining an instruction with a passage or an input field. These transformations determine the exact token sequence measured by GPT-2.
For BoolQ, the constructed input asks for an answer based on a passage and includes the question and passage. For SQuAD-v2, the request refers to the document title and asks for an answer recoverable from its context. Tapir combines instruction and input fields.
The paper does not experiment with alternative wordings of those wrappers. Its findings therefore concern the stated constructions. An added instruction is part of the measured text, not an invisible container surrounding an otherwise unchanged example.
Represent the text in tokens
Tokenization supplies the units used by GPT-2. The sequence length feature counts those units. It should not be interpreted as a count of characters or as an ordinary word count.
This matters for unusual text. A piece of punctuation, an unfamiliar string, or a code fragment may be divided differently from a familiar word. Both the probabilities and the sequence length depend on the representation supplied to the scorer.
The paper uses the complete prompt as the object of measurement. It does not report a classifier that receives a separately identified suffix, a syntactic analysis, or a semantic description of the harmful objective.
Calculate perplexity from conditional probabilities
For each token, GPT-2 supplies a probability conditioned on preceding tokens. The calculation aggregates how much probability the predictor assigned to the tokens that actually appeared.
PPL(x) = exp(−(1/t) ∑ᵢ₌₁ᵗ log p(xᵢ | x<ᵢ))
Here, x denotes the prompt’s token sequence, and t is its token count. The position index is i. The token at that position is xᵢ, while x<ᵢ represents the preceding portion of the sequence. The conditional probability p(xᵢ | x<ᵢ) comes from GPT-2. The operator log takes its logarithm, the summation combines positions, division by t averages across them, and exp transforms the negative average into perplexity.
A prompt receives a higher score when its observed tokens are collectively less expected. The measure is relative to the scorer. It does not establish that the request is grammatically defective, incomprehensible, or unsafe.
Because the calculation averages over the supplied sequence, ordinary instructions and unusual suffix material contribute jointly. This differs from the windowed approach discussed in related work, which can inspect smaller portions. The paper does not conduct a direct comparison between those aggregation strategies.
Retain length as an additional observation
The second feature gives the classifier information that an overall surprise score discards. Many generated attacks contain the original request plus an appended token sequence. Some legitimate examples with extreme perplexity are instead isolated fragments.
This does not make length an attack criterion on its own. Ordinary document passages can be long, and ordinary conversation can be short. The useful hypothesis concerns where an input lies when length and perplexity are considered together.
The scatter plots make that hypothesis inspectable. Inputs that overlap along the perplexity axis need not overlap in the joint space. Conversely, the human-written jailbreaks remain mixed with benign material even when length is visible.
Create learning, validation, and test partitions
The authors use different partition proportions for the adversarial and ordinary classes. Attack examples follow a 50:25:25 division across training, validation, and test data. The corresponding ordinary-input division is 70:15:15.
The complete mixture contains less than 1% adversarial prompts. This imbalance explains the choice to focus on metrics involving positive predictions and recovered attacks rather than headline accuracy alone.
The paper gives the partition proportions but not an objective-grouped holdout specification. Since several generated candidates arise from the selected harmful objectives, unseen prompt instances and unseen underlying objectives are different generalization questions. The reported procedure establishes the former more directly.
Fit the classifier
LightGBM learns a mapping from the feature pair to a prediction score. The training labels tell it which examples belong to the adversarial category.
The learner can represent a boundary that changes with length. In contrast, a single perplexity cutoff imposes the same decision at every length. This extra flexibility is central to the proposed improvement.
The input representation remains deliberately limited. It does not contain a protected assistant’s answer, a human judgment about the prompt’s meaning, or internal activity from the target. The classifier’s success must therefore arise from regularities available in the measured pair.
The paper identifies the learning algorithm but does not give a detailed parameter specification. Its description supports understanding the design and comparisons, while leaving some implementation choices unspecified.
Select an operating point with F₂
A classifier score must be converted into a positive or negative decision. The authors evaluate candidate thresholds on validation predictions and choose one that maximizes their preferred F-score.
Fβ = (1 + β²) × precision × recall / (β² × precision + recall)
Fβ is the combined metric. Precision describes how frequently a flagged example actually belongs to the positive class. Recall describes how much of the positive class is recovered. The parameter β sets their relative emphasis, and β² is its square.
The authors choose β = 2. Their policy therefore gives additional importance to recovering threats. It still penalizes false alarms through precision; prioritizing recall is not equivalent to disregarding legitimate users.
The paper explicitly connects this choice to operational costs. Rejecting a valid request and allowing a dangerous one may carry different consequences. The expected mix of inputs and the strength of other protections also matter.
Evaluate without retuning on the test result
The final test predictions are examined after threshold selection. The authors report the aggregate score and inspect where errors occur in the feature space.
This combination of a held-out metric and category analysis is important. The metric establishes comparative predictive performance under the stated setup. The inspection explains why a strong aggregate result can coexist with failure on an entire adversarial style.
Experiments and results
What the adversarial data contains
The principal generated collection has 1407 prompts. Its labels reflect attack construction, and the appendix includes censored examples tested successfully against Vicuna-7B. The collection as a whole should still be understood as candidate attack material instead of a verified inventory of universally successful exploits.
The starter-suffix records complicate a simple positive-class interpretation. The authors identify repeated-exclamation examples as initialization remnants and state that their tests did not show those examples bypassing safeguards. They are excluded from the substantive interpretation of the attack cluster.
The human-written collection supplies 79 examples. These have the adversarial label but do not share the same striking perplexity behavior. Their presence is crucial to understanding the mixed evaluation and the later category-removal analysis.
Passage and comprehension inputs
DocRED contributes 998 validation passages. These are multi-sentence documents associated with entity and relation extraction. Their inclusion supplies ordinary extended text rather than only direct assistant instructions.
The validation collection from the BoolQ subset of SuperGLUE contributes 3270 examples. The authors turn each into a passage-based answering request. The underlying task is discussed in BoolQ.
SQuAD-v2 supplies 11,873 validation records. Each resulting prompt includes a title, context, and question. The paper cites SQuAD as its question-answering reference while identifying the actual dataset version used as SQuAD-v2.
These collections provide relatively self-contained inputs. Their instructions and passages give GPT-2 more surrounding material than a detached conversational acknowledgment. That difference helps explain why ordinary text cannot be treated as a single statistical population.
Reasoning, conversation, and code inputs
Open-Platypus contributes 24,926 instructions from its training collection. The authors retain the instructions without adding surrounding text. They describe the collection as oriented towards reasoning and scientific questions and connect it to the Platypus project.
Puffin supplies conversation with GPT-4. The appendix examines 6994 human-side turns and a separate sample consisting of the initial human contributions from 3000 conversations. The opening-only sample has a distinct analytical role because its inputs are more comparable to self-contained attack requests.
Tapir contributes 116,862 records. Their prompt construction joins the instruction and input fields, broadening the instruction-following comparison.
For programming, the authors take the first 10,000 examples of instructional code-search-net-python. This category matters because a detector that equates unfamiliar symbols or unusual token transitions with attacks can interfere directly with legitimate code and programming requests.
The paper presents the opening-turn Puffin analysis separately from the main human-turn inventory. It does not provide a fully explicit row-level account of how every appendix sample enters the pooled classifier dataset. The sample descriptions should therefore remain distinct instead of being silently added together.
The generated prompts occupy recognizable regions
The low-perplexity generated cluster contains the starter strings. The figure caption places their perplexity below 18. Another cluster lies above 400, with a small intermediate group.
The conclusion reports that nearly 90 percent of the examples have perplexity above 1000. It also states that relevant generated examples exceed 200. These observations explain why the authors initially consider a simple cutoff plausible.
The word “relevant” carries substantive weight. The repeated-mark records are not interpreted as valid examples of the optimized attacks that motivate the defense. Including their low scores without their special status would obscure the actual pattern.
The resulting evidence supports a specific causal account of detectability: the chosen generator often creates text that GPT-2 finds improbable. It does not show that improbable text is inherently adversarial.
Benign inputs can be even more surprising
The ordinary collections contain examples overlapping the attack range on perplexity. The authors report that some benign inputs exceed attack perplexities by an order of magnitude.
They associate elevated values with non-English tokens, mathematical expressions, code, misspellings, and irregular symbols. Brief fragments also create difficulties. These are ordinary user-input categories, not pathological exceptions that can automatically be discarded.
This overlap is the central empirical objection to plain thresholding. Raising a threshold to spare unusual legitimate text can miss attacks; lowering it to catch generated suffixes can reject appropriate requests.
Length helps because some extreme benign cases are short. The data consequently permits separation in the joint feature space that is unavailable along the perplexity axis alone. The result depends on this distributional relationship, not on a universal rule that attacks are longer than ordinary prompts.
The main baseline comparison
The baseline classifies a prompt as adversarial when its perplexity passes a cutoff. The authors identify 997 as the optimizing threshold and report comparison results at 400 and 1000.
Mixed held-out prompts, F₂ comparison
The learned feature combination performs better than either perplexity cutoff.
The numbers
| System or setting | F₂ % |
|---|---|
| Perplexity cutoff 400 | 83.3 |
| Perplexity cutoff 1000 | 87.2 |
| Perplexity and length with LightGBM (this paper) | 94.2 |
The comparison establishes that the proposed setup is more effective on the stated test mixture than the reported single-threshold alternatives. It supports using information beyond a universal surprise boundary.
It does not establish that LightGBM is the only suitable learner. The study does not compare several classifiers receiving the same pair of measurements. Nor does it show whether a carefully designed transparent joint rule would achieve similar performance.
The validation score is 95.6%, while the test score is 94.2%. The distinction matters because validation predictions determine the operating threshold. Test performance is the subsequent evaluation, not another threshold-selection result.
A narrower population produces a stronger score
The authors recompute performance after removing the human-written jailbreak observations from the test evaluation.
Held-out prompts without human-written jailbreaks, F₂
Removing the fluent attack category reveals strong generated-suffix separation.
The numbers
| System or setting | F₂ % |
|---|---|
| Perplexity cutoff 400 | 87.0 |
| Perplexity cutoff 1000 | 91.6 |
| Perplexity and length with LightGBM (this paper) | 99.1 |
This analysis helps identify the source of the remaining difficulty. The classifier performs especially well when the attack category is restricted to the generated-suffix setting.
The result should not be described as improved detection of the removed examples. Their predictions have not been corrected. The scoring population has changed, making the diagnostic narrower.
That narrower result is still valuable. It shows why the paper can reasonably propose a detector for a particular attack style while rejecting a claim of broad jailbreak recognition.
Category-level counts and a reporting conflict
Table 1 records 0 true positives and 23 false negatives for the human-written test group. The detector therefore fails to identify that tested category.
For the machine-generated group, it records 355 true positives, 4 false negatives, and 10 true negatives. The table caption explains the true negatives as disqualified repeated-exclamation records, rather than valid successful attacks that the detector correctly accepts.
The analysis prose makes a stronger statement than these counts support: it attributes every false negative to the human-written category. The table instead records machine-generated misses too. The appropriate reading preserves the discrepancy while retaining the supported overall pattern of strong suffix detection and failed human-written detection.
The figure caption also makes broad claims about the origins of errors, but the numerical presentation does not supply a complete ordinary-input false-positive breakdown. It is therefore inappropriate to derive an unstated benign rejection rate from the category table.
What was not measured
These experiments evaluate input classification. They do not report the harmful-answer rate of a protected assistant with and without the filter.
A flagged candidate might have been refused anyway. A missed candidate might also fail to induce an unsafe answer. The relationship between detection and prevented harm requires additional observations about the target’s responses.
The paper also does not report serving latency or throughput for the complete screen. Its compact feature representation is clear, but compactness alone does not quantify the cost of obtaining GPT-2 probabilities.
What the ablations show
The paper contains comparative settings and distribution analyses instead of an extensive component-removal study. Its main controlled comparison concerns a perplexity cutoff versus the learned use of perplexity and length; its other analyses distinguish input categories and inspect errors.
Length helps within the reported comparison
The classifier improves on both cutoff settings in the mixed test evaluation. This is consistent with the authors’ explanation that short benign fragments and longer generated attacks can share a perplexity range.
The comparison, however, changes more than the feature list. A cutoff is a restricted decision rule, whereas LightGBM can learn a more flexible boundary. The experiment therefore combines the value of additional information with the value of a different learner.
There is no reported length-only system. There is also no reported LightGBM baseline restricted to perplexity. Those omissions prevent a precise decomposition of how much benefit comes from length and how much comes from flexibility.
The scatter plots support the proposed interaction visually, but they do not substitute for those missing comparisons. The justified claim is that the joint setup works better than the stated cutoff baselines under this evaluation.
Human-written attacks probe what the feature means
The manually composed category is a particularly revealing comparison because it preserves adversarial purpose while changing textual form.
Its low perplexities show that the detection signal is not equivalent to intent. Those examples can seek a jailbreak without producing the improbable token combinations characteristic of the generated suffixes.
Their placement among benign points in the joint plot explains why a more flexible boundary is not automatically enough. If the available measurements look similar across labels, changing the classifier cannot necessarily recover a distinction that the representation fails to express.
The stronger score after removing this category identifies the scope of success. It is evidence about the generated distribution, not evidence that the detector has become more general.
Starter strings expose a data-generation artifact
The repeated-exclamation group shows that records emitted during an attack-generation process need inspection before they become attack evidence.
Their low perplexity is not a contradiction of the central finding because the authors do not treat them as substantive optimized attacks. Instead, they reveal an artifact of initialization.
This distinction matters for interpretation and reproducibility. A record’s origin in an attack run does not on its own determine whether it should count as a positive example, an excluded case, or a negative control.
The paper explains their special role but does not give a complete processing specification tracing every such record through the learning pipeline. That leaves an accounting detail unresolved.
Conversational fragments reveal a missing-context problem
The Puffin appendix identifies ordinary short utterances with NaN perplexity values. Examples include acknowledgments and requests to continue.
Such inputs can be entirely appropriate in dialogue while making little sense as detached requests. The observation concerns the chosen scoring unit as much as the text itself.
The separate opening-turn sample offers a contrast: conversation starters tend to carry more of their own context. The paper examines their distributions but does not establish an optimal way to include prior conversation in scoring.
It also does not fully describe the downstream treatment of every NaN value. This is a practical reproducibility limit, distinct from the conceptual lesson that context-free measurement can mischaracterize ordinary interaction.
Limitations
Limits explicitly acknowledged by the authors
The authors state that a better representation of real interactions would be desirable. Their dataset spans several tasks, but it remains an assembled research mixture.
This matters because the relationship between perplexity and legitimacy depends on what users submit. A collection dominated by passages can differ from a service receiving many fragments, programming snippets, or multilingual requests. Coverage of several categories is useful without proving representativeness.
They also acknowledge their reliance on the default attack procedure. More generation time could change the resulting distribution. A detector fitted to the observed outputs may therefore behave differently on outputs produced with another computational effort.
The exclusive use of GPT-2 is another stated limitation. The study does not compare perplexity estimators or establish that the observed boundaries transfer to a different predictor.
The authors’ acknowledged failure on human-written jailbreaks
The paper explicitly concludes that its approach does not successfully identify the tested manually written attacks.
This failure is central, not peripheral. The detector depends on measurements of textual expectation and size. Neither directly represents whether the user is trying to bypass a safeguard.
A natural-looking adversarial instruction can consequently avoid the feature pattern that makes generated suffixes detectable. The test results demonstrate this limitation for the human-written collection examined.
The conclusion proposes other possible targets, including similarly strange generated strings and encoded exchanges. Those are research directions. The paper does not provide measurements demonstrating detection of the additional attack families.
A careful reader’s limit: adaptation is not evaluated directly
The authors discuss adaptive perplexity-aware attacks in related work, but their own generated collection uses the default procedure. They do not report an attacker optimizing specifically against their fitted classifier.
This distinction is substantial. An attacker aware of the screen could attempt to reduce perplexity, alter length, or otherwise change the joint distribution. Whether those changes preserve attack effectiveness is an empirical question.
The related window-filter study does not answer that question for this detector. Its measurements concern another procedure and evaluation setting.
The paper’s result therefore supports screening the observed attack population. It does not support a robustness guarantee against informed evasion.
A careful reader’s limit: labels do not measure downstream harm
The intention-based labeling policy is coherent for detecting attempted abuse. It does not automatically quantify safety improvement.
A detected attempt may not have been effective against the protected assistant. Conversely, an undetected attempt may still encounter a refusal. Classification and target behavior can diverge.
The censored examples demonstrate that generated suffixes can induce objectionable outputs in the tested setting. They do not establish the counterfactual effect of deploying the filter across the whole collection.
An end-to-end evaluation would need to preserve the detector decision and examine what the protected system actually produces under the relevant conditions. Those measurements are absent.
A careful reader’s limit: the holdout scope is incompletely specified
The split proportions are given, but the paper does not state that the underlying harmful objectives are partitioned separately.
This leaves uncertainty about the kind of novelty tested. A candidate prompt can be unseen while sharing an objective with training examples. Generalization to unfamiliar objectives is a different question.
The study also does not evaluate a held-out suffix-generation algorithm. Suggestions about detecting other generators rely on similarity of their artifacts rather than direct evidence.
The reported success should therefore remain tied to the supplied GCG configuration and the stated instance-level evaluation.
A careful reader’s limit: the classifier description leaves reconstruction gaps
The methods identify the algorithm and predictive features but omit a detailed training configuration.
The handling of undefined perplexity is also not fully specified. Because ordinary conversational inputs can produce NaN values, their treatment could affect learning and evaluation.
The generated total and per-objective prediction description are both reported, but the relationship between them is not fully reconciled. It would be inappropriate to infer an undocumented filtering or collection rule.
Similarly, the prose and table disagree about the source of false negatives. These issues do not remove the baseline comparison, but they constrain exact reproduction and precise error accounting.
A careful reader’s limit: aggregate F₂ is not a user-experience report
The chosen metric expresses a preference for recall. It does not show which legitimate users bear the false alarms.
A technical input collection and a prose collection may experience different rejection patterns. The paper identifies plausible sources of difficulty but does not give a comprehensive per-category false-positive analysis.
Attack prevalence matters too. The class mixture helps determine precision and therefore the practical usefulness of a selected threshold. A different deployment mixture can change that usefulness without changing the basic feature extractor.
Finally, the absence of online cost measurements limits efficiency claims. The design is simple in its representation and decision interface. The complete cost still includes obtaining probability estimates for each prompt.
The observation is empirical, not a safety guarantee
The strongest result describes separation in a particular held-out collection. It does not certify that all harmful prompts occupy a rejectable region or that every accepted prompt is safe.
That distinction is especially clear from the human-written failures. Fluent malicious instructions can share the same measurements as legitimate requests.
The paper’s lasting usefulness comes from preserving this boundary: a narrow statistical detector may contribute to protection, but its output must remain evidence about a particular pattern instead of a complete judgment of intent.
What came after
The subsequent citation record spans attack generation, benchmarking, defenses, and broader security assessment. It establishes that these works cite the perplexity study. For many entries, the available evidence identifies a research subject through the title instead of a detailed account of how the authors reused this detector. The connections below therefore distinguish an identifiable continuation of the problem from an unverified claim of technical inheritance.
Stealth and alternative attack construction
AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models makes stealth an explicit concern. That direction bears directly on the vulnerability exposed here: a detector benefits when attack construction leaves conspicuous irregularities. The citation connection does not, by itself, establish a measured result against the exact LightGBM system.
The separately titled AutoDAN: Interpretable Gradient-Based Adversarial Attacks on Large Language Models foregrounds interpretability within gradient-based attack construction. It belongs to the same broader question of what optimized attack text looks like. Its title and citation do not justify assuming that its outputs share the statistical distribution of the GCG candidates studied by Alon and Kamfonas.
Jailbreaking Black Box Large Language Models in Twenty Queries and Tree of Attacks: Jailbreaking Black-Box LLMs Automatically identify automated black-box attack settings. These works extend the surrounding discussion of attack construction under restricted access. The perplexity paper is relevant to that discussion because the detector’s observations are separate from the protected system’s internals.
Their inclusion in the citation record does not show whether their attacks evade the proposed feature pair. What it does support is a distinction between access assumptions and textual artifacts: black-box construction describes what the attacker can observe, while perplexity describes a property of the resulting input.
How Johnny Can Persuade LLMs to Jailbreak Them places persuasion at the center of its stated investigation. That is a meaningful neighboring direction because persuasive adversarial language need not look statistically bizarre. The human-written failure in the perplexity study explains why such a direction calls for a different evaluation from generated-suffix detection.
Benchmarking and broader assessments
JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Models identifies shared robustness evaluation as its purpose. Its citation connects the detector to later work concerned with making attack and defense comparisons more explicit.
The importance of that concern is visible in the original results. Including or removing an adversarial category changes the reported score substantially. A benchmark must therefore specify the evaluated population before a number can support a broad comparative claim.
TrustLLM: Trustworthiness in Large Language Models places the topic within a wider trustworthiness discussion. That citation does not turn a prompt-classification F₂ score into a general measure of trustworthy behavior. It shows the reach of the security question beyond a single detector.
The surveys Security and Privacy Challenges of Large Language Models and Jailbreak Attacks and Defenses Against Large Language Models similarly place the work in broader accounts of threats and protection. The available citation information does not specify their evaluation of the detector or establish a consensus about its deployment value.
Defensive evidence beyond external perplexity
SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks is another defensive work in the citation record. Its listed subject supports placing it alongside this input-screening study, but not reconstructing its method or assigning it a comparative advantage without further evidence.
SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decoding explicitly locates protection in decoding. This differs architecturally from deciding whether a submitted prompt resembles generated attack text. The two locations observe different parts of an interaction, and their outcomes need not be measured by the same metric.
Certifying LLM Safety against Adversarial Prompting names certification as its subject. That ambition clarifies the status of the perplexity result: held-out empirical discrimination is a different kind of evidence from a safety certificate.
Improving Alignment and Robustness with Circuit Breakers contributes another named defensive direction. Its citation links it to this literature, while the available description does not establish whether it reuses, replaces, or directly tests the perplexity–length classifier.
Input representation becomes part of the attack surface
FigStep: Jailbreaking Large Vision-Language Models via Typographic Visual Prompts names a visual representation of prompt content. ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMs identifies another representation-centered attack direction.
These citations matter because the original detector measures a token sequence using GPT-2. A change in how a request is represented can alter what is available to such a scorer. The titles do not establish the detector’s behavior on those attacks, and no corresponding result should be inferred.
Code-Switching Red-Teaming: LLM Evaluation for Safety and Multilingual Understanding connects safety assessment with multilingual input. This relates closely to the original paper’s observation that legitimate non-English content can receive elevated perplexity. It highlights a recurring evaluation problem: linguistic unfamiliarity and adversarial purpose must remain distinguishable.
Later detection subjects revisit the missing information
HiddenDetect: Detecting Jailbreak Attacks against Multimodal Large Language Models via Monitoring Hidden States explicitly names internal-state monitoring as its evidence source. That is different from obtaining a probability score from an external predictor. The citation record supports the architectural contrast, not a performance comparison.
Intention Analysis Makes LLMs A Good Jailbreak Defender foregrounds intent, the very distinction that perplexity cannot directly supply. Reasoning-to-Defend: Safety-Aware Reasoning Can Defend Large Language Models from Jailbreaking similarly identifies reasoning as a defensive focus.
The later title Beyond Surface-Level Detection: Towards Cognitive-Driven Defense Against Jailbreak Attacks via Meta-Operations Reasoning makes the contrast with surface detection explicit. Its presence does not retroactively invalidate the narrow generated-suffix result. It identifies a broader defensive ambition than the original measurements establish.
Across these directions, the question introduced by Alon and Kamfonas remains useful and precise: when does an attack-generation process leave a detectable trace, and what ordinary behavior resembles that trace? Their experiments answer that question convincingly for a restricted suffix distribution while demonstrating why the answer cannot be expanded into general recognition of malicious intent.
Institutions
Fields, topics and concepts
Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works
Topics 2Research subjects and languages the work is about.Language models & pretraining · 4,145 worksBias, fairness & safety · 590 works
Cite
Cite as Gabriel Alon and Michael Kamfonas. 2023. Detecting Language Model Attacks with Perplexity. arXiv:2308.14132.
@misc{alon2023detecting,
title = {{Detecting Language Model Attacks with Perplexity}},
author = {Gabriel Alon and Michael Kamfonas},
year = {2023},
doi = {10.48550/arxiv.2308.14132},
eprint = {2308.14132},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2308.14132}
}References
- Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, Nicholas Joseph, Saurav Kadavath, Jackson Kernion, Tom Conerly, Sheer El-Showk, Nelson Elhage, Zac Hatfield-Dodds, Danny Hernandez, Tristan Hume, Scott Johnston, Shauna Kravec, Liane Lovitt, Neel Nanda, Catherine Olsson, Dario Amodei, Tom Brown, Jack Clark, Sam McCandlish, Chris Olah, Ben Mann, and Jared Kaplan. Training a helpful and harmless assistant with reinforcement learning from human feedback, 2022. OpenAlex ↗ · Scholar ↗
- Wenhu Chen, Ming Yin, Max Ku, Pan Lu, Yixin Wan, Xueguang Ma, Jianyu Xu, Xinyi Wang, and Tony Xia. Theoremqa: A theorem-driven question answering dataset. preprint arXiv:2305.12524, 2023. our card
- Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. Boolq: Exploring the surprising difficulty of natural yes/no questions. In NAACL, 2019. our card
- Jeremy Cohen, Elan Rosenfeld, and Zico Kolter. Certified adversarial robustness via randomized smoothing. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 1310–1320. PMLR, 09–15 Jun 2019. URL https://proceedings.mlr.press/v97/cohen19c.html. OpenAlex ↗ · Scholar ↗
- Maria Cvach. Monitor alarm fatigue: an integrative review. Biomedical instrumentation & technology, 2012. OpenAlex ↗ · Scholar ↗
- Amelia Glaese, Nat McAleese, Maja Trebacz, John Aslanides, Vlad Firoiu, Timo Ewalds, Maribeth Rauh, Laura Weidinger, Martin Chadwick, Phoebe Thacker, Lucy Campbell-Gillingham, Jonathan Uesato, Po-Sen Huang, Ramona Comanescu, Fan Yang, Abigail See, Sumanth Dathathri, Rory Greig, Charlie Chen, Doug Fritz, Jaume Sanchez Elias, Richard Green, Soňa Mokrá, Nicholas Fernando, Boxi Wu, Rachel Foley, Susannah Young, Iason Gabriel, William Isaac, John Mellor, Demis Hassabis, Koray Kavukcuoglu, Lisa Anne Hendricks, and Geoffrey Irving. Improving alignment of dialogue agents via targeted human judgments, 2022. OpenAlex ↗ · Scholar ↗
- Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples, 2015. our card
- Wenjuan Han, Liwen Zhang, Yong Jiang, and Kewei Tu. Adversarial attack and defense of structured prediction models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 2327–2338, Online, November 2020. Association for Computational Linguistics. . URL https://aclanthology.org/2020.emnlp-main.182. OpenAlex ↗ · Scholar ↗
- Dan Hendrycks, Nicholas Carlini, John Schulman, and Jacob Steinhardt. Unsolved problems in ml safety, 2022. our card
- Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=nZeVKeeFYf9. our card
- Huggingface. perplexity, howpublished = https://huggingface.co/docs/transformers/perplexity, note = Accessed: 2023-08-26, 2023. OpenAlex ↗ · Scholar ↗
- Neel Jain, Avi Schwarzschild, Yuxin Wen, Gowthami Somepalli, John Kirchenbauer, Ping yeh Chiang, Micah Goldblum, Aniruddha Saha, Jonas Geiping, and Tom Goldstein. Baseline defenses for adversarial attacks against aligned language models, 2023. our card
- Rubén Darío Jaramillo. Jaramilo:gpt4jailbreak, howpublished = https://huggingface.co/datasets/rubend18/chatgpt-jailbreak-prompts, 2023. Accessed: 2023-09-20. OpenAlex ↗ · Scholar ↗
- Erik Jones, Anca Dragan, Aditi Raghunathan, and Jacob Steinhardt. Automatically auditing large language models via discrete optimization, 2023. our card
- Raz Lapid, Ron Langberg, and Moshe Sipper. Open sesame! universal black box jailbreaking of large language models, 2023. OpenAlex ↗ · Scholar ↗
- Ariel N. Lee, Cole J. Hunter, and Nataniel Ruiz. Platypus: Quick, cheap, and powerful refinement of llms, 2023. our card
- Klas Leino, Zifan Wang, and Matt Fredrikson. Globally-robust neural networks, 2021. OpenAlex ↗ · Scholar ↗
- Yuhui Li, Fangyun Wei, Jinjing Zhao, Chao Zhang, and Hongyang Zhang. Rain: Your language models can align themselves without finetuning, 2023. OpenAlex ↗ · Scholar ↗
- Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id=rJzIBfZAb. our card
- Annunziata Elefante Mattia Limone, Gaetano Cimino. Tapir: Trigger action platform for information retrieval. https://github.com/MattiaLimone/ifttt_recommendation_system, 2023. OpenAlex ↗ · Scholar ↗
- Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering. In EMNLP, 2018. OpenAlex ↗ · Scholar ↗
- OpenAI. Gpt-4 technical report, 2023. our card
- Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback, 2022. our card
- Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples, 2016. OpenAlex ↗ · Scholar ↗
- Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. In NA. OpenAI, 2019. URL https://api.semanticscholar.org/CorpusID:160025533. OpenAlex ↗ · Scholar ↗
- Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: 100,000+ Questions for Machine Comprehension of Text. arXiv e-prints, art. arXiv:1606.05250, 2016. our card
- Tomohiro Sawada, Daniel Paleka, Alexander Havrilla, Pranav Tadepalli, Paula Vidas, Alexander Kranias, John J. Nay, Kshitij Gupta, and Aran Komatsuzaki. Arb: Advanced reasoning benchmark for large language models, 2023. our card
- Taylor Shin, Yasaman Razeghi, Robert L. Logan IV au2, Eric Wallace, and Sameer Singh. Autoprompt: Eliciting knowledge from language models with automatically generated prompts, 2020. our card
- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, and Nikolay Bashlykov. Llama 2: Open foundation and fine-tuned chat models, 2023. our card
- Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Superglue: A stickier benchmark for general-purpose language understanding systems. arXiv preprint arXiv:1905.00537, 2019. our card
- Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith, Daniel Khashabi, and Hannaneh Hajishirzi. Self-instruct: Aligning language models with self-generated instructions, 2023. our card
- Alexander Wei, Nika Haghtalab, and Jacob Steinhardt. Jailbroken: How does llm safety training fail?, 2023. our card
- Yotam Wolf, Noam Wies, Oshri Avnery, Yoav Levine, and Amnon Shashua. Fundamental limitations of alignment in large language models, 2023. our card
- Jingjing Xu, Xuancheng Ren, Junyang Lin, and Xu Sun. Dp-gan: Diversity-promoting generative adversarial network for generating informative and diversified text, 2018. OpenAlex ↗ · Scholar ↗
- Yuan Yao, Deming Ye, Peng Li, Xu Han, Yankai Lin, Zhenghao Liu, Zhiyuan Liu, Lixin Huang, Jie Zhou, and Maosong Sun. DocRED: A large-scale document-level relation extraction dataset. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 764–777, Florence, Italy, July 2019. Association for Computational Linguistics. . URL https://aclanthology.org/P19-1074. OpenAlex ↗ · Scholar ↗
- Weihao Yu, Zihang Jiang, Yanfei Dong, and Jiashi Feng. Reclor: A reading comprehension dataset requiring logical reasoning. In International Conference on Learning Representations (ICLR), April 2020. our card
- Youliang Yuan, Wenxiang Jiao, Wenxuan Wang, Jen tse Huang, Pinjia He, Shuming Shi, and Zhaopeng Tu. Gpt-4 is too smart to be safe: Stealthy chat with llms via cipher, 2023. our card
- Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric. P Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. Judging llm-as-a-judge with mt-bench and chatbot arena, 2023. our card
- Andy Zou, Zifan Wang, J. Zico Kolter, and Matt Fredrikson. Universal and transferable adversarial attacks on aligned language models, 2023. our card
This page in Markdown https://md.research.elamur.ai/free/en/papers/alon-2023-detecting-language-model-attacks-perplexity/