Skip to content
Open access

Response-Only Adversarial Detection of LLM Outputs: A Comparative Study of Lexical, Contrastive, and Contextual Representations

2026 · IEEE Access · Vol 14, pp. 104875-104891 · 0 citations · 48 references
Computer Science

TL;DR

This study investigates response-only adversarial classification of LLM outputs through a comparative evaluation of lexical, contrastive, and contextual representations and provides a realistic benchmark for response-only adversarial detection and clarify the limits of contrastive representations when prompt information is absent.

Abstract

Large Language Models (LLMs) are increasingly used in settings where the original user prompt may be unavailable, redacted, or untrusted. This makes response-only adversarial detection an important but challenging problem, because the detector observes only the generated response while the label is determined by the originating prompt. In this study, we investigate response-only adversarial classification of LLM outputs through a comparative evaluation of lexical, contrastive, and contextual representations. Specifically, we compare TF-IDF features, triplet-loss-based metric embeddings, TF-IDF+triplet concatenation, and a Sentence-BERT contextual embedding baseline across three tasks: Prompt Type, Adversarial Type, and Adversarial Class. Experiments on 158 592 response records show that response-only detection is feasible but substantially more difficult than prompt-aware detection. Under stratified group 10-fold evaluation, the strongest TF-IDF+XGBoost baseline achieves 72.37% accuracy for Prompt Type, 82.06% for Adversarial Type, and 56.40% for Adversarial Class. Leave-one-LLM-out evaluation further shows that cross-model generalization remains challenging. Triplet-based metric learning provides model-dependent benefits, particularly for some Adversarial Type configurations, but it does not uniformly outperform strong lexical baselines. Low-dimensional embedding analysis shows that Insertion samples are relatively separable, whereas Prefix and Suffix samples substantially overlap. Overall, the findings provide a realistic benchmark for response-only adversarial detection and clarify the limits of contrastive representations when prompt information is absent.

Read PDF

Similar papers

Preprint Jul 2026

The Effect of Multi-Lingual and Keyword Adversarial Injection on LLM Relevance Judgment

This work investigates the impact of cross-lingual prompt injection attacks on LLM-based relevance judgments using TREC Deep Learning collections and two open-weight models under established prompting frameworks, and demonstrates that multilingual query-based injections are highly effective in inflating relevance scores while simultaneously evading existing prompt-injection defenses.

Nguyen-Thanh-Thao Vo, Duy Duong Tuong, Oleg Zendel et al. · 0 citations
Book Open access Jul 2026

Investigating Robustness in Vision-Language Models via Adversarial Prompt Illumination

Trained on large corpora of image-text pairs, vision-language models (VLMs) have proven broadly useful across many applications. However, they can still make errors that humans rarely do, particularly when exposed to adversarial inputs crafted to mislead them. Traditional approaches to uncovering such vulnerabilities typically optimize a single input, such as a text prompt, to induce incorrect predictions while remaining plausible to human readers. These methods tend to identify only one or a few high-impact adversarial examples, offering a narrow view of model weaknesses. In contrast, we argue that a Quality-Diversity (QD) perspective is more informative. Rather than searching for a single best attack, QD explicitly aims to generate many high-quality adversarial prompts spanning diverse behaviors and characteristics. This allows us not only to diagnose model weaknesses, but also to characterize which prompts are robust and which are especially fragile. Our experiments show that CVT-MAP-Elites, a QD method integrated into our pipeline, discovers a richer and more diverse set of meaningful adversarial samples than quality-only optimization. Consequently, our approach achieves broader search-space coverage and provides deeper insight into VLM failure modes on text-to-image retrieval tasks in both general and medical domains.

Thai Huy Nguyen, Khoa Tran, Quan Minh Phan et al. · 0 citations
Preprint Jul 2026

Inference-Time Mitigation of Adversarial Political Bias in Large Language Models

The proposed Recursive Self-Correction approach raises model performance from a Political Neutrality Likert scale baseline of 2.14 to 4.56, averaged across all models, demonstrating effective inference-time mitigation of political bias in LLM-generated summaries.

Tejaswi V. Panchagnula, Bruce Coburn, Bryce J. Dietrich et al. · 0 citations
Open access Jul 2026

Beyond The Surface: Characterizing Adversarial Boundaries in Synthetic Text Attribution Across Heterogeneous Domains

A hybrid detection framework which combines semantically deep embeddings from the RoBERTa transformer with a set of carefully designed language statistics and linguistic statistics and shows excellent resistance to the surface-level adversarial paraphrasing strategy.

Anita Rani, Suman · 0 citations
Preprint Aug 2026

DSPrompt: Dynamic Soft Prompt Defense Against M-RAG Corruption

DSPrompt is proposed, a Dynamic Soft Prompt defense framework that directly reshapes the retriever's embedding semantics, without modifying the retrieval pipeline, and is consistently outperforming existing defense baselines at a fraction of their computational cost.

Chang Liu, Y. Lai, Mingyue Cui et al. · 0 citations
Preprint Aug 2026

Adversarial Robustness in Smishing Detection: A Comparative Analysis of Adversarial Fragility in Classical vs. Transformer-Based Detection Systems

It is demonstrated that clean-text performance is not a reliable predictor of adversarial robustness, and the results underscore the necessity for architecture-specific defences and frame smishing detection as an adversarial cybersecurity challenge rather than a static classification task.

Denzel Chiuseni, A. Bahizire, Silva Hama et al. · 0 citations