Skip to content
Conference Open access

BERM: Low-Overhead Prompt-Injection Detection via In-Situ Benign Representation Modeling

Sep 2026 · Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence · 0 citations · 35 references

TL;DR

BERM is introduced, a lightweight framework that performs in-situ detection by modeling a host LLM’s internal representations extracted during prefill, adding negligible overhead and reducing incremental inference overhead to near-zero.

Abstract

Real-world deployment of large language models (LLMs) necessitates a robust and low-latency approach to detect prompt injections; existing low-overhead methods fail to simultaneously boost robustness and reduce latency. Current defenses for prompt injection either rely on brittle heuristics or invoke costly auxiliary models, imposing a significant runtime burden. We introduce BERM, a lightweight framework that performs in-situ detection by modeling a host LLM’s internal representations extracted during prefill, adding negligible overhead. Our approach trains a lightweight classifier atop the LLM by learning a compact manifold of benign representations via joint contrastive learning to maximize the separation from malicious representations. At inference, this pre-trained classifier enables in-situ detection without invoking auxiliary guard models. On a diverse landscape of prompt injection attacks, our framework establishes a new state-of-the-art, achieving an F1-score 5.2 percentage points (pp) higher than the best prior work. Critically, BERM achieves this while being over 12x faster, reducing inference overhead to near-zero.

Read PDF

Similar papers

Open access Aug 2026

Real-Time Detection and Mitigation of Prompt Injection Attacks in LLM-Integrated Enterprise Systems

Large language models (LLMs) embedded in enterprise workflows cannot structurally distinguish legitimate instructions from adversarial ones in the same token stream, making prompt injection OWASP's top LLM risk for two consecutive editions a persistent threat across direct and indirect vectors. This paper presents Prom...

Fatimah Alhamzawi · 0 citations
Jul 2026

DEFENSE-IN-DEPTH FOR LARGE LANGUAGE MODELS: A MULTI-LAYER HYBRID ARCHITECTURE FOR PROMPT INJECTION DETECTION

A layered hybrid defense gateway that combines three complementary detectors: a fast prefilter based on lexical rules, a semantic classifier that uses word-level TF-IDF features together with a multilayer perceptron, and a character-level classifier that is robust to obfuscation is proposed.

O. Esanov, Ch. Erkinova · 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, Ming-Yue Cui et al. · 0 citations
Jul 2026

Defense Against LLM Backdoors using Critical Neuron Isolation Pruning

DeCNIP (Defense with Critical Neuron Isolation Pruning), which leverages representational analysis to identify and neutralize backdoors in a unified pipeline, is introduced, which achieves over 95% relative reduction in Attack Success Rate (ASR), outperforming seven state-of-the-art defenses with only 0.1% neuron inter...

Yuxi Li, Zhi-Bo Zhang, Kailong Wang et al. · 0 citations
Conference Jun 2026

AI-Enhanced SaaS Reliability: LLM-Based Log Parsing, OOV Detection, and Early Failure Prediction

Modern Software-as-a-Service (SaaS) environments generate voluminous, heterogeneous logs that exhibit rapid schema drift and semantic sparsity, rendering traditional template-based detection methods ineffective. This paper presents LLM-EP, a unified framework that utilizes Large Language Models (LLMs) for proactive err...

Vasanthi Jangala Naga · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.