MOSAIC: Composable Safety Alignment with Modular Control Tokens

Jingyu Peng, Hongyu Chen, Jiancheng Dong, Maolin Wang, Wenxi Li +3 more
3/17/2026
cs.AI

No confident code implementation found for this paper.

Abstract

Safety alignment in large language models (LLMs) is commonly implemented as a single static policy embedded in model parameters. However, real-world deployments often require context-dependent safety rules that vary across users, regions, and applications.

Show full abstract

Existing approaches struggle to provide such conditional control: parameter-level alignment entangles safety behaviors with general capabilities, while prompt-based methods rely on natural language instructions that provide weak enforcement. We propose MOSAIC, a modular framework that enables compositional safety alignment through learnable control tokens optimized over a frozen backbone model. Each token represents a safety constraint and can be flexibly activated and composed at inference time. To train compositional tokens efficiently, we introduce order-based task sampling and a distribution-level alignment objective that mitigates over-refusal. Experiments show that MOSAIC achieves strong defense performance with substantially lower over-refusal while preserving model utility.

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. Any repos shown below are weak matches — 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{peng2026mosaic,
  title  = {MOSAIC: Composable Safety Alignment with Modular Control Tokens},
  author = {Jingyu Peng and Hongyu Chen and Jiancheng Dong and Maolin Wang and Wenxi Li and Yuchen Li and Kai Zhang and Xiangyu Zhao},
  year   = {2026},
  eprint = {2603.16210},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.16210v1}
}

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/2603.16210.svg)](https://codeofpaper.com/paper/2603.16210)

Discussion