# A Hierarchical Generative Embedding Model for Influence Maximization in Attributed Social Networks
## 4 The Proposed Method
### Hierarchical Generative Embedding Model
#### 4.1.1 Hierarchical Structure Properties  
Similar to most embedding methods [23; 24; 25], we preserve the network structure through the distance of the vertex in the hidden space. A community is a node set with tensility, and in order to capture this tensility, we embed a community as a Gaussian distribution. The greater the variance, the greater tensility of the community, that is, the difference between nodes contained in the community will be greater. Therefore, we use the KL distance to measure the similarity between communities. More specifically, suppose \(\mathbf{\Phi}_{v_{1}}=\mathcal{N}(\mu_{1},\Sigma_{1})\), \(\mathbf{\Phi}_{v_{2}}=\mathcal{N}(\mu_{2},\Sigma_{2})\). Then, the distance between \(v_{1}\) and \(v_{2}\) can be calculated in two ways, as follows:  
\[\delta(v_{1},v_{2})=D_{KL}(\mathcal{N}_{1}\|\mathcal{N}_{2})=\frac {1}{2}[tr(\Sigma_{2}^{-1}\Sigma_{1}) \tag{3}\] \[+(\mu_{2}-\mu_{1})^{T}\Sigma_{2}^{-1}(\mu_{2}-\mu_{1})-L-log\frac {\Sigma_{2}}{\Sigma_{1}}].\]  
where \(tr(\Sigma_{2}^{-1}\Sigma_{1})\) is the trace of matrix \(\Sigma_{2}^{-1}\Sigma_{1}\), \(v_{1}\) and \(v_{2}\) are communities, and \(L\) is a constant. \[\delta(v_{1},v_{2})=\left\|\mu_{1}-\mu_{2}\right\|_{2} \tag{4}\]where \(v_{1}\) and \(v_{2}\) are nodes. Unlike normal networks, hierarchical networks contain a large number of hierarchical relationships. To capture this complex hierarchical relationship, we force the embedding of a vertex to submit to two constraints, the horizontal and the vertical:  
Horizontal constraint: Generally, community-based embedding methods [27; 28] consider that the nodes belonging to the same community are more similar than those belonging to different communities. Thus, we intend to extend this constraint to hierarchical networks and name such a constraint as the horizontal constraint. The horizontal constraint can be defined as follows: For each layer \(l\) in clustering tree \(T\), for all vertex-pairs \(v_{i}^{l}\), \(v_{j}^{l}\) at layer \(l\) with \(fa(v_{i}^{l})=fa(v_{j}^{l})\), for all \(v_{k}^{l}\) at layer \(l\) with \(fa(v_{i}^{l})\
eq fa(v_{k}^{l})\) and \(fa(v_{j}^{l})\
eq fa(v_{k}^{l})\), we have  
\[\delta(v_{i}^{l},v_{j}^{l}) <\delta(v_{i}^{l},v_{k}^{l}) \tag{5}\] \[\delta(v_{i}^{l},v_{j}^{l}) <\delta(v_{j}^{l},v_{k}^{l}) \tag{6}\]  
Vertical constraint: From the biological point of view, a clustering tree can be likened to a gene tree, in which the lower vertexes propagate from the upper vertexes. The more children a vertex has, the more genes it inherits from its father, that is, the more similar it is to its father. We use a personalized distance rank method to describe the vertical constraint: for all vertices \(m\),  
\[\delta(v_{1},v_{m})<\delta(v_{2},v_{m})<\cdots<\delta(v_{n},v_{m}) \tag{7}\]  
if \(n(v_{1})>n(v_{2})\cdots>n(v_{n})\), where \(v_{1},v_{2},\cdots,v_{n}\) are children of \(v_{m}\), i.e., \(v_{1},v_{2},\cdots,v_{n}\in\mathcal{Ch}(v_{m})\), and \(n(v_{1}),n(v_{2}),\cdots,n(v_{n})\), respectively, denote the number of the children of vertices \(v_{1},v_{2}\cdots v_{n}\). Affiliation constraint: In hierarchical networks, bottom-node clustering forms small communities, while small-community clustering forms large communities. Therefore, the parent node can be regarded as the feature set of all child nodes. Our HGE model describes the formation process of hierarchical networks from the perspective of generation: as the attribute set of the entire hierarchical network, the root node generates the child node of the next layer according to the attribute classification and repeats this top-down generation process to obtain the entire hierarchical network. In order to capture this hierarchical affiliation (generation) relationship, in the HGE model, nodes are embedded as Gaussian distributions. The mean value represents the position in the embedding space and is generated by the distribution of the parent node, and the variance represents the tensility of the node, which can also represent the differences among all child nodes.