Hybrid Constitutional Classifiers for Prompt Injection Defense

In this paper, we propose a novel hybrid constitutional classifier system that combines a lightweight input classifier with a fine-tuned generative LLM to enhance security while maintaining efficiency. Our approach integrates a DeBERTa-based classifier for filtering adversarial prompts before they reach the model and a small LLM that performs response monitoring to prevent unsafe completions in real time. Through extensive benchmarking, we demonstrate that our hybrid approach effectively mitigates adversarial inputs while significantly reducing inference latency compared to large-scale models like LLaMA-2 13B. We further explore optimization techniques such as model quantization and knowledge distillation to improve system performance with minimal degradation in classification accuracy. Our results indicate that the hybrid system achieves detection accuracy of 96.97% for inputs and 78.79% for the outputs, maintaining robust safe filtering capabilities while offering 67% lower latency in overall compared to conventional large LLM classifiers. The deployment of a hybrid constitutional classifier system for real-time AI applications enhances LLM security by providing a scalable, high-performance defense against prompt injection attacks, enabling safer AI interactions in critical domains.

Authors

Institutions

Publication Details

Published
2025-05-29
DOI
https://doi.org/10.1109/eit64391.2025.11103606
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

Hybrid Constitutional Classifiers for Prompt Injection Defense

Anuj Kaul, Piyush Pattanayak, Vinothini Pandurangan, Nishant Kumar Das Pattanaik et al.
Adversarial Robustness in Machine Learning
article

Hybrid Constitutional Classifiers for Prompt Injection Defense

Anuj Kaul, Piyush Pattanayak, Vinothini Pandurangan, Nishant Kumar Das Pattanaik, Qianlong Lan, Shaun Jones, Stephanie Westrum
article en

Abstract

In this paper, we propose a novel hybrid constitutional classifier system that combines a lightweight input classifier with a fine-tuned generative LLM to enhance security while maintaining efficiency. Our approach integrates a DeBERTa-based classifier for filtering adversarial prompts before they reach the model and a small LLM that performs response monitoring to prevent unsafe completions in real time. Through extensive benchmarking, we demonstrate that our hybrid approach effectively mitigates adversarial inputs while significantly reducing inference latency compared to large-scale models like LLaMA-2 13B. We further explore optimization techniques such as model quantization and knowledge distillation to improve system performance with minimal degradation in classification accuracy. Our results indicate that the hybrid system achieves detection accuracy of 96.97% for inputs and 78.79% for the outputs, maintaining robust safe filtering capabilities while offering 67% lower latency in overall compared to conventional large LLM classifiers. The deployment of a hybrid constitutional classifier system for real-time AI applications enhances LLM security by providing a scalable, high-performance defense against prompt injection attacks, enabling safer AI interactions in critical domains.

eBay (Ireland) (IE)
Peace, Justice and strong institutions
Openalex Percentile: Top 89%
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.

Hybrid Constitutional Classifiers for Prompt Injection Defense — Anuj Kaul, Piyush Pattanayak, et al. · (2025) | TGRS Research Map | TGRS