Two to Tango: Coupled Task-Reference Selection for Safe LLM Fine-tuning

Xinrui Chen, Jianhao Zhang, Ou Wu, Di Gao
6/1/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Fine-tuning safety aligned large language models (LLMs) on downstream data improves adaptation but may erode learned safety behavior. Existing methods use fixed safety examples, global constraints, or one-sided task filtering.

Show full abstract

Our diagnostics show task updates expose different safety constraints, motivating joint selection of relevant references and compatible task samples. We propose DualSelect, a coupled framework for task and reference selection that refreshes task conditioned safety references before filtering whole task samples compatible with the induced reference direction. Under a minimax view, DualSelect selects safety references with high preservation loss and task conflict, together with compatible task samples, through entropy-regularized scoring surrogates, lazy reference refresh, and gradient correction. On 1B-8B LLMs, DualSelect preserves safety without losing task utility; using the REDORCA judge, it improves Safety Avg. over the strongest baseline by at least 5.10 points and remains highest in Safety Avg. across judges with moderate overhead. This view extends to retention focused continual learning.

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{chen2026tango,
  title  = {Two to Tango: Coupled Task-Reference Selection for Safe LLM Fine-tuning},
  author = {Xinrui Chen and Jianhao Zhang and Ou Wu and Di Gao},
  year   = {2026},
  eprint = {2606.09866},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.09866v1}
}

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

Discussion