# Deep Clustering of Student Code Strategies Using Multi-View Code Representation (CMVAE)
## 1 Introduction  
In modern programming education, algorithmic problem-solving training is crucial in enhancing students' programming skills. Through the process of solving problems, students gradually master data structures and classical algorithms. However, when addressing the same problem, different students may employ distinct strategies, and teachers must provide personalized feedback accordingly. As programming education rapidly evolves, online problem-solving platforms have seen a surge in use, increasing both the number of students and the diversity of code submissions. This has made it increasingly difficult for educators to review and provide feedback on all student submissions manually. Therefore, automated clustering of student-submitted code based on code strategies offers a promising solution, enabling teachers to provide more timely and targeted feedback, thereby improving the overall quality of programming education. Despite the progress, current automated clustering methods face several challenges:  
* The same problem can be solved using various approaches. The definition of a coding strategy depends on multiple features, such as program structure and semantic information, making it challenging to effectively model coding strategies. * Existing methods for learning code representations often focus on specific downstream tasks, which can result in representations that fail to adequately capture the strategic aspects of code. * Existing code clustering methods often rely on supervised learning, but manually labeling coding strategies is a subjective and time-consuming task. As a result, labeled datasets are difficult to scale, limiting the applicability of supervised methods. * Most code clustering methods rely on program execution behaviors and code compilation. However, these methods typically overlook deeper insights into the diversity of code features, making them less effective for code strategy clustering in the context of programming education. To address these challenges, this study aims to answer the following research question: How can we effectively cluster student-submitted code based on problem-solving strategies without relying on extensive labeled data or execution-based methods? To this end, we propose CMVAE, a deep clustering model designed to cluster student code strategies based on multi-view code representations. The main contributions of this paper are as follows:  
* We propose a code representation method that first statically parses the code into an abstract syntax tree (AST), enhances edges related to strategy structures, and extracts structural features using centrality metrics. Additionally, we introduce a multi-view self-supervised learning framework that combines semantic features from pre-trained models to strengthen the expressive power of both structural and semantic representations, thereby providing robust support for the subsequent deep clustering phase. * We propose CMVAE, a deep clustering model based on multi-view code representations, and we successfully apply it to the task of code strategy clustering in programming education. * Experiments on four datasets (both labeled and unlabeled) demonstrate the effectiveness of our model in identifying and clustering students' code strategies. The remainder of this paper is organized as follows: Section 2 presents a review of related work in code representation learning and deep clustering. This section discusses various approaches to code representation, including sequence-based, tree-based, and pre-trained model-based methods. We also review existing deep clustering methods and focus on code strategy clustering. Section 3, Methodology, provides an overview of the clustering model and details the process of pre-trained code representation learning. It covers the transformation of code into ASTs, the extraction of structural features, and the multi-view pre-training phase. This section also discusses the deep clustering process.