NAACL 2024long4 citations

MDR: Model-Specific Demonstration Retrieval at Inference Time for In-Context Learning

Huazheng Wang, Jinming Wu, Haifeng Sun, Zixuan Xia, Daixuan Cheng, Jingyu Wang, Qi Qi, Jianxin Liao

Abstract

Recently, retrieval-based in-context learning (ICL) methods for selecting demonstrations have been widely investigated. Existing methods train a dense retriever to retrieve the most appropriate demonstrations for a given test query, which improves ICL performance. However, we find that distinct LLMs exhibit different biases for “what is a good demonstration” since they possess differences in training data, model architectures and training methods. As a result, a demonstration suitable for one LLM may not be appropriate for others.Previous approaches ignore the model bias and fail to retrieve the most appropriate demonstrations for different inference LLMs, resulting in a degradation of ICL performance.To address this problem, we propose a simple yet effective metric to evaluate the appropriateness of demonstrations for a specific inference LLM. Furthermore, we introduce a Model-specific Demonstration Retrieval (MDR) method for ICL at inference time, which considers the biases of different LLMs. We test MDR on seen and unseen tasks with multi-scale inference LLMs, such as GPT-Neo-2.7B, LLaMA-7B and Vicuna-13B. Experiments on 23 datasets across 11 data domains highlight the remarkable effectiveness of MDR, showcasing improvements of up to 41.2% in comparison to methods that neglect model biases.

BibTeX
@inproceedings{wang-etal-2024-mdr,
    title = "{MDR}: Model-Specific Demonstration Retrieval at Inference Time for In-Context Learning",
    author = "Wang, Huazheng  and
      Wu, Jinming  and
      Sun, Haifeng  and
      Xia, Zixuan  and
      Cheng, Daixuan  and
      Wang, Jingyu  and
      Qi, Qi  and
      Liao, Jianxin",
    editor = "Duh, Kevin  and
      Gomez, Helena  and
      Bethard, Steven",
    booktitle = "Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers)",
    month = jun,
    year = "2024",
    address = "Mexico City, Mexico",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.naacl-long.235/",
    doi = "10.18653/v1/2024.naacl-long.235",
    pages = "4189--4204"
}
MDR: Model-Specific Demonstration Retrieval at Inference Time for In-Context Learning · NAACL 2024