EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Detecting Behavioral Anomalies in LLM Response Sequences: A Leakage-Free Benchmark and Comparative Study of Predictive, Distance, and Change-Point Detectors

Przemysław Sujecki, Damian Frąszczak

Entropy · 14.11.2026 · 28 (11) · 1257

DOI: 10.3390/e28111257 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Entropy, online erschienen am 14.11.2026. Verfasst von Przemysław Sujecki und 1 weiteren Autor:innen. Die Arbeit nennt 32 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Military University of Technology in Warsaw.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Large language models increasingly operate over long multi-turn interactions, where behavioral stability matters as much as single-answer correctness. We study the detection of behavioral anomalies—abrupt shifts in persona, topic, style, or use of context, independent of factual accuracy—from response embeddings and, for the predictive detector, embeddings of incoming user messages, without anomaly labels, external knowledge, or reference outputs; detectors are trained only on normal dialogues and calibrated on clean data. We release a reproducible primary benchmark of 700 multi-turn dialogues generated with Mistral-7B-Instruct—100 per anomaly type—together with cross-generator replications generated with Qwen2.5-7B-Instruct (139 dialogues) and Qwen3-8B (310 dialogues), plus matched six- and twenty-exchange corpora that vary conversation length. The benchmark spans four controlled anomaly types, clean controls, a natural topic adaptation control, per-turn intervention labels, and blind audits by LLMs and humans. Under a deliberately leakage-free protocol, we compare twelve detectors in terms of ROC- and PR-AUC, per-type performance, latency, and recall at a fixed false-positive budget, with cluster-bootstrap confidence intervals, multiple training seeds, and two encoders. The prediction-error + anchor fusion leads overall on the primary corpus (ROC-AUC of 0.762; PR-AUC of 0.771) and significantly exceeds the static anchor in the paired bootstrap, while no single detector leads for every anomaly type. The fusion also provides zero median latency and a 0.002 false-alarm rate under natural adaptation, where the anchor reaches 0.110. Proper change-point detectors do not beat the fusion or anchor, and lexical features remain useful for style shifts but false-alarm under natural adaptation. The context_ignore construction uses user questions that require prior context, manifests visibly in 13/16 audited cases, and is detectable (best per-type ROC-AUC of 0.865). Detector rankings remain stable across two encoders (ρ = 0.95) and dialogue lengths from six to twenty exchanges (ρ = 0.75–0.91). Cross-generator performance remains generator-dependent: fusion reaches 0.617 on Qwen2.5-139 and 0.688 (95% CI: [0.645, 0.732]) on Qwen3-310, versus 0.762 on size-matched Mistral-310; on Qwen3, its point advantage over the anchor (0.667) is inconclusive. These results show that detector choice depends on anomaly type, temporal shape, dialogue length, and generator.

Förderung

  • Military University of Technology in Warsaw

Zitieren

APA

Sujecki, P., & Frąszczak, D. (2026). Detecting Behavioral Anomalies in LLM Response Sequences: A Leakage-Free Benchmark and Comparative Study of Predictive, Distance, and Change-Point Detectors. Entropy, 28(11), 1257. https://doi.org/10.3390/e28111257

Vancouver

Sujecki P, Frąszczak D. Detecting Behavioral Anomalies in LLM Response Sequences: A Leakage-Free Benchmark and Comparative Study of Predictive, Distance, and Change-Point Detectors. Entropy. 2026;28(11):1257. doi:10.3390/e28111257

BibTeX
@article{Sujecki2026,
  author = {Sujecki, Przemysław and Frąszczak, Damian},
  title = {Detecting Behavioral Anomalies in LLM Response Sequences: A Leakage-Free Benchmark and Comparative Study of Predictive, Distance, and Change-Point Detectors},
  journal = {Entropy},
  year = {2026},
  volume = {28},
  number = {11},
  pages = {1257},
  doi = {10.3390/e28111257}
}
Kostenlos starten →