Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxification
<|reference_start|>Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxification: We propose a constraint learning schema for fine-tuning Large Language Models (LLMs) with attribute control. Given a training corpus and control criteria formulated as a sequence-level constraint on model outputs, our method fine-tunes the LLM on the training corpus while enhancing constraint satisfaction with minimal impact on its utility and generation quality. Specifically, our approach regularizes the LLM training by penalizing the KL divergence between the desired output distribution, which satisfies the constraints, and the LLM's posterior. This regularization term can be approximated by an auxiliary model trained to decompose the sequence-level constraints into token-level guidance, allowing the term to be measured by a closed-form formulation. To further improve efficiency, we design a parallel scheme for concurrently updating both the LLM and the auxiliary model. We evaluate the empirical performance of our approach by controlling the toxicity when training an LLM. We show that our approach leads to an LLM that produces fewer inappropriate responses while achieving competitive performance on benchmarks and a toxicity detection task.<|reference_end|>
@article{meng2024attribute,
    title={Attribute Controlled Fine-tuning for Large Language Models: A Case Study
  on Detoxification},
    author={Tao Meng, Ninareh Mehrabi, Palash Goyal, Anil Ramakrishna, Aram
  Galstyan, Richard Zemel, Kai-Wei Chang, Rahul Gupta, Charith Peris},
    journal={arXiv preprint arXiv:2410.05559},
    year={2024},
    archivePrefix={arXiv},
    eprint={2410.05559},
    primaryClass={cs.CL}
}