Editing Knowledge Representation of Language Lodel via Rephrased Prefix Prompts

Published: 01 Aug 2024, Last Modified: 30 Sept 2024https://link.springer.com/book/10.1007/978-981-97-5672-8 Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 14878))EveryoneRevisionsCC BY 4.0
Abstract: Neural language models (LMs) have been extensively trained on vast corpora to store factual knowledge about various aspects of the world described in texts. Current technologies typically employ knowledge editing methods or specific prompts to modify LM outputs. However, existing knowledge editing methods are costly and inefficient, struggling to produce appropriate text. Additionally, prompt engineering is opaque and requires significant effort to find suitable prompts. To address these issues, we introduce a new method called PSPEM (\textbf{P}refix \textbf{S}oft-\textbf{P}rompt \textbf{E}diting \textbf{M}ethod), that can be used for a lifetime with just one training. It resolves the inefficiencies and generalizability issues in knowledge editing methods and overcomes the opacity of prompt engineering by automatically seeking optimal soft prompts. Specifically, PSPEM adopts a prompt encoder and an encoding converter to compress and refine key information in prompts and adopts prompt alignment techniques to guide model generation, ensuring text consistency and adherence to the intended structure and content. We have validated the effectiveness of PSPEM through knowledge editing and attribute inserting. On the COUNTERFACT dataset, PSPEM achieved nearly 100\% editing accuracy and demonstrated the highest level of fluency. We further analyzed the similarities between PSPEM and original prompts and their impact on the model's internals. The results indicate that PSPEM can serve as an alternative to original prompts, supporting the model in effective editing.
Loading

OpenReview is a long-term project to advance science through improved peer review with legal nonprofit status. We gratefully acknowledge the support of the OpenReview Sponsors. © 2025 OpenReview