Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

A Lightweight Explainable Guardrail for Prompt Safety

About

We propose a lightweight explainable guardrail (LEG) method for the classification of unsafe prompts. LEG uses a multi-task learning architecture to jointly learn a prompt classifier and an explanation classifier, where the latter labels prompt words that explain the safe/unsafe overall decision. LEG is trained using synthetic data for explainability, which is generated using a novel strategy that counteracts the confirmation biases of LLMs. Lastly, LEG's training process uses a novel loss that captures global explanation signals and combines cross-entropy and focal losses with uncertainty-based weighting. LEG obtains equivalent or better performance than the state-of-the-art for both prompt classification and explainability, both in-domain and out-of-domain on three datasets, despite the fact that its model size is considerably smaller than current approaches. If accepted, we will release all models and the annotated dataset publicly.

Md Asiful Islam, Mihai Surdeanu• 2026

Related benchmarks

TaskDatasetResultRank
Explainability classificationToxic-Chat 0124 (test)
Unsafe F165.99
30
Explainability classificationAEGIS 2.0 (test)
Unsafe F179.6
27
Safety ClassificationWildGuardMix (test)
F1 (Unsafe)75.83
27
Safety ClassificationXSTest (test)
F192.91
20
Explainability classificationWildGuardMix human-annotated (test)
F1 Score60.69
3
Showing 5 of 5 rows

Other info

Follow for update