arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2405.20192cs.CL
收藏

TAIA:大语言模型是分布外数据学习者

TAIA: Large Language Models are Out-of-Distribution Data Learners

Fudan University(复旦大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);Cooperative Medianet Innovation Center(合作 medianet 创新中心);Shanghai Jiao Tong University(上海交通大学)

Shuyang Jiang, Yusheng Liao, Ya Zhang, Yanfeng Wang, Yu Wang

AI总结:

本文提出TAIA方法,在微调时更新全部参数但推理时仅使用注意力参数,以解决领域数据稀缺且分布不匹配的问题,并在多个任务上验证了其优于完全微调模型和基础模型的表现。

摘要:

在任务特定的问答对上进行微调是提升指令微调大语言模型(LLMs)在下游任务上表现的主要方法。然而,在某些专业领域,如医疗保健或无害内容生成,几乎不可能获得大量与下游分布相匹配的高质量数据。为了在数据稀缺且数据与领域不匹配的情况下提升LLMs的性能,我们重新评估了Transformer架构,并发现微调过程中并非所有参数更新都对下游性能有积极贡献。我们的分析表明,在自注意力和前馈网络中,当训练集分布与测试集不完全一致时,只有微调后的注意力参数特别有益。基于这一发现,我们提出了一种有效的推理时干预方法:训练全部参数但仅使用注意力进行推理(\ rainallInfAttn)。我们使用两个通用指令微调数据集对\ rainallInfAttn进行了实证验证,并在涉及数学、推理和知识理解的七个下游任务上,针对不同参数规模和微调技术的大语言模型进行了评估。我们全面的实验表明,在大多数场景下,与完全微调模型和基础模型相比,\ rainallInfAttn均取得了更优的改进,并带来了显著的性能提升。\ rainallInfAttn对数据不匹配的高容忍度使其能够抵抗越狱微调,并利用通用数据增强专业任务。代码可在\url{https://github.com/pixas/TAIA_LLM}获取。

英文摘要:

Fine-tuning on task-specific question-answer pairs is a predominant method for enhancing the performance of instruction-tuned large language models (LLMs) on downstream tasks. However, in certain specialized domains, such as healthcare or harmless content generation, it is nearly impossible to obtain a large volume of high-quality data that matches the downstream distribution. To improve the performance of LLMs in data-scarce domains with domain-mismatched data, we re-evaluated the Transformer architecture and discovered that not all parameter updates during fine-tuning contribute positively to downstream performance. Our analysis reveals that within the self-attention and feed-forward networks, only the fine-tuned attention parameters are particularly beneficial when the training set's distribution does not fully align with the test set. Based on this insight, we propose an effective inference-time intervention method: Training All parameters but Inferring with only Attention (\trainallInfAttn). We empirically validate \trainallInfAttn using two general instruction-tuning datasets and evaluate it on seven downstream tasks involving math, reasoning, and knowledge understanding across LLMs of different parameter sizes and fine-tuning techniques. Our comprehensive experiments demonstrate that \trainallInfAttn achieves superior improvements compared to both the fully fine-tuned model and the base model in most scenarios, with significant performance gains. The high tolerance of \trainallInfAttn to data mismatches makes it resistant to jailbreaking tuning and enhances specialized tasks using general data. Code is available in \url{https://github.com/pixas/TAIA_LLM}.

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

↑