MarkTechPost@AI 07月26日 08:14
FEEDER: A Pre-Selection Framework for Efficient Demonstration Selection in LLMs
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

大型语言模型(LLMs)在少样本推理(即上下文学习,ICL)方面表现出色,但从大型训练数据集中选择最具代表性的演示样本是一个挑战。以往的方法依赖于相似性分数,而当前方法则结合了其他选择规则,但这会增加计算开销。上海交通大学等机构的研究人员提出了FEEDER(FEw yet Essential Demonstration prE-selectoR)方法,该方法通过引入“充分性”和“必要性”指标,并结合基于树的算法,能够识别出包含最代表性样本的核心子集,并针对特定LLM进行调整。FEEDER在多种数据集和不同规模的LLM上进行了评估,结果显示,在保持性能的同时,可将训练数据量减少20%,并能有效提升LLM在复杂任务上的表现,尤其是在样本数量增加导致性能下降时。

🎯 FEEDER是一种创新的演示预选框架,旨在解决大型语言模型(LLMs)在上下文学习(ICL)中选择代表性演示样本的难题。它通过引入“充分性”和“必要性”两个核心指标,并结合高效的树状算法,能够从庞大的训练数据集中识别出一个精简但至关重要的演示子集,从而优化LLM的学习过程。

🔬 FEEDER通过精选演示样本,有效解决了在增加样本数量(shots)时LLM性能下降的问题,尤其是在面对噪声或重复演示时。该方法通过评估每个演示的充分性和必要性,最大限度地减少了对LLM性能的负面影响,提高了模型在复杂任务上的稳定性和表现,例如在Gemma-2等LLM上,即使在挑战性任务中也能实现性能提升。

📊 FEEDER在多种文本分类、推理、语义解析和科学问答数据集上进行了广泛评估,并使用了包括GPT-2、GPT-neo、GPT-3、Gemma-2、Llama-2、Llama-3和Qwen-2.5在内的多种LLM。实验证明,FEEDER能在保留近一半训练样本的同时,实现同等甚至更优的性能,并且在减少训练数据量方面取得了显著成效,为LLM的高效部署提供了切实可行的解决方案。

📈 在双层优化方面,FEEDER通过使用高质量的小型数据集进行微调,同时降低了计算成本,这与核心集选择的原则一致。研究表明,与仅通过上下文增强LLM相比,微调LLM能带来更大的性能提升,而FEEDER在微调设置下更能实现卓越的性能增益,其有效性随着运行次数的增加而先升后降,说明了识别代表性子集对LLM性能增强的重要性,但过窄的子集可能会限制性能的进一步提升。

LLMs have demonstrated exceptional performance across multiple tasks by utilizing few-shot inference, also known as in-context learning (ICL). The main problem lies in selecting the most representative demonstrations from large training datasets. Early methods selected demonstrations based on relevance using similarity scores between each example and the input question. Current methods suggest using additional selection rules, along with similarity, to enhance the efficiency of demonstration selection. These improvements introduce significant computational overhead when the number of shots increases. The effectiveness of selected demonstrations should also consider the specific LLM in use, as different LLMs exhibit varying capabilities and knowledge domains.

Researchers from Shanghai Jiao Tong University, Xiaohongshu Inc., Carnegie Mellon University, Peking University, No Affiliation, University College London, and University of Bristol have proposed FEEDER (FEw yet Essential Demonstration prE-selectoR), a method to identify a core subset of demonstrations containing the most representative examples in training data, adjusted to specific LLMs. To construct this subset, “sufficiency” and “necessity” metrics are introduced in the pre-selection stage, along with a tree-based algorithm. Moreover, FEEDER reduces training data size by 20% while maintaining performance and seamlessly integrating with various downstream demonstration selection techniques in ICL across LLMs ranging from 300M to 8B parameters.

FEEDER is evaluated on 6 text classification datasets: SST-2, SST-5, COLA, TREC, SUBJ, and FPB, covering tasks from sentiment classification and linguistic analysis to textual entailment. It is also evaluated on the reasoning dataset GSM8K, the semantic-parsing dataset SMCALFlow, and the scientific question-answering dataset GPQA. The official splits for each dataset are directly followed to get the training and test data. Moreover, multiple LLM variants are utilized to evaluate the performance of the method, including two GPT-2 variants, GPT-neo with 1.3B parameters, GPT-3 with 6B parameters, Gemma-2 with 2B parameters, Llama-2 with 7B parameters, Llama-3 with 8B parameters, and Qwen-2.5 with 32B parameters as the LLM base.

Results regarding in-context learning performance show that FEEDER enables retention of almost half the training samples while achieving superior or comparable performance. Evaluation of few-shot performance on complex tasks using LLMs like Gemma-2 shows that FEEDER improves performance even when LLMs struggle with challenging tasks. It performs effectively with large numbers of shots, handling situations where LLM performance usually drops when the number of examples increases from 5 to 10 due to noisy or repeated demonstrations. Moreover, FEEDER minimizes negative impact on LLM performance by evaluating the sufficiency and necessity of each demonstration, and helps in the performance stability of LLMs

On bi-level optimization, FEEDER achieves improved performance by utilizing a small yet high-quality dataset for fine-tuning while simultaneously reducing computational expenses, aligning with the core-set selection principle. Results indicate that fine-tuning LLMs provides greater performance improvements compared to augmenting LLMs with contexts, with FEEDER achieving even better performance gains in fine-tuning settings. Performance analysis reveals that FEEDER’s effectiveness first rises and then drops with increasing number of runs or rounds (R and K, respectively), confirming that identifying representative subsets from training datasets enhances LLM performance. However, overly narrow subsets may limit potential performance gains.

In conclusion, researchers introduced FEEDER, a demonstration pre-selector designed to use LLM capabilities and domain knowledge to identify high-quality demonstrations through an efficient discovery approach. It reduces training data requirements while maintaining comparable performance, offering a practical solution for efficient LLM deployment. Future research directions include exploring applications with larger LLMs and extending FEEDER’s capabilities to areas such as data safety and data management. FEEDER makes a valuable contribution to demonstration selection, providing researchers and practitioners with an effective tool for optimizing LLM performance while reducing computational overhead.


Check out the Paper. All credit for this research goes to the researchers of this project.

Meet the AI Dev Newsletter read by 40k+ Devs and Researchers from NVIDIA, OpenAI, DeepMind, Meta, Microsoft, JP Morgan Chase, Amgen, Aflac, Wells Fargo and 100s more [SUBSCRIBE NOW]

The post FEEDER: A Pre-Selection Framework for Efficient Demonstration Selection in LLMs appeared first on MarkTechPost.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

LLMs 上下文学习 演示选择 FEEDER 模型优化
相关文章