ACL 2025long0 citations

Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context Learning

Chengwei Qin, Wenhan Xia, Fangkai Jiao, Chen Chen, Yuchen Hu, Bosheng Ding, Ruirui Chen, Shafiq Joty

Abstract

Large language models (LLMs) have shown impressive few-shot generalization on many tasks via in-context learning (ICL). Despite their success in showing such emergent abilities, the scale and complexity of larger models also lead to unprecedentedly high computational demands and deployment challenges. In reaction, researchers explore transferring the powerful capabilities of larger models to more efficient and compact models by typically aligning the output of smaller (student) models with that of larger (teacher) models. Existing methods either train student models on the generated outputs of teacher models or imitate their token-level probability distributions. However, these distillation methods pay little to no attention to the input, which also plays a crucial role in ICL. Based on the finding that the performance of ICL is highly sensitive to the selection of demonstration examples, we propose Bidirectional Alignment (BiAlign) to fully leverage the models’ preferences for ICL examples to improve the ICL abilities of student models. Specifically, we introduce the alignment of input preferences between student and teacher models by incorporating a novel ranking loss, in addition to aligning the token-level output distribution. With extensive experiments and analysis, we demonstrate that BiAlign can consistently outperform existing baselines on a variety of tasks involving language understanding, reasoning, and coding.

BibTeX
@inproceedings{qin-etal-2025-beyond,
    title = "Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context Learning",
    author = "Qin, Chengwei  and
      Xia, Wenhan  and
      Jiao, Fangkai  and
      Chen, Chen  and
      Hu, Yuchen  and
      Ding, Bosheng  and
      Chen, Ruirui  and
      Joty, Shafiq",
    editor = "Che, Wanxiang  and
      Nabende, Joyce  and
      Shutova, Ekaterina  and
      Pilehvar, Mohammad Taher",
    booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.acl-long.1573/",
    doi = "10.18653/v1/2025.acl-long.1573",
    pages = "32732--32758",
    ISBN = "979-8-89176-251-0"
}
Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context Learning · ACL 2025