CLAILGApr 27, 2025

Unified Multi-Task Learning & Model Fusion for Efficient Language Model Guardrailing

arXiv:2504.19333v23 citationsh-index: 10
Originality Highly original
AI Analysis

This work addresses latency, memory, and cost issues in deploying guardrails for language models, offering a more efficient solution for AI safety applications.

The paper tackles the inefficiency of large language models for guardrailing by developing smaller, fine-tuned classifiers that outperform state-of-the-art models, achieving average F1 score improvements of 29.92 points over Aegis-LlamaGuard and 21.62 over GPT-4o.

The trend towards large language models (LLMs) for guardrailing against undesired behaviors is increasing and has shown promise for censoring user inputs. However, increased latency, memory consumption, hosting expenses and non-structured outputs can make their use prohibitive. In this work, we show that task-specific data generation can lead to fine-tuned classifiers that significantly outperform current state of the art (SoTA) while being orders of magnitude smaller. Secondly, we show that using a single model, \texttt{MultiTaskGuard}, that is pretrained on a large synthetically generated dataset with unique task instructions further improves generalization. Thirdly, our most performant models, \texttt{UniGuard}, are found using our proposed search-based model merging approach that finds an optimal set of parameters to combine single-policy models and multi-policy guardrail models. % On 7 public datasets and 4 guardrail benchmarks we created, our efficient guardrail classifiers improve over the best performing SoTA publicly available LLMs and 3$^{\text{rd}}$ party guardrail APIs in detecting unsafe and safe behaviors by an average F1 score improvement of \textbf{29.92} points over Aegis-LlamaGuard and \textbf{21.62} over \texttt{gpt-4o}, respectively. Lastly, our guardrail synthetic data generation process that uses custom task-specific guardrail poli

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes