GOLD: Generalized Knowledge Distillation via Out-of-Distribution-Guided Language Data Generation
作者: Mohsen Gholami, Mohammad Akbari, Cindy Hu, Vaden Masrani, Z. Jane Wang, Yong Zhang
分类: cs.CL
发布日期: 2024-03-28
💡 一句话要点
提出GOLD框架以解决语言模型蒸馏中的数据分布偏差问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 知识蒸馏 数据生成 语言模型 泛化能力 离散外部指导 NLP任务 能量基评估
📋 核心要点
- 现有知识蒸馏方法在数据生成时,往往集中于内容分布的中心,导致模型无法学习到真实的数据分布。
- 本文提出GOLD框架,利用迭代的离散外部指导反馈机制,生成多样化的数据以提升蒸馏模型的泛化能力。
- 在10个NLP任务中,GOLD相较于现有方法平均提升了5%至14%的性能,显示出其广泛的适用性和有效性。
📝 摘要(中文)
知识蒸馏在语言模型的高效部署中至关重要。现有方法生成的数据往往集中于原始内容分布的中心,导致蒸馏模型无法学习真实的数据分布,忽视低概率样本。为此,本文提出了GOLD框架,通过迭代的离散外部指导反馈机制生成数据,从而提高蒸馏模型的泛化能力。此外,本文还引入了一种基于能量的OOD评估方法,以处理噪声生成数据。实验结果表明,GOLD在10个不同的NLP分类和序列到序列任务中,平均提升了5%至14%的性能。
🔬 方法详解
问题定义:本文旨在解决现有知识蒸馏方法在数据生成过程中,样本主要集中于原始内容分布中心的问题。这种偏差导致蒸馏模型无法有效学习到真实的数据分布,尤其是低概率样本的遗忘。
核心思路:GOLD框架通过引入迭代的离散外部指导反馈机制,生成更具多样性的数据,从而增强蒸馏模型的泛化能力。此设计旨在克服传统方法的局限性,使模型能够学习到更全面的分布特征。
技术框架:GOLD的整体架构包括数据生成模块和反馈机制。数据生成模块利用大语言模型(LLM)生成样本,而反馈机制则根据生成样本的分布特征进行迭代优化,以确保生成数据的多样性和代表性。
关键创新:GOLD的主要创新在于其离散外部指导反馈机制,该机制能够有效引导生成过程,确保模型不仅关注高频样本,还能学习到低频样本的特征。这一方法与传统的集中采样方法形成鲜明对比。
关键设计:在实现过程中,GOLD采用了一种能量基的OOD评估方法,以处理生成数据中的噪声。此外,损失函数的设计也考虑了样本的多样性,确保模型在训练过程中能够平衡不同样本的学习权重。
🖼️ 关键图片
📊 实验亮点
实验结果显示,GOLD在10个不同的分类和序列到序列任务中,平均提升了5%至14%的性能,相较于现有方法和大语言模型(LLM)均表现出显著的优势。这一结果表明GOLD在提升模型泛化能力方面的有效性和实用性。
🎯 应用场景
GOLD框架具有广泛的应用潜力,特别是在需要高效知识蒸馏的自然语言处理任务中。其生成的多样化数据不仅可以提升模型的泛化能力,还能应用于新兴和未充分探索的任务,推动相关领域的研究进展。未来,GOLD可能在多种语言模型的部署和优化中发挥重要作用。
📄 摘要(原文)
Knowledge distillation from LLMs is essential for the efficient deployment of language models. Prior works have proposed data generation using LLMs for preparing distilled models. We argue that generating data with LLMs is prone to sampling mainly from the center of original content distribution. This limitation hinders the distilled model from learning the true underlying data distribution and to forget the tails of the distributions (samples with lower probability). To this end, we propose GOLD, a task-agnostic data generation and knowledge distillation framework, which employs an iterative out-of-distribution-guided feedback mechanism for the LLM. As a result, the generated data improves the generalizability of distilled models. An energy-based OOD evaluation approach is also introduced to deal with noisy generated data. Our extensive experiments on 10 different classification and sequence-to-sequence tasks in NLP show that GOLD respectively outperforms prior arts and the LLM with an average improvement of 5% and 14%. We will also show that the proposed method is applicable to less explored and novel tasks. The code is available.