To address the aforementioned issues, this study proposes a lightweight GCN model that integrates multi-source student characteristics and social relationships, specifically tailored for educational applications. A weighted graph construction mechanism is introduced, which is based on students' classroom behavior, peer evaluation relationships, and collaboration frequency, thereby enhancing the educational interpretability and predictive accuracy of the graph structure. Compared to previous studies, this study innovatively combines individual student attributes, classroom interactions, online platform behaviors, and social relationships into a deep integration, constructing a multi-dimensional heterogeneous feature matrix. Additionally, the model incorporates the interpretable algorithm GNNExplainer for causal analysis of the prediction results, aiming to improve the model's transparency and educational applicability.
With the in-depth development of educational informatization, classroom performance evaluation has evolved from single-grade assessment to a multi-dimensional, dynamic and intelligent direction. Traditional methods rely on teachers' subjective judgments or structured data (such as attendance, homework completion, etc.), making it difficult to comprehensively capture students' learning behaviors and social interaction characteristics. GNN has shown powerful modeling capabilities in social network analysis, recommendation systems and other fields, providing new ideas for constructing student learning behavior models based on complex relationships.
This study proposes a classroom performance evaluation model based on GCN. The core concept of the model is to regard students as nodes in the graph and their interactive behaviors as edges. It mines the potential associations among students through the graph structure to achieve accurate prediction of students' classroom performance. Compared with traditional methods, GCN can effectively integrate the individual attributes of students and the influence of their social networks, thus improving the objectivity and accuracy of evaluation. The architecture of this model is shown in Fig. 1:
(1) Graph structure modeling: The construction of student relationship graph. To describe the interactive relationship between students, it is necessary to model the classroom environment as a graph structure. Let graph , where represents the collection of students and represents the interaction between students. Each side has a weight , which is used to quantify the intensity of interaction between students i and j. The weight can be calculated based on the frequency of class discussion, the contribution of group cooperation or the peer evaluation score:
represents the i-th student. represents the connection between student i and student j. represents the weight of the edge, the interaction frequency or influence.
In this study, the edge weight between student nodes is used to quantify the intensity of interaction between student and student in the teaching process. To comprehensively reflect the multi-dimensional behavior basis of interaction, the calculation method of the edge weight is constructed based on three key indicators, namely: ① The frequency of cooperation in class discussion , and the number of times when two people are observed to cooperate and discuss in groups in class is recorded. ② Interaction frequency in online learning platform, such as participating in forum topics together and commenting on homework with each other. ③ Peer rating , which records the results of students' rating on each other's "learning communication frequency" or "willingness to cooperate" in the questionnaire. Equation (3) shows the calculation of edge weight:
The sum of , and is 1. The basis of setting the weight is based on the subjective importance judgment of front-line teachers on the influence degree of each interaction behavior on students' performance in the pre-investigation. To avoid the influence of features with different proportions on the weights, all have been normalized by 0-1 before addition. The final is filled into the weighted adjacency matrix as the weight value of the edge in the graph, which is used for the subsequent information dissemination operation in GCN. This method effectively combines structured behavior data with subjective social perception, improves the authenticity and expressive ability of student relationship graph, and provides a solid structural foundation for GNN to capture the peer influence path later.
On this basis, the adjacency matrix is defined to represent the connection relationship between nodes in the graph:
In Eq. (4), is the weighted adjacency matrix, and the element value of should be the edge weight , which is calculated based on multiple indicators. At the same time, the degree matrix D is introduced, and its diagonal element represents the sum of the total weights of the neighbors of node i.
(2) Design and information dissemination mechanism of map stack. The core idea of GCN is to update the representation of the current node by aggregating the information of neighboring nodes. For each layer l, the input feature matrix is , where is the feature dimension of the l-th layer. The propagation rules of GCN are as follows:
is the adjacency matrix after joining the self-ring, which prevents isolated nodes from losing information. is a normalized degree matrix, is a trainable parameter matrix, and is a nonlinear activation function, and ReLU is usually used. The equation shows that the new representation of each node not only contains its original features, but also integrates the information of its neighbors. This layer-by-layer communication mechanism enables the model to gradually capture the social impact in a wider range.
(3) Feature extraction and embedded representation. The initial feature matrix contains the attribute information of each student, such as grades, participation, attendance records, click stream of online learning platform, etc. After multi-layer GCN processing, the final output node is embedded:
is the number of layers of GCN. is the input characteristic matrix. is an adjacency matrix. is a low-dimensional embedded representation of nodes, which can be used for subsequent tasks such as classification or regression.
The embedded representation is input to the fully connected layer to predict the classroom performance score:
represents the embedding vector of student i. represents the fully connected layer weight matrix. represents the offset term. represents the predicted probability distribution. and represent the number of categories (such as excellent, good, pass and fail).
In the GNN, the node characteristic matrix is the basis of model learning, where n represents the number of students and d represents the characteristic dimension of each student. In this study, the feature matrix consists of three categories of information: individual basic attributes, classroom behavior characteristics and online platform behavior characteristics, with a total of 16 dimensions. Specifically, it includes: age (normalization), gender (One-hot code), class, historical achievements, attendance rate, self-rating, classroom speech frequency, group cooperation activity, teacher rating, peer rating, video learning duration, homework timeliness rate, forum posts, platform access frequency, online questioning frequency and click path length. These features are static attributes at the node level, indicating the overall performance in a semester. Regarding the frequency of classroom speeches, the raw data records the number of times each student speaks in each class. To avoid bias caused by differences in class size (such as fewer speaking opportunities for students in larger classes), a class relative standardization strategy is adopted: dividing the number of individual speaking times by the ratio of class size to the highest number of speaking times in the class. This process ensures comparability of the characteristics of students from different classes while retaining individual behavioral intensity.
In the preprocessing stage, all numerical features are standardized (mean = 0, standard deviation = 1), while categorical variables (e.g., gender) are expanded using one-hot encoding to create binary variables, ensuring consistency in the dimensionality of input features. Each row of the feature matrix corresponds to a student node and contains its 16-dimensional attribute information, which serves as the initial input to the GCN model. During the information propagation process, the model progressively aggregates the features of neighboring nodes layer by layer. With this structure, the GCN is able to capture both the static performance characteristics of individual students and the dynamic influences from neighboring nodes within the social structure, enabling node representation learning under multi-source information fusion. This enhances both the accuracy and interpretability of classroom performance predictions.
(4) Loss function and optimization objective. To train the model, the cross-entropy loss function is used to measure the difference between the prediction result and the real label:
represents the total number of samples. represents the real label of student i. represents the probability distribution of model prediction.
In addition, to prevent over-fitting, L2 regularization term is introduced:
represents the regularization coefficient. represents Frobenius norm of the l-layer weight matrix.
The final objective function is:
The objective function is minimized by gradient descent method to obtain the optimal model parameters.
In the graph construction process, this study introduces a weighted social graph generation method based on multi-source behavioral data, distinguishing it from traditional approaches that rely solely on simple interaction frequency. By integrating peer evaluation frequency from surveys, group collaboration density, and interaction intensity indicators from online platforms, a more education-semantic relationship graph is constructed. This allows the GCN to more effectively capture socially influential paths with educational value during the propagation stage. This construction strategy enhances the model's expressive power and predictive performance, and provides a reference framework for designing graph modeling methods in complex educational scenarios.
(1) Data preprocessing and graph construction. Multi-source data are collected from teaching management system, learning platform and classroom observation records. It covers students' academic performance, interactive behavior, emotional state and other dimensions. After cleaning, standardization and feature engineering, the data is constructed into a feature matrix X. According to the frequency and type of interaction between students, the edge weight is calculated and the weighted adjacency matrix A is constructed. Commonly used methods include Pearson correlation coefficient, cosine similarity or behavior matching algorithm based on time series.
In this study, in order to quantify the interaction intensity between students and construct the weighted adjacency matrix , the cosine similarity method is used to calculate the similarity between each pair of students in the behavior feature space. Specifically, for each student, his interaction behavior (including the number of lectures in class, the number of group cooperation, the frequency of mutual evaluation, the frequency of online discussion, etc.) is encoded into a high-dimensional vector, which is recorded as . The edge weight between student and student is calculated by Eq. (12):
represents vector dot product. represents Euclidean norm. Cosine similarity can effectively measure the similarity of two students in multi-dimensional interaction behavior, regardless of the absolute frequency of their interaction, and is suitable for evaluating the relative activity similarity of students in different platforms and teaching scenarios. The calculated edge weights are normalized and filled into the adjacency matrix , which is used as the information dissemination basis of the GCN. This method not only takes into account the structural characteristics and intensity differences of behavior data, but also facilitates the explanation of social similarity between students in educational application.
(2) Model training and validation. the PyTorch Geometric GNN framework is used to build the model. The data are divided into training, validation, and test sets, and adopt the k - fold cross-validation strategy to evaluate the model's generalization performance. Hyperparameters (such as learning rate, the number of GCN layers, hidden layer dimensions, etc.) are tuned through grid search or Bayesian optimization.
(3) Model explanation and visualization. To further understand the model's decision-making process, the GNNExplainer method is used to explain the model and identify which student relationships and features have significant impacts on classroom performance prediction. Meanwhile, t-distributed Stochastic Neighbor Embedding (t-SNE) or Principal Component Analysis (PCA) is used to visualize node embeddings and reveal the latent clustering structures of student groups. The overall implementation process is shown in Fig. 2.
To enhance the model's interpretability, the GNNExplainer tool is used to analyze the decision-making process of the GCN model on several prediction samples in the test set. Taking a student node predicted as "excellent" as an example, the explanation results show that the main neighbors relied upon during the GCN propagation are peers with whom the student frequently collaborated on group tasks. The most influential input features include "class participation frequency," "teacher ratings," and "assignment submission timeliness," indicating that the model primarily infers the student's classroom performance based on active participation and consistent behavior. Additionally, t-SNE algorithm is applied to reduce the dimensionality of the node embedding vectors output by the GCN to two dimensions. The visualized results show clear clustering among students of the same category, with relatively distinct boundaries between different categories, validating the model's strong ability to distinguish between performance levels.