|
| |
基于知识图谱和GPT模型的可靠性代码自动生成 |
Automatic Code Generation for Structural Reliability Analysis Based on Knowledge Graphs and GPT Models |
投稿时间:2023-10-22 修订日期:2023-10-22 |
DOI: |
中文关键词: 知识图谱 结构可靠性 GPT Transformer 代码生成 |
英文关键词:Knowledge Graph Structural Reliability GPT Transformer Code Generation |
基金项目: |
|
摘要点击次数: 305 |
全文下载次数: 0 |
中文摘要: |
生成式预训练转换器(Generative Pre-trained Transformer,GPT)模型已经在通用代码生成领域取得巨大进步,然而工程实践层面使用GPT代码生成技术将面临诸多挑战,如工程领域内可学习数据量小,并且缺少从通用编程语言到小众编程语言的学习过程构建经验。本文面向工程不确定性的可靠性分析,提出了一种结合多种类可靠性知识图谱、基于GPT的代码自动完成模型进行Matlab分析代码预测的方法,使用精心设计的源代码预处理降噪策略,使用知识图谱传播模拟密集型任务解释意图,采用条件代码生成训练,有效提升了小数据样本量的学习性能,实现高准确率、问题匹配的可靠性代码自动生成。最后通过三个可靠性知识图谱案例验证了所提方法的有效性。 |
英文摘要: |
Generative Pre-Trained Transformer (GPT) models have achieved great success in general code generation, but the use of GPT for code generation in engineering practice still faces challenges, such as the small learnable data set and the lack of experience in building GPT from general programming languages to domain-specific programming languages. In this paper, we propose a code prediction method for Matlab reliability analysis by combining multi-category reliability knowledge graphs and a GPT-based code autocompletion model. We used a well-designed source code preprocessing and denoising strategy, used knowledge graphs to transfer simulation intentions, and employed conditional code generation training. These efforts drastically increase the learning effect of small data size, and enable automatic code generation with high accuracy and problem matching. Finally, the proposed method is verified by three reliability knowledge graph cases. |
查看/发表评论 下载PDF阅读器 |