PofoliaDaily literature tracker

ACM Transactions on Software Engineering and Methodology· 2026Q1

Neuron Patching: Semantic-based Neuron-level Language Model Repair for Code Generation

Jian Gu, Aldeida Aleti, Chunyang Chen, Hongyu Zhang

Short summary

A novel approach called MINT (Model Improvement via Neuron Targeting) repairs code language models by updating only the specific neurons responsible for incorrect code generation, achieving significant improvements in accuracy and efficiency.

AI-generated from the title and abstract; the full text is not read.

Key points

  • MINT is a novel neuron-level repair approach for code language models.
  • It identifies and updates only the critical neurons causing incorrect code generation.
  • MINT achieves significant improvements in ExactMatch scores (up to 20.8%) and efficiency (up to 74.8%) compared to state-of-the-art methods.
  • The approach is evaluated on line-level code generation, shellcode generation, and intent-to-bash translation tasks.

AI-generated from the title and abstract; the full text is not read.

Abstract

Language Models (LMs) have become widely used in software engineering, especially for tasks such as code generation, where they are referred to as code LMs. These models have proven effective in generating code, making it easier for developers to automate coding activities. However, research has highlighted a significant limitation: despite their effectiveness, LMs often produce code that is incorrect, buggy, or not fully functional. Addressing this limitation is essential to fully realize LMs’ potential in practical applications. Yet, updating LMs, especially with only a small amount of feedback data, is highly challenging. In such cases, hot-fix techniques, which facilitate agile model updates with limited data, may be promising to maintain reliability and usefulness. In this article, we propose Model Improvement via Neuron Targeting (MINT), a novel approach for repairing code LMs. MINT leverages the semantic property of LMs to perform neuron-level repairs in a novel way. Furthermore, by analyzing the relationships between the model’s latent representations, the incorrect outputs, and the desired outputs, MINT determines which neurons are worth updating. This approach ensures that only the neurons crucial to the model’s failure are targeted, avoiding unnecessary changes and allowing for a more efficient and precise repair process. MINT is effective, efficient, and reliable, capable of correcting a neural model by patching a minimum number of neurons (usually one neuron for short code, while two or more neurons for long codes). We introduce new measures to evaluate its generalizability and develop a new benchmark, which is made available for further study. Our approach is evaluated on three coding tasks: line-level code generation, shellcode generation, and intent-to-bash translation. The experimental results demonstrate that the proposed approach significantly outperforms the State-of-the-Art (SOTA) in both effectiveness and efficiency measures. With respect to the ExactMatch score, MINT achieves 5.7–20.8 \(\%\) improvements in StarCoder2-3B and 3.9–18.5 \(\%\) improvements in CodeLlama-7B concerning the SOTA. Regarding efficiency, MINT is 32.3–74.8 \(\%\) faster than the SOTA. In addition, we analyze and discuss the side effects of model repair techniques, including the balance between generalization and specificity and the performance after multiple repairs in succession.

The authors' abstract, as published at the source. ACM Transactions on Software Engineering and Methodology, 2026 · DOI ↗

TakeawaysPremium Ask the paperFree account

Continue with a free account

Ask the paper: 5 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.

Continue free on the web

Sign in with Google or Apple; no card needed. You come back to this paper.

On your phone:

Field: Information Systems

Information SystemsComputer Science