PreprintCited by 8Topic ModelingDomain Adaptation and Few-Shot LearningNatural Language Processing Techniques

Massive Editing for Large Language Models via Meta Learning

Open access
Tan, Chenmien, Zhang, Ge, Fu, Jie·2023·arXiv

Abstract

While large language models (LLMs) have enabled learning knowledge from the pre-training corpora, the acquired knowledge may be fundamentally incorrect or outdated over time, which necessitates rectifying the knowledge of the language model (LM) after the training. A promising approach involves employing a hyper-network to generate parameter shift, whereas existing hyper-networks suffer from inferior scalability in synchronous editing operation amount. To mitigate the problem, we propose the MAssive Language Model Editing Network (MALMEN), which formulates the parameter shift aggregation as the least square problem, subsequently updating the LM parameters using the normal equation. To accommodate editing multiple facts simultaneously with limited memory budgets, we separate the computation on the hyper-network and LM, enabling arbitrary batch size on both neural networks. Our method is evaluated by editing up to thousands of facts on LMs with different architectures, i.e., BERT-base, GPT-2, T5-XL (2.8B), and GPT-J (6B), across various knowledge-intensive NLP tasks, i.e., closed book fact-checking and question answering. Remarkably, MALMEN is capable of editing hundreds of times more facts than strong baselines with the identical hyper-network architecture and outperforms editor specifically designed for GPT. Our code is available at https://github.com/ChenmienTan/malmen.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.2311.04661

Cites

1 of 1 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • The latest lifelong editing methods such as LTE, MALMEN, and RECIPE require extensive training with domain-specific edits before specific editing.

    “The latest efforts in lifelong editing such as LTE [66], MALMEN [15], and RECIPE [67] require extensive training with domain-specific edits before specific editing”

    From WISE: Rethinking the Knowledge Memory for Lifelong Model Editing of Large Language Models (2024) · cites this paper as [15]

    The Method (p. 3) identifies MALMEN as a trained editing hyper-network, and Empirical Evaluation (pp. 6–7) describes task-specific datasets with 104,996 and 244,173 training examples, supporting the training aspect of the claim as it applies to MALMEN. But the Introduction (p. 2) explicitly distinguishes MALMEN’s simultaneous editing of multiple facts from sequential editing, so describing it as a lifelong-editing method overstates what this source supports. This paper does not establish the training requirements of LTE or RECIPE, which have separate citations. (LLM, conf=0.85)

    Experimental — accuracy not yet measured
  • Meta-learning methods typically require a lengthy hyper network training process before each edit, making them less effective for lifelong editing.

    “Meta-learning methods (De Cao et al. 2021; Mitchell et al. 2021; Tan, Zhang, and Fu 2023), which use a hyper network to learn and apply gradients for fine-tuning, typically require a lengthy hyper network training process before each edit, making them less effective for lifelong editing.”

    From Knowledge in Superposition: Unveiling the Failures of Lifelong Knowledge Editing for Large Language Models (2024) · cites this paper as Tan, Zhang, and Fu 2023

    The Introduction (p. 1) describes hyper-networks that use fine-tuning gradients to generate parameter shifts. It also says they may need retraining after a few updates, making repeated editing computationally expensive (p. 2). It does not say a lengthy training process is required before each edit; that frequency overstates the source. (LLM, conf=0.87)

    Experimental — accuracy not yet measured
  • Meta-learning methods like MEND decouple finetuning gradients to generalize edits, complemented by MALMEN addressing cancellation effects.

    “Meta-learning methods like MEND decouple finetuning gradients to generalize edits [31], complemented by MALMEN addressing cancellation effects [15].”

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

  • Zero-Shot Relation Extraction via Reading Comprehension

    Levy, O., Seo, M., Choi, E., & Zettlemoyer, L. (2017) · Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017) · doi:10.18653/v1/k17-1034 · Cited by 482 · cited 1× · see citing works

    “For GPT-2, T5-XL, and GPT-J, we use the zero-shot Relation Extraction (zsRE) question answering dataset (Levy et al., 2017) with the identical train/val splits with De Cao et al. (2021); Mitchell et al. (2022), where the unrelated tuples ( x ui , y ui ) mi =1 are sampled from Natural Questions (NQ;…”
    Method

Flagged first, then by citations

Research works printed but not linked: 34

  1. Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei. Knowledge neurons in pretrained transformers. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics , 2022. URL https://aclanthology.org/2022.acl-long.581 .
  2. Nicola De Cao, Wilker Aziz, and Ivan Titov. Editing factual knowledge in language models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing , 2021. URL https://aclanthology.org/2021.emnlp-main.522 .
  3. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics , 2019. URL https://aclanthology.org/N19-1423 .
  4. Mor Geva, Roei Schuster, Jonathan Berant, and Omer Levy. Transformer feed-forward layers are key-value memories. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing , 2021. URL https://aclanthology.org/2021.emnlp-main. 446 .
  5. Anshita Gupta, Debanjan Mondal, Akshay Krishna Sheshadri, Wenlong Zhao, Xiang Lorraine Li, Sarah Wiegreffe, and Niket Tandon. Editing commonsense knowledge in gpt. arXiv , 2305.14956, 2023. URL https://arxiv.org/abs/2305.14956 . · arXiv
  6. David Ha, Andrew M. Dai, and Quoc V. Le. Hypernetworks. In Proceedings of the 5th International Conference on Learning Representations , 2017. URL https://openreview.net/forum? id=rkpACe1lx .
  7. Thomas Hartvigsen, Swami Sankaranarayanan, Hamid Palangi, Yoon Kim, and Marzyeh Ghassemi. Aging with grace: Lifelong model editing with discrete key-value adapters. arXiv , 2211.11031, 2023. URL https://arxiv.org/abs/2211.11031 . · arXiv
  8. Peter Hase, Mohit Bansal, Been Kim, and Asma Ghandeharioun. Does localization inform editing? surprising differences in causality-based localization vs. knowledge editing in language models. arXiv , 2301.04213, 2023a. URL https://arxiv.org/abs/2301.04213 . · arXiv
  9. Peter Hase, Mona Diab, Asli Celikyilmaz, Xian Li, Zornitsa Kozareva, Veselin Stoyanov, Mohit Bansal, and Srinivasan Iyer. Methods for measuring, updating, and visualizing factual beliefs in language models. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics , 2023b. URL https://aclanthology.org/ 2023.eacl-main.199 .
  10. Dan Hendrycks and Kevin Gimpel. Gaussian error linear units. arXiv preprint arXiv:1606.08145 , 2016. URL https://arxiv.org/abs/1606.08415 . · arXiv
  11. Sepp Hochreiter and J¨ urgen Schmidhuber. Long short-term memory. Neural computation , 9(8):1735-1780, 1997. URL https://www.pnas.org/doi/abs/10.1073/pnas. 1611835114 . · DOI
  12. Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In Proceedings of the 10th International Conference on Learning Representations , 2022. URL https:// openreview.net/forum?id=nZeVKeeFYf9 .
  13. Zeyu Huang, Yikang Shen, Xiaofeng Zhang, Jie Zhou, Wenge Rong, and Zhang Xiong. Transformer-patcher: One mistake worth one neuron. In Proceedings of the 11th International Conference on Learning Representations , 2023. URL https://openreview.net/forum? id=4oYUGeGBPm .
  14. Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the 6th International Conference on Learning Representations , 2015. URL https://arxiv. org/abs/1412.6980 .
  15. James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences , 114(13):3521-3526, 2017. URL https://www.pnas.org/doi/abs/10.1073/pnas.1611835114 . · DOI · Paper page
  16. David Krueger, Chin-Wei Huang, Riashat Islam, Ryan Turner, Alexandre Lacoste, and Aaron Courville. Bayesian hypernetworks. In NeurIPS workshop on Bayesian Deep Learning , 2017. URL http://bayesiandeeplearning.org/2017/papers/34.pdf .
  17. Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics , 7:452-466, 2019. URL https: //aclanthology.org/Q19-1026 .
  18. Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In Proceedings of the 7th International Conference on Learning Representations , 2019. URL https://openreview. net/forum?id=Bkg6RiCqY7 .
  19. Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. Locating and editing factual associations in gpt. In Advances in Neural Information Processing Systems , 2022. URL https://proceedings.neurips.cc/paper\_files/paper/2022/ file/6f1d43d5a82a37e89b0665b33bf3a182-Paper-Conference.pdf .
  20. Kevin Meng, Arnab Sen Sharma, Alex J Andonian, Yonatan Belinkov, and David Bau. Mass-editing memory in a transformer. In Proceedings of the 11th International Conference on Learning Representations , 2023. URL https://openreview.net/forum?id=MkbcAHIYgyS .
  21. Eric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn, and Christopher D Manning. Fast model editing at scale. In Proceedings of the 10th International Conference on Learning Representations , 2022. URL https://openreview.net/forum?id=0DcZxeWfOPt .
  22. Eric Mitchell, Charles Lin, Antoine Bosselut, Christopher D Manning, and Chelsea Finn. Memorybased model editing at scale. In Proceedings of the 39th International Conference on Machine Learning , 2023. URL https://proceedings.mlr.press/v162/mitchell22a. html .
  23. Fabio Petroni, Tim Rockt¨ aschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. Language models as knowledge bases? In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing , 2019. URL https://aclanthology. org/D19-1250 .
  24. Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-totext transformer. Journal of Machine Learning Research , 21(140):1-67, 2020. URL http: //jmlr.org/papers/v21/20-074.html .
  25. Adam Roberts, Colin Raffel, and Noam Shazeer. How much knowledge can you pack into the parameters of a language model? In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing , 2020. URL https://aclanthology.org/2020. emnlp-main.437 .
  26. Anton Sinitsin, Vsevolod Plokhotnyuk, Dmitry Pyrkin, Sergei Popov, and Artem Babenko. Editable neural networks. In Proceedings of the 8th International Conference on Learning Representations , 2020. URL https://openreview.net/forum?id=HJedXaEtvS .
  27. Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In Proceedings of the 34th International Conference on Machine Learning , 2017. URL https: //proceedings.mlr.press/v70/sundararajan17a.html .
  28. James Thorne, Andreas Vlachos, Christos Christodoulopoulos, and Arpit Mittal. FEVER: a largescale dataset for fact extraction and VERification. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics , 2018. URL https:
  29. James Thorne, Andreas Vlachos, Oana Cocarascu, Christos Christodoulopoulos, and Arpit Mittal. The FEVER2.0 shared task. In Proceedings of the 2nd Workshop on Fact Extraction and VERification , 2019. URL https://aclanthology.org/D19-6601 .
  30. Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Yaron Singer, and Stuart Shieber. Investigating gender bias in language models using causal mediation analysis. In Advances in Neural Information Processing Systems , 2020. URL https://proceedings.neurips.cc/paper/2020/hash/ 92650b2e92217715fe312e6fa7b90d82-Abstract.html .
  31. Yunzhi Yao, Peng Wang, Bozhong Tian, Siyuan Cheng, Zhoubo Li, Shumin Deng, Huajun Chen, and Ningyu Zhang. Editing large language models: Problems, methods, and opportunities. arXiv , 2305.13172, 2023. URL https://arxiv.org/abs/2305.13172 . · arXiv
  32. Chih-Kuan Yeh, Ankur Taly, Mukund Sundararajan, Frederick Liu, and Pradeep Ravikumar. First is better than last for language data influence. In Advances in Neural Information Processing Systems , 2022. URL https://papers.nips.cc/paper\_files/paper/2022/hash/ d07022783ff6f7bf7a288c207b7dcbd1-Abstract-Conference.html .
  33. Tianhe Yu, Saurabh Kumar, Abhishek Gupta, Sergey Levine, Karol Hausman, and Chelsea Finn. Gradient surgery for multi-task learning. In Advances in Neural Information Processing Systems , 2020. URL https://proceedings.neurips.cc/paper/2020/hash/ 3fe78a8acf5fda99de95303940a2420c-Abstract.html .
  34. Chen Zhu, Ankit Singh Rawat, Manzil Zaheer, Srinadh Bhojanapalli, Daliang Li, Felix X. Yu, and Sanjiv Kumar. Modifying memories in transformer models. arXiv , 2012.00363, 2020. URL https://arxiv.org/abs/2012.00363 . · arXiv

Cited by

Sorted by citations

Authors
Tan, C., Zhang, G., & Fu, J.
Venue
arXiv
Publisher
arXiv
Published
2023
ISSN
2331-8422 (ISSN-L)
OpenAlex
W4388585315
Cited by
8
References
1
Citations by year
2025: 7 · 2024: 1
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion)
  • Rare & Special e-Zone (The Hong Kong University of Science and Technology) (submittedVersion)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Domain Adaptation and Few-Shot Learning
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
Keywords
meta-learning, hypernetworks, parameter shifts, normal equations, fact-checking, question answering

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review