arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.08883cs.CL
收藏

将基于规则的知识蒸馏到大型语言模型中

Distilling Rule-based Knowledge into Large Language Models

Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Pattern Recognition Center, WeChat AI, Tencent Inc.(腾讯微信AI模式识别中心)

Wenkai Yang, Yankai Lin, Jie Zhou, Ji-Rong Wen

AI总结:

本文提出规则蒸馏方法,利用LLM上下文能力从规则提取知识并编码进参数,相比示例学习在样本效率和泛化上更优。

摘要:

大型语言模型(LLMs)在完成各种现实世界任务中展现出了惊人的性能。当前LLMs知识学习的主要范式是基于示例的学习,即LLMs从一定数量的监督示例中隐式地学习内部规则。然而,这种学习范式可能无法很好地学习那些复杂的规则,尤其是在训练示例有限的情况下。我们受到启发,人类可以通过从规则中学习来以另一种方式学习新任务或知识。也就是说,人类在仅获得详细规则和少量可选示例的情况下,可以快速学习新任务或掌握新知识,并具有良好的泛化能力。因此,在本文中,我们旨在探索这种新学习范式的可行性,其目标是将基于规则的知识编码到LLMs中。我们进一步提出了规则蒸馏(rule distillation),该方法首先利用LLMs强大的上下文学习能力从文本规则中提取知识,然后通过从模型内部产生的上述上下文信号中学习,将知识显式地编码到LLMs的参数中。我们的实验表明,通过我们的方法使LLMs从规则中学习,在样本量和泛化能力方面都比基于示例的学习高效得多。警告:本文可能包含带有冒犯性内容的示例。

英文摘要:

Large language models (LLMs) have shown incredible performance in completing various real-world tasks. The current paradigm of knowledge learning for LLMs is mainly based on learning from examples, in which LLMs learn the internal rule implicitly from a certain number of supervised examples. However, this learning paradigm may not well learn those complicated rules, especially when the training examples are limited. We are inspired that humans can learn the new tasks or knowledge in another way by learning from rules. That is, humans can learn new tasks or grasp new knowledge quickly and generalize well given only a detailed rule and a few optional examples. Therefore, in this paper, we aim to explore the feasibility of this new learning paradigm, which targets on encoding rule-based knowledge into LLMs. We further propose rule distillation, which first uses the strong in-context abilities of LLMs to extract the knowledge from the textual rules, and then explicitly encode the knowledge into the parameters of LLMs by learning from the above in-context signals produced inside the model. Our experiments show that making LLMs learn from rules by our method is much more efficient than example-based learning in both the sample size and generalization ability. Warning: This paper may contain examples with offensive content.

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

↑