arXiv:2501.01473cs.LGcs.AI2025-01被引 4

用影响函数提升复杂场景下的示范选择效果,让大模型更聪明地学习。

Unraveling Indirect In-Context Learning Using Influence Functions

  • 引入影响函数评估示范样本价值,改进传统选择方法
  • 在混合任务中提升0.37%-1.45%准确率,在噪声数据中提升2.9%以上
  • 适合处理标注错误或对抗攻击的复杂应用,尤其适合安全敏感场景

本文提出一种新型广义上下文学习范式——间接上下文学习(Indirect ICL),针对混合任务和噪声上下文学习两种真实场景,系统评估影响函数(IFs)作为示范选择工具的有效性。在混合任务设置中,示范样本来自28个不同任务,包括MMLU、BigBench、StrategyQA和CommonsenseQA。实验表明,将BertScore-Recall(BSR)与IF代理模型结合,可在3-shot和5-shot设置下分别带来0.37%和1.45%的平均绝对准确率提升。在噪声上下文学习场景中,使用IF重加权传统选择器(BSR与余弦相似度),在噪声GLUE基准上使准确率平均提升2.90%(余弦相似度)和2.94%(BSR)。对于对抗子集,采用无任务依赖的示范选择策略,利用IF实现后门攻击缓解,相较任务感知方法降低32.89%的攻击成功率。研究提出一个鲁棒的示范选择框架,为间接上下文学习提供了新思路。

原文摘要 · Abstract (English)

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.

上下文学习影响函数示范选择鲁棒学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。