首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于知识图谱和GPT模型的可靠性代码自动生成方法
引用本文:向历霓,李刚,李海江.基于知识图谱和GPT模型的可靠性代码自动生成方法[J].计算力学学报,2024,41(2):217-225.
作者姓名:向历霓  李刚  李海江
作者单位:大连理工大学 工程力学系, 工业装备结构分析优化与CAE软件全国重点实验室, 大连 116024;卡迪夫大学 工程学院, 卡迪夫 CF24 3AA
基金项目:国家自然科学基金(12372119)资助项目.
摘    要:工程结构服役中广泛使用可靠性分析进行结构安全评估,但可靠性分析方法种类多、分析程序代码自动化程度低且复用难,需要研究可靠性代码自动生成方法。生成式预训练转换器GPT(Generative Pre-trained Transformer)模型已经在大量替代编程手工作业,进行代码自动生成。但是,其在工程领域中的应用受限于可学习数据量小和问题匹配度不高。本文提出了一种结合多种类可靠性知识图谱、基于GPT的代码自动完成模型进行Matlab可靠性代码预测的方法,使用精心设计的源代码预处理降噪策略,以及知识图谱传播模拟密集型任务解释意图;采用条件代码生成训练,有效提升了小数据样本量的学习性能,实现高准确率、问题匹配的可靠性代码自动生成。最后通过三个可靠性知识图谱案例验证了所提方法的有效性。

关 键 词:知识图谱  结构可靠性  GPT  Transformer  代码生成
收稿时间:2023/10/22 0:00:00
修稿时间:2023/12/29 0:00:00

Automatic code generation method for structural reliability analysis based on knowledge graphs and GPT models
XIANG Li-ni,LI Gang,LI Hai-jiang.Automatic code generation method for structural reliability analysis based on knowledge graphs and GPT models[J].Chinese Journal of Computational Mechanics,2024,41(2):217-225.
Authors:XIANG Li-ni  LI Gang  LI Hai-jiang
Institution:State Key Laboratory of Structural Analysis, Optimization and CAE Software for Industrial Equipment, Department of Engineering Mechanics, Dalian University of Technology, Dalian 116024, China; School of Engineering, Cardiff University, Cardiff CF24 3AA, UK
Abstract:Reliability analysis is widely used in engineering structures for safety assessment,but the variety of reliability methods,low automation of the analysis codes,and the difficulties in reuse require reliable code generation methods.Generative Pre-Trained Transformer (GPT) models have been replacing manual programming work by automatic code generation.However,its application in engineering is limited by the small amount of learnable data and the difficulty of problem matching.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,and knowledge graphs to transfer simulation intentions.We also employed conditional code generation training.These efforts drastically increase the learning performance 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.
Keywords:knowledge graph  structural reliability  GPT  Transformer  code generation
点击此处可从《计算力学学报》浏览原始摘要信息
点击此处可从《计算力学学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号