Large language models (LLMs) often produce incorrect or outdated information, necessitating efficient and precise knowledge updates. Current model editing methods, however, struggle with long-form knowledge in diverse formats, such as poetry, code snippets, and mathematical derivations. These limitations arise from their reliance on editing a single token's hidden state, a limitation we term "efficacy barrier". To solve this, we propose AnyEdit, a new autoregressive editing paradigm. It decomposes long-form knowledge into sequential chunks and iteratively edits the key token in each chunk, ensuring consistent and accurate outputs. Theoretically, we ground AnyEdit in the Chain Rule of Mutual Information, showing its ability to update any knowledge within LLMs. Empirically, it outperforms strong baselines by 21.5% on benchmarks including UnKEBench, AKEW, and our new EditEverything dataset for long-form diverse-formatted knowledge. Additionally, AnyEdit serves as a plug-and-play framework, enabling current editing methods to update knowledge with arbitrary length and format, significantly advancing the scope and practicality of LLM knowledge editing.
翻译:大型语言模型(LLMs)常产生错误或过时信息,亟需高效且精确的知识更新。然而,现有模型编辑方法难以处理多样化格式的长篇知识,如诗歌、代码片段和数学推导。这些局限源于其依赖编辑单个词元的隐藏状态,我们称之为“效能壁垒”。为此,我们提出AnyEdit,一种新的自回归编辑范式。它将长篇知识分解为顺序块,并迭代编辑每个块中的关键词元,确保输出的一致性与准确性。理论上,我们将AnyEdit基于互信息的链式法则,证明其能够更新LLMs中的任意知识。实证中,在包括UnKEBench、AKEW及我们新构建的面向长篇多格式知识的EditEverything数据集等基准测试上,其性能超越强基线方法21.5%。此外,AnyEdit可作为即插即用框架,使现有编辑方法能够更新任意长度与格式的知识,显著拓展了LLM知识编辑的范围与实用性。