Outline

Ingegneria Sismica

Ingegneria Sismica

Application of Program Code Semantic Understanding Model Based on Transformer Architecture in Automatic Grading of Data Structure Course

Author(s): Mingxing Zhu1, Xin Guo1
1Zhixing College of Hubei University, Wuhan, Hubei, 430011, China
Zhu, Mingxing. and Guo, Xin. “Application of Program Code Semantic Understanding Model Based on Transformer Architecture in Automatic Grading of Data Structure Course.” Ingegneria Sismica Volume 43 Issue 1: 1-19, doi:10.65102/is2026091.

Abstract

In order to solve the problem of “testable results but difficult to describe semantics” in automatic scoring of data structure course, this paper constructs a method for semantic understanding and automatic scoring of program code based on Transformer architecture. In this study, student submitted code, problem constraints, test results and structural features are integrated into the unified processing flow. Through code preprocessing, semantic coding, reference semantic alignment and multidimensional score aggregation, the joint evaluation of program correctness, implementation quality and structural rationality is realized. In the system design, a test set organization mechanism and a scoring feedback link for data structure questions are established, so that the automatic evaluation is no longer limited to input-output comparison, but can further identify the implementation differences in typical tasks such as linked lists, trees, and graphs. The experimental results based on 1184 valid program samples show that the Accuracy of the proposed method reaches 0.907, Macro-F1 is 0.889, QWK is 0.926, and RMSE is reduced to 3.84. The overall performance is better than that of rule scoring and multiple comparison models. The research shows that the introduction of Transformer code semantic modeling into the course evaluation process can effectively improve the accuracy, stability and teaching adaptability of automatic scoring.

Keywords
Transformer; Program code semantic understanding; Automatic scoring; Data Structure Course

Related Articles

Zhihao Jiang1,2, Limi Chen1,2, Jing Yang1
1Hainan Vocational University of Science and Technology, Haikou 571126, China
2Institute for Mathematical Research, Universiti Putra Malaysia, Serdang 43400, Malaysia
Limi Chen1,2, Zhihao Jiang1,2, Jing Yang1
1Hainan Vocational University of Science and Technology, Haikou 571126, China
2Institute for Mathematical Research, Universiti Putra Malaysia, Serdang 43400, Malaysia
Hui Yuan1, Minjie Chai2, Siqing Xu1, Jinsong Li1, Jinwan Zheng1
1Electric Power Research Institute, State Grid Shanxi Electric Power Co., Ltd., Taiyuan, 030001, Shanxi, China
2Jincheng Power Supply Branch, State Grid Shanxi Electric Power Co., Ltd., Jincheng, 048000, Shanxi, China
Yanhan Zhu1,2
1China Academy of Cultural Heritage, Chaoyang District, 100029, Beijing, China
2Beijing University of Civil Engineering and Architecture, Xicheng District, 100044, Beijing, China
Ken Wang1, Jinhan Shu2, Kan Yuan1
1School of Digital Media, Shenzhen Polytechnic University, Shenzhen 518055, Guangdong, China
2Postdoctoral Mobile Station of Journalism and communication, Fudan University, Shanghai 200433, Shanghai, China