ACL 2024findings4 citations

SSS: Editing Factual Knowledge in Language Models towards Semantic Sparse Space

Huazheng Wang, Haifeng Sun, Jingyu Wang, Qi Qi, Zixuan Xia, Menghao Zhang, Jianxin Liao

Abstract

Language Models (LMs) acquire factual knowledge during pre-training and store it in the parameters, which can be valuable for downstream tasks. As world evolves, some facts may be incorrectly induced or become obsolete over time. Various model editing methods have been proposed to modify specific examples in LMs. However, existing training-based methods still suffer from sub-optimal locality, where irrelevant neighborhood examples can be adversely influenced. Model’s gradients are still struggling to identify the appropriate direction when updating the parameters. To address this issue, we find that directing the hidden state of the edit example towards spaces where semantics are sparse tends to help preserve the semantics of irrelevant neighborhood examples. Based on this hypothesis, we propose a novel metric, named SSS, to evaluate the degree of sparsity around a sentence embedding in the semantic space without any human or machine annotation. Subsequently, we incorporate SSS into the original loss function of the existing training-based methods to enhance locality. Experiments conducted on two datasets across various models demonstrate that SSS is effective in improving both locality and reasoning capability.

BibTeX
@inproceedings{wang-etal-2024-sss,
    title = "{SSS}: Editing Factual Knowledge in Language Models towards Semantic Sparse Space",
    author = "Wang, Huazheng  and
      Sun, Haifeng  and
      Wang, Jingyu  and
      Qi, Qi  and
      Xia, Zixuan  and
      Zhang, Menghao  and
      Liao, Jianxin",
    editor = "Ku, Lun-Wei  and
      Martins, Andre  and
      Srikumar, Vivek",
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2024",
    month = aug,
    year = "2024",
    address = "Bangkok, Thailand",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.findings-acl.331/",
    doi = "10.18653/v1/2024.findings-acl.331",
    pages = "5559--5570"
}
SSS: Editing Factual Knowledge in Language Models towards Semantic Sparse Space · ACL 2024