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

James O' Neill, Santhosh Subramanian, Eric Lin, Vaikkunth Mugunthan
4/27/2025
cs.CLcs.AIcs.LG

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

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

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{neill2025unified,
  title  = {Unified Multi-Task Learning & Model Fusion for Efficient Language Model Guardrailing},
  author = {James O' Neill and Santhosh Subramanian and Eric Lin and Vaikkunth Mugunthan},
  year   = {2025},
  eprint = {2504.19333},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.19333v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.19333.svg)](https://codeofpaper.com/paper/2504.19333)

Discussion