STEM / docs /STEM_benchmark_specification.md
eduzrh
feat: STEM benchmark initial release
bcb16da
|
Raw
History Blame Contribute Delete
25.1 kB

STEM: Spatio-Temporal 3D Entity Matching Benchmark

Construction Specification Document

Version: 1.0
Date: 2026-07-08
Authors: ZRH Edu
Target Venue: VLDB Journal Special Issue on "Spatio-Temporal Data Management and Analytics: Machine Learning-based Solutions and Beyond"
HuggingFace Repository: https://huggingface.co/datasets/eduzrh/STEM


Table of Contents

  1. Project Overview
  2. Research Motivation
  3. Dataset Sources
  4. Benchmark Design
  5. Code Architecture
  6. Environment Setup
  7. Download Plan
  8. Preprocessing Pipeline
  9. Experimental Protocol
  10. Delivery Checklist

1. Project Overview

1.1 Goal

Build the first spatio-temporal 3D entity matching benchmark that enables rigorous evaluation of matching algorithms for 3D building objects across both different data sources (cross-source entity resolution) and different time points (temporal entity resolution). The benchmark is designed to support both unsupervised and few-shot entity matching paradigms.

1.2 Core Contributions

Contribution Description
STEM-3D Benchmark Multi-epoch, multi-source 3D building entity matching dataset with ground-truth labels
Disaster Simulation Pipeline Controllable CRS misalignment + structural damage for realistic post-disaster cross-time matching
Spatio-Temporal Evaluation Suite Standardized metrics for cross-time, cross-source 3D entity matching
Open-Source Toolkit Full codebase for reproduction, extending 3dSAGER to spatio-temporal setting

1.3 Why 3D Entity Matching Matters

Traditional entity matching (EM) operates on tabular records. However, real-world geospatial entities — buildings, bridges, infrastructure — are inherently 3D objects. Matching them across datasets is critical for:

  • Disaster response: Match pre-disaster and post-disaster building inventories to assess damage
  • Urban digital twins: Fuse multi-source 3D city models (Overture, 3DBAG, OpenStreetMap, commercial providers)
  • Cadastral reconciliation: Match building registrations across jurisdictions and over time
  • Infrastructure monitoring: Track structural changes across satellite/airborne LiDAR surveys

The spatio-temporal dimension adds unique challenges:

  1. Buildings can be modified (extensions, demolitions, renovations) between time points
  2. CRS (Coordinate Reference System) may differ between sources and epochs
  3. Geometric properties change with time (height reduction from damage, volume changes from extensions)
  4. No absolute coordinate alignment is available (post-disaster scenario)

2. Research Motivation

2.1 The Spatio-Temporal Entity Matching Problem

Definition (Strong Spatio-Temporal EM): Given two collections of 3D building objects S_A_t and S_B_t' from potentially different sources A, B and different time points t, t', find all matching pairs (a in S_A_t, b in S_B_t') where a and b refer to the same real-world building.

Key differences from standard EM:

  1. Coordinate-unaware matching: Cannot rely on absolute coordinates (different CRS, post-disaster shift)
  2. Temporal geometry drift: Properties change between t and t' → geometric feature ratios deviate from 1.0
  3. Structural emergence/disappearance: New buildings appear, old buildings are demolished
  4. Cross-source schema heterogeneity: Different LOD levels, attribute schemas, modeling conventions

2.2 The (ε, δ)-Systematic Discrepancy Framework

Following the 3dSAGER paper, we formalize cross-source systematic discrepancy:

For any geometric property p, there exists a source-specific scaling factor F_S^p such that for all matching buildings:
p_cand / p_index ≈ F_S^p

In the spatio-temporal setting, we extend this to:

p_cand_t' / p_index_t ≈ F_S^p · F_T^p

where F_S^p is the source discrepancy and F_T^p is the temporal change factor.

2.3 Methodological Approach

We adopt and extend the 3dSAGER pipeline for spatio-temporal entity matching:

Raw 3D City Models (CityJSON/CityGML) → Preprocessing → Object Properties (25 geometric features) → Pairwise Feature Vectors (F÷ division operator) → BKAFI Blocking → ML Classifier (XGBoost, RF, etc.) → Rigid Alignment (RANSAC + SVD) → Final Matching

Key extensions for spatio-temporal:

  1. Temporal property delta features: Δp = |p_t' - p_t| as additional features
  2. Disaster-aware CRS simulation: Random Z-rotation + damage (height reduction) for post-disaster scenarios
  3. Multi-epoch evaluation: Match across (t=2009, t'=2012/2015/2018) pairs
  4. (ε, δ)-Temporal discrepancy tracking: Measure F_T^p for each time gap

3. Dataset Sources

3.1 Primary Dataset: Lyon Multi-Epoch 3D City Model

Source: Métropole de Lyon Open Data + Zenodo
Format: CityGML LOD2
Temporal coverage: 2009, 2012, 2015, 2018 (4 epochs, 9-year span)
Coverage: Lyon metropolitan area (59 communes)
Key features:

  • Same source/provider across all epochs (minimizes cross-source artifacts)
  • Known to contain real building changes (demolitions, new constructions, renovations)
  • Already used in 3D change detection research
  • CityGML format with semantic building parts
Epoch Source URL Status
2009 Zenodo https://zenodo.org/record/3611354 Open access
2012 Zenodo https://zenodo.org/record/3611354 Open access
2015 Zenodo https://zenodo.org/record/3611354 Open access
2018 Grand Lyon Portal https://data.grandlyon.com Open access

Data characteristics:

  • CRS: EPSG:3946 (RGF93 / CC46)
  • LOD: LOD2 (buildings with roof geometry, no detailed facade elements)
  • Format: CityGML 2.0
  • Estimated building count: ~150,000–200,000 per epoch

3.2 Secondary Dataset: 3dSAGER Hague Benchmark

Source: 3dSAGER project
Format: CityJSON
Provider: 3D BAG (Netherlands)
Coverage: The Hague, Netherlands
Temporal: Single epoch (2021/2022) with two co-registered sources (Source A, Source B)
URL: https://tinyurl.com/3dSAGERdataset
Key features:

  • Provides ground-truth match labels across Source A/B
  • Two sources with different LOD representations of the same area
  • Used as baseline for cross-source evaluation (matching mode)

Benchmark statistics (medium version):

  • ~3,000–5,000 buildings
  • 25 geometric properties per building
  • Train/val/test split by spatial grid cells

3.3 Temporal POI Data (Auxiliary)

Source: OpenStreetMap History API
Purpose: Ground-truth verification for POI-level temporal entity matching
Entities: Restaurants, shops, offices with temporal change logs
Temporal resolution: Daily snapshots
Usage: Validate temporal matching methodology at smaller scale

3.4 Dataset Summary Table

Dataset Type Buildings Epochs LOD Format Labels
Lyon 2009–2018 Primary ~150K/epoch 4 LOD2 CityGML Build from persistence
Hague A/B Baseline ~4K 1 (2 sources) LOD1/LOD2 CityJSON Provided
OSM POI History Auxiliary ~5K POIs Daily N/A GeoJSON OSM IDs

4. Benchmark Design

4.1 Task Taxonomy

The STEM benchmark defines three sub-tasks:

Task 1: Cross-Source 3D Entity Matching (Standard)

  • Input: Source A buildings + Source B buildings (same epoch, different providers)
  • Goal: Match corresponding buildings
  • Baseline dataset: Hague A/B
  • Difficulty: Cross-source schema heterogeneity (LOD differences)

Task 2: Cross-Time 3D Entity Matching (Temporal)

  • Input: Buildings from epoch t + buildings from epoch t' (t ≠ t', same provider)
  • Goal: Match persistent buildings across time
  • Primary dataset: Lyon 2009–2018 (6 time pairs: 2009→2012, 2009→2015, 2009→2018, 2012→2015, 2012→2018, 2015→2018)
  • Difficulty: Temporal geometry drift, building modifications, demolitions/new constructions

Task 3: Cross-Source + Cross-Time 3D Entity Matching (Full ST-EM)

  • Input: Source A at epoch t + Source B at epoch t'
  • Goal: Match buildings across both source and time
  • Constructed via: Apply disaster simulation (CRS + damage) to cross-time pairs
  • Difficulty: Maximum — both source and temporal discrepancies compound

4.2 Ground-Truth Label Construction

For the Lyon multi-epoch dataset, we construct ground-truth labels as follows:

  1. Spatial persistence filter: Buildings with centroid distance < 2m across epochs are candidates
  2. Geometric consistency check: Area ratio and volume ratio within [0.7, 1.3] → likely same building
  3. Building ID tracking: Use CityGML gml:id attributes where available (Lyon may have persistent IDs)
  4. Manual sampling verification: Random sample of 200 pairs per epoch gap for manual validation
  5. Confidence tiers:
    • High confidence: Persistent CityGML ID + geometric consistency
    • Medium confidence: Spatial + geometric consistency only
    • Low confidence: Spatial proximity only (for hard negative mining)

4.3 Evaluation Metrics

Metric Description
Precision TP / (TP + FP)
Recall TP / (TP + FN)
F1-Score Harmonic mean of Precision and Recall
Recall@k Recall within top-k candidates per query building
MRR Mean Reciprocal Rank
Distance Recall Recall at spatial distance thresholds (10m, 25m, 50m)
Temporal F1 Drop F1 degradation as time gap increases
Cross-Source F1 Drop F1 degradation from single-source to cross-source matching
Cross-Time F1 Drop F1 degradation from single-epoch to cross-epoch matching

4.4 Training Regime Taxonomy

Regime Training Data Test Data Setting
Supervised Labeled pairs from t→t' Held-out pairs from same t→t' Full labels available
Few-shot K labeled pairs (K=5,10,20,50) All remaining pairs Scarce supervision
Unsupervised (Zero-shot) No labels from target pair All pairs from t→t' Cross-epoch generalization
Cross-epoch transfer Train on t1→t2, test on t3→t4 Transfer to unseen epochs Temporal generalization
Cross-city transfer Train on Hague, test on Lyon Transfer to unseen city Geographic generalization

4.5 Benchmark Splits

STEM/
├── lyon/
│   ├── 2009/, 2012/, 2015/, 2018/    # CityJSON-converted buildings
│   ├── labels/                        # Ground-truth match pairs per epoch pair
│   └── splits/                        # train/val/test CSV files
├── hague/
│   ├── source_a/, source_b/
│   ├── labels.csv
│   └── splits/
├── disaster/
│   ├── simulated/                     # Disaster simulation outputs
│   └── configs/                       # Simulation parameters
└── metadata/
    ├── dataset_card.md
    ├── statistics.json
    └── changelog.md

5. Code Architecture

5.1 Repository Structure

STEM/
├── README.md
├── requirements.txt
├── setup.py
├── config/
│   ├── default.yaml                  # Default configuration
│   ├── lyon.yaml                     # Lyon-specific config
│   ├── hague.yaml                    # Hague-specific config
│   └── disaster.yaml                 # Disaster simulation config
├── src/
│   ├── __init__.py
│   ├── data/
│   │   ├── __init__.py
│   │   ├── download.py               # Dataset downloader
│   │   ├── preprocess.py             # CityJSON/GML conversion
│   │   ├── labels.py                 # Ground-truth label construction
│   │   └── splits.py                 # Train/val/test splitting
│   ├── features/
│   │   ├── __init__.py
│   │   ├── properties.py             # 3dSAGER geometric properties (extended)
│   │   ├── temporal.py               # Temporal delta features
│   │   └── pairwise.py               # Pairwise feature vectors
│   ├── matching/
│   │   ├── __init__.py
│   │   ├── blocking.py               # BKAFI + extended blocking methods
│   │   ├── classifier.py             # ML classifier training
│   │   ├── alignment.py              # RANSAC rigid alignment
│   │   └── disaster.py               # Disaster simulation
│   ├── evaluation/
│   │   ├── __init__.py
│   │   ├── metrics.py                # Evaluation metrics
│   │   ├── analysis.py               # Result analysis utilities
│   │   └── visualization.py          # Plots and reports
│   └── utils/
│       ├── __init__.py
│       ├── io.py                     # File I/O utilities
│       ├── geometry.py               # Geometric computation helpers
│       └── logging.py                # Experiment logging
├── experiments/
│   ├── baseline_hague.py             # Reproduce 3dSAGER baseline
│   ├── cross_time_lyon.py            # Cross-time matching experiments
│   ├── few_shot_benchmark.py         # Few-shot evaluation
│   ├── zero_shot_benchmark.py        # Unsupervised/zero-shot evaluation
│   └── disaster_scenario.py          # Post-disaster matching
├── notebooks/
│   ├── 01_data_exploration.ipynb
│   ├── 02_feature_analysis.ipynb
│   └── 03_results_visualization.ipynb
├── tests/
│   ├── test_properties.py
│   ├── test_blocking.py
│   └── test_labels.py
└── docs/
    ├── api.md
    ├── benchmark_guide.md
    └── paper_figures/

5.2 Key Design Decisions

  1. CityJSON as canonical format: All datasets converted to CityJSON v1.1 for uniformity
  2. Modular experiment scripts: Each experiment type is a standalone script with YAML config
  3. Reproducibility: All random seeds logged; configs versioned with experiment outputs
  4. HuggingFace Hub integration: push_to_hub() calls in all data generation scripts
  5. Streaming support: Large CityJSON files use streaming parsing (ijson)

5.3 Extension Points

Extension Location Purpose
New dataset src/data/preprocess.py Add CityJSON conversion for new cities
New feature src/features/properties.py Add geometric/temporal property
New blocking method src/matching/blocking.py Add candidate generation method
New classifier src/matching/classifier.py Add ML/DL model
New evaluation metric src/evaluation/metrics.py Add custom metric

6. Environment Setup

6.1 Python Environment

# Core environment
Python 3.9+ (tested with 3.9–3.12)
pip install -r requirements.txt

# Key dependencies (all installed via pip):
numpy==1.26.4
pandas==2.3.2
scikit-learn==1.6.1
xgboost==2.1.4
shapely==2.0.5
pyproj==3.6.1
geopandas==0.14.4
faiss-cpu==1.9.0
scipy==1.13.1
joblib==1.5.2
matplotlib==3.9.2
tqdm==4.67.1

# Optional — PyTorch + CLIP (for ViT-based blocking):
torch>=2.0.0
torchvision>=0.15.0
clip (from OpenAI GitHub)

# HuggingFace:
huggingface_hub>=0.20.0
datasets>=2.14.0

6.2 Disk Space Requirements

Item Estimated Size
Lyon 2009 CityGML ~2–5 GB (compressed)
Lyon 2012 CityGML ~2–5 GB (compressed)
Lyon 2015 CityGML ~2–5 GB (compressed)
Lyon 2018 CityGML ~2–5 GB (compressed)
Hague benchmark (A + B) ~500 MB
Processed CityJSON files ~2–3 GB per epoch
Feature caches (joblib) ~200 MB per epoch
Model files ~50 MB
Total estimated ~25–40 GB

7. Download Plan

7.1 Step-by-Step Download Procedure

Phase 1: Hague Baseline Dataset (Priority: HIGH)

The 3dSAGER dataset contains The Hague buildings in CityJSON format, split into Source A and Source B directories. This is the baseline benchmark used in the 3dSAGER paper.

URL: https://tinyurl.com/3dSAGERdataset
Expected output: data/hague/source_a/.json, data/hague/source_b/.json

Phase 2: Lyon Multi-Epoch Dataset (Priority: HIGH)

Lyon 2009, 2012, 2015 from Zenodo: https://zenodo.org/record/3611354
Contains CityGML files for Lyon arrondissements across three historic versions.

Lyon 2018 from Grand Lyon Portal:
https://data.grandlyon.com/jeux-de-donnees/maquettes-3d-texturees-2018-communes-metropole-lyon/donnees

Phase 3: Optional Additional Data

  • 3DBAG historical versions (API: https://api.3dbag.nl/)
  • OSM POI History (Overpass API with date filters)

7.2 Download Verification

  • SHA256 hashes recorded for all downloaded files
  • Building counts cross-referenced with published statistics
  • Spatial extent and CRS validation

8. Preprocessing Pipeline

8.1 CityGML → CityJSON Conversion

CityGML (.gml/.xml)
    ↓  citygml-tools or custom parser
CityJSON (.json)
    ↓  CRS unification → EPSG:7415 (or local UTM)
    ↓  Centroid computation
    ↓  Building-only filtering
    ↓  Attribute standardization
    ↓  Save as joblib/.pkl cache

Tools:

  • citygml-tools (Java CLI): citygml-tools to-cityjson input.gml
  • cityjson Python package: for validation and manipulation
  • Alternative: cjio Python package

8.2 Ground-Truth Label Construction

For each epoch pair (ti, tj):
├── Load buildings from ti and tj
├── Compute pairwise centroid distances
├── Filter: distance < 2m → candidate matches
├── Compute geometric consistency (area, volume ratios)
├── Filter: ratio ∈ [0.7, 1.3] → probable matches
├── Check CityGML ID persistence (if available)
├── Assign confidence tier (high/medium/low)
├── Manual sampling for verification (200 pairs)
└── Output: pairs CSV with [id_ti, id_tj, confidence, area_ratio, volume_ratio, distance]

8.3 Feature Extraction

For each building, extract 25 geometric properties (from 3dSAGER):

  • Size: area, perimeter, volume, convex_hull_area, convex_hull_volume
  • Shape: compactness_2d, compactness_3d, cubeness, hemisphericality, fractality
  • Dimensions: bounding_box_width/length, aligned_bounding_box_width/length/height
  • Distribution: density, elongation, shape_ind, axes_symmetry, num_vertices, circumference
  • Context: ave_centroid_distance, height_diff, num_floors, perimeter_ind

Temporal extension (new for STEM):

  • delta_area: |area_ti - area_tj| / area_ti
  • delta_volume: |volume_ti - volume_tj| / volume_ti
  • delta_height: |height_ti - height_tj| / height_ti
  • delta_compactness_3d: same for compactness
  • time_gap_months: temporal distance between epochs

8.4 Disaster Simulation (for Task 3)

DisasterSimulator:
    CRS Simulation:
        - Random Z-axis rotation: θ ~ Uniform(0, 360°)
        - Random translation: t ~ Uniform(-100km, +100km) in X, Y
        - Applied to all candidate buildings
    
    Damage Simulation:
        - Per-building probability: P = 0.8
        - Height reduction factor: f ~ Uniform(0.3, 0.95)
        - Modified height = original_height × f
        - Propagate to volume, convex_hull_volume, compactness_3d

9. Experimental Protocol

9.1 Baseline Experiment (Task 1: Cross-Source)

Parameter Value
Dataset Hague (Source A vs Source B)
Features 25 geometric properties
Feature operator Division (F÷)
Blocking method BKAFI
Classifier XGBoost
Train:Val:Test 60:20:20
Evaluation Precision, Recall, F1, Recall@k
Seeds 5

9.2 Cross-Time Experiment (Task 2)

Parameter Value
Dataset Lyon (6 epoch pairs)
Train:Val:Test 60:20:20 (per epoch pair)
Features 25 geometric + 5 temporal delta
Classifier XGBoost, GradientBoosting, RF, MLP
Evaluation mode matching + blocking
Key analysis F1 vs. time gap, property drift vs. time gap

9.3 Few-Shot Experiment

Shots Setting
K = 5 5 labeled pairs per epoch pair
K = 10 10 labeled pairs
K = 20 20 labeled pairs
K = 50 50 labeled pairs
K = 100 100 labeled pairs

9.4 Full ST-EM Experiment (Task 3)

Parameter Value
Base data Lyon cross-time pairs
Simulation CRS rotation + damage
Alignment RANSAC rigid alignment
Re-scoring α × geometric + (1-α) × spatial
Evaluation Distance-based recall (10m, 25m, 50m)

9.5 Unsupervised/Zero-Shot Experiment

Setting Description
Cross-epoch transfer Train on 2009→2012, test on 2015→2018
Cross-city transfer Train on Hague, test on Lyon (adapt features)
Property-ratio heuristic F÷ operator + clustering, no labels

10. Delivery Checklist

10.1 Phase 1: Infrastructure (Current)

  • 3dSAGER codebase cloned and analyzed
  • Python environment with all dependencies installed
  • HuggingFace repo initialized and configured
  • Specification document written (this file)

10.2 Phase 2: Data Acquisition

  • Download 3dSAGER Hague dataset (Source A: 309MB, 36 CityJSON files; Source B: partial, 3 files)
  • Complete Source B download (remaining CityJSON files)
  • Download Lyon 2009-2015 from Zenodo (395 MB zip)
  • Download Lyon 2018 from Grand Lyon portal
  • Verify all downloads (counts, CRS, integrity)

10.3 Phase 3: Preprocessing

  • Convert Lyon CityGML → CityJSON
  • Unify CRS across all epochs
  • Extract building geometries and compute centroids
  • Generate geometric properties per building
  • Cache processed data as joblib files

10.4 Phase 4: Benchmark Construction

  • Construct ground-truth labels for all 6 Lyon epoch pairs
  • Manual verification of random samples
  • Generate train/val/test splits
  • Compute dataset statistics
  • Write dataset card (README.md for HuggingFace)

10.5 Phase 5: Baseline Experiments

  • Run 3dSAGER baseline on Hague dataset (reproduce paper results)
  • Run cross-time matching on Lyon (supervised)
  • Run few-shot experiments (K = 5, 10, 20, 50)
  • Run disaster scenario (CRS + damage + alignment)
  • Run unsupervised transfer experiments

10.6 Phase 6: Upload & Documentation

  • Upload all data to HuggingFace (eduzrh/STEM)
  • Upload all code to HuggingFace
  • Upload experiment results and logs
  • Write paper-ready result tables and figures
  • Push specification document

10.7 Phase 7: Paper Writing

  • Draft VLDBJ paper outline
  • Write methodology section
  • Generate all figures and tables
  • Write experiments and results
  • Polish and submit

Appendix A: Risk Analysis

Risk Probability Impact Mitigation
Lyon data not downloadable Low High Fall back to synthetic multi-epoch from 3DBAG versions
CityGML IDs not persistent Medium Medium Use geometric + spatial heuristics for labeling
CityGML→CityJSON conversion fails Low Medium Use citygml-tools Java tool as backup
HuggingFace storage limits Low Low Use Git LFS for large files; tier upgrade if needed
Lyon building count too large Medium Medium Use spatial subset (1–2 arrondissements)
Disk space insufficient for Lyon Medium High Use GPU machine with SSD; process per-arrondissement

Appendix B: Timeline

Week Milestone
Week 1 Environment setup, data download, preprocessing
Week 2 Benchmark construction, baseline experiments
Week 3 Full experiments, result analysis
Week 4 Paper writing, final uploads

Appendix C: Lyon Zenodo Data Details

  • Zenodo Record: https://zenodo.org/record/3611354
  • File: Lyon_2009-2012-2015_Splitted_Stripped.zip (394.9 MB compressed, ~50.9 GB uncompressed)
  • MD5: 74b4610a11d9ca37951f5de2b747794f
  • Content: CityGML LOD2 buildings for Lyon, split by arrondissement, across 3 epochs (2009, 2012, 2015)
  • Preprocessing: Original data had structural issues resolved; texture coordinates removed
  • 2018 data: Separate download from Grand Lyon Open Data Portal

Appendix D: Hague Dataset Details

  • Google Drive Folder: https://drive.google.com/drive/folders/11dC2jn9fajcn2W0LWKBCgyuBxabkz4WU
  • Structure:
    • RawCitiesData/The Hague/Source A/ — CityJSON files covering all wijks (36 files, ~309 MB)
    • RawCitiesData/The Hague/Source B/ — CityJSON files (3+ files, ~21 MB so far)
    • dataset_partitions/ — Pre-computed train/val/test splits (3 seed files)
  • CRS: EPSG:7415 (Amersfoort / RD New + NAP height)
  • Format: CityJSON v1.0/v1.1
  • LOD: Mixed LOD1/LOD2