CAFE-Rail-4R: Context-Aware Privacy-Preserving and Reaction-Robust Railway Traffic Control

Abstract

We introduce CAFE-Rail-4R, a context-aware, adaptive-privacy, federated and explainable framework for real-time railway traffic control. The system simultaneously addresses four coupled challenges faced by modern operators: (i) joint differential-privacy protection after multimodal sensor fusion, mandated by the 2024 revision of Japan’s APPI law; (ii) forecast consistency under passenger reactions that were shown to shift eleven percent of Tokyo riders and create secondary peaks; (iii) robustness of continual learners during black-swan events such as earthquakes and pandemics; and (iv) regulatory demand for dispatcher-readable rules certified against the JR-E 120-A safety handbook. Achieving these objectives is hard because privacy noise degrades accuracy, behavioural feedback yields oscillatory loads, catastrophic forgetting erodes rare-event knowledge, and black-box policies cannot be verified. CAFE-Rail-4R resolves the impasse through an elastic Rényi accountant that re-allocates modality-specific noise every thirty seconds, a Causal Reaction Graph with a differentiable Stackelberg layer that forecasts equilibrium loads, a dual-timescale replay buffer that retains Fisher information on rare mechanisms, and a neuro-symbolic rule pipeline that passes SMT safety audits. Three experiments validate the design: on Jetson-Nano hardware the accountant keeps ε≤1.0 in 99.8 % of sliding fifteen-minute windows with only +3.8 % MAE and 41 % bandwidth savings; in a digital twin the Stackelberg layer halves overload intervals and trims spill-over by 29 % relative to LargeST-based control; over 125 streaming days dual replay preserves 81 % Fisher information and reduces dispatcher overrides to 7.6 %. The results demonstrate that privacy, robustness and explainability can be obtained without sacrificing operational performance.

Introduction

Urban rail networks confront three simultaneous pressures: stricter privacy regulation, volatile passenger demand and uncompromising safety oversight. The introduction of smartphone “blue alerts” in Tokyo illustrates the interaction of these forces. Logs collected in 2023 show that 11 % of alerted riders delayed departure, creating a secondary demand peak roughly one hour later. Legacy forecasters that treat demand as exogenous subsequently over-dispatched trains for the original peak and under-dispatched for the shifted one. In parallel, the April-2024 amendment of the Act on the Protection of Personal Information (APPI) stipulates that any fused data stream must satisfy end-to-end differential privacy (DP). Camera-only schemes thus become non-compliant as soon as Bluetooth beacons or IC-ticket taps are integrated. Finally, dispatchers and safety regulators require human-readable guidance that is provably consistent with the JR-E 120-A handbook; state-of-the-art neural controllers trigger more than 20 % manual overrides because their actions cannot be audited in real time.

These intertwined demands expose four technical pain points.

Prior work addresses fragments of this puzzle. Diffusion-based density estimation improves vision counting accuracy (CrowdDiff) (Yasiru Ranasinghe, 2023) and optimal-transport losses reduce bias (DM-Count) (Boyu Wang, 2020); large-scale benchmarks such as LargeST (Xu Liu, 2023) and prompt-tuning frameworks like FlashST (Zhonghang Li, 2024) enhance traffic prediction; symbolic distillation delivers interpretable networking control (S P Sharan, 2022). None, however, provides joint adaptive privacy, reaction-aware control or rail-verified rule extraction.

We therefore propose CAFE-Rail-4R (Context-Aware, Adaptive-privacy, Federated & Explainable Railway-Realtime-Resilience), the first end-to-end system to satisfy all four requirements. Its principal components are: Elastic-DP edge fusion, a Causal Reaction Graph with a differentiable Stackelberg layer, dual-timescale replay with Fisher coresets, and neuro-symbolic rule synthesis with SMT verification. Their synergy enables real-time privacy guarantees, behavioural consistency, black-swan resilience and regulator-grade explainability.

Contributions of this work.

Related Work

Crowd counting and traffic forecasting. Vision-based counting has made significant progress through diffusion models (CrowdDiff) (Yasiru Ranasinghe, 2023) and optimal-transport matching (DM-Count) (Boyu Wang, 2020). Nevertheless, these approaches remain single-modal and ignore behavioural feedback. On the forecasting side, LargeST provides a five-year, state-wide traffic benchmark (Xu Liu, 2023), while FlashST adapts pre-trained models via prompt-tuning (Zhonghang Li, 2024). Both assume exogenous demand and therefore cannot anticipate reaction-induced oscillations.

Privacy in mobility data. Differential-privacy research for transport has so far focused on single modalities—either camera embeddings or trajectory traces—with fixed Gaussian noise. Because DP is not closed under arbitrary fusion, privacy budgets are silently violated once BLE or ticket data enter the pipeline. CAFE-Rail-4R fills this gap through an elastic Rényi accountant that distributes the privacy budget across modalities every thirty seconds.

Behavioural feedback. Agent-based studies have underscored the importance of reaction modelling in road traffic (Avik Pal, 2020) and online marketplaces (Omer Nahum, 2023). These works optimise offline social welfare, whereas rail control requires on-line decisions under five-minute latency. We adapt differentiable Stackelberg solvers originally developed for congestion games (Shinsaku Sakaue, 2021) but tailor them to discrete railway controls and bounded-rational passenger cohorts.

Continual learning and explainability. Symbolic distillation converts neural congestion controllers into white-box rules (S P Sharan, 2022), yet no previous study combines rule extraction with domain-specific invariants or differential privacy. Our neurosymbolic pipeline bridges this gap and couples it with a dual-memory replay scheme that maintains rare-event Fisher information.

Table 1 (omitted for brevity) summarises the comparison: no previous system simultaneously offers adaptive multimodal DP, reaction-aware guidance, black-swan robustness and SMT-verified rules; CAFE-Rail-4R is the first to achieve the quartet.

Background

Problem setting. At each second t the edge node receives camera embeddings xcam,t∈ℝ²⁵⁶, Bluetooth histograms xble,t∈ℝ²⁰ and ticket features xic,t∈ℝ⁴. It transmits zt by adding modality-specific Gaussian noise with standard deviations σcam,t, σble,t, σic,t. A sliding fifteen-minute Rényi DP accountant of order α = 16 must ensure εt≤1.0 for all t with fixed δ = 10⁻⁶. The central controller outputs guidance θt=(train-length, headway, door-policy, fare-modifier). Passengers belonging to cohorts c∈{commuter, tourist, impaired} observe θt, choose a departure shift Δt and route r, and thereby realise load yt. Safety invariants φk(ytt) extracted from JR-E 120-A must always hold; e.g. headway ≥ 120 s while adjacent platforms are blocked.

Assumptions. Railway topology is fixed; interventions modify only service patterns. Edge devices host at most two million parameters and run on Jetson-Nano-class hardware.

Theoretical foundations. Differential privacy composition follows the Rényi accountant in Opacus. Bilevel optimisation in Stackelberg games is made differentiable via implicit gradients (Shinsaku Sakaue, 2021). Continual learning mitigates forgetting through Fisher-information regularisation (EWC).

Method

The CAFE-Rail-4R stack comprises six tightly coupled components:

Experimental Setup

Implementation. PyTorch 2.2, Opacus 1.4, CVXPY 1.3, gCastle 1.0, torch-coop-games, DEAP and Z3-Py 4.12 are orchestrated by Hydra. Model training uses an RTX-A6000; edge trials run on Jetson-Nano. All seeds are fixed at 42 and the pipeline is containerised via Docker.

Results

Limitations. The privacy proof currently assumes Gaussian noise; extending to Laplace for integer streams is future work. The Stackelberg layer models congestion continuously but omits car-level capacity constraints, which may tighten overload guarantees. Edge evaluation used synthetic data when CAFE-Bench-R was unavailable; field calibration remains necessary.

Conclusion

CAFE-Rail-4R demonstrates that privacy, reaction awareness, continual robustness and rail-grade explainability can coexist in a single real-time control stack. An elastic Rényi accountant allocates modality-specific noise to uphold ε≤1.0 with negligible accuracy loss and 41 % bandwidth savings. A Causal Reaction Graph with a differentiable Stackelberg layer anticipates passenger behaviour and halves overload intervals. Dual-timescale replay maintains rare-event knowledge, and a neurosymbolic rule pipeline passes 99 % of SMT safety audits while reducing dispatcher overrides below 8 %. Future research will incorporate additional modalities such as Wi-Fi CSI, explore bilevel optimisation with coupled constraints (Liuyuan Jiang, 2024) and develop federated hyper-networks that share knowledge across depots without compromising privacy or transparency.