Font Size: a A A

Automatic Grading And Feedback On Student Code

Posted on:2024-01-14Degree:MasterType:Thesis
Country:ChinaCandidate:D X WangFull Text:PDF
GTID:2568307067493514Subject:Software Engineering
Abstract/Summary:PDF Full Text Request
With the rapid development of computer science and technology,programming has become an increasingly important skill.It is difficult for beginners to complete programming assignments independently,and often takes time and energy.To better help students master programming skills,teachers need to evaluate and give feedback on students’ programming assignments.However,manually assessing and providing feedback to numerous students by teachers is often tedious and time-consuming.At the same time,because each student’s programming ability and knowledge level are different,there may be subjectivity and errors in the teacher’s evaluation and feedback.To solve these problems,student code automatic grading and feedback systems have become hot research topics in recent years.These systems can give students more objective and accurate assessment scores,help them find and correct errors quickly,and improve their programming skills and knowledge.They can also help teachers manage large-scale programming assignments more effectively and provide accurate and timely feedback.Existing code grading and feedback systems can quickly provide students with scores and feedback,but some deficiencies still need to be addressed.Firstly,current code grading methods heavily rely on manual feature engineering to extract semantic features while neglecting to extract the differences in semantic feature vectors between codes.Additionally,these methods usually only evaluate a single part of student codes and can’t comprehensively assess the code’s semantic features and style quality.Regarding providing feedback to students,most models only generate prompts for a particular aspect of the code and cannot provide comprehensive feedback on code quality.Moreover,the feedback model for semantic problems is often trained based on a specific dataset,which may result in poor generalization ability when applied to new programming questions.The code students submit in programming exercises is usually shorter and simpler,and the solutions are more singular and standardized.Therefore,we can use more complex semantic representation methods when building evaluation and feedback models and ideas based on comparison with correct solutions.Combining the characteristics of the student code above,we propose an automatic grading and feedback model based on multifaceted features with the following main contributions:1.To address the issue of extracting semantic feature vectors from code,an enhanced semantic representation model is proposed for representing student code.The model includes two sub-tasks to train more discriminative semantic feature vectors for code.The first is the contrastive learning subtask,which aims to encourage the vectors of codes of the same programmer questions to be closer and drive the vectors of codes of different programmer questions to be further apart.The second subtask is to further fine-tune the semantic feature vectors by predicting the similarity of each code pair so that the semantic feature vectors of codes with similar solutions to the same problem are closer to each other.This model helps to improve the degree of difference between different code representation vectors and lays the foundation for code grading.2.To address the issue of the single-feature evaluation problem in existing grading methods,a grading model called Sim Grader is proposed,which measures similarity based on multiple aspects of features.The model first extracts code features from student codes,including static,dynamic,and semantic features,to form the final code feature vector.Then calculate the similarity between the eigenvector of the code submitted by the student and the eigenvector of the correct code,and form a score based on this.The scoring results can not only reflect the correctness of the semantic function of the code submitted by the students but also reflect the comprehensive quality of the code,such as simplicity and style.Finally,many experiments prove that the model can significantly improve the accuracy of scoring results and avoids expensive code annotation overhead.3.To solve the poor generalization ability to exist semantic feedback models,a semantic abnormal sentence detection method based on code alignment is proposed to detect sentences with semantic problems in the code and provide feedback.The method first parses the student code into a graph structure and divides it into subgraph sets according to the code statements.Then we feed the group of subgraphs into the graph attention network to generate sentence representation vectors and compute the alignment probability matrix with the sentence representation vectors of the correct code.Finally,we use the Sinkhorn algorithm to iteratively align the probability matrix and normalize the rows and columns to obtain the probability that each statement in the student code is an abnormal node.In this paper,we propose a system for automatically grading and providing feedback on student code,which comprehensively assesses three aspects of code: style,efficiency,and semantics,and generates optimized code suggestions.To validate the reliability of the proposed method,we conduct extensive experiments on the automatic grading module and code feedback module,and the experimental results demonstrate that the proposed automatic scoring module achieves significantly better performance than the comparison methods.Furthermore,we demonstrate the effectiveness of using the automatic feedback module for providing feedback on code style,complexity,and semantic functionality.
Keywords/Search Tags:Code Grading, Code Feedback, Contrastive Learning, Similarity Measure, Code Representation, Abnormal Statement Detection
PDF Full Text Request
Related items