A Novel World Knowledge Aware Universal Representations of Design Patterns Based on Pre-trained Language Models
摘要
Publicly available design pattern resources make it increasingly costly for developers to access critical content among the many pieces of information. However, current approaches are based on word granularity, which generates semantic errors when representing design patterns. To alleviate this problem, we propose the Design Pattern Transformer, a pre-trained natural language model-based framework which implements the learning of association between design patterns and natural queries in modeling overall semantics of sentences based on world knowledge. On this basis we propose a model based on DPT that can solve multiple downstream tasks simultaneously. The model greatly simplifies task-solving steps and significantly improves performance compared to the state-of-the-art. In the design pattern tag recommendation task, the DPT-based method outperforms the state-of-the-art algorithms by \(4\%\) and \(12\%\) for the F1@10 and F1@5 metircs, respectively. In the design pattern selection task, the DPT-based model further promotes the current method to improve from \(4.89{\%}\) – \(27.51{\%}\) on the MRR and \(11.53\%\) – \(25.97\%\) on the RCDDP metric.