# Cat-DPO: Category-Adaptive Safety Alignment

*Tiankai Yang, Yi Nian, Xinyuan Li, Ruiyao Xu, Henry P Zou, Kaize Ding, Xiyang Hu, Yan Liu, Yue Zhao*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/151048) · [OpenReview](https://openreview.net/forum?id=dN2PIz3N8a) · [alphaXiv](https://www.alphaxiv.org/abs/2604.17299) · [Open on the map](../papers.html#p151048)

Category: [AI Safety, Security & Alignment](../pcat/16.md) › [LLM Safety Alignment Methods](../pgroup/187.md) · Type: new method · Keywords: language model safety alignment, per-category safety margin, direct preference optimization, adaptive training, harm category variance

Areas: [Safety & Security](../areas/safety.md) › Safe Alignment › Fine-Tuning Safety Alignment; [RL for LLMs & Agents](../areas/llm-rl.md) › Language Model Alignment › Safety Alignment

## Summary
Cat-DPO introduces a per-category adaptive safety margin in direct preference optimization to balance helpfulness and safety across different harm categories.

## Explained to a 5-year-old
When we teach a big robot to be nice, we want it to say nice things and not say bad things. Right now, we only teach it one rule for all bad things, so sometimes it still says some bad things. This new idea teaches the robot a different rule for each kind of bad thing, so it gets better at avoiding all bad things. It works by adjusting how strict the rule is for each kind of bad thing while learning. This helps the robot be nicer and safer overall.

## Explained to a 5-year-old, longer
We want a big computer brain that answers questions nicely and doesn't say bad things. To teach it, we show it examples of good answers and bad answers. Usually, we give it one rule that says "don't say bad things" for all kinds of bad things. Because the rule is the same for everything, the brain might still say some bad things sometimes. The new idea is to give the brain different rules for each kind of bad thing, like a special rule for lying, another for insults, another for dangerous advice. Each rule gets stronger or weaker depending on how often the brain still makes mistakes in that area. If the brain keeps saying bad things about a certain topic, the rule for that topic becomes stricter. Once the brain gets better at that topic, the rule relaxes a little. This way, the brain learns at its own speed for each kind of bad behavior. The result is that the brain becomes nicer overall and is less likely to say bad things in any category. It also helps the brain be more consistent, so the best behavior is not much worse than the worst behavior. All of this can be added to existing teaching methods without changing them much.

## For a technical reader
Cat-DPO is a refinement of Direct Preference Optimization (DPO) that introduces per-category safety margins to align language models more uniformly across different harm types. Instead of a single global safety scalar, the approach learns a separate margin for each harm category, tightening it when unsafe outputs persist and relaxing it as performance improves. This adaptive margin is integrated into the existing DPO training loop, requiring no changes to the underlying preference dataset or model architecture. Empirically, the method improves both overall helpfulness and harmlessness while reducing variance between the best-performing and worst-performing categories. Because it is a drop-in replacement for standard DPO, teams can adopt it directly in their alignment pipelines to obtain more consistent safety.

## Problem
Aligning large language models with human preferences often treats safety as a single scalar applied uniformly, which can leave some harm categories unsafe while optimizing average performance. This creates a trade-off between overall helpfulness and consistent safety across different categories.

## Method
The approach formulates safety alignment as a per-category constrained optimization problem, learning a separate adaptive safety margin for each harm category. The margin tightens when unsafe responses persist in a category and relaxes once the model improves, allowing the training signal to track each category's difficulty. This yields a drop-in refinement of direct preference optimization without altering the underlying preference learning pipeline.

## Results
The approach improves aggregate helpfulness and harmlessness and reduces per-category safety variance and the best-to-worst gap across multiple backbones and baselines.

## Contributions
The paper casts safety alignment as a per-category constrained optimization problem and introduces an adaptive safety margin that adjusts per harm category during training. This yields a drop-in refinement that simultaneously boosts overall safety and reduces variance across categories.

## Research questions this paper is counted under

- [How can we align language models to achieve both safety and performance without sacrificing one for the other?](../q/209.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/151048)
