## 4 The Proposed Framework
### Framework Details
#### 4.4.2 Model Architecture  
The framework architecture of DAGA comprises several key components: encoders, disentangled multi-head self-attention encoders, aggregators, predictors and a discriminator. Each component plays a pivotal role in processing user preferences, disentangling user intents, aggregating group preferences and predicting group-item interactions. **Encoder (MLP Encoder1):** The foundation of user preference encoding lies in a two-layer Multi-Layer Perceptron (MLP). This encoder transforms the original user preference matrix \(R\) into hidden representations \(Z^{\prime}\), employing nonlinear activation functions \(\sigma\) and distinct learnable weight matrices \(W_{1}\) and \(W_{2}\) alongside biases \(b_{1}\) and \(b_{2}\) as follows:  
\[Z^{\prime}=\sigma(W_{2}^{T}\sigma(W_{1}^{T}R+b_{1})+b_{2}). \tag{12}\]  
**Disentangled Self-Attention Encoder:** According to the conventional attention mechanism [37], to represent the user preference with the other members within a group, the hidden representation \(Z^{\prime}\) is embedded into \(Z^{m}\) as follows:  
\[Z^{Q}=\sigma(W_{Q}^{T}\sigma(W_{pQ}^{T}Z^{\prime}+b_{pQ})+b_{Q}), \tag{13}\]  
\[Z^{K}=\sigma(W_{K}^{T}\sigma(W_{PK}^{T}Z^{\prime}+b_{PK})+b_{K}), \tag{14}\]  
\[Z^{V}=\sigma(W_{V}^{T}\sigma(W_{PV}^{T}Z^{\prime}+b_{PV})+b_{V}), \tag{15}\]  
where \(W_{pQ}\) and \(W_{Q}\), \(W_{pK}\) and \(W_{K}\) and \(W_{pV}\) and \(W_{V}\) with related \(b_{pQ}\) and \(b_{Q}\), \(b_{pK}\) and \(b_{K}\) and \(b_{pV}\) and \(b_{V}\) are used to encode the Q, K and V of the attention mechanism and perform the mapping of the dimensionality increase, respectively. Moreover, the disentanglement is realized by \(Z^{Q}=\{Z_{1}^{Q},Z_{2}^{Q},\ldots Z_{k}^{Q}\}\), \(Z^{K}=\{Z_{1}^{K},Z_{2}^{K},\ldots Z_{k}^{K}\}\) and \(Z^{V}=\{Z_{1}^{V},Z_{2}^{V},\ldots Z_{k}^{V}\}\). Subsequently, the factor-wise self-attention mechanism is applied to calculate the attention matrix and related encoded representations as follows:  
\[Z_{i}^{m}=\frac{1}{H}\sum_{j\in[1,H]}\text{softmax}(\frac{Z_{ij}^{Q}Z_{ij}^{ K}}{\sqrt{d/k}})Z_{ij}^{V},\quad\forall i\in[1,k], \tag{16}\]  
where \(H\) denotes the number of heads to average the results from different heads of our disentangled self-attention module. **Disentangled Encoders (MLP Encoder2):** To further process the disentangled representations \(Z_{k}^{m}\), a two-layer MLP is utilized, equipped with a unique parameter matrix to cater to each factor, thus facilitating the embedding into another factor-specific feature space as follows:  
\[Z_{i}=\sigma(W_{i}^{\text{gt}}\sigma(W_{i}^{\text{gt}}Z_{i}^{m}+b_{i}^{a})+b_{i} ^{b}),\quad\forall i\in[1,k]. \tag{17}\]  
**Aggregators:** The framework incorporates three aggregation mechanisms--_Maxpooling_, _Meanpooling_ and _Attention_--to synthesize group representations from user embeddings. The _Maxpooling_ and _Meanpooling_ operations perform element-wise maximum and mean calculations, respectively, across each factor of the disentangled representations. The _Attention_ mechanism, primarily employed within DAGA, computes a weighted summation of member representations for each factor with weights derived from attention networks and disentangled encoder outputs as follows:  
\[\mathbf{p_{i}^{g}}=\sum_{u\in g}\alpha_{i}^{u}\mathbf{z_{i}^{u}},\quad\forall i \in[1,k], \tag{18}\]  
where the weight \(\alpha_{i}^{u}\) for each user \(u\) in group \(g\) is determined by the attention mechanism [37]  
\[\alpha_{i}^{u}=\frac{\exp(\mathbf{h_{i}^{T}z_{i}^{u}})}{\sum_{u\in g}\exp( \mathbf{h_{i}^{T}z_{i}^{u}})}. \tag{19}\]  
**Predictor:** The predictor component, comprising two fully connected layers followed by a _softmax_ function, is responsible for translating the aggregated disentangled group representations or disentangled user representations into preference distributions for group-item interactions or user-item interactions.