NAACL 2025long0 citations

Instantly Learning Preference Alignment via In-context DPO

Feifan Song, Yuxuan Fan, Xin Zhang, Peiyi Wang, Houfeng Wang

Abstract

Human Preference Alignment (HPA) can assist large language models (LLMs) to generate safe content. Due to the heavy cost of fine-tuning, tuning-free methods have emerged, typically modifying LLM decoding via post-processing. In this paper, we propose a novel and effective approach for HPA in a tuning-free way, named In-Context Direct Preference Optimization (ICDPO). We first rethink the derivation procedures of DPO, based on which we conversely build an instant scorer using the states of the LLM before and after ICL. It enables LLMs to both generate and select the well-aligned response, which is precisely estimated by the aforementioned instant scorer, thereby enhancing the final performance. ICDPO can be further enhanced with a two-stage retriever and an upgraded scorer. Extensive experiments show its effectiveness, particularly in outperforming multiple tuning-free baselines, even competitiveness with SFT and DPO. We also conduct detailed analyses to offer comprehensive insights into ICDPO.

BibTeX
@inproceedings{song-etal-2025-instantly,
    title = "Instantly Learning Preference Alignment via In-context {DPO}",
    author = "Song, Feifan  and
      Fan, Yuxuan  and
      Zhang, Xin  and
      Wang, Peiyi  and
      Wang, Houfeng",
    editor = "Chiruzzo, Luis  and
      Ritter, Alan  and
      Wang, Lu",
    booktitle = "Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers)",
    month = apr,
    year = "2025",
    address = "Albuquerque, New Mexico",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.naacl-long.8/",
    pages = "161--178",
    ISBN = "979-8-89176-189-6"
}
Instantly Learning Preference Alignment via In-context DPO · NAACL 2025