Skip to main content
QUICK REVIEW

[Paper Review] Modifying Memories in Transformer Models

Chen Zhu, Ankit Singh Rawat|arXiv (Cornell University)|Dec 1, 2020
Topic ModelingComputer Science45 references42 citations
TL;DR

The paper defines a knowledge modification task for Transformers, proposing constrained fine-tuning to update specific facts stored implicitly in model weights while preserving performance on unmodified facts, and evaluates various baselines and memory-augmented variants.

ABSTRACT

Large Transformer models have achieved impressive performance in many natural language tasks. In particular, Transformer based language models have been shown to have great capabilities in encoding factual knowledge in their vast amount of parameters. While the tasks of improving the memorization and generalization of Transformers have been widely studied, it is not well known how to make transformers forget specific old facts and memorize new ones. In this paper, we propose a new task of \emph{explicitly modifying specific factual knowledge in Transformer models while ensuring the model performance does not degrade on the unmodified facts}. This task is useful in many scenarios, such as updating stale knowledge, protecting privacy, and eliminating unintended biases stored in the models. We benchmarked several approaches that provide natural baseline performances on this task. This leads to the discovery of key components of a Transformer model that are especially effective for knowledge modifications. The work also provides insights into the role that different training phases (such as pretraining and fine-tuning) play towards memorization and knowledge modification.

Motivation & Objective

  • Motivate and formalize the problem of updating specific factual knowledge stored in Transformer parameters without degrading existing knowledge.
  • Create benchmarks (based on T-REx and zsRE) to evaluate knowledge modification capabilities of candidate methods.
  • Investigate baseline approaches and identify effective strategies for memory modification in large Transformer models.
  • Analyze how different training phases (pretraining vs. fine-tuning) and model components affect memorization and modification.

Proposed method

  • Formulate knowledge modification as a constrained optimization problem targeting a subset of facts to be updated.
  • Propose constrained fine-tuning on modified evidences with a weight-space constraint to limit interference with unmodified facts.
  • Experiment with fine-tuning specific Transformer blocks and with constrained optimization (using l_infinity or Fisher information as alternatives).
  • Evaluate baseline approaches including retraining, fine-tuning on modified facts, and mixed batches, against constrained fine-tuning across multiple models.

Experimental results

Research questions

  • RQ1Can Transformer models reliably modify selected factual knowledge while preserving accuracy on unmodified facts?
  • RQ2Which modeling choices (layers to fine-tune, constraints, training regime) best balance modification success and forgetting risk?
  • RQ3How do explicit memory architectures (FaE) compare to standard Transformer models in the ability to update facts?
  • RQ4What is the role of pretraining versus fine-tuning in memorization and knowledge modification?
  • RQ5How scalable is the constrained-finetuning approach as the number of modified facts grows?

Key findings

  • Constrained fine-tuning on modified evidences with an l_infinity weight constraint effectively updates facts while preserving unmodified knowledge.
  • Best results often come from modifying specific layers rather than the entire model, and the optimal layer can shift with the number of modified facts and the model state.
  • Fine-tuning FaE’s symbolic memory alone is insufficient; updating implicit knowledge via parameterFine-tuning yields the best trade-offs in many settings.
  • Across models, the constrained FTM (fine-tune on modified facts with constraints) outperforms unconstrained finetuning and mixed-batch strategies in preserving unmodified facts.
  • Memory-augmented FaE can reach competitive modified-fact accuracy but does not consistently beat constrained BERT-Large in the overall knowledge-modification trade-off.
  • The study provides a benchmark showing that constrained-layer-wise updates and selective-layer fine-tuning are effective for knowledge modification.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.