Papers › Knowledge-in-Context: Towards Knowledgeable Semi-Parametric Language Models

Knowledge-in-Context: Towards Knowledgeable Semi-Parametric Language Models

28 Oct 2022arXiv:2210.16433archive 2025-07-28

Xiaoman Pan, Wenlin Yao, Hongming Zhang, Dian Yu, Dong Yu, Jianshu Chen

Fully-parametric language models generally require a huge number of model parameters to store the necessary knowledge for solving multiple natural language tasks in zero/few-shot settings. In addition, it is hard to adapt to the evolving world knowledge without the costly model re-training. In this paper, we develop a novel semi-parametric language model architecture, Knowledge-in-Context (KiC), which empowers a parametric text-to-text language model with a knowledge-rich external memory. Specifically, the external memory contains six different types of knowledge: entity, dictionary, commonsense, event, script, and causality knowledge. For each input instance, the KiC model adaptively selects a knowledge type and retrieves the most helpful pieces of knowledge. The input instance along with its knowledge augmentation is fed into a text-to-text model (e.g., T5) to generate the output answer, where both the input and the output are in natural language forms after prompting. Interestingly, we find that KiC can be identified as a special mixture-of-experts (MoE) model, where the knowledge selector plays the role of a router that is used to determine the sequence-to-expert assignment in MoE. This key observation inspires us to develop a novel algorithm for training KiC with an instance-adaptive knowledge selector. As a knowledge-rich semi-parametric language model, KiC only needs a much smaller parametric part to achieve superior zero-shot performance on unseen tasks. By evaluating on 40+ different tasks, we show that KiC_Large with 770M parameters easily outperforms large language models (LMs) that are 4-39x larger by a large margin. We also demonstrate that KiC exhibits emergent abilities at a much smaller model scale compared to the fully-parametric models.

PaperPDF

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

No code repository is listed for this paper in the archive or in Syntology's graph.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Common Sense ReasoningCoreference ResolutionLanguage ModelingLanguage ModellingMixture-of-ExpertsNatural Language InferenceNatural Language Inference (Zero-Shot)Question AnsweringSentence CompletionWord Sense DisambiguationWorld Knowledge

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Common Sense Reasoning WinoGrande KiC-770M Accuracy 55.30 #63 of 77 Archive leaderboard report
Coreference Resolution Winograd Schema Challenge KiC-770M Accuracy 65.40 #42 of 82 Archive leaderboard report
Natural Language Inference ANLI test KiC-770M A1 36.30 #14 of 25 Archive leaderboard report
Natural Language Inference ANLI test KiC-770M A2 35.00 #14 of 25 Archive leaderboard report
Natural Language Inference ANLI test KiC-770M A3 37.60 #14 of 25 Archive leaderboard report
Natural Language Inference RTE KiC-770M Accuracy 74.00 #46 of 90 Archive leaderboard report
Question Answering COPA KiC-770M Accuracy 85.30 #28 of 60 Archive leaderboard report
Question Answering StoryCloze KiC-770M Accuracy 94.40 #5 of 23 Archive leaderboard report
Sentence Completion HellaSwag KiC-770M Accuracy 29.6 #88 of 89 Archive leaderboard report
Word Sense Disambiguation Words in Context KiC-770M Accuracy 52.40 #27 of 37 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections