一句话:提出首个多位置软件模型补全方法 NextFocus,用全局嵌入与注意力预测跨位置的协同修改,Precision@k 达 0.98。
软件模型是模型驱动工程的关键制品,常因演化、重构和维护经历大量修改。现有基于 LLM 的软件模型补全方法仅支持单位置补全,难以处理大型复杂模型中跨位置的协同修改。本文提出全局嵌入式下一焦点预测器 NextFocus,首次实现多位置模型补全。它使用带注意力机制的神经网络,在历史软件模型演化数据上训练,从已有变更出发预测后续需修改的模型元素,这些元素可分布在不同位置。作者在真实项目开发者实际执行的多位置模型变更上评估,即使变更高度分散,NextFocus 仍在 k≤10 时达到平均 Precision@k 0.98,显著优于三个基线方法。
In model-driven engineering and beyond, software models are key development artifacts. In practice, they often grow to substantial size and complexity, undergoing thousands of modifications over time due to evolution, refactoring, and maintenance. The rise of AI has sparked interest in how software modeling activities can be automated. Recently, LLM-based approaches for software model completion have been proposed, however, the state of the art supports only single-location model completion by predicting changes at a specific location. Going beyond, we aim to bridge the gap toward handling coordinated changes that span multiple locations across large, complex models. Specifically, we propose a novel global embedding-based next focus predictor, NextFocus, which is capable of multi-location model completion for the first time. The predictor consists of a neural network with an attention mechanism that is trained on historical software model evolution data. Starting from an existing change, it predicts further model elements to change, potentially spanning multiple parts of the model. We evaluate our approach on multi-location model changes that have actually been performed by developers in real-world projects. NextFocus achieves promising results for multi-location model completion, even when changes are heavily spread across the model. It achievesan average Precision@k score of 0.98 for k ≤ 10, significantly outperforming the three baseline approaches.