ST Data Mining / Interview Notes
Five recommended papers, compressed for interview preparation
Fast orientation

从城市数据到可解释的移动性预测From urban data to explainable mobility prediction

Use this as an interview map, not as a textbook. The target is to explain the problem, the modeling choice, the evidence, and the limitation in clear English.

页面默认中英对照;点击 EN only 隐藏中文提示,练习全英复述。Default view is bilingual. Click EN only to rehearse in English.

Core narrativeUrban computing gives the problem context. STGNNs model discrete spatial relations and temporal dynamics. SSL learns representations without many labels. CityFM adds multimodal geospatial representations. LLM agents add adaptive evidence gathering and auditability.
The 30-second map

先记住这条主线Remember this narrative

如果教授只给你一分钟,先说这段。它把五篇文章放在同一张图里。If the professor gives you one minute, use this narrative to connect all five papers.

Urban problemCities produce heterogeneous data across locations and time.城市数据来自不同位置和时间,来源多、尺度不同、关系复杂。
RepresentationChoose a graph, a continuous field, a sequence, or a multimodal embedding.根据问题选择图、连续场、序列或多模态向量表示。
LearningLearn spatial relations, temporal patterns, or both.学习空间关系、时间模式,或二者的联合依赖。
Prediction / decisionForecast a value or choose an action with evidence and uncertainty.预测数值,或基于证据和不确定性做决策。
Interview sentence: “The common theme is representation learning for structured urban data. The papers differ mainly in how they represent space and how they obtain supervision.”
共同主题是结构化城市数据的表示学习;区别主要在空间如何表示、监督信号如何获得。
Paper 1 / Zheng et al., 2014

Urban Computing: the problem setting

This paper is the conceptual foundation. It is less about one model and more about the end-to-end urban data loop.

Definition and recurrent loop

Urban computing uses data generated in cities to understand and improve city life, city operations, and the environment. It connects sensing, data management, analytics, and service provision in a recurrent loop.
Urban computing 利用城市产生的数据来理解并改善生活、城市运行和环境;它把感知、数据管理、分析和服务连接成循环。

SensingSensors, GPS, mobile networks, cameras, weather stations.传感器、GPS、移动网络、摄像头、气象站。
ManagementStore, clean, index, align, and protect heterogeneous data.存储、清洗、索引、对齐并保护异构数据。
AnalyticsMining, prediction, causal analysis, optimization.挖掘、预测、因果分析、优化。
ServicesRouting, planning, alerts, resource allocation.导航、规划、预警、资源分配。

Seven application categories

Urban planning; transportation; environment; energy; social; economy; public safety and security.

城市规划、交通、环境、能源、社会、经济、公共安全。

Four methodology families

Urban sensing; urban data management; knowledge fusion across heterogeneous data; urban data visualization.

城市感知、数据管理、异构知识融合、数据可视化。

Key challenge: Urban data is not i.i.d. in the ordinary sense. It has spatial dependence, temporal dependence, missingness, noise, privacy constraints, and heterogeneous semantics.
城市数据通常不满足简单的独立同分布假设:它有空间依赖、时间依赖、缺失、噪声、隐私和异构语义。

What to say if asked for an example: “A traffic sensor is not an isolated time series. Its value is influenced by nearby roads, upstream flow, weather, incidents, time of day, and policy.”

Paper 2 / Jin et al., 2023

Spatio-Temporal Graph Neural Networks

STGNN combines a graph learner for space with a temporal learner for sequence dynamics. It is a strong baseline language for urban forecasting interviews.

Problem representation

At time t, a graph can be written as G_t = (V, E_t, A_t), where V are locations or entities, E_t are edges, and A_t is the adjacency matrix. Node features are X_t in R^(N x F).
在时刻 t,图可写为 G_t=(V,E_t,A_t):V 是位置或实体,E_t 是边,A_t 是邻接矩阵;节点特征 X_t 的形状通常为 N x F。

historical X[t-T'+1 : t], graph G -> future X[t+1 : t+T]

The graph may be static or dynamic, directed or undirected, weighted or unweighted. The choice should follow the data and the task.
图可以静态或动态、有向或无向、加权或不加权,选择取决于数据和任务。

How to construct the graph

Topology-based

Use known connectivity, such as road links. Usually sparse and often static.
利用道路连接等已知拓扑,通常稀疏且相对静态。

Distance-based

Connect nearby locations with a kernel such as a Gaussian RBF; a threshold controls sparsity.
用距离核函数(如高斯 RBF)连接邻近位置,阈值控制稀疏度。

Similarity-based

Connect locations with similar time series or POI profiles; Pearson correlation and DTW are common.
连接时间序列或 POI 属性相似的位置;常见方法有 Pearson 相关和 DTW。

Interaction-based

Use flows between locations, for example the proportion of trips from i to j.
利用位置之间的流量,例如 i 到 j 的出行比例。

Adaptive graph learning: Predefined graphs miss hidden or changing relations. A model can learn node embeddings and derive an adjacency matrix, or generate it from current features / hidden states.
预定义图可能漏掉隐含或变化的关系;模型可以学习节点向量生成邻接矩阵,也可以从当前特征或隐藏状态动态生成。

Three modules in a typical STGNN

DPM: Data Processing ModuleBuild graphs, align timestamps, normalize features, create input windows.建图、对齐时间、归一化、切分输入窗口。
STGLM: ST Graph LearningExtract spatial and temporal dependencies.提取时空依赖,是模型核心。
TPM: Task-aware PredictionMap hidden states to flow, speed, demand, AQI, or another target.把隐藏表示映射为流量、速度、需求、AQI 等目标。

Basic building blocks

ComponentIntuitionInterview wording
GCN / message passingAggregate a node's neighbors using A and learnable weights.“A graph convolution propagates information along the relational structure.”
GATLearn different attention weights for different neighbors.“Attention lets the model distinguish important neighbors from less relevant ones.”
GRU / LSTMRecursive memory with gates; handles sequential dependence.“GRU balances the new observation with the previous hidden state.”
TCNCausal 1-D convolution; dilation expands the receptive field.“A dilated causal TCN captures multi-scale history without looking into the future.”
Self-attentionQueries attend to keys and aggregate values; positional encoding preserves order.“Self-attention can connect distant time steps, but it needs positional information.”

Fusion and improved variants

Factorized vs coupled

Factorized models stack spatial and temporal blocks (e.g., STGCN). Coupled models embed graph convolution inside a recurrent unit (e.g., DCRNN).
Factorized 把空间和时间模块串联或并联;coupled 把图卷积嵌进循环单元。

Joint spatio-temporal graph

Connect spatial neighbors and the same location across adjacent times in one graph (e.g., STSGCN).
在统一图中同时连接空间邻居和相邻时间的同一位置。

Multi-scale / granularity

Learn short-term closeness, daily or weekly periodicity, and long-term trend separately, then fuse them.
分别学习短期 closeness、日/周周期和长期 trend,再融合。

Heterogeneous learning

Treat different edge or node types differently, such as distance edges versus mobility-flow edges.
区分不同节点或边类型,如距离边和流动边。

Advanced techniques to recognize

adversarial learningmeta learningself-supervised learningNeural ODE/CDEphysics-informed learningtransfer learningNAS

You do not need to derive each one. Know the purpose: improve realism, adapt to heterogeneity, learn from unlabeled data, model continuous dynamics, enforce domain rules, transfer across cities, or automate architecture design.
不必推导每个方法;记住它们各自解决什么问题:真实性、异质性、无标签学习、连续动态、物理约束、跨城市迁移和自动架构设计。

STGNN limitations and future directions

Interpretability
Which space-time features drive the prediction?哪些时空特征真正驱动了预测?
Calibration
Can a manager trust the confidence score?置信度是否可靠?
Physical constraints
Do outputs obey domain laws?输出是否符合物理或领域规律?
Pre-training
Can representations transfer to new tasks?表示能否迁移到新任务?
Distribution shift
Will a model trained in one period or city generalize?换时间段或城市后还能泛化吗?
Scalability
Can it handle tens of thousands of locations efficiently?大规模节点下是否高效?
Paper 3 / Zhang et al., 2023

Self-Supervised Learning for Time Series

The interview-level idea: create supervision from the data itself, learn a reusable representation, then fine-tune with fewer labels.

Why SSL for time series?

Labels for forecasting, anomaly detection, or classification can be expensive. SSL pre-trains on abundant unlabeled sequences and transfers the encoder to downstream tasks.
预测、异常检测、分类的标签可能昂贵;SSL 先用大量无标签序列预训练,再把编码器迁移到下游任务。

unlabeled series -> pretext task -> representation encoder -> small labeled set -> downstream model

A pretext task is not necessarily the final task. It is a proxy objective that forces the representation to preserve useful temporal structure.
pretext task 不一定是最终任务,而是迫使表示保留有用时间结构的代理目标。

Taxonomy

Generative-based

Autoregressive forecasting: predict future window from history.
Autoencoder reconstruction: encode and reconstruct the input; denoising and masking are common.
Diffusion generation: add noise and learn a reverse denoising process.

生成式:用历史预测未来、重构输入、或通过扩散反向去噪生成。

Contrastive-based

Construct positive and negative views, pull positives together, push negatives apart. Five categories in the survey: sampling, prediction, augmentation, prototype, and expert-knowledge contrast.

对比式:构造正负样本,正样本靠近、负样本远离;五类是 sampling、prediction、augmentation、prototype、expert knowledge。

Adversarial-based

A generator creates synthetic or perturbed sequences; a discriminator distinguishes real from generated, or adversarial loss enhances representations.

对抗式:生成器产生样本,判别器区分真假,或用对抗损失增强表示。

Contrastive learning pipeline

1. Views / pairsUse augmentation, temporal proximity, multiple sensors, or local-global views.通过增强、时间邻近、多传感器或局部-全局视图构造样本。
2. Pretext taskDefine what should be similar or predictable.定义哪些样本应相似、哪些信息可预测。
3. EncoderUse end-to-end, momentum encoder, memory bank, or clustering architecture.使用端到端、动量编码器、memory bank 或聚类架构。
4. LossCosine, margin, triplet, NCE / InfoNCE, or mutual-information objectives.使用余弦、margin、triplet、NCE/InfoNCE 或互信息目标。
Most important caveat: The quality of SSL depends heavily on the positive/negative construction. A false negative or a temporal leak can teach the wrong invariance.
最重要的风险是正负样本构造:错误负样本或时间泄漏会让模型学到错误的不变性。

Time-series-specific augmentations

Noise injection, window slicing, window warping, masking, time-step masking, segment masking, and variable-wise masking.
常见增强包括加噪、窗口切片、窗口变形、mask;mask 又可按时间点、片段或变量进行。

How to discuss evaluation

TaskQuestionTypical metrics
ForecastingHow close is the future window?MAE, RMSE, MAPE
ClassificationCan the representation separate classes?Accuracy, F1, AUROC
Anomaly detectionCan it identify unusual points or sequences?Precision, recall, F1, delay-aware metrics
ClusteringDoes the embedding reveal meaningful groups?Adjusted Rand Index, NMI, silhouette
Interview sentence: “For spatio-temporal data, I would be careful that augmentations preserve the semantics of time and space. For example, arbitrary shuffling may destroy causality, while masking a short segment can be a realistic pretext task.”
时空数据的增强必须保留时间和空间语义;任意打乱可能破坏因果,短片段 mask 更符合真实缺失。
Paper 4 / Li et al., 2025

Urban Computing in the Era of LLMs

Treat this as a bridge from classic urban models to foundation models and agents.

Why LLMs are attractive

Traditional urban models can be accurate but task-specific, difficult to generalize, and often opaque. LLMs can process text and multimodal context, retrieve external knowledge, explain decisions, and decompose tasks.
传统模型可能准确但任务专用、泛化有限且不透明;LLM 能处理文本和多模态上下文、检索外部知识、解释决策并分解任务。

Five functional roles

Encoder

Turn urban data into representations, often through tokenization and fine-tuning.

把城市数据编码成向量表示。

Predictor

Map context to forecasts or decisions.

直接输出预测或决策。

Enhancer

Improve an existing model with semantic reasoning, missing-data handling, or recommendations.

增强现有模型的语义理解、补全或建议能力。

Assistant

Answer questions, summarize reports, and support experts.

回答问题、总结报告、辅助专家。

Agent

Plan, retrieve, call APIs/tools, evaluate results, and iterate.

规划、检索、调用工具、评估结果并迭代。

agent loop: plan -> retrieve / call tools -> execute -> evaluate -> revise -> answer

Core implementation concepts

Tokenization / alignment

Numeric or spatial data must be converted into tokens or embeddings that an LLM can consume. Alignment determines whether the LLM receives meaningful signal or just a text wrapper.
数值或空间数据要转成 LLM 能处理的 token/embedding;关键是对齐是否真的保留了信号,而不是简单套一层文本。

RAG / GraphRAG

Retrieve relevant external facts before generation. GraphRAG uses entity relations for multi-hop context and can reduce hallucination.
生成前检索外部事实;GraphRAG 利用实体关系做多跳检索,降低幻觉。

LoRA / PEFT

Fine-tune a small set of parameters or low-rank adapters instead of the entire LLM.
只训练少量参数或低秩 adapter,降低微调成本。

Efficiency and trust

Pruning, quantization, distillation, caching, selective computation, uncertainty, and human-in-the-loop review matter for deployment.
部署时要考虑剪枝、量化、蒸馏、缓存、选择性计算、不确定性和人工复核。

LLMs and human mobility

A trajectory can be represented as a sequence of (location, timestamp) pairs. Next-location prediction is a conditional generation problem: given history H, context C, and knowledge K, predict the next spatial unit.
轨迹可表示为 (location, timestamp) 序列;下一位置预测可以看作条件生成:给定历史 H、上下文 C 和知识 K,预测下一空间单元。

f(H, C, K) -> (location[k+1], time[k+1], ...)
Caveat: An LLM does not magically know coordinates. Semantic descriptions, retrieval, spatial encoders, and tool outputs must ground it in geography.
LLM 不会自动拥有准确坐标知识;必须用语义描述、检索、空间编码和工具输出把它落到地理空间。

Future issues likely to be asked

generalizationinterpretabilitycomputational costprivacy / securityhallucinationreal-time planningmultimodal fusion

Paper 5 / Balsebre et al., CIKM 2024

CityFM: foundation representations from OSM

This is the cleanest example of self-supervised, multimodal geospatial representation learning.

Why OSM is difficult

Geospatial data is heterogeneous: nodes are points, ways are polylines or polygons, and relations connect entities. Each object may also have sparse key-value tags, a location, a shape, and nearby context.
地理数据很异构:node 是点,way 是线或面,relation 连接实体;对象还可能有稀疏的 key-value 标签、位置、形状和邻域上下文。

Node

Point with coordinates; often a POI.

带坐标的点,常表示 POI。

Way

Ordered nodes forming a road polyline or a building polygon.

有序节点组成道路线或建筑面。

Relation

Members that represent a complex object, such as a bus route.

成员集合表示复杂对象,如公交线路。

CityFM pretraining objectives

Text-text contrastBERT encodes tags; entities in the same road context are positives; other contexts in the batch are negatives.BERT 编码标签;同一道路上下文中的实体为正样本,batch 中其他上下文为负样本。
Vision-language contrastRasterized polygon shape and area are aligned with the textual functionality of a building.把多边形栅格化后的形状、面积与建筑功能文本对齐。
Road-context contrastRoad segments with similar public-transport link weights are pulled together.公共交通关系权重相近的道路段在向量空间中靠近。
L_pretrain = L_NCE_text + L_NCE_visual + L_NCE_road

The intuition is mutual-information maximization: different views of the same entity should agree in representation space.
核心直觉是最大化互信息:同一实体的不同视图在表示空间中应该一致。

Location encoding

CityFM uses a fixed sinusoidal encoding of latitude and longitude with multiple frequencies. The frequencies represent position at different granularities, and the parameters do not need to be learned.
CityFM 用多频率正弦编码经纬度;多频率对应不同空间粒度,位置编码参数不必训练。

Frozen embeddings and downstream tasks

After pretraining, the encoder is frozen and its embeddings are used for road traffic-speed inference, building-functionality classification, and population-density estimation. The reported results are superior to or on par with task-specific baselines.
预训练后冻结编码器,用 embedding 做道路速度推断、建筑功能分类和人口密度估计;结果优于或不弱于任务专用基线。

What this teaches: A foundation model is not defined only by size. The important idea is reusable representations learned from broad, mostly unlabeled data and transferred across downstream tasks.
Foundation model 不只意味着模型很大;关键是从广泛、主要无标签的数据学习可复用表示,并迁移到多个下游任务。

Limitations to mention

Cross-paper synthesis

把五篇文章连成你的回答Connect the five papers

QuestionAnswer mapEnglish line
How to represent space?Graph: discrete relations; field: continuous coordinates; CityFM: multimodal entity embeddings.“The representation should match the geometry and the available supervision.”
How to learn with little labels?Time-series SSL and CityFM create proxy objectives from unlabeled data.“Self-supervision turns structure in the data into a training signal.”
How to handle time?RNN/TCN/attention model temporal dependence; multi-granularity separates closeness, periodicity, and trend.“Temporal inductive bias is useful, but it must not leak future information.”
How to improve transfer?Pretraining, adaptive graphs, meta-learning, foundation representations, and careful domain adaptation.“Transfer is difficult because both spatial topology and temporal distributions can change.”
How to improve trust?Calibration, uncertainty, physical constraints, RAG, audit traces, and human review.“Accuracy is necessary, but deployment also needs calibrated confidence and an audit trail.”
How does AgentMob fit?It uses compact behavioral/geographical evidence and an LLM controller to allocate reasoning by difficulty.“The LLM is a controller for evidence gathering, not merely a black-box predictor.”

A safe 45-second synthesis

“The papers address different layers of the same urban intelligence problem. Urban computing defines the sensing-to-service loop. STGNNs model discrete spatial relations and temporal dynamics, while the field-based view in my air-quality work models continuous coordinates. Self-supervised learning and CityFM reduce dependence on labels by learning reusable representations from time-series or OpenStreetMap structure. More recent LLM work adds semantic reasoning and tool use, but it also introduces concerns about grounding, cost, privacy, and calibration. I see my mobility-agent project as an evidence-grounded decision layer on top of these representation-learning ideas.”

这段适合面试中总结五篇文章并自然引到你的项目。

Last-minute checklist

面试前必须能说出来What you must be able to say

Define spatial-temporal data in one sentence.
Explain G_t = (V, E_t, A_t) and X_t.
Name four graph-construction strategies.
Explain GCN vs GAT in plain English.
Explain why causal TCN prevents leakage.
Explain positive / negative pairs in contrastive learning.
Name the three SSL families.
Explain CityFM's three contrastive objectives.
Explain why an LLM needs grounding for geography.
State one strength and one limitation of STGNNs.
State one strength and one limitation of AgentMob.
Distinguish Acc@1, MRR@5, and geographic distance.