Saved in:
Bibliographic Details
Main Authors: Yang, Wenkai, Lin, Yankai, Zhou, Jie, Wen, Ji-Rong
Format: Preprint
Published: 2023
Subjects:
Online Access:https://arxiv.org/abs/2311.08883
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912157196615680
author Yang, Wenkai
Lin, Yankai
Zhou, Jie
Wen, Ji-Rong
author_facet Yang, Wenkai
Lin, Yankai
Zhou, Jie
Wen, Ji-Rong
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2311_08883
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Distilling Rule-based Knowledge into Large Language Models
Yang, Wenkai
Lin, Yankai
Zhou, Jie
Wen, Ji-Rong
Computation and Language
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.
title Distilling Rule-based Knowledge into Large Language Models
topic Computation and Language
url https://arxiv.org/abs/2311.08883