English

Editing Common Sense in Transformers

Computation and Language 2023-10-27 v3

Abstract

Editing model parameters directly in Transformers makes updating open-source transformer-based models possible without re-training (Meng et al., 2023). However, these editing methods have only been evaluated on statements about encyclopedic knowledge with a single correct answer. Commonsense knowledge with multiple correct answers, e.g., an apple can be green or red but not transparent, has not been studied but is as essential for enhancing transformers' reliability and usefulness. In this paper, we investigate whether commonsense judgments are causally associated with localized, editable parameters in Transformers, and we provide an affirmative answer. We find that directly applying the MEMIT editing algorithm results in sub-par performance and improve it for the commonsense domain by varying edit tokens and improving the layer selection strategy, i.e., MEMITCSKMEMIT_{CSK}. GPT-2 Large and XL models edited using MEMITCSKMEMIT_{CSK} outperform best-fine-tuned baselines by 10.97% and 10.73% F1 scores on PEP3k and 20Q datasets. In addition, we propose a novel evaluation dataset, PROBE SET, that contains unaffected and affected neighborhoods, affected paraphrases, and affected reasoning challenges. MEMITCSKMEMIT_{CSK} performs well across the metrics while fine-tuning baselines show significant trade-offs between unaffected and affected metrics. These results suggest a compelling future direction for incorporating feedback about common sense into Transformers through direct model editing.

Keywords

Cite

@article{arxiv.2305.14956,
  title  = {Editing Common Sense in Transformers},
  author = {Anshita Gupta and Debanjan Mondal and Akshay Krishna Sheshadri and Wenlong Zhao and Xiang Lorraine Li and Sarah Wiegreffe and Niket Tandon},
  journal= {arXiv preprint arXiv:2305.14956},
  year   = {2023}
}

Comments

Accepted to EMNLP 2023 Main Conference. Anshita, Debanjan, Akshay are co-first authors. Code and datasets for all experiments are available at https://github.com/anshitag/memit_csk

R2 v1 2026-06-28T10:44:19.410Z