Decoding by Contrasting Knowledge: Enhancing LLMs' Confidence on Edited Facts

Baolong Bi, Shenghua Liu, Lingrui Mei, Yiwei Wang, Pengliang Ji +1 more
5/19/2024
cs.CL

No official code found. Best implementation: byronBBL/DeCK (10 stars, last commit 2024-12-29).

Abstract

The knowledge within large language models (LLMs) may become outdated quickly. While in-context editing (ICE) is currently the most effective method for knowledge editing (KE), it is constrained by the black-box modeling of LLMs and thus lacks interpretability. Our work aims to elucidate the superior performance of ICE on the KE by analyzing the impacts of in-context new knowledge on token-wise distributions. We observe that despite a significant boost in logits of the new knowledge, the performance of is still hindered by stubborn knowledge. Stubborn knowledge refers to as facts that have gained excessive confidence during pretraining, making it hard to edit effectively. To address this issue and further enhance the performance of ICE, we propose a novel approach termed $\textbf{De}$coding by $\textbf{C}$ontrasting $\textbf{K}$nowledge (DeCK). DeCK derives the distribution of the next token by contrasting the logits obtained from the newly edited knowledge guided by ICE with those from the unedited parametric knowledge. Our experiments consistently demonstrate that DeCK enhances the confidence of LLMs in edited facts. For instance, it improves the performance of LLaMA3-8B-instruct on MQuAKE by up to 219%, demonstrating its capability to strengthen ICE in the editing of stubborn knowledge. Our work paves the way to develop the both effective and accountable KE methods for LLMs. (The source code is available at: https://deck-llm.meirtz.com)

View on arXivView PDF

Code Implementations(1)

byronBBL/DeCKCommunity100%

Official repository of paper “Decoding by Contrasting Knowledge: Enhancing LLMs’ Confidence on Edited Facts”

100C, C++Apr 24, 20241 years ago

Similar Papers

Cite this paper

@article{bi2024decoding,
  title  = {Decoding by Contrasting Knowledge: Enhancing LLMs' Confidence on Edited Facts},
  author = {Baolong Bi and Shenghua Liu and Lingrui Mei and Yiwei Wang and Pengliang Ji and Xueqi Cheng},
  year   = {2024},
  eprint = {2405.11613},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.11613v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.11613.svg)](https://codeofpaper.com/paper/2405.11613)

Discussion