Skip to main navigation Skip to search Skip to main content

Model Editing for Vision Transformers

  • Xinyi Huang
  • , Kangfei Zhao
  • , Long Kai Huang*
  • *Corresponding author for this work
  • Hong Kong Baptist University

Research output: Chapter in Book/Report/Conference proceeding › Conference contribution › peer-review

Abstract

Model editing offers a promising paradigm for efficiently and precisely updating knowledge in pre-trained transformers without costly retraining. While extensively studied in language models (LMs), model editing for vision transformers (ViTs) remains underexplored. Existing methods typically adapt LM-based techniques by modifying the multi-layer perceptron (MLP) modules, overlooking the unique characteristics of ViTs. In this work, we show that ViT predictions are more strongly influenced by the multi-head self-attention (MSA) modules than by the MLPs. Building on this observation, we propose a two-stage framework for editing ViTs. First, we identify which attention heads are most responsible for incorrect predictions. Next, we selectively remove the corresponding features to correct the model's prediction. To further balance error correction with predictive stability on unrelated data, we learn a projection matrix that refines the image representations. Extensive experiments across multiple real-world datasets and model editing benchmarks demonstrate that our method consistently outperforms existing model editing methods for ViTs, achieving superior generalization and locality. Our code is available at https://github.com/shanghxy/Model-editing-for-vision-transformers.

Original languageEnglish
Title of host publication39th Conference on Neural Information Processing Systems, NeurIPS 2025
PublisherNeural information processing systems foundation
Pages75066-75095
Number of pages30
ISBN (Electronic)9798331338275
Publication statusPublished - 2025
Event39th Conference on Neural Information Processing Systems, NeurIPS 2025 - San Diego, United States
Duration: 2 Dec 2025 → 7 Dec 2025

Publication series

NameAdvances in Neural Information Processing Systems
Volume38
ISSN (Print)1049-5258

Conference

Conference39th Conference on Neural Information Processing Systems, NeurIPS 2025
Country/TerritoryUnited States
CitySan Diego
Period2/12/25 → 7/12/25

Fingerprint

Dive into the research topics of 'Model Editing for Vision Transformers'. Together they form a unique fingerprint.

Cite this