                           Cross-City Latent Space Alignment for Consistency Region Embedding

                                                                                                                                                                                         𝐂𝐂𝐂𝐂𝐂𝐂 𝑋𝑋→𝑋𝑋
representations of all anchors in matrix form, projecting                   latent space 𝐙𝐙 𝑋𝑋                   City-Specific Pairwise Region Correlation
each anchor point Ai ∈ Rd into the region sets RX ⊂ RNX                               𝐙𝐙2𝑋𝑋
                                                                                                𝐙𝐙3𝑋𝑋   Attention-based Cross-City Correlation
                                                                              𝐙𝐙1𝑋𝑋                      𝐐𝐐𝑋𝑋                          𝐀𝐀𝐀𝐀𝐀𝐀𝐀𝐀 𝑋𝑋→𝑌𝑌
and RY ⊂ RNY in the latent spaces ZX and ZY . This is                                                                                                   𝐀𝐀𝐀𝐀𝐀𝐀𝐀𝐀 𝑋𝑋→𝑌𝑌 � 𝐀𝐀𝐀𝐀𝐀𝐀𝐀𝐀𝑌𝑌→𝑋𝑋
                                                                                                         𝐊𝐊 𝑋𝑋                                                                                            Latent
formally represented as:                                                                                         Cross-Space                                                                            Individual
                                                                                                         𝐐𝐐𝑌𝑌     Attention          𝐀𝐀𝐀𝐀𝐀𝐀𝐀𝐀𝑌𝑌→𝑋𝑋                                                      Alignment
                                                                                                                                                        𝐀𝐀𝐀𝐀𝐀𝐀𝐀𝐀𝑌𝑌→𝑋𝑋 � 𝐀𝐀𝐀𝐀𝐀𝐀𝐀𝐀 𝑋𝑋→𝑌𝑌                     Loss
                                                                                    𝐙𝐙1𝑌𝑌
                                                                                                         𝐊𝐊 𝑌𝑌
                          XT                       YT
           AX
            rel = A · Z        ,   AYrel = A · Z        ,       (7)         𝐙𝐙2𝑌𝑌

                                                                            latent space 𝐙𝐙𝒀𝒀                    City-Specific Pairwise Region Correlation
                  Na ×NX                                                                                                                                                            𝐂𝐂𝐂𝐂𝐂𝐂 𝑌𝑌→𝑌𝑌
where AX rel ∈ R           and AYrel ∈ RNa ×NY , in which
each entry quantifies the similarity between an anchor and
a region within the city. The samples in AX          Y
                                            rel and Arel are                                  Figure 4. Cross-city latent individual alignment.
rescaled to unit norm, capturing the intrinsic shape of the
data by considering only the relative angles between points.
We use the parallel common anchors as bridges and project                 from ZX to ZY and vice versa. Specifically, if we can cycle
AX          Y                                                             through ZX → ZY → ZX (or ZY → ZX → ZY ) and
  rel and Arel into a relative space based on the common
anchor set A. Each sample is represented as a function of                 ensure that the pairwise region correlations in the original
the common anchor set, computed as:                                       and cycled spaces closely match, it indicates that the cross-
                                                                          city pairwise relations among regions are well preserved.
                           T                                T
       ÂX      X      X
         rel = Arel · Arel ,       ÂYrel = AYrel · AYrel ,     (8)       This serves as strong evidence that the two latent spaces are
                                                                          further aligned at the individual level.
                   Na ×Na
where ÂX rel ∈ R          and ÂYrel ∈ RNa ×Na are also
                                                                          This process is analogous to machine translation between
rescaled to unit norm. At this stage, through two rounds of
                                                                          two languages (e.g., English to Spanish). For instance, trans-
relative representations, ÂX          Y
                            rel and Ârel are aligned within              lating words from English to Spanish and then back to En-
the same reference system.
                                                                          glish should preserve the semantic relationships between the
                                                                          original English words. If these relationships remain consis-
3.2.2. L ATENT M ANIFOLD A LIGNMENT L OSS
                                                                          tent before and after translation, we can be confident that the
For well-aligned latent spaces ZX and ZY , the difference                 translation process is reliable at the individual-word level.
between ÂX            Y
            rel and Ârel remains small, as the latent mani-              Similarly, our cross-space attention mechanism ensures that
folds of the two spaces are similar. Conversely, significant              the pairwise relationships between regions are preserved
discrepancies between the latent manifolds result in large                across cities, enhancing the alignment of individual region
differences in ÂX          Y
                  rel and Ârel . To ensure the alignment of              representations.
the latent manifolds, we minimize the difference between
                                                                          The proposed latent individual alignment method consists
ÂX           Y
  rel and Ârel and define the latent manifold alignment                  of several key steps, as illustrated in Figure 4. First, we
(LMA) loss as:
                                                                          compute city-specific pairwise region correlations to cre-
                         1                                                ate ground truth labels. Next, we employ a cross-attention
               LLMA =       ∥ÂX       Y    2
                               rel − Ârel ∥2 ,                 (9)
                        Na2                                               mechanism to generate cross-city correlation matrices from
                                                                          ZX to ZY and from ZY to ZX . Finally, we use these cross-
where ∥ · ∥2 denotes the L2 norm. This difference is solely               city pairwise correlation matrices to reconstruct intra-city
determined by the parallel common anchors in the latent                   pairwise region correlations and minimize the reconstruc-
spaces and is independent of the number of regions in each                tion differences based on the ground truth signals.
city. Moreover, the latent manifold alignment does not
rely on human-defined rules for creating anchoring pairs of               3.3.1. C ITY- SPECIFIC PAIRWISE C ORRELATIONS
region representations across cities.
                                                                          Using the region representations in the latent spaces ZX
3.3. Cross-City Latent Individual Alignment                               and ZY , we compute the intra-city pairwise region corre-
                                                                          lation matrices CorX→X ∈ RNX ×NX and CorY →Y ∈
In addition to aligning the latent manifolds of two spaces,               RNY ×NY as ground truth labels:
we aim to achieve more fine-grained alignment of individ-
ual region representations. Effective alignment should bring               CorX→X = ZX · (ZX )T ,                                     CorY →Y = ZY · (ZY )T . (10)
semantically similar regions from different cities closer to-
gether, which is crucial for cross-city knowledge transfer.
                                                                          3.3.2. ATTENTION - BASED C ROSS -C ITY PAIRWISE
To this end, we propose a self-supervised task that enhances
                                                                                 C ORRELATION
alignment from an individual perspective. The core idea
is to utilize cross-space attention mechanisms to transfer                To measure cross-city region correlations, we employ a
pairwise region correlations between the two latent spaces:               cross-attention mechanism that facilitates interaction be-

                                                                      5
