Source-linked AI summary
Deep Gravity: enhancing mobility flows generation with deep neural networks and geographic information
Filippo Simini, Gianni Barlacchi, Massimiliano Luca, Luca Pappalardo
TL;DR
Mobility flows must often be generated where historical flow data are unavailable, yet such flows affect important societal processes. Deep Gravity combines voluntary geographic data with deep neural networks to model nonlinear relationships, improving realism over classic and simpler alternatives across England, Italy, and New York State, particularly in densely populated regions, while enabling geographic interpretation. The paper notes that its explainability analysis relies on agnostic techniques and calls for more sophisticated approaches.
Problem
Generating mobility flows without historical data is important but challenging, and deep learning’s ability to do so remains barely explored.
Method
Deep Gravity uses geographic features, explainable AI, and a deep neural network to generate and interpret mobility flows.
Results
66% (Italy), 246% (England), and 1076% (New York State) relative realism improvements over the classic gravity model are reported.
Takeaways & Limitations
Deep Gravity generalizes to geographically disjoint areas and improves especially in highly populated regions.
Takeaways & Limitations
The explainability analysis uses agnostic techniques, motivating the need for more sophisticated approaches.
Abstract
from arXiv · showhide
The movements of individuals within and among cities influence critical aspects of our society, such as well-being, the spreading of epidemics, and the quality of the environment. When information about mobility flows is not available for a particular region of interest, we must rely on mathematical models to generate them. In this work, we propose the Deep Gravity model, an effective method to generate flow probabilities that exploits many variables (e.g., land use, road network, transport, food, health facilities) extracted from voluntary geographic data, and uses deep neural networks to discover non-linear relationships between those variables and mobility flows. Our experiments, conducted on mobility flows in England, Italy, and New York State, show that Deep Gravity has good geographic generalization capability, achieving a significant increase in performance (especially in densely populated regions of interest) with respect to the classic gravity model and models that do not use deep neural networks or geographic data. We also show how flows generated by Deep Gravity may be explained in terms of the geographic features using explainable AI techniques.
graphic data. Deep Gravity has good generalization capability, generating realistic flows also
Deep Gravity supports explaining generated flows through geographic features and extends flow generation to areas without training data.
- Deep Gravity generates flows for geographic areas without available training data.
- Its geographic generalization capability supports application beyond the areas used for training.
- The model’s generated flows may be explained using geographic features.
highlight crucial differences among the three considered countries interpreting the model’s
The paper uses explainable AI to interpret flow predictions through geographic features, including country-specific contributions.
- Explainable AI techniques are used to analyze Deep Gravity’s flow predictions.
- The analysis interprets predictions in terms of geographic features.
- The approach provides prediction explanations rather than only flow estimates.
Introduction
Flow generation estimates mobility between locations without historical flows, a challenging task because conventional gravity models use limited geographic information. Deep Gravity combines rich OpenStreetMap features with nonlinear neural networks and improves realism across three regions, especially in densely populated areas, while supporting geographic generalization and explainability.
- Introduction: Mobility-flow modeling matters for understanding congestion, migration, epidemics, and other spatial processes.
- Introduction: Flow generation estimates movements between locations from demographic and geographic characteristics without historical flow information.
- Introduction: The gravity model assumes flows increase with population and decrease with distance.
- Introduction: Its limited variables cannot capture real-flow structure and variability or essential geographic complexity.
- Introduction: Deep learning flow prediction methods rely on historical flows and therefore cannot generate flows where such histories are unavailable.
- Introduction: Deep Gravity trains a deep neural network on OpenStreetMap features covering land use, roads, transport, food, health, education, and retail.
- Introduction: 66% (Italy), 246% (England), and 1076% (New York State) relative realism improvements are reported over the classic gravity model.
- Introduction: Deep Gravity generalizes to geographically disjoint areas and improves especially in highly populated regions.
Results
The paper defines mobility-flow generation over tessellated geographic regions, estimating flows between locations from origin outflows and destination probabilities. Performance is evaluated by comparing generated and real flows with CPC and complementary distributional metrics.
- Problem setup: A region of interest is tessellated into finite, non-overlapping polygons whose union covers the territory.
- Problem setup: The flow y(li, lj) counts people moving from origin li to destination lj per unit time, while Oi is the total outflow from li.
- Problem setup: The task estimates flows between all locations using total outflows, without using flows within the target region or historical flows from that region.
- Evaluation: CPC measures similarity between real and generated flows on a 0–1 scale, with 1 indicating a perfect match and 0 indicating no overlap.
- Evaluation: When generated and real total outflows match, CPC equals the fraction of trips whose destinations are correctly predicted.
- Evaluation: Pearson correlation, NRMSE, and JSD additionally measure linear correlation, error, and dissimilarity between real and generated-flow distributions.
Derivation of Deep Gravity.
Deep Gravity is derived by interpreting flow generation as destination classification and extending the gravity model’s shallow linear formulation with hidden layers, nonlinearities, and geographic features.
- Deep Gravity derivation: The gravity model is equivalent to a shallow neural network with a single linear layer, while Deep Gravity adds hidden layers and nonlinearities.
- Deep Gravity derivation: Deep Gravity also incorporates additional geographical features, extending beyond the gravity model’s two explanatory variables.
- Gravity-model interpretation: The gravity model assigns destination probabilities using population and distance, with distance represented by exponential or power-law deterrence functions.
- Classification formulation: Flow generation can be formulated as classification, where each trip from an origin is assigned to its actual destination among all locations.
- Classification formulation: For each origin, the model predicts a probability for every possible destination, then multiplies those probabilities by the origin’s total outflow to obtain average flows.
Architecture of Deep Gravity.
Deep Gravity feeds origin, destination, and distance features through a shared feed-forward network, converts destination scores into probabilities, and rescales them by origin outflows to generate flows.
- Inputs and outputs: Each origin–destination pair is represented by concatenating the origin vector, destination vector, and geographic distance.
- Network: The network processes candidate destinations in parallel through the same feed-forward neural network and produces one scalar score per pair.
- Network: Scores are transformed by softmax into positive destination probabilities that sum to one, with higher scores yielding higher trip probabilities.
- Inputs and outputs: Generated flows are obtained by multiplying destination probabilities by the origin’s total outflow.
- Geographic features: Location vectors encode population and OpenStreetMap features covering land use, roads, transport, food, health, education, and retail facilities.
- Geographic features: The standard model describes each flow with 39 features, while light and heavy variants alter feature aggregation and achieve comparable or worse performance.
- Training: Deep Gravity is trained with cross-entropy, treating normalized observed flows as targets and assuming flows from different origins are independent.
Experiments.
Across England, Italy, and New York State, Deep Gravity consistently outperforms the gravity and hybrid baselines, generalizes to geographic areas without training data, and performs especially well in densely populated regions.
- Overall results: England’s DG achieves CPC = 0.32, improving 39% over MFG, 166% over NG, and 190% over G.
- Overall results: DG improves global CPC over G by 66% in Italy and 1076% in New York State.
- Population effects: DG’s relative improvement over G increases with population in all countries because its performance degrades less in highly populated regions.
- Overall results: DG has the best performance in all three countries, while G has the worst and NG and MFG have intermediate performance.
- Generalization: DG and LDG generate flow probabilities for geographic areas with no training-data availability, demonstrating geographic generalization.
- Feature explanations: Geographic distance generally lowers flow probability while short distances increase it; destination population is especially relevant in Italy and New York State.
- Feature explanations: In England, population has a mixed effect, while food, retail, industrial, health, and commercial geographic features contribute differently to predicted commuter attraction.
- Feature explanations: In Italy and New York State, population and distance dominate, explaining why NG outperforms MFG there while nonlinear population–distance relationships remain predictive.
Discussion
Deep Gravity improves mobility-flow generation, particularly in densely populated regions, by combining deep neural networks with voluntary geographic information. Its explanations reveal that geographic information and non-linearity contribute differently across countries, while several transferability and explainability questions remain open.
- Deep Gravity significantly improves on models without geographic information, non-linearity, or deep neural networks.
- Deep Gravity improves most where many relevant destinations make flow prediction harder, suggesting stronger gains where existing models are unrealistic.
- Deep Gravity still outperforms its competitors when using a smaller region of interest.
- The combination of deep neural networks and voluntary geographic information significantly boosts mobility-flow realism.
- Geographic information matters most in England, whereas non-linearity predominates in Italy and New York State.
- The study calls for more sophisticated mobility-specific explanations and further testing of transferability across spatial scales and settings.
Methods
The study partitions geographic regions into tessellated locations, combines mobility and population data with OpenStreetMap features, and uses SHAP to explain predictions. Experiments span England, Italy, and New York State using census-based spatial units and region-of-interest splits.
- Regions of interest: Regions of interest are represented with square tessellations covering England, Italy, and New York State.
- Experimental split: England’s regions are randomly split into training and testing sets with stratification by population decile.
- Locations: Locations are census polygons whose centroids fall within each region of interest, using OAs, CAs, or CTs depending on the country.
- Location features: OpenStreetMap supplies 18 geographic features for origins and destinations, including points of interest, streets, railways, land use, and buildings.
- Location features: Population is included as an input feature using census residents or estimated residents derived from outgoing flows.
- Mobility flows: Mobility data consist of within-region commuting flows from censuses in England and Italy and flow data between New York State census tracts.
- SHAP explanations: SHAP provides global and local explanations by measuring feature contributions to predictions relative to the dataset-average prediction.
Data Availability
The paper identifies publicly available sources for the commuting and flow datasets used in England, Italy, and New York State.
- England commuting and boundary data are freely available through the UK Data Service Census guides.
- Italy commuting data are freely available through ISTAT’s open-data and archive sites.
- New York State flow data are freely available through the GeoDS COVID19USFlows repository and described in Kang et al. 75.
England
Deep Gravity significantly outperforms gravity and competing models across England’s geographic evaluations, with especially large gains for densely populated regions. Its predictions can also be interpreted through geographic features and SHAP values.
- The evaluation uses five independent experiments, population-stratified training on 50% of tiles, and CPC, Pearson correlation, NRMSE, and JSD metrics.
- DG’s relative improvement over G increases with the population of the region of interest.
- 246% is DG’s approximate improvement over G for England’s most populous regions of interest.
- SHAP analyses show that geographic features can outweigh population for specific origin-destination pairs, while distance generally deters travel.
- DG significantly improves on the other models across all geographic areas considered, regardless of evaluation metric.
Supplementary Material
The supplementary analyses examine prediction quality across spatial scales, population deciles, model variants, and geographic generalization. They also report that DG’s advantage is robust, while feature splitting improves performance relative to DG-sum.
- Generalization: Leave-one-city-out validation finds L-DG remarkably close to DG, suggesting that DG is geographically agnostic.
- Spatial evaluation: Observed-versus-predicted plots use CPC and Pearson correlation, with points nearer the main diagonal indicating higher values for both measures.
- Model comparisons: DG-Knn provides no significant improvement over DG as k increases, and its improvement over G is negligible or negative in highly populated regions.
- Model comparisons: DG-sum performs worse than DG across population deciles, with DG improving over DG-sum by 141.98% in England, up to 17.90% in Italy, and up to 6.05% in New York State.
- Spatial evaluation: For 10km regions, DG improves over G by 0.131 CPC (+19.5%) and 0.143 Pearson correlation (+18%).
- Model comparisons: DG achieves a significant improvement in generated-flow realism over gravity and models lacking non-linearity or geographic information.
- Explainability: SHAP analyses indicate that population and distance are important globally, while local origin-destination explanations can emphasize other geographic factors.