                             Cross-City Latent Space Alignment for Consistency Region Embedding

  an aligned latent space.                                           et al., 2024). To this end, we first construct a base region
                                                                     embedding model for an individual city. This model cap-
• We achieve cross-city alignment of latent spaces through           tures human mobility patterns between regions and derives
  two interdependent pathways: latent manifold alignment             latent region representations using a self-supervised graph
  and latent individual alignment, addressing both global            embedding approach.
  and individual perspectives. Our method accounts for
  the complex interplay between cities without relying on            3.1.1. M OBILITY G RAPH C ONSTRUCTION
  explicit anchoring pairs of region representations across
  cities based on human-crafted rules.                               Given a human mobility dataset M = {m1 , m2 , · · · },
                                                                     where each trip mi = (ro , rd ) represents a movement
• We conduct comprehensive experiments across three                  from an origin region ro to a destination region rd , we
  downstream tasks using datasets from three cities. The             construct a mobility graph G = {V, E} for each city. Here,
  results clearly show the advantages of CoRE over base-             V = {ri }N  i=1 represents the N regions as nodes, and the
  line methods. Data and source codes are available at:              edge weights E = {wij }N   i,j=1 are derived from M. Specifi-
  https://github.com/AIMUrban/CoRE.                                  cally, the transition frequency (edge weight) from region ri
                                                                     to region rj is calculated as:
2. PROBLEM FORMULATION
                                                                                                        N
                                                                                                        X
Definition 2.1 (Urban Region). A city is divided into n                        wij = count(ri → rj )/        count(ri → rk ),         (1)
disjoint urban regions R = {r1 , r2 , . . . , rn }, where each                                         k=1

region ri is defined by a set of boundary points specified by        where count(ri → rj ) denotes the number of trips from
their latitude and longitude coordinates.                            ri to rj . This normalization ensures that each edge weight
Definition 2.2 (Region Representations). For a region riX            reflects the proportion of trips from a given origin to each
in city X, its representation is encoded as a d-dimensional          possible destination. Using this approach, we construct two
vector ZXi . The representations of all regions in city X are        separate mobility graphs, G X and G Y , for cities X and Y ,
collectively represented as a (NX × d) matrix ZX , where             respectively.
NX denotes the number of regions in the city.
Definition 2.3 (Consistency Region Embedding across                  3.1.2. G RAPH E MBEDDING
Cities). Our objective is to generate compatible region rep-         Based on the mobility graph G, we employ a graph attention
resentations for cities X and Y by aligning their latent             network (GAT) (Veličković et al., 2017) to learn the latent
spaces. This alignment ensures that semantically similar             representation of each node (region). The input vectors for
regions from both cities are positioned closely within the           the N regions are initialized as {Ei ∈ R1×d }Ni=1 . The GAT
shared latent space. Achieving consistent region embedding           layer computes the feature representation Zi ∈ R1×d for
for cities X and Y makes their representations compatible            region ri as follows:
and comparable. Thus, downstream task predictors trained
with region representations in city X, where ample ground                            H
                                                                                   1 X ′(h)       ′(h)
                                                                                                              X        (h)
truth data is available, can be directly applied to make accu-              Zi =      Zi ,      Zi       =            αij Ej W(h) ,
                                                                                   H
rate predictions in city Y .                                                        h=1                      rj ∈Ni

                                                                                     (h)        (h)
                                                                                                         X             (h)
                                                                                    αij = exp(sij )/           exp(sik ),             (2)
3. Method                                                                                             rk ∈Ni

In this section, we first introduce the base region embedding         (h)
                                                                     sij = LeakyReLU([Ei W(h) ∥Ej W(h) ∥wij We(h) ]·a(h)T ),
model, which independently learns region representations
for each city. We then propose a cross-city latent manifold          where W(h) ∈ Rd×d , We(h) ∈ R1×d , and a(h) ∈ R1×3d
alignment component designed to align the data manifolds             are learnable parameters of the h-th attention head, H is the
of two latent spaces without requiring external supervision.         number of attention heads, ∥ denotes concatenation, and Ni
Finally, we present a cross-city latent individual alignment         represents the neighbors of region ri .
component that enhances fine-grained alignment of individ-
ual region representations through a self-supervised task.           3.1.3. I NTRA -C ITY R EGION E MBEDDING L OSS
                                                                     To effectively learn region representations, we utilize a self-
3.1. Base Region Embedding Model
                                                                     supervised task that reconstructs mobility patterns among
Human mobility within a city reflects the relationships be-          regions within an individual city. Specifically, we predict
tween its different regions, making it a popular data source         the destination region rj given ri using the region represen-
for learning region representations (Yao et al., 2018; Liu           tations Z. For a specific region ri , the distribution of the

                                                                 3
