Large Language Models with Controllable Working Memory
Authors:
Preprint
Abstract
Large language models (LLMs) have led to a series of breakthroughs in natural language processing (NLP), owing to their excellent understanding and generation abilities. Remarkably, what further sets these models apart is the massive amounts of world knowledge they internalize during pretraining. While many downstream applications provide the model with an informational context to aid its performance on the underlying task, how the model's world knowledge interacts with the factual information presented in the context remains under explored. As a desirable behavior, an LLM should give precedence to the context whenever it contains task-relevant information that conflicts with the model's memorized knowledge. This enables model predictions to be grounded in the context, which can then be used to update or correct specific model predictions without frequent retraining. By contrast, when the context is irrelevant to the task, the model should ignore it and fall back on its internal knowledge. In this paper, we undertake a first joint study of the aforementioned two properties, namely controllability and robustness, in the context of LLMs. We demonstrate that state-of-the-art T5 and PaLM (both pretrained and finetuned) could exhibit poor controllability and robustness, which do not scale with increasing model size. As a solution, we propose a novel method - Knowledge Aware FineTuning (KAFT) - to strengthen both controllability and robustness by incorporating counterfactual and irrelevant contexts to standard supervised datasets. Our comprehensive evaluation showcases the utility of KAFT across model architectures and sizes.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- Time-Aware Language Models as Temporal Knowledge BasesTransactions of the Association for Computational Linguistics, 2022
- Transformer Feed-Forward Layers Are Key-Value Memories2021
- QASC: A Dataset for Question Answering via Sentence CompositionProceedings of the AAAI Conference on Artificial Intelligence, 2020
- UNIFIEDQA: Crossing Format Boundaries with a Single QA System2020
- How Much Knowledge Can You Pack Into the Parameters of a Language Model?2020
- Negated and Misprimed Probes for Pretrained Language Models: Birds Can Talk, But Cannot Fly2020
- Visual working memory buffers information retrieved from visual long-term memoryProceedings of the National Academy of Sciences, 2017
- FROST: A Distributed Neurocomputational Model of Working Memory MaintenanceJournal of Cognitive Neuroscience, 2005
- Unit activity in prefrontal cortex during delayed-response performance: neuronal correlates of transient memory.Journal of Neurophysiology, 1973
- Modern Control EngineeringJournal of Dynamic Systems, Measurement, and Control, 1971