Open Access
ARTICLE
MAMGBR: Group-Buying Recommendation Model Based on Multi-Head Attention Mechanism and Multi-Task Learning
College of Computer and Control Engineering, Northeast Forestry University, Harbin, 150006, China
* Corresponding Author: Ming Yu. Email:
Computers, Materials & Continua 2025, 84(2), 2805-2826. https://doi.org/10.32604/cmc.2025.066244
Received 02 April 2025; Accepted 07 May 2025; Issue published 03 July 2025
Abstract
As the group-buying model shows significant progress in attracting new users, enhancing user engagement, and increasing platform profitability, providing personalized recommendations for group-buying users has emerged as a new challenge in the field of recommendation systems. This paper introduces a group-buying recommendation model based on multi-head attention mechanisms and multi-task learning, termed the Multi-head Attention Mechanisms and Multi-task Learning Group-Buying Recommendation (MAMGBR) model, specifically designed to optimize group-buying recommendations on e-commerce platforms. The core dataset of this study comes from the Chinese maternal and infant e-commerce platform “Beibei,” encompassing approximately 430,000 successful group-buying actions and over 120,000 users. The model focuses on two main tasks: recommending items for group organizers (Task I) and recommending participants for a given group-buying event (Task II). In model evaluation, MAMGBR achieves an MRR@10 of 0.7696 for Task I, marking a 20.23% improvement over baseline models. Furthermore, in Task II, where complex interaction patterns prevail, MAMGBR utilizes auxiliary loss functions to effectively model the multifaceted roles of users, items, and participants, leading to a 24.08% increase in MRR@100 under a 1:99 sample ratio. Experimental results show that compared to benchmark models, such as NGCF and EATNN, MAMGBR’s integration of multi-head attention mechanisms, expert networks, and gating mechanisms enables more accurate modeling of user preferences and social associations within group-buying scenarios, significantly enhancing recommendation accuracy and platform group-buying success rates.Keywords
Recently, users have increasingly preferred purchasing through group buying rather than individual purchases, as group-buying prices are often more favorable than those for single purchases. According to Forbes [1], the group-buying model has achieved notable progress in attracting new users, enhancing user engagement, and boosting platform profitability. Under this model, users can share links to products they are interested in, allowing friends who are also interested in the same product to join the group buying.
There are distinct differences between the core processes of group buying and individual purchases. Generally, individual purchases involve users (consumers) placing orders directly through an online shopping platform. In contrast, as depicted in Fig. 1, the group-buying process consists of two stages. In the first stage, a user (consumer) selects a product of interest and initiates a group-buy at a lower price than that available for individual purchases; this user is referred to as the group initiator. In the second stage, other users can select from a list of available group-buying opportunities and join an existing group-buy, thereby becoming group participants. Each initiated group-buy is defined by a product, an initiator, and potential participants. A group-buy is only successful if certain conditions are met, such as reaching a predefined threshold of participants.

Figure 1: Group buying process diagram
According to the two stages depicted in Fig. 1, our group-buying recommendation model comprises two tasks. The first task recommends items to the group initiator for initiating a group-buy. The second task recommends group-buying opportunities for participants to join a group-buy for a specific item. In contrast, traditional group recommendation models focus on a single task of recommending items to a user group, aiming to predict the items that the group collectively prefers based on member’s individual preferences [2,3]. In group recommendation, user roles are relatively simple and typically rely on the interactions between the group, products, and users to construct group representations. In contrast, the relationships between users and products in group buying scenarios are more complex. Therefore, it is crucial to fully and accurately leverage these intricate correlations and interactions when modeling group buying.
We propose a multi-head attention mechanism and multi-task learning-based group buying recommendation model, named MAMGBR. This model utilizes multi-head attention and multi-task learning to capture the embedding information of initiators, participants, and products. Specifically, we employ graph convolutional network (GCN) during the embedding learning phase to learn the embeddings of different roles. Furthermore, we introduce expert networks and gating mechanisms in the multi-task learning component to facilitate information exchange between the two tasks. At the same time, we integrate the multi-head attention mechanism within the expert network to enhance the model’s accuracy. To further optimize model performance, we design two auxiliary loss functions to improve the training effectiveness, thereby enhancing overall performance.
Despite the significant advantages of group buying models, their recommendation systems still face several challenges, such as the complexity of user roles, with significant differences in the needs of organizers and participants, making it difficult for traditional recommendation models to provide a unified approach. There is also a task collaboration dilemma, where there are information barriers between product recommendations (Task I) and participant recommendations (Task II), and independent optimization leads to limited accuracy. Furthermore, higher-order relationship modeling is needed as the triadic interactions between users, products, and participants are dynamic and sparse, and conventional collaborative filtering methods fail to capture them effectively. To address these challenges, we adopt a multi-task learning framework to separate the dual task objectives, balancing specificity and commonality through parameter sharing. An expert network and gating mechanism are designed to implement cross-task feature selection, as shown in Fig. 2. We combine Graph Convolutional Networks (GCN) and multi-head attention mechanisms to model complex relationships from both topological (GI/GP/GIP tri-graphs) and semantic association perspectives.

Figure 2: Overall structure of the model
In summary, the objectives and main contributions of this study are as follows:
(1) We propose a group-buying recommendation model based on multi-head attention mechanisms and multi-task learning, effectively addressing the dual-task requirements of group-buying recommendations within a multi-task learning framework. Specifically, the model recommends appropriate items to group organizers and suggests potential group-buying opportunities to participants.
(2) The model employs Graph Convolutional Network (GCN) for embedding representation learning, combined with expert networks and gating mechanisms. Leveraging multi-head attention mechanisms, it deeply extracts features and captures dependencies between tasks, significantly enhancing recommendation accuracy.
(3) An auxiliary loss function is designed and incorporated to further optimize embedding representation learning, allowing for a more precise modeling of the complex interactions among users, items, and participants, thus improving recommendation performance.
(4) Extensive experiments conducted on a real group-buying dataset demonstrate that the proposed model outperforms existing methods in recommendation accuracy, fully showcasing the effectiveness and superiority of this research.
The remaining part of the paper is as follows: Section 2 discusses related work, Section 3 describes our method, Section 4 validates our model and presents the results, Section 5 discusses the implications and significance of our findings, and Section 6 concludes our work.
2.1 Group Buying Recommendation
Group purchasing [4] typically refers to a collective effort by a group of individuals to buy the same product. In the current landscape of online e-commerce services, there are two forms of group purchasing. Early models of group purchasing [5] involved platforms organizing hundreds or even thousands of users, who were often strangers to one another, to collectively purchase goods from sellers. In recent years, novel group purchasing models, such as those exemplified by China’s Pinduoduo, have emerged, allowing users to act as initiators of group buying and invite friends to join. Consequently, users within this new model are often interconnected through social networks, which marks a significant distinction from traditional group purchasing methods. Although group recommendation [6,7] differs fundamentally from group buying recommendation, it remains one of the most relevant fields. Yannam et al. [6] developed a recommendation system that combines social tags and collaborative filtering to enhance group recommendation effectiveness. By integrating social tag information with collaborative filtering, the system provides recommendations better aligned with the preferences of group members. The MGBR model proposed by Zhai et al. [8] adopts a multi-task learning module that allows for better interaction between the two sub-tasks. By using a collaborative expert network and gating units, the model effectively integrates information from both tasks, thereby enhancing recommendation performance. The model further improves recommendation results by introducing auxiliary loss functions to optimize representation learning. Sha et al. [9] proposed the J2PRec framework, which simultaneously addresses both product recommendation and participant recommendation in group buying services. In the group buying scenario, success depends not only on recommending the right products to the initiator but also on identifying potential participants and ensuring their willingness to join the group buying.
Beyond e-commerce, group recommendation has applications in various domains such as Point of Interest (POI) recommendation [10] and restaurant recommendation [11]. However, in the context of our research on social e-commerce group buying recommendations, groups are dynamically formed from social networks rather than being predefined, which represents a significant departure from traditional group recommendation tasks.
Social recommendation is a method in recommendation systems that aims to leverage information from social networks or social relationships to improve recommendation results. In social recommendation, recommendation algorithms not only rely on a user’s historical behavior and preferences but also consider interactions, relationships, and the interests of friends or social circles within the social network. This approach uses trust and influence in social relationships to predict content or items that a user may be interested in, thus providing more accurate personalized recommendations.
Wu et al. [12] proposed the SocialGCN model, which utilizes Graph Convolutional Networks (GCN) to model the information diffusion process in social recommendation. By performing multi-layer information propagation on both the social network and the user-item interaction graph, SocialGCN effectively captures the spread of user preferences within the social network, improving traditional user-neighbor-based recommendation methods. Chen et al. [13] proposed the ADSRec model, aimed at addressing the issue of social relationship noise in Graph Neural Networks (GNNs). This approach introduces a denoising network that adaptively adjusts the weights of social edges to reduce the impact of noisy social relationships. It also integrates contrastive learning to further enhance the representation of users and items, improving recommendation accuracy. Wu et al. [14] introduced DiffNet++, which further improves social recommendation by considering both social influence diffusion (from the social network) and interest diffusion (from item interactions), thereby enhancing recommendation effectiveness. The model uses a multi-level attention network to selectively aggregate information from these two networks, optimizing user embedding learning. Yu et al. [15] proposed a deep adversarial framework based on Graph Convolutional Networks (GCN) to address issues in social recommendation such as sparse social relationships, noisy data, and the heterogeneous strength of social ties. This framework enhances relational data through a GCN-based autoencoder and handles the diversity of social relationships through an attention-based social recommendation module.
Liu et al. [16] introduced a multi-perspective social recommendation approach (MPSR), which uses Graph Convolutional Networks (GCN) to learn user’s multi-level preferences and employs multi-view modeling of social relationships to improve recommendation performance. The MPSR framework effectively captures the trust differences between users in a social network and combines item attributes to uncover user’s explicit preferences. Huang et al. [17] proposed a knowledge-aware coupled graph neural network (KCGN), designed to enhance the performance of social recommendation systems. KCGN strengthens the recommendation model’s understanding of social influence and item dependencies by capturing interrelationships between user-user and item-item pairs. The authors particularly emphasize modeling dynamic multi-type user-item interaction patterns and improving user embedding learning through global graph structure awareness.
Group recommendation is an important branch of recommendation systems, primarily addressing the problem of providing personalized recommendations for a group of users. In many application scenarios, such as shared family accounts, team collaboration, or groups in social networks, the recommendation system needs to consider not only the interests of individual users but also the preferences of multiple users within the group, aiming to find a recommendation solution that satisfies the needs of the majority of group members.
Huang et al. [18] proposed a multi-attention mechanism group recommendation model (MAGRM), which learns both internal and external social features of the group through multiple attention networks. MAGRM dynamically captures the preference interactions between group members by learning each member’s social attributes, thus more accurately recommending items for the group. Yannam et al. [19] introduced an attention mechanism-based group recommendation model (GRAM), which combines a neural collaborative filtering framework with attention mechanisms to dynamically capture each group member’s influence on group decision-making. GRAM can adaptively adjust the weights of different members in group recommendations, improving the accuracy of group recommendations. Lu et al. [20] proposed a group recommendation method based on Graph Neural Networks (GNN), using a graph structure to represent social relationships between users and learning deep user features through GNNs. This approach effectively integrates information from user’s social networks, significantly improving the accuracy of group recommendations. Huang et al. [21] introduced a two-stage deep learning model (GRMTDL) to address the sparse data problem in group recommendations. The model includes two stages: the first stage is Group Representation Learning (GRL), where semantic features of the group are learned through a graph autoencoder network; the second stage is Group Preference Learning (GPL), where user and group preferences are learned through a dual-network structure.
Li et al. [22] proposed a Multi-view Interaction Compromise Learning (MICL) method, aiming to address the member interaction and compromise issues in group recommendation. MICL captures the interaction-compromise relationships among group members through a multi-view graph convolutional network, thereby enhancing the accuracy and reliability of group recommendations.
Multi-task learning (MTL) has diverse applications in recommendation systems, enhancing system performance and user experience by addressing issues such as task conflicts, negative transfer, and data sparsity. First, the cross-task knowledge distillation framework leverages the prediction results of one task to supervise another, enabling knowledge transfer between tasks and mitigating task conflicts [23]. The STEM model effectively addresses the negative transfer problem in MTL by combining shared and task-specific embeddings, significantly improving performance across different tasks [24]. In the application of contrastive learning, one study proposed improving recommendation effectiveness by integrating both static and dynamic neighbor information, thereby tackling the challenge of data sparsity [25].
Liu et al. [26] proposed a multi-behavioral sequential recommendation model called MAINT, which is similar to a multi-task learning approach. By utilizing a multi-aspect projection mechanism, behavior-enhanced LSTM, and multi-aspect fusion mechanism, it accurately captures users’ multi-faceted preferences and intents, significantly improving the accuracy and robustness of the recommendation system. The CPMR model adopts a pseudo-multi-task learning framework to model static preferences and dynamic interests separately, capturing user’s dynamic interests with temporal information, thus maintaining model updates and timeliness in incremental learning [27]. Additionally, the FairSR model focuses on fairness in recommendation systems, reducing algorithmic bias within an MTL framework through preference graph embeddings, ensuring fairness and balanced interactions among users [28].
Deng et al. [29] proposed a recommendation method integrating knowledge graphs with multi-task learning, where the knowledge graph captures semantic associations between users and items, and multi-task learning improves the coordination of dependencies across different tasks. Gao et al. [30] introduced a unified multi-task learning framework aimed at integrating multiple conversational recommendation objectives, such as user preference mining and contextual understanding, to efficiently handle diverse recommendation tasks within a single framework. This framework utilizes shared embedding layers and feature extraction modules, enhancing the personalization and diversity of the recommendation system while significantly reducing computational costs.
In this study, we use the symbols u, i, p to denote the group-buy initiator, item, and participant, respectively. Based on the characteristics of the group-buying process, the group-buying recommendation task is divided into the following two tasks:
Task I:
Task II:
The selection of recommendation targets (i.e., item i and participant p) in group-buying recommendations is based on scoring all items in the candidate item list and all participants in the candidate participant list through
We define a group-buying group as
Additionally, we represent the entire set of users and items as U and I, respectively, where u,
3.2 Overview of Overall Structure
As shown in Fig. 2, the model is primarily composed of three core components: the embedding learning module, the multi-head attention and multi-task learning module, and the result prediction module.
In the first module, the embedding information of users (including initiators and participants) and products is learned separately through Graph Convolutional Networks (GCN), generating corresponding embedding matrices. The second module incorporates an expert network and a gating mechanism, with multi-head attention introduced within the expert network to further enhance the model’s learning capability. In the third module, a Multi-Layer Perceptron (MLP) is constructed for each task, and the output embeddings from the final gating mechanism in the multi-task learning process are used as input to the prediction module to compute the results for each task.
Furthermore, to improve the embedding learning effectiveness for initiators, products, and participants, this study designs two auxiliary loss functions tailored for these two tasks to optimize the training process of the model, thereby achieving better recommendation performance.
As described in Section 3.1,
Assume that
where
As shown in Fig. 2, each entity u, i, p is embedded through GCN across the three graphs, with each entity associated with two different views. Consequently, we are able to obtain the embedding information for initiators, items, and participants, as follows:
Here, || denotes the concatenation operation,
3.4 Enhancing Feature Representation with Multi-Head Attention Mechanism
To further improve the model’s performance, we embed a multi-head attention mechanism in each expert network to enable deep feature extraction and capture global dependencies among the input data. The multi-head attention mechanism computes the similarity weights between the query (Q) and key (K) vectors and uses these weights to scale the value (V) vectors, thereby generating weighted feature representations. Specifically, the calculations for Q, K, and V are given by:
where
In detail, the multi-head attention mechanism divides the input of the expert network into multiple “heads” and attention scores are calculated separately for each head. The attention score is calculated through the dot product of the query vector and the key vector, then scaling the result by dividing by
where
where
Finally, the weight vector for each head is calculated by the following formula, and the outputs of multiple heads are then combined. A linear transformation is subsequently applied to restore the input dimensions:
where
This mechanism allows the model to capture shared features across different tasks via multi-head attention in the shared expert network. In task-specific expert networks, the multi-head attention mechanism focuses on task-relevant features, enhancing task-specific learning. By introducing the multi-head attention mechanism, the model not only improves feature representation capacity but also effectively captures long-range dependencies, further enhancing its multi-task learning ability.
As previously discussed, the group-buying recommendation task is divided into Task I and Task II, making the introduction of a multi-task learning framework appropriate. In Task I, user u selects an item i from a list to initiate a group-buy. This process is influenced not only by user u’s preference for item i but also by the potential participant’s preferences for this item. This reflects the nature of real-world group buying–typically, the stronger the potential participant’s interest in item i, the higher the likelihood of a successful group buy for that item. For instance, in Fig. 1, the initiator might be interested in a recommended phone, T-shirt, and book. However, If he could learn in advance that some participants are willing to participate in the mobile phone group, and that the potential group size for the phone exceeds that for other items, he is more likely to choose the phone for the group-buy.
Thus, the model’s learning in Task I needs to incorporate participant’s preference information from Task II to encode participant characteristics. Additionally, the learning in Task II depends on information about the initiator and item from Task I, as Task II aims to estimate
In line with the above, we employ expert networks and a gating mechanism to enhance the learning effectiveness of both tasks in the group-buying recommendation context. Our multi-task learning framework consists of three components: Task I, a shared layer S, and Task II. Each component operates with multiple expert networks and a gating mechanism working collaboratively.
To be more specific, in each expert network, a multi-head attention mechanism is integrated (The specific principle has been explained in Section 3.4). This mechanism is combined with a feedforward neural network to process the input data and generate feature representations, serving as a feature extractor for specific tasks or shared tasks. After being processed by the multi-head attention mechanism, the features are passed to the feedforward neural network for further processing. The feedforward neural network maps the input features to hidden layers through two linear transformations
where
To prevent overfitting and enhance the stability of the training process, batch normalization and dropout are incorporated into the feedforward neural network. Batch normalization is applied to standardize the output of intermediate layers, accelerating training and improving model stability. The formula is as follows:
where
Finally, after feature transformation through the multi-head attention mechanism and the feedforward neural network, the output of the expert network E(x) can be expressed as:
Next, the gating unit, a critical component of the model, is responsible for selecting the output of different expert networks. Each task has a dedicated gating network, which dynamically selects the most appropriate expert output based on the input by generating weights. By assigning weights to different experts, the model can control the degree of attention to various expert networks.
Similar to the expert networks, the gating units generate gating weights through two fully connected layers and the ReLU activation function. The selection weights for the expert networks are then generated using the softmax function, as defined by:
where
Through this design, the model is able to effectively extract the most suitable features in multi-task learning and dynamically adjust the reliance on the outputs of experts for each task via the gating networks, thereby achieving optimal performance across multiple tasks.
In this section, we calculated two recommendation scores separately. These results are computed in the model’s final layer (layer L) using the outputs from gating mechanisms I and II, as given by:
Here,
3.7 Two Auxiliary Losses Functions
We propose two auxiliary loss functions to refine the learning of object embeddings within the model. Experimental results indicate that these auxiliary losses significantly enhance recommendation performance.
To refine the model’s representation learning, we propose two enhanced loss functions based on the aforementioned basic loss functions. These refined loss functions aim to improve the recommendation performance of our method.
1. Auxiliary Loss for Task I: While the participant information from Task I can affect Task II, our analysis suggests that the model should primarily focus on the matching between the initiator u and the item i in Task I, rather than whether there is a match between (u, i) and participant p. This is because the user’s preference for item i is the main motivation for initiating a group buy. By minimizing the interference of potential participant information in Task I, we can avoid introducing excessive noise. Therefore, the model should ensure that the following inequalities hold:
where r(u, i, p) is computed as per Eq. (16), and
For each positive sample triplet t = (u, i, p), we define
Additionally, we incorporate both the BPR [32] and ListNet [33] loss functions. Following the above rationale, we propose an auxiliary loss function for Task I:
where
2. Auxiliary Loss for Task II: The strategy for optimizing representation learning in Task II differs significantly from Task I. On one hand, in the real triplet (u, i, p), replacing item i with another item
The goal of Task II is captured in the loss function of Eq. (23), and we further implement the auxiliary objective using the BPR loss:
Finally, the overall loss function of the model is updated to:
where
1. Group buying Dataset: Currently, datasets related to group purchasing from real shopping websites remain relatively scarce. Previous datasets utilized for group recommendation models [2,34,35] are not suitable for evaluating our group buying recommendation task, as discussed in Section 1, due to significant inherent differences between the two. In this study, we utilized data from Beibei as a basis for evaluating all comparative models. Beibei is an online shopping platform in China that focuses on maternal and infant products, provides a substantial number of group buying transaction logs, enabling the identification of each transaction group’s initiator, products, and participants. Additionally, in some transaction groups within the dataset, two users (regardless of being initiators or participants) are identified as social friends.
Our dataset encompasses 430,360 successfully completed group-buying transactions, comprehensively reflecting user behavioral characteristics and product transaction patterns on group-buying e-commerce platforms. The dataset includes 125,012 unique users who can serve flexibly as either group organizers or participants, highlighting the versatility and diversity of user roles within group-buying activities. Each user can select products based on individual needs and either organize or join a group-buying event, illustrating the interplay between individual actions and group dynamics.
Additionally, the dataset includes 30,516 distinct products, each of which could be chosen by a single user to initiate a group-buy or selected by multiple users to form independent group-buying events. This diverse product data offers a multifaceted perspective for analyzing how product characteristics influence group-buying behaviors. Furthermore, this dataset provides a robust empirical foundation for studying role shifts among users within group-buying contexts, examining product preference selection, and understanding the relationship between initiation and participation behaviors. This supports multidimensional analysis and modeling, enabling deeper insights into group-buying behavior patterns and potential pathways for strategy optimization.
We solely employed this dataset for model evaluation, which includes only records related to maternal and infant products. Our results sufficiently demonstrate the applicability of our model to other group buying, as the patterns on other shopping websites exhibit similar characteristics to those of the Beibei platform.
2. Sample Construction: Prior to constructing the training and testing sets, we first retained the data of users who had initiated or participated in at least one group buying in the original dataset, following the common practices outlined in previous related studies [36]. Subsequently, we removed transaction groups containing the filtered users (either initiators or participants) and retained the remaining dataset for experimentation. The statistical results of the preprocessed data are detailed in Table 1.

We collected training and testing samples for Tasks I and II as follows. In the processed dataset, all observed (u, i) pairs and (u, i, p) triplets were used as positive samples (Y) for Tasks I and II, respectively. For Task I, we randomly selected one item that the initiator u had not purchased as a negative sample (N), thereby forming a negative sample pair with u. In transaction groups represented as
Additionally, the training set, validation set, and test set are divided in a ratio of 7:3:1.
In our experiments, multiple baseline models were employed for comparative analysis. These baseline models were adapted with specific modifications to meet the requirements of the group-buying recommendation task.
(1) NGCF [37]: Aims to introduce higher-order connectivity information within a user-item interaction graph to effectively capture collaborative filtering signals, thereby enhancing the embedding representations of users and items. This approach utilizes graph embedding propagation layers, recursively passing information between users and items to capture multi-layered interaction relationships, leveraging higher-order connections to improve prediction accuracy in recommendation tasks.
(2) EATNN [38]: Utilizes transfer learning and attention mechanisms to personalize the transfer of user preference information across item and social domains. This model enhances recommendation accuracy, especially under conditions of sparse user data (e.g., cold-start users), by more effectively modeling user preferences.
(3) GBGCN [39]: Designed specifically for group-buying recommendations on social e-commerce platforms, this model aims to recommend lists of suitable products for initiating group buys, thus improving group-buying success rates and platform sales. By constructing a heterogeneous graph neural network, GBGCN captures user’s multiple roles and complex social relationships within the group-buying process, facilitating more accurate modeling of user preferences and social influence.
(4) LightGCN [40]: This model simplifies the traditional Graph Convolutional Network (GCN) structure by removing redundant feature transformations and non-linear activation operations, retaining only neighborhood aggregation and multi-layer embedding weighted combinations.
(5) IMPGCN [41]: In the modified version of this model, we utilized an interest embedding matrix to group users and items based on their interests by controlling the number of user groups, filtering features according to the group with the highest interest, and retaining relevant information. Simultaneously, user embeddings were grouped to enable independent embedding computation within each interest group at the same layer, allowing different information to propagate within distinct groups and enhancing information diversity. We also retained IMPGCN’s block matrix processing method to minimize computational overhead.
(6) J2PRec [9]: A new Joint Product-Participant Recommendation (J2PRec) framework is proposed to improve the success rate of group buying (GB) services. In this model, J2PRec not only recommends products that match the interests of the initiator but also suggests potential social friends who might participate in the group buying, thereby helping to increase the participation rate. The proposed J2PRec framework significantly enhances the participation and success rates of group buying by jointly recommending suitable products and potential participants, utilizing relational graph embeddings and a joint learning module.
(7) MGBR [8]: A Multi-task Learning-based Group Buying Recommendation (MGBR) model is proposed, which decomposes the group buying recommendation task into two sub-tasks: recommending products to the initiator and recommending participants for the selected products. MGBR facilitates information exchange between the sub-tasks by introducing expert networks and gating mechanisms, and optimizes representation learning through auxiliary loss functions, thereby improving recommendation performance.
Although these baseline models were not initially designed for group-buying recommendation tasks, their direct application may not satisfy the specific requirements of our model. Therefore, we made necessary adjustments to enable these models to perform in our tasks. Specifically, in our study, these baseline models are limited to recommending either for Task I or Task II, and thus required tailored modifications. Since the two tasks in our research are similar, modifications were limited to the result prediction module rather than the primary framework. Effective mechanisms within the original models were preserved to ensure robust performance in the new task context. These improvements allow the baseline models to better meet the demands of group-buying recommendations, effectively addressing the personalized user needs and complex interaction relationships inherent in the group-buying scenario.
The experiments in this study were conducted on a server equipped with a GeForce RTX 4090 graphics processing unit (24 GB memory), operating under Ubuntu 22.04. The model training and inference were performed using PyTorch 2.3.0 and CUDA 12.1.
In this experiment, we employed Mean Reciprocal Rank (MRR@N) and Normalized Discounted Cumulative Gain (NDCG@N) [42] as metrics to evaluate the recommendation performance of all baseline models. These evaluation metrics enable an objective assessment of the ranking performance of the model across both the organizer’s item recommendation and participant recommendation tasks. These metrics are widely used in the evaluation of ranking-based recommendation systems, with NDCG particularly focusing on the specific ranking positions of positive samples/participants in the recommendation list. We first calculated MRR/NDCG@10 at a positive to negative sample ratio of 1:9, and subsequently calculated MRR/NDCG@100 at a ratio of 1:99, in order to comprehensively assess the recommendation performance of all comparative models.
4.5 Overall Performance Comparison
Table 2 presents the performance of all baseline models across the two tasks. All results are visualized in Fig. 3.


Figure 3: Performance graphs of all baselines
(1) Clearly, our model, MAMGBR, demonstrates optimal performance across both tasks, attributable to several key factors. First, by employing GCN across multiple views, MAMGBR captures rich and crucial features from the relationships between users and items. Secondly, the multi-task learning module in the model enables essential information sharing between the two tasks. Additionally, the auxiliary loss function further facilitates information interaction, mitigating potential issues between Task I and Task II. Notably, our model shows an especially significant advantage in Task I over other baselines, underscoring its capability in optimizing the match between organizers and items.
(2) Due to NGCF’s recursive propagation of connectivity information between users and items via embedding propagation layers, it effectively captures higher-order collaborative signals, yielding overall better performance compared to other baseline models. However, NGCF still falls short of surpassing our proposed model.
(3) Although EATNN performs well in social-aware recommendations and incorporates attention mechanisms to enhance recommendation accuracy, its performance in this study’s tasks did not meet expectations.
(4) GBGCN, designed specifically for group-buying recommendation tasks, distinguishes multiple user roles and emphasizes social relationships among users. However, its performance in this study’s tasks remains limited.
(5) LightGCN and IMPGCN, based on traditional graph convolutional network methods, has a relatively simple structure that only enables basic group-buying recommendations. When handling complex social relationships and user roles, IMPGCN’s capacity is notably limited, resulting in relatively weaker overall performance.
(6) J2PRec and MGBR are methods specifically designed for group buying. However, both approaches are overly complex, making them less ideal in terms of time and computational resources. Additionally, their results are slightly inferior to those of our method.
We designed three ablative variants to further validate the effectiveness of our proposed method:
MAMGBR-M: The multi-task learning framework was removed, with each task being independently trained and evaluated. This configuration aims to analyze the contribution of multi-task learning framework to model performance.
MAMGBR-MH: The multi-head attention mechanism was eliminated from the original architecture. We subsequently tested its performance on both Task I and Task II to assess the impact of this component removal on model effectiveness.
MAMGBR-L: The enhanced loss functions
As shown in Table 3, MAMGBR-M demonstrates superior performance in both tasks, significantly outperforming other variants. This robustly validates the critical importance of our multi-task learning framework to the proposed method. The results clearly indicate that inter-task information interaction profoundly influences the recommendation processes for both commodities and participants. The performance of MAMGBR-MH notably degrades after removing the multi-head attention mechanism from expert networks, further confirming the effectiveness of this mechanism in modeling comprehensive feature dependencies. This finding underscores its pivotal role in enhancing model performance. When replacing the enhanced loss functions with their original counterparts (MAMGBR-L), the model fails to optimize implicit constraints in embedding representations during training. This not only compromises generalization capability but also decelerates convergence speed, thereby fully demonstrating the indispensable role of our improved loss functions in embedding optimization.

1. Impact of Loss Function Coefficients
We systematically adjusted the weighting coefficients

Figure 4: Performance of MAMGBR under different loss function coefficients. The X-axis represents the values of
2. Impact of MuHlti-Head Attention Configuration
We experimented with varying numbers of attention heads (1, 2, 4, 8, 12, 16) to investigate their effects. As illustrated in Fig. 5, recommendation accuracy improves substantially with increasing head numbers, reaching peak performance at 8 heads while maintaining stable training dynamics. However, further increases to 12 or 16 heads not only degrade performance but also prolong training time and heighten the risk of overfitting. This suggests that excessive attention heads may introduce redundant feature interactions while compromising model robustness.

Figure 5: The impact of different numbers of attention heads on performance. The X-axis represents the number of attention heads, while the Y-axis represents the model performance values
5 Research Results and Implications
This study proposes MAMGBR, a group-buying recommendation model for e-commerce platforms based on multi-head attention mechanisms and multi-task learning, aimed at optimizing recommendations in group-buying scenarios. Experimental results indicate that MAMGBR significantly outperforms existing baseline models across both tasks, excelling especially in organizer item recommendation (Task I) and participant recommendation (Task II). Specifically, MAMGBR achieves an MRR@10 of 0.7696 on Task I, marking a 20.23% improvement over traditional models, and a 24.08% increase in MRR@100 on Task II. By incorporating Graph Convolutional Networks (GCN) and multi-head attention mechanisms, MAMGBR enables fine-grained modeling of the multi-role relationships among users, items, and participants, effectively capturing complex associations between user preferences and item attributes. Each task also incorporates expert networks and gating mechanisms to optimize task dependencies and information exchange, further enhancing recommendation accuracy. Additionally, the auxiliary loss function strengthens the embedding learning process, making the model’s performance more stable and efficient across tasks.
In comparison with other baseline models, such as NGCF, EATNN, GBGCN, and GBMF, MAMGBR demonstrates superior performance across both task types. Although these baselines focus on collaborative relationships between users and items or incorporate social information, they face limitations in handling the role diversity and high complexity of group-buying recommendations. MAMGBR, by leveraging a multi-task framework, enables effective coordination between organizers and participants, thereby enhancing recommendation precision.
(1) Improving Group-Buying Recommendation Accuracy and Success Rates
MAMGBR effectively addresses the complexity of multi-role interactions inherent in group-buying recommendations. Group-buying behavior on e-commerce platforms is often influenced by various factors, including organizer preferences, participant interests, and item attributes. By incorporating multi-head attention mechanisms and multi-task learning, MAMGBR integrates these factors comprehensively. This research provides a significant boost to group-buying success rates on e-commerce platforms, enabling more accurate recommendations of items and participants, thereby enhancing user experience and increasing transaction volume.
(2) Enriching Multi-Task Learning Applications in Recommendation Systems
This study illustrates the advantages of multi-task learning in group-buying recommendations through MAMGBR. Traditional recommendation systems focus mainly on optimizing a single task, while MAMGBR’s dual-task architecture excels in both organizer item recommendation and participant recommendation tasks. This multi-task learning approach enriches the research paradigm in recommendation systems, offering a framework for similar applications in other recommendation scenarios.
(3) Strengthening the Research Foundation for Social Group-Buying in E-Commerce
The dataset used in this study, consisting of 430,000 group-buying events from the real-world maternal and infant e-commerce platform “Beibei,” showcases user behavior and item transaction patterns in authentic social group-buying settings. Experimental validation on real data demonstrates that the MAMGBR model is not only applicable to maternal and infant e-commerce but also holds promise for other group-buying contexts. This study provides an innovative foundation for group-buying recommendation research, offering insights for future social e-commerce applications.
(4) Offering New Approaches for Modeling Complex User Roles
The design of this model emphasizes the multi-role relationships of users in group-buying scenarios, exploring the intricate interactions among organizers, participants, and items. Traditional recommendation models primarily focus on simple user-item relationships, whereas MAMGBR goes further by emphasizing synergies between roles. This modeling approach provides an innovative solution for the recommendation field, with potential applications in other recommendation tasks requiring consideration of multiple user roles.
(5) Providing a Broadly Applicable Framework for Group-Buying Recommendations
The MAMGBR model proposed in this paper is not only suitable for group-buying recommendations in the maternal and infant e-commerce domain but also demonstrates strong generalizability by characterizing the multi-dimensional roles of users, items, and participants. Extensive validation on real datasets highlights MAMGBR’s potential in diverse recommendation contexts. In the future, this model could be adapted for group-buying recommendations across different product categories, supporting the efficient operation of personalized group-buying activities and driving further advancements in social e-commerce.
This paper conducts experiments on the task of group-buying recommendations in e-commerce websites. To address the two tasks in this study, we propose a group-buying recommendation model (MAMGBR) based on multi-head attention mechanisms and multi-task learning. Leveraging an in-depth understanding of the correlation and information exchange between the two tasks, MAMGBR’s multi-task learning module incorporates expert networks and gating units, with multi-head attention mechanisms embedded within the expert network to more effectively learn embedding features of entities within purchasing groups. Additionally, we introduce two auxiliary loss functions, each corresponding to the training objectives of the two tasks, to further optimize representation learning. Experimental results demonstrate that our model significantly outperforms other baseline models, proving to be well-suited for group-buying scenarios.
Acknowledgement: We greatly appreciate the work of the editors and reviewers, and welcome constructive feedback.
Funding Statement: This research was supported by the Key Research and Development Program of Heilongjiang Province (No. 2022ZX01A35).
Author Contributions: Zongzhe Xu: Writing—original draft, Visualization, Validation, Software, Resources, Methodology, Data curation, Conceptualization. Ming Yu: Writing—review & editing, Funding acquisition, Supervision, Validation. All authors reviewed the results and approved the final version of the manuscript.
Availability of Data and Materials: The data that support the findings of this study are available from the corresponding author upon reasonable request.
Ethics Approval: Not applicable.
Conflicts of Interest: The authors declare no conflicts of interest to report regarding the present study.
References
1. Guo L, Ma J, Jiang HR, Chen ZM, Xing CM. Social trust aware item recommendation for implicit feedback. J Comput Sci Technol. 2015 Sep;30(5):1039–53. doi:10.1007/s11390-015-1580-8. [Google Scholar] [CrossRef]
2. Cao D, He X, Miao L, Xiao G, Chen H, Xu J. Social-enhanced attentive group recommendation. IEEE Trans Knowl Data Eng. 2021;33(3):1195–209. doi:10.1109/TKDE.2019.2936475. [Google Scholar] [CrossRef]
3. Gorla J, Lathia N, Robertson S, Wang J. Probabilistic group recommendation via information matching. In: Proceedings of the 22nd International Conference on World Wide Web, WWW’13; 2013; New York, NY, USA: Association for Computing Machinery. p. 495–504. [Google Scholar]
4. Jiang Y, Wu M, hui Li X. Cooperation mechanism, product quality, and consumer segment in group buying. Electron Commer Res Appl. 2024;64:101357. doi:10.1016/j.elerap.2024.101357. [Google Scholar] [CrossRef]
5. Liu X, Tian Y, Wang W, Cui Y. A social network-based trust model for group-buying. In: 2011 4th IEEE International Conference on Broadband Network and Multimedia Technology; 2011; Shenzhen, China. p. 385–9. [Google Scholar]
6. Yannam VR, Kumar J, Babu KS, Sahoo B. Improving group recommendation using deep collaborative filtering approach. Int J Inform Technol. 2023;15(3):1489–97. doi:10.1007/s41870-023-01205-x. [Google Scholar] [CrossRef]
7. Abolghasemi R, Engelstad P, Herrera-Viedma E, Yazidi A. A personality-aware group recommendation system based on pairwise preferences. Inform Sci. 2022;595:1–17. doi:10.1016/j.ins.2022.02.033. [Google Scholar] [CrossRef]
8. Zhai S, Liu B, Yang D, Xiao Y. Group buying recommendation model based on multi-task learning. In: 2023 IEEE 39th International Conference on Data Engineering (ICDE); 2023; Anaheim, CA, USA. p. 978–91. [Google Scholar]
9. Sha X, Sun Z, Zhang J, Ong YS. Who wants to shop with you: joint product-participant recommendation for group-buying service. IEEE Trans Neural Netw Learn Syst. 2024;35(2):2353–63. doi:10.1109/tnnls.2022.3190003. [Google Scholar] [PubMed] [CrossRef]
10. Liu Z, Meng L, Sheng QZ, Chu D, Yu J, Song X. POI recommendation for random groups based on cooperative graph neural networks. Inform Process Manag. 2024;61(3):103676 doi: 10.1016/j.eswa.2023.121583. [Google Scholar] [CrossRef]
11. Yu Y, Zhang H. A novel semi-naive Bayesian restaurant recommendation method considering feature correlation. In: 2024 5th International Conference on Computer Engineering and Application (ICCEA); 2024; Hangzhou, China. p. 771–9. [Google Scholar]
12. Wu L, Sun P, Hong R, Fu Y, Wang X, Wang M. SocialGCN: an efficient graph convolutional network based model for social recommendation. arXiv:1811.02815. 2019. [Google Scholar]
13. Chen X, He C, Guan Q. Boost social recommendation via adaptive denoising network. In: Companion Proceedings of the ACM Web Conference 2024, WWW’24; 2024; New York, NY, USA: Association for Computing Machinery. p. 577–80. [Google Scholar]
14. Wu L, Li J, Sun P, Hong R, Ge Y, Wang M. DiffNet++: a neural influence and interest diffusion network for social recommendation. IEEE Trans Knowl Data Eng. 2022;34(10):4753–66. doi:10.1109/tkde.2020.3048414. [Google Scholar] [CrossRef]
15. Yu J, Yin H, Li J, Gao M, Huang Z, Cui L. Enhancing social recommendation with adversarial graph convolutional networks. IEEE Trans Knowl Data Eng. 2022;34(8):3727–39. doi:10.1109/tkde.2020.3033673. [Google Scholar] [CrossRef]
16. Liu H, Zheng C, Li D, Zhang Z, Lin K, Shen X, et al. Multi-perspective social recommendation method with graph representation learning. Neurocomputing. 2022;468:469–81. doi:10.1016/j.neucom.2021.10.050. [Google Scholar] [CrossRef]
17. Huang C, Xu H, Xu Y, Dai P, Xia L, Lu M, et al. Knowledge-aware coupled graph neural network for social recommendation. Proc AAAI Conf Artif Intell. 2021 May;35(5):4115–22. doi:10.1609/aaai.v35i5.16533. [Google Scholar] [CrossRef]
18. Huang Z, Xu X, Zhu H, Zhou M. An efficient group recommendation model with multiattention-based neural networks. IEEE Trans Neural Netw Learn Syst. 2020;31(11):4461–74. doi:10.1109/tnnls.2019.2955567. [Google Scholar] [PubMed] [CrossRef]
19. Yannam VR, Kumar J, Sravani L, Babu KS. Enhancing Group Recommendation Using Attention Mechanisam. In: 2022 IEEE 19th India Council International Conference (INDICON); 2022; Kochi, India. p. 1–6. [Google Scholar]
20. Lu M, Zhu P, Miao C, Wang Y, Wang J. Group recommendation method based on graph neural network. In: 2024 International Conference on Cyber-Physical Social Intelligence (ICCSI); 2024; Doha, Qatar. p. 1–6. [Google Scholar]
21. Huang Z, Liu Y, Zhan C, Lin C, Cai W, Chen Y. A novel group recommendation model with two-stage deep learning. IEEE Trans Syst, Man, Cybern: Syst. 2022;52(9):5853–64. doi:10.1109/tsmc.2021.3131349. [Google Scholar] [CrossRef]
22. Li J, Zhu S. Multi-view interactive compromise learning for group recommendation. In: ICASSP 2024—2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP); 2024; Seoul, Republic of Korea. p. 9396–400. [Google Scholar]
23. Yang C, Pan J, Gao X, Jiang T, Liu D, Chen G. Cross-task knowledge distillation in multi-task recommendation. Proc AAAI Conf Artif Intell. 2022 Jun;36(4):4318–26. doi:10.1609/aaai.v36i4.20352. [Google Scholar] [CrossRef]
24. Su L, Pan J, Wang X, Xiao X, Quan S, Chen X, et al. STEM: unleashing the power of embeddings for multi-task recommendation. Proc AAAI Conf Artif Intell. 2024 Mar;38(8):9002–10. doi:10.1609/aaai.v38i8.28749. [Google Scholar] [CrossRef]
25. Huang B, Zheng S, Fujita H, Liu J. A multi-task learning model for recommendation based on fusion of dynamic and static neighbors. Eng Appl Artif Intell. 2024;133:108190. doi:10.1016/j.engappai.2024.108190. [Google Scholar] [CrossRef]
26. Liu H, Ding J, Zhu Y, Tang F, Yu J, Jiang R, et al. Modeling multi-aspect preferences and intents for multi-behavioral sequential recommendation. Knowl Based Syst. 2023;280:111013. doi:10.1016/j.knosys.2023.111013. [Google Scholar] [CrossRef]
27. Bian Q, Xu J, Fang H, Ke Y. CPMR: context-aware incremental sequential recommendation with pseudo-multi-task learning. In: Proceedings of the 32nd ACM International Conference on Information and Knowledge Management, CIKM’23; 2023; New York, NY, USA: Association for Computing Machinery. p. 120–30. [Google Scholar]
28. Li CT, Hsu C, Zhang Y. FairSR: fairness-aware sequential recommendation through multi-task learning with preference graph embeddings. ACM Trans Intell Syst Technol. 2022 Feb;13(1):16. doi:10.1145/3495163. [Google Scholar] [CrossRef]
29. Deng Y, Zhang W, Xu W, Lei W, Chua TS, Lam W. A unified multi-task learning framework for multi-goal conversational recommender systems. ACM Trans Inf Syst. 2023 Feb;41(3):77. doi:10.1145/3570640. [Google Scholar] [CrossRef]
30. Gao M, Li JY, Chen CH, Li Y, Zhang J, Zhan ZH. Enhanced multi-task learning and knowledge graph-based recommender system. IEEE Trans Knowl Data Eng. 2023;35(10):10281–94. doi:10.1109/tkde.2023.3251897. [Google Scholar] [CrossRef]
31. Bhatti UA, Tang H, Wu G, Marjan S, Hussain A. Deep learning with graph convolutional networks: an overview and latest applications in computational intelligence. Int J Intell Syst. 2023;2023(1):8342104. doi:10.1155/2023/8342104. [Google Scholar] [CrossRef]
32. Rendle S, Freudenthaler C, Gantner Z, Schmidt-Thieme L. BPR: bayesian personalized ranking from implicit feedback. arXiv:1205.2618. 2012. [Google Scholar]
33. Liu Y, Zhang X, Zhu X, Guan Q, Zhao X. ListNet-based object proposals ranking. Neurocomputing. 2017;267:182–94. doi:10.1016/j.neucom.2017.06.008. [Google Scholar] [CrossRef]
34. Yin H, Wang Q, Zheng K, Li Z, Yang J, Zhou X. Social influence-based group representation learning for group recommendation. In: 2019 IEEE 35th International Conference on Data Engineering (ICDE); 2019; Macao, China. p. 566–77. [Google Scholar]
35. Li K, Wang CD, Lai JH, Yuan H. Self-supervised group graph collaborative filtering for group recommendation. In: Proceedings of the Sixteenth ACM International Conference on Web Search and Data Mining, WSDM’23; 2023; New York, NY, USA: Association for Computing Machinery. p. 69–77. [Google Scholar]
36. Shi Y, Larson M, Hanjalic A. Collaborative filtering beyond the user-item matrix: a survey of the state of the art and future challenges. ACM Comput Surv. 2014 May;47(1):3. doi:10.1145/2556270. [Google Scholar] [CrossRef]
37. Wang X, He X, Wang M, Feng F, Chua TS. Neural graph collaborative filtering. In: Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR’19; 2019; New York, NY, USA: Association for Computing Machinery. p. 165–74. [Google Scholar]
38. Chen C, Zhang M, Wang C, Ma W, Li M, Liu Y, et al. An efficient adaptive transfer neural network for social-aware recommendation. In: Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR’19; 2019; New York, NY, USA: Association for Computing Machinery. p. 225–34. [Google Scholar]
39. Zhang J, Gao C, Jin D, Li Y. Group-buying recommendation for social e-commerce. In: 2021 IEEE 37th International Conference on Data Engineering (ICDE); 2021; Chania, Greece . p. 1536–47. [Google Scholar]
40. He X, Deng K, Wang X, Li Y, Zhang Y, Wang M. LightGCN: simplifying and powering graph convolution network for recommendation. In: Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR’20; 2020; New York, NY, USA: Association for Computing Machinery. p. 639–48. [Google Scholar]
41. Liu F, Cheng Z, Zhu L, Gao Z, Nie L. Interest-aware message-passing GCN for recommendation. In: Proceedings of the Web Conference 2021, WWW’21; 2021; New York, NY, USA: Association for Computing Machinery. p. 1296–1305. [Google Scholar]
42. Schwartz I. Ensemble of MRR and NDCG models for visual dialog. arXiv:2104.07511. 2021. [Google Scholar]
Cite This Article
Copyright © 2025 The Author(s). Published by Tech Science Press.This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


Submit a Paper
Propose a Special lssue
View Full Text
Download PDF
Downloads
Citation Tools