arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.15853cs.CLcs.AI
收藏

一种轻量级可解释的提示安全守护栏

A Lightweight Explainable Guardrail for Prompt Safety

University of Arizona(亚利桑那大学)

Md Asiful Islam, Mihai Surdeanu

AI总结:

本文提出了一种轻量级可解释守护栏(LEG)方法,通过多任务学习架构联合学习提示分类器和解释分类器,利用合成解释数据训练,采用新颖策略对抗LLM确认偏见,结合交叉熵和焦点损失实现全局解释信号的弱监督学习,实现优于现有方法的性能。

摘要:

我们提出了一种轻量级可解释守护栏(LEG)方法,用于检测不安全的提示。LEG采用多任务学习架构,联合学习提示分类器和解释分类器,后者标记解释整体安全/不安全决策的提示词。LEG在合成解释数据上训练,该数据通过新颖策略生成,以对抗LLM的确认偏见。最后,LEG的训练过程使用一种新的损失函数,捕捉全局解释信号作为弱监督,并结合交叉熵和焦点损失与基于不确定性的加权。尽管模型大小远小于当前方法,LEG在三个数据集上,无论是领域内还是领域外,都实现了等同或更好的性能,适用于提示分类和可解释性。

英文摘要:

We propose a lightweight explainable guardrail (LEG) method to detect 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 on synthetic explanation data, 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 as a weak supervision 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑