PromptGuard a structured framework for injection resilient language models

Prompt injection attacks threaten the reliability of large language models (LLMs) by embedding adversarial instructions that override intended behavior and compromise task fidelity. Existing defenses are typically narrow in scope or depend on retraining, limiting their adaptability across deployment contexts. This paper presents a modular, four-layer defense framework that integrates input gatekeeping, structured prompt formatting, semantic output validation, and adaptive response refinement (ARR). The pipeline combines regex and MiniBERT-based detection to identify and block malicious instructions, while structured formatting and critic-based validation ensure consistent task alignment. Evaluations on PromptBench, InjectBench, and TruthfulQA demonstrate that the framework enhances robustness across multiple LLMs, achieving up to a 67% reduction in injection success rate and an F1-score of 0.91 in detection, with a latency increase below 8%. These results confirm the framework's effectiveness as a lightweight, retraining-free approach for strengthening LLM safety and reliability in real-world applications.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-01-09
DOI
https://doi.org/10.1038/s41598-025-31086-y
Primary Topic
Adversarial Robustness in Machine Learning
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

PromptGuard a structured framework for injection resilient language models

Ahmed Ibrahim Alzahrani
Scientific Reports
Adversarial Robustness in Machine Learning
article

PromptGuard a structured framework for injection resilient language models

Ahmed Ibrahim Alzahrani
article en

Abstract

Prompt injection attacks threaten the reliability of large language models (LLMs) by embedding adversarial instructions that override intended behavior and compromise task fidelity. Existing defenses are typically narrow in scope or depend on retraining, limiting their adaptability across deployment contexts. This paper presents a modular, four-layer defense framework that integrates input gatekeeping, structured prompt formatting, semantic output validation, and adaptive response refinement (ARR). The pipeline combines regex and MiniBERT-based detection to identify and block malicious instructions, while structured formatting and critic-based validation ensure consistent task alignment. Evaluations on PromptBench, InjectBench, and TruthfulQA demonstrate that the framework enhances robustness across multiple LLMs, achieving up to a 67% reduction in injection success rate and an F1-score of 0.91 in detection, with a latency increase below 8%. These results confirm the framework's effectiveness as a lightweight, retraining-free approach for strengthening LLM safety and reliability in real-world applications.

Scientific ReportsVol. 16(1)
King Abdulaziz University (SA)
Openalex Percentile: Top 94%
Adversarial Robustness in Machine Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

PromptGuard a structured framework for injection resilient language models — Ahmed Ibrahim Alzahrani · Scientific Reports (2026) | TGRS Research Map | TGRS