Complexity-Based Code Embeddings

被引:1
|
作者
Folea, Rares [1 ]
Iacob, Radu [1 ]
Slusanschi, Emil [1 ]
Rebedea, Traian [1 ]
机构
[1] Univ Politehn Bucuresti, Bucharest, Romania
关键词
algorithm classification; code embeddings; complexity; tree-based classification;
D O I
10.1007/978-3-031-41456-5_20
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
This paper presents a generic method for transforming the source code of various algorithms to numerical embeddings, by dynamically analysing the behaviour of computer programs against different inputs and by tailoring multiple generic complexity functions for the analysed metrics. The used algorithms embeddings are based on r-Complexity [7]. Using the proposed code embeddings, we present an implementation of the XGBoost algorithm that achieves an average 90% F1-score on a multi-label dataset with 11 classes, built using real-world code snippets submitted for programming competitions on the Code-forces platform.
引用
收藏
页码:256 / 269
页数:14
相关论文
共 50 条