                                            Cross-City Latent Space Alignment for Consistency Region Embedding

                                                                                     first relative space 𝐀𝐀X𝑟𝑟𝑟𝑟𝑟𝑟                                                            second relative space 𝐀𝐀�X𝑟𝑟𝑟𝑟𝑟𝑟
          latent space 𝐙𝐙X                 relative representation                                                                relative representation
                                                                                           based on 𝐙𝐙X                             𝐀𝐀X𝑟𝑟𝑟𝑟𝑟𝑟 1    𝐀𝐀X𝑟𝑟𝑟𝑟𝑟𝑟 2   𝐀𝐀X𝑟𝑟𝑟𝑟𝑟𝑟 3        based on 𝐀𝐀X𝑟𝑟𝑟𝑟𝑟𝑟
                                             𝐙𝐙1X          𝐙𝐙2X          𝐙𝐙3X
             𝐙𝐙2X                     𝐀𝐀1 sim( , ) sim( , ) sim( , )                                                   𝐀𝐀X𝑟𝑟𝑟𝑟𝑟𝑟 1 sim( , ) sim( , ) sim( , )
                             𝐙𝐙3X
                      𝐀𝐀2             𝐀𝐀2 sim( , ) sim( , ) sim( , )                                                   𝐀𝐀X𝑟𝑟𝑟𝑟𝑟𝑟 2 sim( , ) sim( , ) sim( , )
     𝐙𝐙1X      𝐀𝐀3
                      𝐀𝐀1             𝐀𝐀3 sim( , ) sim( , ) sim( , )                                                   𝐀𝐀X𝑟𝑟𝑟𝑟𝑟𝑟 3 sim( , ) sim( , ) sim( , )
                                                                                                                                                                                                                     Latent
                                                                                                                                                                                                                   Manifold
                                                                                                                                                                                                                   Alignment
                                                    𝐙𝐙1Y          𝐙𝐙2Y                                                              𝐀𝐀Y𝑟𝑟𝑟𝑟𝑟𝑟 1    𝐀𝐀Y𝑟𝑟𝑟𝑟𝑟𝑟 2   𝐀𝐀Y𝑟𝑟𝑟𝑟𝑟𝑟 3                                          Loss
                                                                                                                         Y
            𝐙𝐙1Y                           𝐀𝐀1 sim( , ) sim( , )                                                       𝐀𝐀𝑟𝑟𝑟𝑟𝑟𝑟 1 sim( , )        sim( , ) sim( , )
                      𝐀𝐀2                  𝐀𝐀2 sim( , ) sim( , )                                                       𝐀𝐀Y𝑟𝑟𝑟𝑟𝑟𝑟 2 sim( , ) sim( , ) sim( , )
   𝐙𝐙2Y        𝐀𝐀3
                                           𝐀𝐀3 sim( , ) sim( , )                                                       𝐀𝐀Y𝑟𝑟𝑟𝑟𝑟𝑟 3 sim( , ) sim( , ) sim( , )
                      𝐀𝐀1
                                                                                     first relative space 𝐀𝐀Y𝑟𝑟𝑟𝑟𝑟𝑟                                                            second relative space 𝐀𝐀 �Y𝑟𝑟𝑟𝑟𝑟𝑟
          latent space 𝐙𝐙Y                 relative representation                                                                relative representation
                                                                                            based on 𝐙𝐙Y                                                                             based on 𝐀𝐀Y𝑟𝑟𝑟𝑟𝑟𝑟
             virtual parallel common anchors                                    data points in latent space 𝐙𝐙X                            data points in latent space 𝐙𝐙Y


Figure 3. The framework of cross-city latent manifold alignment. Three common anchors A1 , A2 , and A3 (colored dots) are randomly
generated in both latent spaces. For a given anchor Ai , we compute its similarity w.r.t. the region representations on the data manifold of
ZX and ZY , yielding vectors (AX              Y
                                  reli and Areli ) of dimensionality 3 and 2, respectively. Each dimension is treated as coefficients in a
coordinate system defined by all region representations, which are orthogonal in this example only for visualization purposes. Similarly,
we compute the second relative representations ÂX        Y          X     Y
                                                   rel /Ârel w.r.t.Arel /Arel , which are now in the same coordinate system. Finally, we
                                     X          Y
minimize the difference between Ârel and Ârel to ensure the alignment of the latent manifolds of ZX and ZY .


destination region rj is computed as:                                                                                 3.2.1. R ELATIVE R EPRESENTATIONS OF PARALLEL
                                                                                                                             C OMMON A NCHORS
                                                           N
                                                           X
            p̂ (rj | ri ) = exp(Zi · Zj T )/                        exp(Zi · Zk T ).                  (3)         Due to the varying number of data points (regions) in each
                                                           k=1                                                    latent space, directly measuring the similarity between the
                                                                                                                  data manifolds of two latent spaces is challenging. To ad-
Using the human mobility data M, we define the intra-city                                                         dress this, we propose using Na randomly generated virtual
region embedding (RE) loss as:                                                                                    parallel anchor points, A ∈ RNa ×d , which remain con-
                                                                                                                  sistent across the latent spaces of different cities. These
                                     1
                     LRE = −
                                             X
                                                            log p̂ (rj | ri ) .                       (4)         anchors serve as bridges for comparison, where Na is the
                                    |M|
                                          (ri ,rj )∈M                                                             number of anchors, and their dimensionality matches that
                                                                                                                  of the region representations.
This approach reconstructs actual mobility patterns based
                                                                                                                  To represent the manifold of the latent space using these
on the graph structure, enabling us to derive the region
                                                                                                                  anchors, we adopt the concept of relative representations
representations ZX and ZY for both cities.
                                                                                                                  (Moschella et al., 2023). Specifically, each anchor is rep-
                                                                                                                  resented relative to all region representations in the la-
3.2. Cross-City Latent Manifold Alignment
                                                                                                                  tent space. We define a generic similarity function sim :
The region embedding model in Section 3.1 generates city-                                                         Rd × Rd → R to capture the relationship between the an-
specific region representations in distinct latent spaces.                                                        chors and the region representations, yielding a scalar score
Aligning these separate latent spaces for cross-city com-                                                         Arelij = sim(Ai , Zj ) for two absolute representations Ai
parison poses significant challenges, particularly due to the                                                     and Zj . Given the region representations ZX              X
                                                                                                                                                               1 , · · · , ZNX in
                                                                                                                                    X
absence of labeled paired data or correspondence annota-                                                          the latent space Z , the relative representation of Ai is
tions, as well as the differing numbers of regions across
                                                                                                                                      AX                 X                      X
                                                                                                                                       reli = (sim(Ai , Z1 ), · · · , sim(Ai , ZNX )),                                         (5)
cities. To address these challenges, we propose a cross-city
latent manifold alignment method. This method leverages                                                           where cosine similarity is chosen as the similarity function
the relative representations of virtual common anchors as                                                         due to its invariance to angle-preserving transformations.
a shared reference system for both cities. By replacing the                                                       Similarly, the relative representation of Ai with respect to
original absolute representations with a relative reference                                                       the latent space ZY is computed as:
system, defined by the similarity between region representa-
tions and common anchor points, we ensure that the region                                                                             AYreli = (sim(Ai , ZY1 ), · · · , sim(Ai , ZYNY )).                                      (6)
representations of both cities are learned within a unified
reference framework (see Figure 3).                                                                               Based on Equations (5) and (6), we compute the relative

                                                                                                             4
