mlsanityData to 14 Oct 2026

Enforcing LLM Safety through DMD-based Classification of Prompt-Response Embedding Dynamics

arXiv 2608.19579 ↗First posted 20 Aug 2026cs.AI math.DScited by 0

On the map: LLM safety and security → Safety alignment, refusal and guardrails

Abstract (arXiv)

Large Language Models (LLMs) are increasingly deployed in high-stakes applications, yet their tendency to generate toxic, harmful, or policy-violating content poses significant risks. Detecting these unsafe outputs efficiently in a black-box manner remains an open challenge. In this paper, we extend a recently proposed dynamical systems framework designed for hallucination detection to LLM safety classification. By projecting both prompts and responses into high-dimensional embedding spaces and fitting separate Koopman-based predictive models for safe and unsafe regimes, we classify new outputs using a new differential residual score that compares prediction errors of the safe and unsafe regimes. A key contribution is the incorporation of the prompt and response embedding dynamics, yielding fitted Koopman operators that capture crucial interaction patterns. We evaluate our black-box method across three safety benchmarks using three embedding models. Our results show that incorporating prompt embeddings yields consistent improvements, particularly for interaction-dependent violations when paired with causal decoders (e.g., in Llama-3), while response-only violations benefit more from dense semantic embedding representations. These findings opens the door for using dynamical systems to analyze AI systems rather than the dominant paradigm of using AI to model dynamical systems.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 29 of its 46 references that are in the map. First posted on arXiv 20 Aug 2026.

Builds on

29 of 46 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024Safeguarding Large Language Models: A Survey3 Jun

Other references · 28

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023GPT-4 Technical Reportcited by 18,396
  3. 2022Training language models to follow instructions with human feedbackcited by 15,971
  4. 2024The Llama 3 Herd of Modelscited by 14,715
  5. 2023Mistral 7Bcited by 3,164
  6. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  7. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
  8. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
  9. 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,601
  10. 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,255
  11. 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 860
  12. 2023Semantic Uncertainty: Linguistic Invariances for Uncertainty Estimation in Natural Language Generationcited by 819
16 more
  1. 2023SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Modelscited by 810
  2. 2023The Internal State of an LLM Knows When It's Lyingcited by 659
  3. 2023Bias and Fairness in Large Language Models: A Surveycited by 639
  4. 2023HaluEval: A Large-Scale Hallucination Evaluation Benchmark for Large Language Modelscited by 341
  5. 2024INSIDE: LLMs' Internal States Retain the Power of Hallucination Detectioncited by 323
  6. 2026Qwen3-VL-Embedding and Qwen3-VL-Reranker: A Unified Framework for State-of-the-Art Multimodal Retrieval and Rankingcited by 230
  7. 2023AI Deception: A Survey of Examples, Risks, and Potential Solutionscited by 188
  8. 2023Calibrated Language Models Must Hallucinatecited by 115
  9. 2023SAC3: Reliable Hallucination Detection in Black-Box Language Models via Semantic-aware Cross-check Consistencycited by 90
  10. 2024Unsupervised Real-Time Hallucination Detection based on the Internal States of Large Language Modelscited by 86
  11. 2023FELM: Benchmarking Factuality Evaluation of Large Language Modelscited by 66
  12. 2025FactSelfCheck: Fact-Level Black-Box Hallucination Detection for LLMscited by 14
  13. 2025Beyond the Next Token: Towards Prompt-Robust Zero-Shot Classification via Efficient Multi-Token Predictioncited by 7
  14. 2025Zero-knowledge LLM hallucination detection and mitigation through fine-grained cross-model consistencycited by 6
  15. 2026Low-Cost Black-Box Detection of LLM Hallucinations via Dynamical System Predictioncited by 3
  16. 2026Guarantees on Dynamical System Distinguishability for LLM Token Generationcited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Bridging the Safety Gap: A Guardrail Pipeline for Trustworthy LLM Inferences
  2. 2026Prompt Embedding Probes (PEP): Hallucination Detection in LLMs from Hidden States
  3. 2025D2HScore: Reasoning-Aware Hallucination Detection via Semantic Breadth and Depth Analysis in LLMs
  4. 2026Predictive Coding and Information Bottleneck for Hallucination Detection in Large Language Models
  5. 2024Fine-Tuning, Quantization, and LLMs: Navigating Unintended Outcomes
  6. 2026BEACON: Behavioral Entropy Aggregation for Cross-Model Hallucination Detection in Large Language Models
  7. 2025SAFE: A Sparse Autoencoder-Based Framework for Robust Query Enrichment and Hallucination Mitigation in LLMs
  8. 2026External Observers May See More Clearly: Cross-Model Span-Level Hallucination Detection in Large Language Models via Hidden State Probing