TY - GEN
T1 - In-Context Learning Reward Guided Decoding for Controlled Text Generation
AU - Zhu, Xinyi
AU - Zhou, Yanru
AU - Song, Dandan
AU - Yang, Ziyi
N1 - Publisher Copyright:
© 2024 IEEE.
PY - 2024
Y1 - 2024
N2 - While large language models have demonstrated remarkable text generation capabilities, they often generate text with adverse or undesired attributes. Common approaches to control text generation involve refining models on data with desired properties or guiding language models decoding using an auxiliary model. However, these methods require additional training and extensive attribute-specific data. To further mitigate the training costs, we propose In-context learning Reward Guided Decoding (IRGD), a weighted decoding method that exploits the in-context learning ability of language models as an alternative to additional model fine-tuning. Specifically, IRGD utilizes ICL outputs to score the alignment reward between sequences and target attributes, subsequently modifying the sampling probabilities to favor tokens with higher reward scores. By applying ICL, IRGD adapts to different tasks by simply adjusting task descriptions and demonstration rather than fine-tuning the model. Through experiments on detoxification and sentiment control, we demonstrate the advantages of IRGD as a plug-and-play and fine-tuning-free decoding method that effectively balance attribute alignment and text quality.
AB - While large language models have demonstrated remarkable text generation capabilities, they often generate text with adverse or undesired attributes. Common approaches to control text generation involve refining models on data with desired properties or guiding language models decoding using an auxiliary model. However, these methods require additional training and extensive attribute-specific data. To further mitigate the training costs, we propose In-context learning Reward Guided Decoding (IRGD), a weighted decoding method that exploits the in-context learning ability of language models as an alternative to additional model fine-tuning. Specifically, IRGD utilizes ICL outputs to score the alignment reward between sequences and target attributes, subsequently modifying the sampling probabilities to favor tokens with higher reward scores. By applying ICL, IRGD adapts to different tasks by simply adjusting task descriptions and demonstration rather than fine-tuning the model. Through experiments on detoxification and sentiment control, we demonstrate the advantages of IRGD as a plug-and-play and fine-tuning-free decoding method that effectively balance attribute alignment and text quality.
KW - controlled text generation
KW - in-context learning
KW - weighted decoding
UR - http://www.scopus.com/inward/record.url?scp=85211499704&partnerID=8YFLogxK
U2 - 10.1109/ICSP62122.2024.10743861
DO - 10.1109/ICSP62122.2024.10743861
M3 - Conference contribution
AN - SCOPUS:85211499704
T3 - 2024 9th International Conference on Intelligent Computing and Signal Processing, ICSP 2024
SP - 1116
EP - 1120
BT - 2024 9th International Conference on Intelligent Computing and Signal Processing, ICSP 2024
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 9th International Conference on Intelligent Computing and Signal Processing, ICSP 2024
Y2 - 19 April 2024 through 21 April 2024
ER -