Cloud Software Code Generation via Knowledge Graphs and Multi-Modal Learning
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
As cloud computing continues to experience rapid growth, the demand for cloud-native applications is escalating, leading to more complex and diverse developmentrequirements. In this context, automated code generation plays a pivotal role inaccelerating cloud-native application development. However, existing studies oftenoverlook the full potential of multi-program representations, typically focusing ona single representation derived from well-structured programs. This paper pro-poses a novel approach that harnesses a code knowledge graph to enhance codegeneration for cloud computing applications. Our method not only identifies con-nections among related programs based on textual and structural similarities butalso employs multiple representations to enrich program depiction, thus facilitat-ing the generation of cloud-optimized code. We introduce the Aligns features ofdifferent representations Before Fusion and Code Generation (ABCFG) strategy,which utilizes shared-retentive networks (shared-RetNet) and an AST-based Trans-former as encoders. By employing contrastive loss, features are initially aligned andthen seamlessly integrated with natural language representations through cross-attention mechanisms and a multi-layer perceptron (MLP), effectively capturing thediverse modalities required for robust cloud-based software development. To assessour approach, we conducted experiments on two open-source datasets. The resultsdemonstrate that our model, without the necessity for extensive pre-training,outperforms state-of-the-art large language models in BLEU-4, CodeBLEU, andROUGE-L metrics, paving the way for more efficient and intelligent cloud-nativesoftware development.