Madinah Plaza Crowd Counts · trained weights

*Every model trained for the Kaggle competition MDA Ethical AI (KAUST Academy): LightGBM / CatBoost per hole kind, fine-tuned Chronos-2 forecasters and gap fillers, fine-tuned TabPFN, and PyPOTS deep-imputation experiments.*

Code Report Competition

Final system: four hole kinds, one model per kind with fixed blend weights, combined into one submission

The task

Thirteen cameras around the Prophet's Mosque plaza in Madinah count people every minute. The competition hides four kinds of holes on two test days (Friday 18 Sep and Saturday 19 Sep):

Hole kind What is hidden What the model may use
forecast 1–15 min after a cut-off all cameras up to the cut-off
missing 5–20 min gaps the rest of the day, all cameras
hidden one camera, dark all day the other cameras
hidden-future the dark camera after a cut-off rows up to the cut-off

Score = mean over the four kinds of (sum of absolute errors / host reference's sum). 1.0 = host reference; lower is better. The public board scored Friday only; the private board, which decides the ranking, scored Saturday only.

Production models (which weights go where)

Hole kind Blend (weights in this repo)
forecast LightGBM 10% + fine-tuned Chronos-2 chronos2_ft/ft_mixup* 12.5% + zero-shot trio (Chronos-2, TimesFM-2.5, Moirai-2) 37.5% + TabPFN v2 40%
missing GBM models/<version>/ 40% + TabPFN 40% + Chronos-2 gap filler chronos2_ft/imp_v1 20%
hidden equal mean of six pretrained TabPFN generations (v2, 2.5, 2.6, 3, 3.5, auto) + Rawdah 20-min slot rhythm
hidden-future GBM alone: 10 LightGBM + 3 CatBoost seeds (models/<version>/)

All GBMs use an L1 objective and TabPFN predicts its median, matching the absolute-error metric.

Results

Final pick Built by Public (Friday) Private (Saturday)
v67s10final (pick 1, validated recipe) scripts/build_v67.py 0.621 0.777
v71hedge (pick 2, three sub-bar Saturday changes) scripts/build_v68hedge.py → v69hedge → v70hedge → build_v71hedge.py 0.621 0.753

Kaggle keeps the better of the two picks, so the final private score is 0.753. The submission CSVs are in the GitHub repo under final_sub/.

Every Saturday change had to pass a pre-registered rehearsal test (better than production by more than 0.01 on the rehearsal mean and in most cells). One passed (G61); changes that helped but stayed under the bar went into pick 2 only:

Saturday rehearsal tests: score change vs production per test; only G61 adopted, G45, G76, G77 and G78b used in pick 2 only

Loading

from huggingface_hub import snapshot_download

# Chronos-2 fine-tuned forecaster (production member), Saturday run
path = snapshot_download("FatimahEmadEldin/mda-crowdcount-weights", allow_patterns=["chronos2_ft/ft_mixup/*"])
from chronos import Chronos2Pipeline                      # chronos-forecasting >= 2.3
pipe = Chronos2Pipeline.from_pretrained(f"{path}/chronos2_ft/ft_mixup/20260919_1100")

# GBM members: one LightGBM text model (*_lgbN.txt) / CatBoost model (*.cbm) per kind, day and seed
snapshot_download("FatimahEmadEldin/mda-crowdcount-weights", allow_patterns=["models/v10/*"], local_dir=".")
# then, from the GitHub repo:  python run.py gbm --config configs/v10.yaml --infer

The final picks are not retrained models: the build scripts assemble them from earlier versions' prediction files (their models/<name>/ folders hold only the format check). To rerun the post-deadline experiments, put data/cache/bank_v2.pkl from this repo at the same path in the GitHub checkout (see docs/handoff/09_post_deadline_models.md).

Pickle files (*.pkl) can run code when loaded. Load only files from this repo, with the GitHub code.

Contents

Folder Files Size What it is
chronos2_ft/ 124 28.2 GB Chronos-2 fine-tuned checkpoints (production + experiments)
tabpfn_ft_g68/ 20 1.7 GB TabPFN v2 fine-tuned on the pooled hidden-camera table
models/ 1,203 1.6 GB LightGBM / CatBoost models per submission version; saved Chronos predictions
deep_impute/ 307 110 MB PyPOTS deep-imputation models (experiment)
chronos_io/ 4 5 MB Chronos task and prediction pickles (cross-validation and test)
data/cache/ 1 11 MB bank_v2.pkl: validation bank (labels, host reference, model prediction columns)
assets/ 2 <1 MB figures for this card

models/<version>/ — LightGBM (*_lgbN.txt) and CatBoost (*.cbm) models per hole kind, recording and camera, one folder per submission version (v10, …, v67s10final). models/chronos_ckpt/ext/ holds saved Chronos-2 predictions (pickles), not weights.

chronos2_ft/<run>/<fold>/ — model.safetensors + config.json, loadable with Chronos2Pipeline.from_pretrained (only each run's final folder is kept). <fold> is the recording the run predicts (20260918_1100 Friday, 20260919_1100 Saturday) or a rehearsal day.

  • Production forecaster: ft_mixup, ft_mixup_s1, ft_mixup_s2, ft_mixup_s3 (TSMixup augmentation, prayer-time covariates, 4 seeds).
  • Production missing-gap member: imp_v1 (two-way gap filler with the other cameras as covariates; one run per held-out day, never trained on that day; scripts/chronos_imputer.py).
  • Experiments (not in the final blends): ft_v1, ft_steps3k, ft_lora (LoRA adapter, load on top of amazon/chronos-2 with PEFT), hid_v1* / hidf1* (hidden-camera runs), rep_base_s* / rep_mask_s* / rep_mv_s* (long-context replication seeds, scripts/chronos_longctx.py).

tabpfn_ft_g68/ — experiment G68. ckpt_<rehearsal>/ holds checkpoints and final_state_dict.pt for each camera D rehearsal; <rehearsal>.pkl holds its rehearsal predictions (log1p). Fine-tuning lowered the pooled model 0.643 → 0.615, but as a 7th hidden member it gained only 0.0024 (bar 0.01). ckpt_v69_Sat/ is the same run for the real Saturday (17,597 pooled rows, Saturday camera D never in it); it is the 7th camera-D member in v71hedge (test G76: 0.5777 vs 0.5831 on rehearsals).

deep_impute/di_v1/<fold>/ — SAITS, BRITS and ImputeFormer models (*.pypots, one file per epoch) for the missing-gap kind. Experiment only; not in any submission.

chronos_io/ — cv_tasks.pkl / cv_pred.pkl (rehearsal inputs and Chronos predictions) and test_tasks.pkl / test_pred.pkl (the same for the test days).

Licences and attribution

  • TabPFN fine-tuned weights derive from Prior Labs' TabPFN v2 and are subject to the Prior Labs License (Apache 2.0 with an attribution clause). Built with TabPFN. Hollmann et al., "Accurate predictions on small data with a tabular foundation model", Nature 637, 2025.
  • Chronos-2 fine-tuned checkpoints derive from amazon/chronos-2 (Apache 2.0). Ansari et al., Amazon Science.
  • PyPOTS models were trained with PyPOTS (BSD-3-Clause). Du et al., "PyPOTS: a Python toolkit for data mining on partially-observed time series", 2023.
  • LightGBM / CatBoost models are our own training output (libraries: MIT / Apache 2.0).
  • Data: the competition data belongs to the competition host. The models, bank_v2.pkl and chronos_io/ were derived from it; get the raw data from the Kaggle competition page.

Citation

@techreport{emadeldin2026madinahcrowd,
  title  = {Filling the Gaps in Madinah Plaza Crowd Counts: Foundation-Model Ensembles,
            Pre-registered Rehearsals, and an Honest Account of Leaderboard Probing},
  author = {Emad Eldin, Fatimah},
  year   = {2026},
  note   = {MDA Ethical AI Competition (KAUST Academy), Kaggle}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support