Skip to main content
LawSphereX

Enhancing Semantic Consistency of Large Language Models through Model Editing: An Interpretability-Oriented Approach

Subject: Language and Linguistics

Author or source: Jingyuan Yang, Dapeng Chen, Yajing Sun, Rongjun Li, Zhiyong Feng, Wei Peng

Updated:

To achieve semantic consistency of an LLM, one of the key approaches is to finetune the model with prompt-output pairs with semantically equivalent meanings.

Jingyuan Yang, Dapeng Chen, Yajing Sun, Rongjun Li, Zhiyong Feng, Wei Peng. 2024. Enhancing Semantic Consistency of Large Language Models through Model Editing: An Interpretability-Oriented Approach. Findings of the Association for Computational Linguistics: ACL 2024. Association for Computational Linguistics. DOI 10.18653/v1/2024.findings-acl.199. CC BY 4.0. Original PDF and author abstract are reproduced unchanged apart from whitespace in the abstract. LawSphereX prepared the reading prompt and cover. No endorsement implied.

Publication sources

Authors’ abstract

Source page 1–11

A Large Language Model (LLM) tends to generate inconsistent and sometimes contradictory outputs when presented with a prompt that has equivalent semantics but is expressed differently from the original prompt. To achieve semantic consistency of an LLM, one of the key approaches is to finetune the model with prompt-output pairs with semantically equivalent meanings. Despite its effectiveness, a data-driven finetuning method incurs substantial computation costs in data preparation and model optimization. In this regime, an LLM is treated as a “black box”, restricting our ability to gain deeper insights into its internal mechanism. In this paper, we are motivated to enhance the semantic consistency of LLMs through a more interpretable method (i.e., model editing) to this end. We first identify the model components (i.e., attention heads) that have a key impact on the semantic consistency of an LLM. We subsequently inject biases into the output of these model components along the semantic-consistency activation direction. It is noteworthy that these modifications are cost-effective, without reliance on mass manipulations of the original model parameters. Through comprehensive experiments on the constructed NLU and open-source NLG datasets, our method demonstrates significant improvements in the semantic consistency and task performance of LLMs. Additionally, our method exhibits promising generalization capabilities by performing well on tasks beyond the primary tasks.

Reading guide for language and linguistics

Source page 1–11

Identify the language phenomenon and how the authors annotate or measure it. Check whether the examples support the conclusions for other settings.