AnyEdit: Edit Any Knowledge Encoded in Language Models

Houcheng Jiang, Junfeng Fang, Ningyu Zhang, Guojun Ma, Mingyang Wan +3 more
2/14/2026

No official code found. Best implementation: jianghoucheng/AnyEdit (48 stars, MIT, last commit 2025-11-06).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT

AnyEdit: Edit Any Knowledge Encoded in Language Models, ICML 2025

485PythonJan 31, 202511 months agoMIT
llmmodel-editing

Similar Papers

Cite this paper

@article{jiang2026anyedit,
  title  = {AnyEdit: Edit Any Knowledge Encoded in Language Models},
  author = {Houcheng Jiang and Junfeng Fang and Ningyu Zhang and Guojun Ma and Mingyang Wan and Xiang Wang and Xiangnan He and Tat-Seng Chua},
  year   = {2026},
  eprint = {2502.05628},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.05628},
  journal = {ICML 2025 2025}
}

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/2502.05628.svg)](https://codeofpaper.com/paper/2502.05628)

Discussion