Knowledge Rumination for Pre-trained Language Models (2023)

Abstract: Previous studies have revealed that vanilla pre-trained language models (PLMs) lack the capacity to handle knowledge-intensive NLP tasks alone; thus, several works have attempted to integrate external knowledge into PLMs. However, despite the promising outcome, we empirically observe that PLMs may have already encoded rich knowledge in their pre-trained parameters but fails to fully utilize them when applying to knowledge-intensive tasks. In this paper, we propose a new paradigm dubbed Knowledge Rumination to help the pre-trained language model utilize that related latent knowledge without retrieving them from the external corpus. By simply adding a prompt like “As far as I know” to the PLMs, we try to review related latent knowledge and inject them back into the model for knowledge consolidation. We apply the proposed knowledge rumination to various language models, including RoBERTa, DeBERTa, and GPT-3. Experimental results on six commonsense reasoning tasks and GLUE benchmarks demonstrate the effectiveness of our proposed approach, which proves that the knowledge stored in PLMs can be better exploited to enhance performance.

## introduction pre-trained language models (plms) have waved the nlp community as fundamental infrastructure by demonstrating remarkable abilities with the "pre-train, prompt, and predict" paradigm @xcite . the mere plms, however, lack the capacity to handle knowledgeintensive tasks with advanced functionalities like commonsense reasoning @xcite @xcite and open-domain question answering @xcite . this necessitates a boosting trend for research focusing q: if a bird is a carnivore, then it is likely a(n) a). prey b). predator c). herbivore d). canary on augmenting plms with external knowledge sources @xcite @xcite @xcite . however, despite the empirical success, we observe that plms can often encode extensive knowledge within their parameters yet fail to utilize this effectively for knowledge-intensive tasks. taking pilot experiments as an example, we use knowledge probing @xcite to the plm as shown in figure 1 . given a question "if a bird is a carnivore, then it is likely a(n) what?", we notice that the plm has known the knowledge "a carnivore is likely a(n) predator" in its parameters; however, we surprisingly find that the finetuned plm chose the wrong answer despite the model knowing the related knowledge. interestingly, this phenomenon mirrors human behavior. as an example, in the cognitive reflection test (crt) @xcite , participants have posed a series of straightforward questions (already learned), yet they often initially fail in their intuitive reason-ing. upon reflection, however, individuals typically identify their erroneous responses and correct them. consequently, we conjecture that the prominent plms of today have flaws as humans and we still have the following problem: are we fully exploiting the potential of the plms? some pioneering researchers have attempted to unravel this enigma. for instance, @xcite and van de @xcite propose to utilize the knowledge in the pre-traning corpus by retrieve-then-fine-tuning method. likewise, @xcite capitalizes on the implicit knowledge within large language models (>10b) by retrieving from model weights with recitationaugmented generation. these studies affirm that plms encapsulate a vast body of knowledge, with untapped potential, while in our paper, we pursue a more universally applicable, yet simple solution to fully harness knowledge in plms for nlp. to address this need, we introduce knowledge rumination to assist the model in thinking thoughtfully in handling knowledge-intensive tasks. analogous to how animals ruminate food for better digestion and absorptionby regurgitating it from the stomach back to the mouth for additional chewingwe aim to mimic this process by having the model first review the relevant knowledge stored in its parameters and then consolidate this knowledge to better tackle associated tasks. in detail, we propose knowledge reviewing with a task-guided prompt by simply adding "as far as i know" to stimulate the model to recall latent knowledge. subsequently, we consolidate knowledge via ffn to explicitly leverage latent knowledge to help address downstream tasks since ffn plays a crucial role in plms @xcite . we apply the proposed knowledge rumination to various plms, including roberta @xcite , deberta @xcite . we also transfer knowledge rumination to large language gpt-3 (175b) @xcite . experimental results on six commonsense reasoning tasks and the glue benchmark demonstrate that the proposed simple method can obtain performance gain and even outperform baselines of retrieving external knowledge. to conclude, we summarize the contributions of this work as follows: knowledge-enhanced models researchers resort to external sources to facilitate the model's ability to deal with knowledge-intensive situations. one direction is to ground the question in a kb and conduct inference with both the question and the retrieved knowledge @xcite @xcite @xcite @xcite . since the pre-trained model can also be viewed as a knowledge store, several recent studies including self-talk @xcite , rainier @xcite , gkp @xcite , elic-itknowledge @xcite propose to treat the large language model (e.g., gpt-3) as an external source to elicit knowledge for downstream tasks. in contrast, our approach diverges from relying on external sources such as knowledge bases (kb) or language models (lm). instead, we concentrate on fully leveraging the latent knowledge acquired by the model itself. there are also some kinds of work that decompose the question into subquestions and ask the model to answer each subquestion such as least-to-most prompt @xcite . however, even these approaches encounter the issue we proposed where the model may possess the answer to the sub-question within its parameters but fails to provide the correct response. the underlying intuition behind our method is that current methods for harnessing the power of pretrained language models (plms) have not fully tapped into the knowledge residing within the model's parameters. note that our approach most closely aligns with self-talk @xcite , but with an additional capability to manage parametric knowledge (such as embeddings in feed-forward networks). this capability broadens the spectrum of the academic idea to a certain extent. ## knowledge rumination in this section, we introduce technical details of knowledge rumination to tap into the potential of plms ( §3.1). given a plm g, we first freeze the model parameters and design a task-specific prompt ( §3.2) to guide the model in reviewing its stored knowledge regarding the task and input (knowledge reviewing). we then consolidate the model's latent knowledge ( §3.3) during tuning downstream tasks (knowledge consolidation). ## conclusion and future work in this work, we propose knowledge rumination for plms, which can serve as a general solution to exploit latent knowledge for downstream tasks and demonstrate promising results. this concept is akin to humans often erring when answering without thorough thinking. in the future, we plan to apply knowledge rumination to more nlp tasks and more types of models.