Response-Only Adversarial Detection of LLM Outputs: A Comparative Study of Lexical, Contrastive, and Contextual Representations
Response-Only Adversarial Detection of LLM Outputs: A Comparative Study of Lexical, Contrastive, and Contextual Representations
Yükleniyor...
Özet
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.
Açıklama
Anahtar kelimeler
Adversarial Detection, Contrastive Learning, Cybercrime, TF-IDF, Sentence Embeddings, Large Language Models, Response-Only Classification, Signal Detection, Technological Monitoring, Modeling, Labeling, Safety, Accuracy, Detectors, Training, Learning (Artificial Intelligence), Measurement, Measurement, Adversarial Detection, Contrastive Learning, Cybercrime, TF-IDF, Modeling, Detectors, Learning (Artificial Intelligence), Signal Detection, Response-Only Classification, Large Language Models, Labeling, Sentence Embeddings, Technological Monitoring, Training, Safety, Accuracy
Bilim Dalları
Alıntı
WoS Q
Scopus Q
Kaynak
Cilt
14
Sayı
Başlangıç Sayfası
104875
Bitiş Sayfası
104891
Yükleniyor...
