Detecting bus delays and service anomalies in Niterói with autoencoder latent feature representations
Uses autoencoder features of raw bus GPS data to detect both late trips and bad service days in Niterói.
Abstract
Bus riders judge service by two failures: single trips that run late, and days on which the whole system misbehaves. We ask whether one unsupervised representation of raw GPS telemetry can serve both diagnoses on the NetMob 2026 Niterói bus dataset. An autoencoder compresses each trip into a 64-dimensional latent vector; the frozen encoder feeds supervised delay classifiers, and the reconstruction error serves as an anomaly score. Two findings are negative. First, the latent representation does not improve delay detection: gradient boosting on per-trip summary features reaches $0.846 \pm 0.013$ ROC-AUC against $0.838 \pm 0.016$ for the best latent setup, and the gap becomes significant once the preprocessing filters are relaxed. Second, two of the three external checks of the anomaly score were circular. Retraining without rainfall removes the rain association ($5.4%$ against $5.0%$ flagged, $p = 0.84$) and an apparent citywide disruption on 23 March. What survives is a day-level signal stable across three autoencoders (Spearman $ρ\geq 0.96$), driven mostly by day type, with degraded-telemetry days still separable within weekday and weekend strata. The alarm threshold limits detection more than the score does: a pooled percentile cut flags $5.7%$ of trips on the worst degraded day, while re-scaling within each bus line flags $29.3%$. The delay model rests almost entirely on one feature, no latent dimension is individually interpretable, and 22 chronic line-directions carry half of all delayed trips.