Online learning group resource recommendation method based on fair constraint

By constructing a learning knowledge graph and a fair attention mechanism, the fairness issue in online learning group recommendations is solved, fairness constraints are implemented both inside and outside the group, and the stability and fairness of the recommendation results are improved.

CN121579749APending Publication Date: 2026-02-27HEZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511642938.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing online learning group recommendation technologies neglect fairness, especially the fairness constraints on sensitive attributes, leading to unfairness within and between groups, and failing particularly in out-of-distribution scenarios.

Method used

We construct a learning knowledge graph, extract features through a knowledge graph convolutional network, combine multiple metrics and fair attention mechanisms, introduce compensation factors and counterfactual consistency modeling, optimize the fairness loss function between groups and achieve fairness constraints.

Benefits of technology

It improves fairness among group members, maintains the stability and fairness of recommendation results, adapts to changes in the distribution of sensitive attributes within the group, and ensures individual fairness and overall group satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579749A_ABST
    Figure CN121579749A_ABST
Patent Text Reader

Abstract

The invention discloses an online learning group resource recommendation method based on fairness constraint, and the method comprises the steps: building a knowledge graph based on users, resources, groups and interaction relationships of the users, the resources, the groups and the interaction relationships of the users, the resources and the groups of an online learning platform, and building group internal fairness measurement through calculating group member satisfaction variance and a Jain fairness index. In the recommendation process, a fair attention aggregation mechanism is introduced, group member features are weighted, and the weights of low-satisfaction members are improved in combination with compensation factors, so that the internal fairness of the group is improved. Meanwhile, by means of anti-fact group generation and consistency loss function constraint, fairness between the groups is achieved, a joint loss function composed of Bayesian personalized sorting loss, group internal fairness loss and a consistency loss function between the groups is constructed, and a recommendation model is optimized. According to the method, the problem of fairness inside and outside the group can be effectively relieved while the recommendation accuracy is improved, and the fairness and satisfaction of online learning group recommendation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of educational technology and group recommendation technology, and in particular to a method for recommending online learning group resources based on fairness constraints. Background Technology

[0002] With the explosive growth of online learning platforms, group recommendation scenarios targeting "learning groups, classes, and project teams" are becoming increasingly common: platforms need to recommend courses, micro-lessons, exercises, or learning resources to the entire group at once. Unlike single-user recommendations, group recommendations must simultaneously meet the overall learning goals of the group and the personalized needs of each member, and the group often contains differences in "sensitive attributes" such as gender, age group, region, and type of learning disability.

[0003] Unlike traditional recommendations geared towards individual users, group recommendations need to satisfy the preferences of multiple members simultaneously in a single response, while ensuring the final recommendation list has acceptable quality for the group as a whole. However, existing group recommendation technologies primarily focus on maximizing recommendation accuracy and group satisfaction, generally neglecting a systematic consideration of "fairness," especially lacking fair constraint mechanisms for "sensitive attributes." These shortcomings manifest in two main ways: First, intra-group unfairness. When the distribution of sensitive attributes among group members is uneven, mainstream aggregation strategies (mean, minimum pain, maximum pleasure, or attention weighting) often lead to the majority of attributes dominating the results, resulting in the long-term marginalization of members with a minority of attributes. Second, inter-group unfairness. When multiple parallel groups exist on an online platform, the distribution of sensitive attributes across different groups can dynamically change due to time, location, or activity theme, creating an "out-of-distribution (OOD)" scenario. Traditional fairness metrics only hold true under the training set distribution; once the group structure changes during the testing phase, the original fairness constraints become invalid, and the system may favor groups with certain attribute combinations.

[0004] Therefore, how to provide a group recommendation method for online learning groups that can simultaneously take into account the overall satisfaction of the group and the fairness of individual members has become a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for recommending online learning group resources based on fairness constraints.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for recommending online learning group resources based on fairness constraints includes the following steps: Step S1: Online learning data acquisition and preprocessing; The data obtained from the online learning platform includes: user sensitive attributes, user non-sensitive attributes, user behavior sequences, learning resource attributes, and group structure; the data is preprocessed to remove duplicate samples and handle missing values. Step S2: Learn knowledge graph construction and feature extraction; Using users, learning resources, and groups in an online learning platform as nodes, and using user-learning resource interactions, user-learning resource behavior relationships, learning resource-knowledge point associations, user-user social relationships, and user-group relationships as edges, a learning knowledge graph is constructed. Then, a knowledge graph convolutional network is used to extract feature information from the knowledge graph. Step S3: Intra-group fairness modeling based on multiple metrics; For each group in the learning knowledge graph, calculate the intra-group fairness index; the intra-group fairness index includes the variance of the satisfaction of all members in the group and the Jain fairness index, and the two are weighted and combined to form a comprehensive fairness measure within the group. Step S4: Fairness-aware group feature representation; In the process of recommending learning resources to the group, a fair attention aggregation strategy is applied. By weighting the feature representations of group members by attention, a compensation factor based on member satisfaction is introduced to increase the weight of members with low satisfaction in the group, and the group's preference score for learning resources is calculated. Step S5: Modeling inter-group fairness based on counterfactual consistency; A counterfactual approach is used to construct a corresponding counterfactual group for each group, and a consistency loss function between groups is defined. Step S6: Joint model optimization and recommendation generation; Define a joint loss function, which includes: Bayesian Personalized Ranking (BPR) loss, intra-group fairness loss, and inter-group consistency loss function; train to minimize the joint loss function to achieve online learning group resource recommendation based on fairness constraints.

[0007] Furthermore, the user-sensitive attributes include: gender, age group, region, and special learning needs; the user-non-sensitive attributes include: interests, mastery of knowledge points, and learning habits.

[0008] Furthermore, the compensation factor is calculated based on the degree of imbalance in the distribution of satisfaction among group members. Specifically, when the satisfaction of a member in the group is significantly lower than the average satisfaction of the group, a higher compensation factor is assigned to that member, thereby increasing the weight of that member in the attention aggregation process.

[0009] Furthermore, the counterfactual group is constructed by replacing or reorganizing the group members.

[0010] Furthermore, the counterfactual group is constructed by replacing some users in the original group with users whose non-sensitive attributes are similar, without changing the group's non-sensitive attributes and functional semantics.

[0011] Furthermore, the inter-group consistency loss function obtains the degree of difference between the group and its corresponding counterfactual group in terms of their preference scores for learning resources.

[0012] Furthermore, the joint loss function is minimized using a stochastic gradient descent optimization algorithm.

[0013] The beneficial effects of this invention are: (1) This invention constructs two measures, member satisfaction variance and Jain fairness index, and combines them with fair attention mechanism to automatically increase the weight of members with lower satisfaction, ensuring that the preferences of each group member are fully considered and improving the fairness of the recommendation results for each group member.

[0014] (2) This invention introduces a group fairness model based on counterfactual consistency for multi-group parallel recommendation scenarios. By constructing counterfactual groups with sensitive attribute perturbations and minimizing the preference differences between the actual group and the counterfactual group during training, the fairness constraint between groups is achieved. Even in out-of-distribution (OOD) scenarios where the distribution of sensitive attributes of the groups changes, the recommendation system can still maintain the stability and fairness of the recommendation results.

[0015] (3) While maintaining the accuracy of group recommendation, this invention introduces fairness constraints within and between groups, so that the recommendation results satisfy the overall learning objectives of the group and take into account individual fairness. Attached Figure Description

[0016] Figure 1 This is a flowchart of an online learning group resource recommendation method based on fairness constraints according to the present invention. Detailed Implementation

[0017] The present invention will be further described in detail below with reference to embodiments, such as... Figure 1 The flowchart shown illustrates a resource recommendation method for online learning groups based on fairness constraints. The specific steps of this method are as follows: Step 1: Online learning data acquisition and preprocessing; The method for obtaining and preprocessing online learning-related data is as follows: 1-1) Obtain learning-related information from online learning platforms, mainly the following: User data includes sensitive information such as gender, age, region, and special learning needs, as well as non-sensitive information such as learning interests, mastery of knowledge points, and historical behavior.

[0018] User data: views, clicks, completion rate, quiz scores, and dwell time.

[0019] Learning resource data includes: courses, exercises, knowledge points, difficulty tags, instructor information, and release time.

[0020] Group data: Group member list (i.e., users belonging to the group), group creation time, roles within the group, historical recommendation records and feedback.

[0021] 1-2) Preprocess the data to remove duplicate samples and handle missing values.

[0022] Step 2: Learn knowledge graph construction and feature extraction; The method for constructing a learning knowledge graph and extracting feature information is as follows: 2-1) Construct a learning knowledge graph from the collected user, learning resources, and corresponding attribute information. Where E represents the set of entities such as users, groups, courses, and knowledge points, R represents the set of relationships between users and groups ("belonging to"), users and courses ("interacting"), courses and knowledge points ("containing"), and users and courses ("behavior"), h and t are the head entity and the tail entity, and r is the relationship between them.

[0023] 2-2) For each entity h, t, and each relation r, vectorize them into e and r, and then use a knowledge graph convolutional network to extract feature information. For a node v in layer l, ... Its update formula is: , in, Let r represent the set of neighbors connected to node v through relation r. This is the normalization factor, which is the number of neighbors here. , (⋅) represents the non-linear activation function ReLU. By stacking L layers of graph convolution, the final node representation formula is obtained as follows: , This representation integrates the node's own attributes, neighbor information, and the relational structure of the knowledge graph.

[0024] Step 3: Intra-group fairness modeling based on multiple metrics; Intra-group fairness modeling aims to ensure that recommendation results do not systematically favor a certain group of members, while maintaining overall group satisfaction as much as possible. The specific methods are as follows: 3-1) Member Satisfaction Prediction. For member X and resource Y in group X, the formula for predicting member X's satisfaction with resource Y is: , in, For trainable MLPs, Let be the embedding vector of group 𝑔. For group 𝑔, recommend a recommendation list of length K. The formula for the cumulative satisfaction of its members with the list is: , Next, calculate the overall satisfaction of the group, that is, the average cumulative satisfaction of all group members. The formula for this calculation is: , in, For the members of group 𝑔, This represents the number of members in group 𝑔.

[0025] 3-2) Multiple fairness measures within the group. To ensure fairness among group members as much as possible, multiple fairness measures are designed. First, the variance of member satisfaction is calculated using the following formula: , The smaller the variance, the more fair the group is.

[0026] Next, using the Jain's Fairness Index (JFI), a group Jain fairness index was designed. The calculation formula is as follows: , The closer it is to 1, the fairer it is; this is converted into a loss term. Finally, the fair loss within the group is obtained by calculating the weighted combination. The calculation formula is as follows: , in, This is a hyperparameter.

[0027] Step 4: Fairness-aware group aggregation.

[0028] The fairness-aware group aggregation method is as follows: 4-1) Obtaining Group Feature Representations. To incorporate member preferences into the group representation while reducing the influence of neglected members, a fair attention aggregation strategy is proposed, the specific method of which is as follows: First, calculate the basic attention scores of the members. Its formula is: , in, , , , All parameters are trainable. To prevent low satisfaction among individual members, we further designed a fairness adjustment factor. This factor is defined based on the members' satisfaction gap and is used to compensate members with low satisfaction within the group. The calculation formula is: , in, Defined as a satisfaction gap, For hyperparameters, if The larger the value, the more "compensation is due". A fairness adjustment factor is then incorporated to obtain the fairness attention score. The formula is: , in, This is a hyperparameter, which preserves relevance while introducing fair compensation. Next, we use fair attention scores based on members. The final representation of the group, obtained by merging the members, is as follows: , Because members with lower satisfaction levels received higher weighting. To better cater to all members and reduce the tendency of recommendations to only appeal to a minority of members.

[0029] 4-2) Predicting group preferences. After obtaining the feature representation of the group, calculate the group... Learning resources Preference rating The calculation formula is as follows: , in, It can be an MLP. This represents the concatenation of three vectors.

[0030] Step 5: Modeling inter-group fairness based on counterfactual consistency; In large-scale online learning platforms, multiple groups often operate in parallel, differing significantly in number, composition, and distribution of sensitive attributes. Focusing solely on intra-group fairness can easily lead to "systematic bias between groups," meaning the platform may consistently favor groups with superior attributes, resulting in significant differences in satisfaction among different groups. Therefore, we propose a counterfactual consistency-based modeling of inter-group fairness, as follows: 5-1) Constructing counterfactual groups. Without changing the non-sensitive properties of the groups, construct counterfactual groups. We employ a method of randomly replacing several members in the group with users who share the same non-sensitive attribute but possess different sensitive attributes. Details are as follows: Set up a real group Each of its members The attributes can be divided into sensitive attributes. (such as gender, age, region, special learning needs, etc.) and non-sensitive attributes (e.g., learning interest, knowledge mastery, user behavior). To construct counterfactual groups. Without altering the group's topic attributes and functional semantics—that is, without changing the group's non-sensitive attributes—we randomly replace some members in the group. The replacement principle is as follows: a. Maintain semantic consistency within the group: Select the user to replace. At the same time, ensure that its non-sensitive attributes are consistent with those of the user being replaced. Similar in terms of subject attributes and functional semantics, its formal formula is: , in, Here, δ is the similarity calculation function, and δ is the similarity threshold.

[0031] b. Sensitive attribute perturbation: The new member replacing the user must have different sensitive attributes: , c. Group size remains unchanged: The replacement operation will not change the number of people in the group, that is: .

[0032] Therefore, the counterfactual group can be formalized as follows: , in, To replace the user.

[0033] 5-2) Consistency Loss Function. To incorporate counterfactual consistency into training, a consistency loss function is introduced. The calculation formula is as follows: , in For groups A subset of candidate resources is dynamically sampled during training to improve computational efficiency and focus on the differences in the top-k important resources. This loss encourages the group to learn resources when the distribution of sensitive attributes changes. The preference scores remain stable, thereby improving fairness among different groups and ensuring that recommendation results remain stable and fair even in OOD scenarios.

[0034] Step 6: Joint Model Optimization and Recommendation Generation; The specific methods for joint model optimization and recommendation generation are as follows: 6-1) Recommendation Prediction Loss. During training, we use the BPR (Bayesian Personalized Ranking) loss, calculated as follows: , in, Indicates group With positive sample resources Negative sample resources The training triplet, For the training set, This is the sigmoid function.

[0035] 6-2) Multi-objective joint loss. The final optimization objective consists of three parts: recommendation accuracy, intra-group fairness, and inter-group fairness, as shown in the formula: , in, , The parameters are adjusted to balance the goals of recommendation accuracy and fairness.

[0036] 6-3) Training and Iteration. The model is trained using backpropagation and gradient descent.

[0037] 6-4) Recommendation Generation. After training, the model is deployed online to return the generated recommendation results to the learning platform for use by online learning groups, thus completing the resource recommendation for online learning groups based on fairness constraints.

[0038] The above content is only used to illustrate the technical solution of the present invention. Simple modifications or equivalent substitutions made by those skilled in the art to the technical solution of the present invention do not depart from the essence and scope of the technical solution of the present invention.

Claims

1. A method for online learning group resource recommendation based on fairness constraints, characterized in that: The method comprises the following steps: Step S1: online learning data acquisition and preprocessing; The data obtained from the online learning platform comprises user sensitive attributes, user non-sensitive attributes, user behavior sequences, learning resource attributes and group structures; the data is preprocessed to remove duplicate samples and handle missing values; Step S2: learning knowledge graph construction and feature extraction; The users, learning resources and groups in the online learning platform are taken as nodes, and the interactions between users and learning resources, the behavior relationships between users and learning resources, the association relationships between learning resources and knowledge points, the social relationships between users and the relationships between users and groups are taken as edges to construct a learning knowledge graph; then, the feature information in the knowledge graph is extracted by using a knowledge graph convolution network; Step S3: group internal fairness modeling based on multiple metrics; The group internal fairness index of each group in the learning knowledge graph is calculated; the group internal fairness index comprises the variance of the satisfaction degrees of all members in the group and the Jain fairness index, and the two are weighted and combined into a comprehensive fairness metric in the group according to a weight; Step S4: group feature representation with fairness awareness; In the process of recommending learning resources to a group, a fairness attention aggregation strategy is applied, the feature representation of the members of the group is weighted by attention, a compensation factor based on the member satisfaction degree is introduced, the weight of the low-satisfaction-degree members in the group is increased, and the preference score of the group to the learning resource is calculated; Step S5: group inter-fairness modeling based on counterfactual consistency; A counterfactual group corresponding to each group is constructed by using a counterfactual method, and a group inter-consistency loss function is defined; Step S6: model joint optimization and recommendation generation; A joint loss function is defined, the joint loss comprises a Bayesian personalized ranking (BPR) loss, the group internal fairness loss and the group inter-consistency loss function; the joint loss function is minimized for training, and online learning group resource recommendation based on fairness constraints is realized. 2.The fairness constraint based online learning group resource recommendation method of claim 1, wherein: The user sensitive attributes comprise gender, age range, region and special learning needs; the user non-sensitive attributes comprise interest, knowledge point mastery degree and learning habit. 3.The fairness constraint based online learning group resource recommendation method of claim 1, wherein: The compensation factor is calculated according to the imbalance degree of the satisfaction degree distribution among the members of the group; specifically, when the satisfaction degree of a member in the group is significantly lower than the average satisfaction degree of the group, a higher compensation factor is given to the member to increase the weight of the member in the attention aggregation process. 4.The fairness constraint based online learning group resource recommendation method of claim 1, wherein: The counterfactual group is constructed by replacing or recombining the members of the group.

5. The fair-constraint-based online learning group resource recommendation method according to claim 1 or 4, characterized in that: The counterfactual group is constructed by replacing part of the users in the original group with users having similar non-sensitive attributes without changing the non-sensitive attributes and functional semantics of the group. 6.The fairness constraint based online learning group resource recommendation method of claim 1, wherein: The group inter-consistency loss function is calculated by calculating the difference between the preference scores of the group and the counterfactual group to the learning resource. 7.The fairness constraint based online learning group resource recommendation method of claim 1, wherein: The joint loss function is minimized by using a stochastic gradient descent optimization algorithm.