# CDSTAEP: Cross-Domain Spatial-Temporal Association Learning for Abnormal Events Prediction
## 4 Methodology
### Graph Representation Learning in Mixed-Curvature Spaces
#### 4.2.1 Metric and Map Representations in Curvature Spaces
(3) Spherical Space  
As in hyperbolic geometry, the embedding representation of hyperbolic spaces can be solved by the Poincare model, as the solutions in spherical geometry [11]. The curvature \(\kappa>0\) of the spherical space \(\mathbb{S}_{k}^{n}\rightarrow\mathbb{R}^{n}\), if \(x\to 0\), it is stretched into a spherical space with an infinite radius. Since the distance metric is equivalent to the angle metric and has rotation invariance, it is suitable for modeling ring data. The projected sphere model can well solve the representation problem of spherical space, the exponential and logarithmic mapping functions are as follows:  
\[exp_{x}^{k}(v)=\cos\left(\sqrt{|k|}\,||v||_{2}\right)+\sin\left(\sqrt{|k|}\,|| v||_{2}\right)\frac{v}{\sqrt{|k|}\,||v||_{2}} \tag{14}\]  
\[log_{x}^{k}(y)=\frac{\cos^{-1}(k\langle x,y\rangle_{2})}{\sqrt{1-(k\langle x, y\rangle_{2})^{2}}}(y-k\langle x,y\rangle_{2}x) \tag{15}\]  
where \(\langle\cdot,\cdot\rangle_{2}\) is the standard Euclidean inner product, \(k\) is the curvature in the Riemann space, any point \(x\in\mathbb{S}^{n}\), \(y\
eq x\). The spherical distance of \(\mathbb{S}^{n}\) is expressed as follows:  
\[d_{\mathbb{S}}(x,y)=\csc^{-1}(\langle x,y\rangle) \tag{16}\]  
(4) Distance Representation in Mixed-Curvature Spaces  
As shown in Formula (3), in the mixed-curvature space \(\mathbb{P}\), for the node vector \(p,q\in\mathbb{P}\), its distance in the product space is defined as \(d_{M_{i}}(p,q)\)[9]. In other words, as shown in Formula (1), the distance \(d_{M_{i}}\) can be expressed as the square distance between two points or as the Euclidean norm \(\ell_{2}\) between two points. In addition, a simple distance representation method is introduced in some practical applications, and the geodesic method in the manifold structure is not used. For example, the distance is represented with the first-order norm \(\ell_{1}\), \(d_{\mathbb{P},\ell_{1}}(p,q)=\sum_{i=1}^{q}d_{\mathbb{S}_{i}}(p,q)+\sum_{i=1}^{ l_{k}}d_{\mathbb{E}_{i}}(p,q)+d_{\mathbb{E}}(p,q)\), where the minimum distance is \(d_{\mathbb{P},min}(p,q)=min\left\{d_{\mathbb{S}_{1}}(p,q),\cdots,d_{\mathbb{E }_{1}}(p,q),\cdots,d_{\mathbb{E}}(p,q)\right\}  
different curvatures in the mixed-curvature space \(\mathbb{P}\). Particularly, GNN is divided into single-component space learning and cross-component space learning. Single-component space learning is used to learn the event correlation graph structure in fixed-curvature space. Cross-component space learning is used to fuse node representations in multi-curvature space, and it realizes the representation of event association graphs with multiple curvatures on mixed-curvature spaces. (1) Fundamental Model  
Stereographic projection models are used to fuse constant curvature spaces such as spheres, hyperboloids, and Euclidean manifolds [11]. For ease of calculation, we use \(\kappa\)_-stereographic_ model to combine hyperbolic and spherical space. \(\kappa\)_-stereographic_ model is a smooth manifold \(\mathcal{M}_{\kappa}^{d}=\left\{x\in\mathbb{R}^{d}\middle|-\kappa\left|\left|x \right.\right|\right|_{2}^{2}<1\right\}\) generated by the Riemannian metric \(g_{x}^{\kappa}=(\lambda_{x}^{\kappa})^{2}I\), where the tensor \(x\) is a point in the space, \(k\) is the curvature of the manifold space, and the metric tensor \(\lambda_{x}^{\kappa}\) is the conformal factor, expressed as follows:  
\[exp_{x}(v)=x+v \tag{8}\]0  
Metric tensors are conformal, meaning all angles between tangent vectors in Riemann space remain constant. Computations in manifold structures usually ignore the difference between vectors caused by this angle. \(\mathcal{M}_{\kappa}^{d}\) is a three-dimensional spherical model, which is suitable for hyperbolic space when the curvature \(k<0\), and ideal for spherical space when the curvature \(k>0\).