Beyond Random Splits: Outcome-Prior-Aware Evaluation of Spatial–Temporal Generalization in Civil Engineering AI

Description This repository provides the Python analysis code and supporting documentation for the research paper: Beyond Random Splits: Outcome-Prior-Aware Evaluation of Spatial–Temporal Generalization in Civil Engineering AI Authors: Ehsan Ghaffari and Mohammad KoohiTarget Journal: Journal of Computing in Civil Engineering, American Society of Civil Engineers (ASCE) Overview This study presents a leakage-controlled, deployment-oriented evaluation framework for assessing the generalization and probability reliability of machine-learning models under independent and identically distributed (IID), temporal, spatial, and spatiotemporal distribution shifts. The framework is investigated using two civil-engineering applications: Crash-severity classification: 25,499 police-reported crash records from Razavi Khorasan Province, Iran (2017–2019), with experiments involving multiple model families, controlled feature environments, training-size comparisons, outcome-prior standardization, and calibration diagnostics. Bridge deck-condition prediction: 670,502 two-year bridge-condition pairs derived from the U.S. National Bridge Inventory, covering seven states and multiple evaluation periods. The study examines how deployment conditions influence predictive discrimination, probability calibration, model-selection stability, geographic transfer, and the practical usefulness of predictive models. Repository Contents The code is organized into nine numbered research steps: Crash Calibration Audit: Evaluation of probability reliability and calibration under distribution shift. Crash Model Comparison: Comparison of model families and generalization behavior. Outcome-Prior Analysis: Investigation of outcome-prior standardization and distribution-shift diagnostics. Bridge Data Preparation: Processing and preparation of National Bridge Inventory records. Bridge Modeling: Model training and evaluation for bridge deck-condition prediction. Bridge Adaptation: Evaluation of outcome-prior adaptation and labeled-audit strategies. Geographic Exposure Comparison: Matched-training-size analysis of seen-versus-unseen geographic domains. Crash Prior Adaptation: Post-hoc expectation–maximization prior-adjustment experiments. Crash Recalibration: Temperature-scaling experiments using different labeled-data budgets. The repository also includes dependency specifications, methodological documentation, setup instructions, and validation information. Data Availability and Reproducibility This is a code-only research release. The original Iranian police crash records and individual-level predictions are excluded because of data-access and confidentiality restrictions. Researchers seeking access to restricted data must obtain authorization from the original data provider. The bridge replication uses National Bridge Inventory data. The repository documents the required inputs and analysis procedures. The included scripts support methodological transparency and authorized reproduction of the reported analyses. However, the archive does not contain all original campaign source modules or restricted inputs and therefore should not be interpreted as a fully self-contained reproduction of every experiment. Software Language: Python Research areas: Civil engineering AI, machine learning, domain generalization, distribution shift, model calibration, transportation safety, and bridge asset management. Citation If you use this code, please cite this Zenodo repository and the associated research article when published.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-29
DOI
https://doi.org/10.5281/zenodo.23778451
Primary Topic
Infrastructure Maintenance and Monitoring
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Beyond Random Splits: Outcome-Prior-Aware Evaluation of Spatial–Temporal Generalization in Civil Engineering AI

Ehsan Ghaffari
1 links
Zenodo (CERN European Organization for Nuclear Research)
Infrastructure Maintenance and Monitoring
article

Beyond Random Splits: Outcome-Prior-Aware Evaluation of Spatial–Temporal Generalization in Civil Engineering AI

Ehsan Ghaffari
article en

Abstract

Description This repository provides the Python analysis code and supporting documentation for the research paper: Beyond Random Splits: Outcome-Prior-Aware Evaluation of Spatial–Temporal Generalization in Civil Engineering AI Authors: Ehsan Ghaffari and Mohammad KoohiTarget Journal: Journal of Computing in Civil Engineering, American Society of Civil Engineers (ASCE) Overview This study presents a leakage-controlled, deployment-oriented evaluation framework for assessing the generalization and probability reliability of machine-learning models under independent and identically distributed (IID), temporal, spatial, and spatiotemporal distribution shifts. The framework is investigated using two civil-engineering applications: Crash-severity classification: 25,499 police-reported crash records from Razavi Khorasan Province, Iran (2017–2019), with experiments involving multiple model families, controlled feature environments, training-size comparisons, outcome-prior standardization, and calibration diagnostics. Bridge deck-condition prediction: 670,502 two-year bridge-condition pairs derived from the U.S. National Bridge Inventory, covering seven states and multiple evaluation periods. The study examines how deployment conditions influence predictive discrimination, probability calibration, model-selection stability, geographic transfer, and the practical usefulness of predictive models. Repository Contents The code is organized into nine numbered research steps: Crash Calibration Audit: Evaluation of probability reliability and calibration under distribution shift. Crash Model Comparison: Comparison of model families and generalization behavior. Outcome-Prior Analysis: Investigation of outcome-prior standardization and distribution-shift diagnostics. Bridge Data Preparation: Processing and preparation of National Bridge Inventory records. Bridge Modeling: Model training and evaluation for bridge deck-condition prediction. Bridge Adaptation: Evaluation of outcome-prior adaptation and labeled-audit strategies. Geographic Exposure Comparison: Matched-training-size analysis of seen-versus-unseen geographic domains. Crash Prior Adaptation: Post-hoc expectation–maximization prior-adjustment experiments. Crash Recalibration: Temperature-scaling experiments using different labeled-data budgets. The repository also includes dependency specifications, methodological documentation, setup instructions, and validation information. Data Availability and Reproducibility This is a code-only research release. The original Iranian police crash records and individual-level predictions are excluded because of data-access and confidentiality restrictions. Researchers seeking access to restricted data must obtain authorization from the original data provider. The bridge replication uses National Bridge Inventory data. The repository documents the required inputs and analysis procedures. The included scripts support methodological transparency and authorized reproduction of the reported analyses. However, the archive does not contain all original campaign source modules or restricted inputs and therefore should not be interpreted as a fully self-contained reproduction of every experiment. Software Language: Python Research areas: Civil engineering AI, machine learning, domain generalization, distribution shift, model calibration, transportation safety, and bridge asset management. Citation If you use this code, please cite this Zenodo repository and the associated research article when published.

Zenodo (CERN European Organization for Nuclear Research)
Industry, innovation and infrastructure
Openalex Percentile: Top 19%
Infrastructure Maintenance and Monitoring
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon