arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.01473cs.LGcs.AI
收藏

利用影响函数揭示间接上下文学习

Unraveling Indirect In-Context Learning Using Influence Functions

University of California, Davis(加州大学戴维斯分校);University of California, Irvine(加州大学尔湾分校);University of Southern California(南加州大学);University of South Florida(佛罗里达州立大学)

Hadi Askari, Shivanshu Gupta, Terry Tong, Fei Wang, Anshuman Chhabra, Muhao Chen

AI总结:

本研究提出间接上下文学习新范式,针对任务混合和含噪场景,结合影响函数优化示例选择策略,在多个基准上提升准确率并有效缓解后门攻击。

摘要:

在本研究中,我们提出了一种广义上下文学习(In-Context Learning, ICL)的新范式,称为间接上下文学习(Indirect In-Context Learning)。在间接ICL中,我们探索了针对两种不同真实场景定制的示例选择策略:任务混合场景与含噪ICL场景。我们系统评估了影响函数(Influence Functions, IFs)作为这些场景下选择工具的有效性,凸显了IFs在捕捉示例池内示例信息量方面的潜力。在任务混合场景中,示例选自28种不同任务,包括MMLU、BigBench、StrategyQA和CommonsenseQA。我们证明,将BertScore-Recall(BSR)与IF替代模型结合可进一步提升性能,与传统ICL指标相比,在3样本和5样本设置下平均绝对准确率分别提升0.37%和1.45%。在含噪ICL场景中,我们研究了示例可能存在标注错误或对抗噪声的情况。实验表明,用基于IF的选择器对传统ICL选择器(BSR和余弦相似度)进行重加权,在含噪GLUE基准上,余弦相似度的准确率平均提升2.90%,BSR的准确率平均提升2.94%。在对抗性子场景中,我们展示了利用IFs进行任务无关示例选择以缓解后门攻击的效用,与任务感知方法相比,攻击成功率降低了32.89%。综上,我们提出了一个鲁棒的示例选择框架,其泛化能力超越传统ICL,为IFs在间接ICL中的作用提供了宝贵见解。

英文摘要:

In this work, we introduce a novel paradigm for generalized In-Context Learning (ICL), termed Indirect In-Context Learning. In Indirect ICL, we explore demonstration selection strategies tailored for two distinct real-world scenarios: Mixture of Tasks and Noisy ICL. We systematically evaluate the effectiveness of Influence Functions (IFs) as a selection tool for these settings, highlighting the potential of IFs to better capture the informativeness of examples within the demonstration pool. For the Mixture of Tasks setting, demonstrations are drawn from 28 diverse tasks, including MMLU, BigBench, StrategyQA, and CommonsenseQA. We demonstrate that combining BertScore-Recall (BSR) with an IF surrogate model can further improve performance, leading to average absolute accuracy gains of 0.37\% and 1.45\% for 3-shot and 5-shot setups when compared to traditional ICL metrics. In the Noisy ICL setting, we examine scenarios where demonstrations might be mislabeled or have adversarial noise. Our experiments show that reweighting traditional ICL selectors (BSR and Cosine Similarity) with IF-based selectors boosts accuracy by an average of 2.90\% for Cosine Similarity and 2.94\% for BSR on noisy GLUE benchmarks. For the adversarial sub-setting, we show the utility of using IFs for task-agnostic demonstration selection for backdoor attack mitigation. Showing a 32.89\% reduction in Attack Success Rate compared to task-aware methods. In sum, we propose a robust framework for demonstration selection that generalizes beyond traditional ICL, offering valuable insights into the role of IFs for Indirect ICL.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑