Key result
NMT improves repair accuracy in natural language models while MLM excels in complex code models.
Why the study?
The applicability of the MLM paradigm in automated program repair had not been widely explored, and differences in repair effectiveness compared with the NMT paradigm remained unclear.
The MLM paradigm is more effective than NMT for automated program repair in Code Language Models due to its superior ability to understand code syntax and dependencies, while NMT remains superior for Natural Language Models.
Suggests tailored paradigm selection by model type; leaves open validation across diverse AI applications.
Automated Program Repair (APR) has garnered significant attention in recent years, especially when combined with the latest advancements in deep learning, further enhancing its automation and repair efficiency. Traditional learning-based APR typically employs Neural Machine Translation (NMT) technology, treating the repair task as a translation process from defective code to repaired code, known as the NMT paradigm. With the emergence of large pre-trained models, a novel approach considers the repair process as a fill-in-the-blanks task, masking defective code and using Masked Language Models (MLM) to predict the masked positions, resulting in repaired code, referred to as the MLM paradigm. However, the applicability of this new learning paradigm in APR has not been widely explored, and the differences in repair effectiveness compared to the NMT paradigm remain unclear. This paper delves into the performance differences between the MLM and NMT paradigms in APR through empirical research. Although both paradigms have drawn attention in the APR domain, their methodologies differ, necessitating a comprehensive evaluation and comparison in the same experimental environment, particularly in Natural Language Models (NLM) and Code Language Models (CLM).The results reveal that in NLM, the NMT paradigm excels with higher repair accuracy, leveraging large parallel corpora for supervised training and focusing on machine translation tasks, facilitating better learning of correspondences and semantic representations between languages. However, when dealing with more complex programming languages like CLM, the repair effectiveness of the NMT paradigm lags behind that of the MLM paradigm. NMT struggles to learn the syntax and semantic relationships of real-world programming languages, while the MLM paradigm comprehends code syntax and structure more effectively. It accurately identifies variable scopes, function call relationships, and dependencies between code blocks, allowing the model to infer errors and generate repaired code that aligns with programming language specifications. In summary, each paradigm demonstrates advantages in different repair scenarios. It is recommended to choose the appropriate technical paradigm based on specific repair needs and contexts in practical applications.
No takes yet. Share an insight, caveat, or question.
YiHeng et al. (2024) studied Automated Program Repair. Masked Language Models (MLM) vs. Neural Machine Translation (NMT) was evaluated on Repair accuracy. The NMT paradigm achieved higher repair accuracy in Natural Language Models, whereas the MLM paradigm demonstrated superior repair effectiveness in more complex Code Language Models.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: