微调既能改风格也能灌知识,关键看数据格式和信息类型。
From Style to Facts: Mapping the Boundaries of Knowledge Injection with Finetuning
- 用问答格式训练,知识泛化效果远超文章式数据。
- 数值信息比类别信息更难记住,多步推理时知识也容易失效。
- 改写作风格与灌输真实事件知识,难度其实差不多。
微调是一种可扩展且成本低的语言模型定制方法,比提示工程或上下文学习更可靠。传统观点认为,通过微调注入知识会导致性能脆弱、泛化能力差。我们提出,任务定制(如指令微调)与知识注入(如传授新事实)的区分并无实质意义。通过大规模实验,在人工设计的、介于微调优势与失败模式之间的数据集上对前沿的Gemini v1.5模型族进行微调,发现:问答格式的数据显著提升知识泛化能力;数值信息比类别信息更难保留;即使训练样本相似,模型在多步推理中仍难以应用已学知识——这些因素使知识注入尤其困难,即便控制了数据增强和信息量等变量。另一方面,结果表明,微调关于真实事件的信息,与微调模型写作风格的难度并无本质差异。
原文摘要 · Abstract (English)
Finetuning provides a scalable and cost-effective means of customizing language models for specific tasks or response styles, with greater reliability than prompting or in-context learning. In contrast, the conventional wisdom is that injecting knowledge via finetuning results in brittle performance and poor generalization. We argue that the dichotomy of "task customization" (e.g., instruction tuning) and "knowledge injection" (e.g., teaching new facts) is a distinction without a difference. We instead identify concrete factors that explain the heterogeneous effectiveness observed with finetuning. To this end, we conduct a large-scale experimental study of finetuning the frontier Gemini v1.5 model family on a spectrum of datasets that are artificially engineered to interpolate between the strengths and failure modes of finetuning. Our findings indicate that question-answer training data formats provide much stronger knowledge generalization than document/article-style training data, numerical information can be harder for finetuning to retain than categorical information, and models struggle to apply finetuned knowledge during multi-step reasoning even when trained on similar examples -- all factors that render "knowledge injection" to be especially difficult, even after controlling for considerations like data augmentation and information volume. On the other hand, our findings also indicate that it is not fundamentally more difficult to finetune information about a real-world event than information about what a model's writing style should be.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。