# Hypernetwork Representation Learning with the Set Constraint
## 5 Our Method
### Joint Optimization Objective Function  
A hyperentwork representation learning method with the set constraint HRSC, which aims to jointly optimize the topology-derived objective function and set constraint objective function, is proposed in this subsection. Figure 2 indicates HRSC framework. Compared to other hypernetwork representation learning methods, HRSC is improved at two levels: (I) at the hypernetwork topology structure level, HRSC exploits the correlations between the nodes by maximizing the prediction probabilities of the center nodes given their contextual nodes in random walk node sequences; (II) at the node-hyperedge level, HRSC captures semantic correlations between the center nodes and their associated hyperedges by maximizing the prediction probabilities of the center nodes given the set of the hyperedges associated with the center nodes. By means of the above improvements, HRSC effectively incorporates the hyperedges into the process of hypernetwork representation learning to get node representation vectors of better quality. As shown in Figure 2, the hypernetwork topology representation and hyperedge representation learned by the model based on the topology-derived objective function and the model based on the set constraint objective function respectively share the same representation, which can comprehensively utilize the contexts and hyperedge information of each node to get the vectors of better quality. For ease of calculation, take the logarithm of \(D_{1}\) and \(D_{2}\), we aim to maximize the following joint objective function of HRSC. Figure 2: HRSC framework, where \(v_{i}\) is the center node, other nodes \(v_{i-s}\), \(v_{i-s+1}\), \(v_{i+s-1}\), \(v_{i+s}\), etc. are contextual nodes of the center node \(v_{i}\), namely \(context(v_{i})\), where the vectors corresponding to \(v_{i-s}\), \(v_{i-s+1}\), \(v_{i}\), \(v_{i+s}\) are denoted as the first red dot from the left, the second red dot from the left, the red dot in the middle, the second red dot from the right, the first red dot from the right, SUM denoted as all red is the summation of all of the vectors corresponding to \(context(v_{i})\), and \(T_{v_{i}}\) is the set of hyperedges associated with the center node \(v_{i}\), and also the set of the nodes associated with the center node \(v_{i}\) if the hyperedge is regarded as the node. \[L=\sum_{n\in\mathbb{C}}\left\{\sum_{u\in\{\{n\}\cup\text{NEG}(n)\}} \left\{L^{n}(u)\cdot\log\left[\sigma\left(X_{n}^{T}\,\mathbf{\theta}_{u}\right) \right]+[1-L^{n}(u)]\cdot\log\left[1-\sigma\left(X_{n}^{T}\,\mathbf{\theta}_{u} \right)\right]\right\}+\right. \tag{8}\] \[=\sum_{n\in\mathbb{C}}\left\{\sum_{u\in\{\{n\}\cup\text{NEG}(n)\} }\left\{L^{n}(u)\cdot\log\left[\sigma\left(X_{n}^{T}\,\mathbf{\theta}_{u}\right) \right]+[1-L^{n}(u)]\cdot\log\left[1-\sigma\left(X_{n}^{T}\,\mathbf{\theta}_{u} \right)\right]\right\}+\right.\] \[\left.\sum_{v\in\mathbb{T}_{n}}\sum_{\theta\in\{\{n\}\cup\text{NEG }(v)\}}\beta\cdot\left\{\delta\left(\vartheta|v\right)\cdot\log\left[\sigma \left(e_{v}^{T}\,\mathbf{\theta}_{\theta}\right)\right]+[1-\delta\left(\vartheta| v\right)]\cdot\log\left[1-\sigma\left(e_{v}^{T}\,\mathbf{\theta}_{\theta}\right) \right]\right\}\right\}\]  
where \(\beta\) is the harmonic factors to balance the model based on the topology-derived objective function and the model based on the set constraint objective function. For ease of derivation, \(L(n,u,v,\vartheta)\) is defined as follows. \[L(n,u,v,\vartheta) =\left\{L^{n}(u)\cdot\log[\sigma(X_{n}^{T}\mathbf{\theta}_{u})]+[1-L^ {n}(u)]\cdot\log[1-\sigma(X_{n}^{T}\mathbf{\theta}_{u})]\right\}+ \tag{9}\] \[\beta\cdot\left\{\delta\left(\vartheta|v\right)\cdot\log[\sigma( e_{v}^{T}\mathbf{\theta}_{\theta})]+[1-\delta\left(\vartheta|v\right)]\cdot\log[1- \sigma(e_{v}^{T}\mathbf{\theta}_{\theta})]\right\}\]  
And then the joint objective function \(L\) is optimized by means of the stochastic gradient ascent algorithm. The key is to give four kinds of gradients of \(L\).