Self-Control of LLM Behaviors by Compressing Suffix Gradient into Prefix Controller
Abstract
We propose Self-Control, a novel method utilizing suffix gradients to control the behavior of large language models (LLMs) without explicit human annotations. Given a guideline expressed in suffix string and the model's self-assessment of adherence, Self-Control computes the gradient of this self-judgment concerning the model's hidden states, directly influencing the auto-regressive generation process towards desired behaviors. To enhance efficiency, we introduce Self-Control_{prefix}, a compact module that encapsulates the learned representations from suffix gradients into a Prefix Controller, facilitating inference-time control for various LLM behaviors. Our experiments demonstrate Self-Control's efficacy across multiple domains, including emotional modulation, ensuring harmlessness, and enhancing complex reasoning. Especially, Self-Control_{prefix} enables a plug-and-play control and jointly controls multiple attributes, improving model outputs without altering model parameters or increasing inference-time costs.
BibTeX
@misc{cai2024self,
author = {Min Cai and Yuchen Zhang and Shichang Zhang and Fan Yin and Difan Zou and Yisong Yue and Ziniu Hu},
title = {{Self-Control of LLM Behaviors by Compressing Suffix Gradient into Prefix Controller}},
year = {2024},
eprint = {2406.02721},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2406.02721},
}Ask Althea to put this paper to the test.