Introduction

Among the various urban transportation modes, the travelling time by taking the subway is the most easily controlled due to its immunity from issues like road congestion and inclement weather. The carbon emissions per passenger per unit distance for electric-powered subways are significantly lower than other options. Consequently, subways present an optimal solution to address common urban issues such as traffic congestion, environmental pollution, and limited efficiency of public services in large cities. The spatial extension characteristics of subways also shape the structure of large cities and the patterns of residents’ activities, known as Transit-Oriented Development (TOD)1. By leveraging the cost-effectiveness and efficiency of the subway, residents can choose to live in affordable suburbs while working in the city center, resulting in a significant spatial separation between job and residential centers. As the most crucial public service system in cities, the subway system is responsible for providing efficient services to meet the highly concentrated daily commuting demands. Its efficiency is primarily characterized by its ability to meet passengers’ transportation needs while effectively reducing waiting times.

Due to the discrete arrival of trains as service providers and the randomness of passenger arrivals as service demanders, there are inevitably random incidents of passengers being stranded in stations. Generally, these events at stations do not exhibit temporal correlation. During the morning rush hours, the Beijing subway system experiences the most severe instances of stranding, with 8.547% of stations affected. Figure 1a illustrates the number of stranded passengers in the Beijing subway system between 8:00 and 8:15 on October 16, 2020. The stranding phenomenon can propagate from station to station along the subway line, forming spatially correlated clusters. This phenomenon is termed the propagation of passenger stranding (PPS). As an example, the stranded stations during the morning rush hours are illustrated in Fig. 1b. The presence of temporal and spatial correlations of stranding in the subway not only leads to longer commuting times for passengers but also undermines the advantages of subway travel and reduces societal efficiency. Large-scale passenger stranding within enclosed subway stations increases the difficulty of evacuation and raises concerns regarding public safety, such as the spread of epidemics and the risk of terrorist attacks.

Fig. 1: Passenger stranding phenomena in the Beijing subway system.
figure 1

a The number of stranded passengers in the Beijing subway system between 8:00 and 8:15 on October 16, 2020. b Spatial distribution of stations with stranded passengers in the Beijing subway network at 8:10 AM rush hour. c Mechanisms of passengers being stranded at subway stations. The causes for the occurrence of stranded passengers and PPS phenomena are as follows: network topology, service trains scheduling, and spatiotemporal characteristics of demand. d The scheme of causing PPS phenomena. Stranding occurs at stations when passengers' demand exceeds transportation supply. Due to the interconnected nature of the line, operation at full capacity in upstream stations would occupy the supply scale of downstream stations, leading to passengers stranded at the latter.

When the duration and spatial scale of stranding reach a substantial magnitude, the system becomes unable to provide adequate service to meet the demand. The critical demand scale in this case can be defined as the threshold of service resilience, a crucial parameter for quantitative evaluation in decision-making processes related to investment, insurance, risk management, and emergency preparedness. The term “resilience” originated in mechanics to describe the resistance of materials to physical impacts. In the study of complex systems, resilience can be categorized into three primary frameworks2: (1) System resilience focuses on the magnitude of change or perturbation a system can endure without shifting to another stable state3; (2) Engineering resilience is defined by the recovery rate or time3; (3) Adaptive resilience characterizes the capacity of socioecological systems to adapt or transform in response to unfamiliar, unexpected, and extreme shocks4. The resilience of services studied here falls under the category of system resilience. The system’s responsive properties, as characterized by the stranding scale, are measured by adjusting the demand scale, which acts as the stimulus. The threshold of resilience is defined as the demand scale at which a notable change in response behavior occurs, beyond which the service efficiency of the system significantly decreases.

Subway research is inspired by traffic fluid models or complex networks5. Traffic fluid models are based on studies of road traffic congestion studies6,7,8,9,10,11. Road traffic congestion stems from the dynamic coupling between the traffic network structure and flow, and can be quantified by order parameter methods to describe the abrupt transition of traffic states from free flow to congestion12. Percolation theory is one of the most widely used analytical approaches4,13,14, which effectively reveals the spatial propagation mechanism of traffic congestion and its inherent structural characteristics by characterizing the formation and dissolution of local traffic clusters within the road network. Unlike road traffic flow or transportation problems in complex networks, service systems—such as bus and subway systems—are defined by the dynamic matching between service supply and passenger demand. When this balance is disrupted—particularly under constraints such as limited capacity and increasingly complex passenger choice behaviors—excessive waiting times15,16,17 may occur, diminishing the overall travel experience. Waiting time, in particular, is one of the most influential factors affecting passengers’ route choices. Subway systems differ from bus systems in several important ways. Subways typically serve a much larger number of passengers on a daily basis. In megacities like Beijing, for instance, subways are the dominant commuting mode, with an average daily ridership of over 10 million passenger trips in 2019. Additionally, subway systems have fewer stations than bus networks, operate on fixed schedules, and exhibit lower operational flexibility. These factors limit the direct applicability of many bus-oriented modeling approaches to subway systems. Against this backdrop, the PPS phenomenon stems from the timely fulfillment of service relationships at each station, governed by the service supply rate and demand rate, as well as network topology factors shown Fig. 1c. The service supply rate is determined by train passenger capacity and the train arrival rate (timetable), while the demand rate is determined by the passenger arrival rate at the station. TOD development patterns lead to highly spatiotemporally uneven subway service demands due to the tidal characteristics of commuting during morning and evening rush hours18,19, making it challenging to match service supply and demand. The topological factor depends on station network connections and train service lines. Furthermore, stranding conditions at upstream stations reduce the supply rate at downstream stations due to train service characteristics, as depicted in Fig. 1d. When trains operate near full capacity, fewer passengers may disembark than those wanting to board, causing the propagation of stranding phenomena along the line. The TOD mode contributes to significant spatial separation between job and residence centers, resulting in long average commuting distances, determining the spatial correlation length of PPS phenomena.

The transportation process in subway systems emerges from the collective behavior of numerous active units—passengers and trains—and thus represents a typical subject of investigation in the field of non-equilibrium statistical physics20. Unlike systems composed of a single type of unit, subway systems involve two functionally distinct types of entities interacting through service relationships: (1) passengers as service demanders, and (2) trains as service suppliers. A passenger’s service demand can be characterized by an origin-destination (OD) pair, while on the supply side, subway services are provided by trains operating according to scheduled timetables. Under the supply-demand coupling mechanism, PPS phenomena can emerge in subway systems, characterized by the formation of stranded station clusters21. This process exhibits superficial similarities to critical phenomena associated with phase transitions, such as abrupt changes in overall system efficiency and the rapid expansion of stranding clusters. However, strictly speaking, PPS does not constitute a classical thermodynamic phase transition, as its dynamical characteristics deviate from those described by conventional phase transition theory. PPS cannot be readily classified into any established universality class, such as percolation22 or the Ising model23. In terms of spatial structure, PPS phenomena resemble ferromagnetic systems, as passenger states exhibit spatial correlations similar to spin interactions24. Yet, unlike physical systems, PPS phenomena lack well-defined thermodynamic quantities such as entropy or free energy, making its universality class difficult to determine through theory or simulation. It is precisely due to the complexity of PPS phenomena and the uncertainty surrounding its theoretical classification that we investigate its formation and propagation mechanisms.

To determine the service resilience threshold, it is necessary to investigate the response behavior of subway systems under varying demand scales. However, executing controlled variable experiments within the actual infrastructure of large cities, particularly when aiming to surpass the resilience threshold, encounters substantial obstacles. As a typical non-equilibrium system, a data-driven dynamic model can be established, enabling the acquisition of its response patterns under different demand scales through computer simulations. In turn, the service resilience threshold can be predicted. In this work, the system’s responsive behaviors, characterized by both the scale of stranding and the average waiting time of passengers, are investigated under non-steady-state non-equilibrium conditions. Moreover, the PPS phenomenon encompasses numerous coupling effects within the subway system. Extracting fundamental patterns from these coupling effects provides valuable insights for the development of subway infrastructure, regulation of social services, and the establishment of effective methods for emergency response and incident prediction. In the field of non-equilibrium statistical physics, the eigen microstate method offers a powerful approach to investigate phase transitions, critical phenomena, and dynamic evolutions in complex systems, thereby providing a valuable tool for studying PPS phenomena. By applying the eigen microstates method25,26,27,28,29,30, fundamental patterns and their evolutionary rules can be extracted from system evolution data. In this work, PPS, as a class of emergent behaviors in self-organized multi-body systems, is studied from a statistical physics perspective, using the eigenmicrostates method to uncover the underlying mechanisms.

The service system can be considered a general model for many economic and social activities. In these systems, the scheduling of supply is optimized to meet the spatiotemporal characteristics of demand, and PPS phenomena are common features. Global operational efficiency, cost-effectiveness, and preventing system collapse are essential considerations from a societal management perspective. Examples of service systems include transportation systems, like subways, taxis31, buses32,33; elevators in skyscrapers34,35,36,37; medical appointment systems; logistical management38,39; aircraft carriers' decks management40,41,42. In this work, the subway system is studied as a representative example of a service system, and the mechanism of PPS phenomena is revealed. The results and methodologies may provide valuable insights for service systems.

Methods

Data

The data used in this work consists of two main components: Automatic Fare Collection (AFC) data and subway train timetable data.

The AFC data were provided by our collaborator, Beijing Infrastructure Investment Co., Ltd. The dataset includes complete records of all subway passenger entry and exit events through fare gates. Each record contains detailed fields, including card ID, tap-in time, boarding station, tap-out time, alighting station, card type, reconciliation date, settlement date, automatic fare gate ID, payment value, and operating company (details in Supplementary 1.1.1).

The subway train timetable data were obtained from the official Beijing Subway website (https://www.bjsubway.com/station/xltcx/line1/2013-08-19/4.html?sk=1), and include complete timetable information for all lines and stations in the Beijing subway network.

The Heuristic Witness Method

The Heuristic Witness Method (HWM) is an empirical approach that we developed to infer passenger travel paths and identify stranding phenomena in subway systems, using real-world AFC data. It employs “witnesses” — passengers with known, clearly defined travel paths — to infer the routes of other passengers. These witnesses are classified into two types: Class I witnesses who travel without transfers, and Class II witnesses who make one or more transfers. The method uses these witnesses’ travel data to build trip chains, which serve as the foundation for inferring the likely paths of other passengers and identifying areas of passenger stranding. For further details about the method, please refer to Supplementary 2.1.

The method integrates a voting mechanism to enhance the accuracy of path inference. Class I witnesses provide direct evidence of their journey, while Class II witnesses help infer the path of passengers making transfers. Votes from these witnesses are weighted based on the time interval between their trip and the target passenger’s trip. The most probable travel path for each passenger is determined by aggregating votes from multiple witnesses, with the final inference reflecting the combined influence of all categories of witnesses. This approach provides a robust and data-driven way to model passenger movement and identify congestion or stranding patterns in subway systems.

The simulation system

After utilizing the HWM to identify passenger stranding phenomena, we further developed a subway simulation system to investigate the stranding phenomena under varying passenger demand scales and train supply scales.

The simulation system we developed consists of three key components: train operations, passenger generation, and train service to passengers. In terms of train operation, the system generates new trains at each originating station once the departure time is reached. The departure times, originating stations, and destination stations for both shuttle and non-shuttle trains are based on real-world data.

For passenger route planning, the system uses the Breadth-First Search (BFS) algorithm to identify the k (k = 5) shortest paths for each passenger’s OD pair. The paths are evaluated based on three factors: the number of stations passed (ns), total trip time (T = Td + Tl, where Td represents the travel time and Tl represents the station dwell time), and the number of transfer stations (nt). A scoring mechanism is applied to these paths, and the highest-scoring path is selected as the route for each OD pair.

For train service to passengers, the system operates with a fixed number of trains, timetables, and maximum passenger capacity per train. When a train arrives at a station, passengers alight before boarding, with priority given based on their trip time. If the train reaches its maximum capacity, no additional passengers are allowed to board. Passengers who need to transfer are handled according to the established transfer rules. For each train, passengers must board or alight based on their travel status and corresponding train schedules.

The system tracks passengers’ behavior by assigning states such as waiting to board, onboard, or having reached their destination. Similarly, train states are monitored to indicate whether the train is in transit, has departed, or has arrived at its destination. This framework enables us to simulate the dynamic flow of passengers under various passenger demand and train supply scenarios, while accurately representing the level of passenger stranding in the subway system (detailed simulation processes and fitting results with real-world data are provided in Supplementary 1.2).

Quantitative definition of the cluster

The number of stranded passengers at station i at time t is denoted as Si(t). The relation between two stranded stations, i and j, can be classified into two categories:

$${e}_{ij}=\left\{\begin{array}{ll}1\quad &{S}_{i}{S}_{j}\, > \,0\,\,{\text{and}}\,\,{T}_{ij}=1\\ 0\quad &\,{\text{else}}\,.\end{array}\right.$$
(1)

The spatial correlation between station i and station j along the route is denoted by Tij: Tij = 1 if there is a station, Si ≠ 0, that establishes connectivity between stations i and j on the route; otherwise, Tij = 0. The propagation of stranding in the spatial domain and the formation of clusters composed of stranded stations are determined based on eij.

Eigen microstate method

We begin by adopting Gibbs’ ensemble method25 and define a statistical ensemble comprising M microstates from a complex system with N components. This statistical system is represented by a normalized N × M ensemble matrix A, in which each row corresponds to the number of stranded passengers Si(t) (i = 1, M) at different stations for a specific time snapshot.

At time t, the number of stranded passengers at station i is denoted as Si(t), which represents the number of passengers. To calculate the average value of Si(t) at station i over M time periods, we compute the mean value as

$$\langle {S}_{i}\rangle =\frac{1}{M}\mathop{\sum }\limits_{i=1}^{M}{S}_{i}(t).$$
(2)

At a certain time t, the agent i has a fluctuation

$$\delta {S}_{i}(t)={S}_{i}(t)-\langle {S}_{i}\rangle .$$
(3)

We define a microstate with fluctuations of all agents, which is represented by a normalized N-dimensional vector26

$$\delta {\boldsymbol{S}}(t)=\left[\begin{array}{c}\delta {S}_{1}(t)\\ \delta {S}_{2}(t)\\ \vdots \\ \delta {S}_{N}(t)\end{array}\right].$$
(4)

With the M microstates, we can compose a statistical ensemble of the complex system. This ensemble is described by an N × M matrix A with elements

$${A}_{it}=\frac{\delta {S}_{i}(t)}{\sqrt{{c}_{0}}},$$
(5)

where \({C}_{0}=\mathop{\sum }\nolimits_{t = 1}^{M}\mathop{\sum }\nolimits_{i = 1}^{N}\delta {S}_{i}^{2}(t)\). The column order of A is in accordance with the evolution of the microstate. As in ref. 26, the correlation between the microstates at t and \({t}^{{\prime} }\) is defined by their vector product

$${C}_{t{t}^{{\prime} }}=\delta S{\left(t\right)}^{{\rm{T}}}\cdot \delta S\left({t}^{{\prime} }\right)=\mathop{\sum }\limits_{i=1}^{N}\delta {S}_{i}\left(t\right)\delta {S}_{i}\left({t}^{{\prime} }\right).$$
(6)

With \({C}_{t{t}^{{\prime} }}\) as its elements, we can get an M × M correlation matrix of microstates as

$${\boldsymbol{C}}={C}_{0}{{\boldsymbol{A}}}^{{\rm{T}}}\cdot {\boldsymbol{A}},$$
(7)

whose trace \({\rm{Tr}}C=\mathop{\sum }\nolimits_{t = 1}^{M}{C}_{tt}={C}_{0}\).

According to the singular value decomposition (SVD)43, the ensemble matrix A can be factorized as

$${\boldsymbol{A}}={\boldsymbol{U}}\cdot {\mathbf{\Sigma }}\cdot {{\boldsymbol{V}}}^{{\rm{T}}},$$
(8)

where δ is an N × M diagonal matrix with elements

$${\delta }_{ij}=\left\{\begin{array}{ll}{\delta }_{I},\quad &\,{\text{for}}\,\,i=j\le r\\ 0,\quad &\,{\rm{for}}\, {\rm{otherwise}}\,,\end{array}\right.,$$
(9)

where \(r=min\left(N,M\right)\).

We can rewrite the ensemble matrix A as

$${\boldsymbol{A}}=\mathop{\sum }\limits_{I=1}^{r}{\sigma }_{I}{{\boldsymbol{A}}}_{{\boldsymbol{I}}}^{{\rm{e}}},$$
(10)

where \({{\boldsymbol{A}}}_{{\boldsymbol{I}}}^{{\rm{e}}}\equiv {{\boldsymbol{U}}}_{{\boldsymbol{I}}}\bigotimes {{\boldsymbol{V}}}_{{\boldsymbol{I}}}\) is an N × M matrix with elements \({({A}_{I}^{{\rm{e}}})}_{it}={U}_{it}{V}_{it}\). We call the ensemble defined by \({A}_{I}^{e}\) an eigen ensemble of the system.

From \({\rm{Tr}}C={C}_{0}\), we have the relation

$$\mathop{\sum }\limits_{I=1}^{r}{\sigma }_{I}^{2}=1.$$
(11)

Therefore, we consider σI as the probability amplitude and \({\omega }_{I}={\sigma }_{I}^{2}\) as the probability of the eigen ensemble \({{\boldsymbol{A}}}_{{\boldsymbol{I}}}^{{\rm{e}}}\) in the statistical ensemble A. This is analogous to quantum mechanics, where a wave function can be written in terms of eigenfunctions. The square of the absolute value of the expansion coefficient is the probability of the corresponding eigen microstate.

Results

Stranding phenomenon

Understanding and predicting real-time passenger flow in subway systems is essential for comprehending the dynamics of stranding phenomenon within the subway network and thereby enhancing system safety, sustainability, and the overall quality of transportation services. We propose a heuristic approach that leverages big-data technologies to infer and validate uncertain information using limited deterministic data. Specifically, this method integrates AFC data with train operation schedules (details in Supplementary 1.1), selecting passengers with known travel paths as “witnesses” to construct a witness model and voting mechanism for identifying the most probable travel paths of other passengers.

Once the complete trip chains across the network are inferred, we estimate both the passenger load on each train and the number of stranded passengers at each station. Figure 2 illustrates the spatial distribution of stranded passengers in the Beijing subway system on October 16, 2020, as derived from the inferred trip chains. During the morning peak, stranded passengers were predominantly concentrated in the northeastern, eastern, and southwestern outskirts of the city, forming several large stranding clusters due to the PPS phenomenon. At midday, stranded passengers were found only at a few stations, including Beijing South Railway Station, Beijing West Railway Station, and Beijing Railway Station. By the evening rush hour, the number of stranded passengers increased, primarily originating from the central urban district. As the evening progressed and subway operations approached their conclusion, there were some stranded passengers at the stations near commercial centers, in addition to the railway stations. This pattern demonstrates the diurnal variations in passenger flow within the rail transit network, correlating with urban land-use patterns, occupational and residential distributions, and station characteristics.

Fig. 2: Distribution of stranded passengers in the Beijing subway system on October 16, 2020, based on identified trip chains.
figure 2

ad The distribution of stranded passengers during the time periods 8:00–8:15, 12:00–12:15, 18:00–18:15, and 22:00–22:15, respectively.

To validate the effectiveness of the proposed inference model, we deployed 50 observers to collect on-site data for 400 trains across multiple platforms. Comparative evaluation shows that our method achieves a path inference accuracy of 98.6%, outperforming the Passenger Itinerary Inference Model44 (85.3%) and the Reference Passengers Method45(91.6%). In addition, the accuracy of station-level stranding estimation was also verified, and the proximity of the model’s estimates to real-world observations further supports the applicability of the proposed method in large-scale urban rail networks. Detailed evaluation procedures and results are provided in Supplementary 2.1.3.

Realistic model

To investigate the phenomenon of PPS in subway systems, we developed a dynamic model using the actual Beijing subway network as a case study. Beijing is a world-class megacity with a population of 23 million permanent residents. As of July 26, 2022, the Beijing subway network is composed of 17 lines with a total of 330 operational stations and 69 transfer stations, constituting a transportation system of significant scale. The job and residential centers in Beijing demonstrate TOD characteristics, heavily influencing the daily commute of a large portion of the population. The model system, illustrated in Fig. 1b, comprises three east-west lines (Lines 1, 6, and 7), three north-south lines (Lines 4, 5, and 8), and three circular lines (Lines 2, 10, and 13), totaling 234 stations (N = 234). Among these, 36 are transfer stations and 10 are terminal stations (ends), representing the Beijing subway’s complex topology. These nine earliest established lines, operating in the core area of Beijing, serve as the main arteries of the subway system. This model accurately represents the scale, importance, and topology of the system, capturing its daily operational features. To focus on essential physical properties and reduce computational load, we excluded newly constructed lines that have not reached supply-demand equilibrium from our study.

A dynamic evolutionary model system is proposed within this subway model to quantitatively investigate the phenomenon of PPS. This model system consists of two types of active basic units—passengers and trains—that interact through a service relationship. The service process involves operating trains to satisfy passenger demand. Trains operate according to a predetermined schedule, ensuring punctuality. When a train arrives at a station, onboard passengers decide whether to disembark based on their destination needs. Simultaneously, waiting passengers choose whether to board depending on the compartment’s crowdedness. Through computer simulations, the dynamic trajectories of passengers and trains can be obtained (more details in Supplementary 1.2). To elucidate the fundamental physical characteristics of PPS, we utilize a simulation system referred to as the “realistic model”. In this System, the rate of passenger demand depends on time, exhibiting rush hour patterns. The positions of OD pairs reflect the tidal flow of real commuting scenarios. The simulation time is measured in seconds, with the system state recorded every 10 min.

This study uses passengers’ average waiting time and the scale of stranding as order parameters to characterize the PPS phenomenon. Passenger waiting time, denoted as tw, increases due to the PPS phenomenon, serving as a key metric for evaluating system service efficiency. To quantify the PPS phenomenon in the subway network, we develop a quantitative framework based on the physical concept of clusters, combining evolving traffic dynamics with network structure. Instead of using the typical structural topology, we consider only stations with stranded passengers to be functionally connected. Thus, we can characterize and understand the dynamics of the PPS phenomenon through the formation and dissolution of clusters. The scale of stranding in the system is characterized by three order parameters: the total number of stations in stranding clusters, ns; the size of the largest cluster, mc, measured by its number of stations; and the total number of stranded stations, nt.

Transition behaviors from spatiotemporal supply-demand imbalance

Large cities exhibit significant spatial separation between job and residence centers, particularly influenced by the TOD urban development model. Citizens tend to select residence and job locations along subway lines, resulting in a spatiotemporal imbalance in commuting demands, especially during rush hours and with long-distance travel patterns. To model the non-steady-state evolution of PPS, a tidal supply-demand model at a daily time scale based on the spatiotemporal characteristics of AFC data and train timetable data is constructed. The AFC data covers the entire weekdays from May 10th to May 14th, 2021, for the 9 subway lines depicted in Fig. 1b of the model (more details of passengers’ related data in Supplementary 1.1.1). The AFC data consists of daily average 3,860,008 records of passengers (Nr) and 5266 records of trains (Nori). The timetable data is sourced from the Beijing Subway Official (more details in Supplementary 1.1.2). The spatiotemporal mismatch between supply and demand is the primary mechanism of PPS phenomena. In the simulation, the supply scale is fixed at the real supply level, while the demand scale is varied to investigate the effects of service shortages on PPS. The demand scale is defined as Pr = Nd/Nr, where Nd denotes the total number of passengers simulated in the entire network throughout one full day, and Nr represents the corresponding real-world passenger count on the same day. We generate Nd OD pairs of demand by sampling the OD pairs in the same time interval based on the probability Pr (see parameter settings and validation in Supplementary 1.2.4).

The computational results based on real-system data exhibit spatiotemporal heterogeneity. The time-dependent number of stranded passengers can be visualized in Supplementary Movie 1 (Pr = 1.0) and Supplementary Movie 2 (Pr = 1.6), which are available in the Supplementary Materials (see Supplementary 3). In the spatial dimension, there are four significant spatially independent clusters of stranded stations (Cluster I–IV), regardless of the demand scale being low (Pr = 1.0, more details in Supplementary 2.2.5, Supplementary Fig. 13e) or high (Pr = 1.6, more details in Supplementary 2.2.5, Supplementary Fig. 13j). These clusters represent distinct commuting “corridors” connecting the residence centers located in the suburbs (north: Huilongguan, Tiantongyuan; south: Daxing; east: Beijing Municipal Administrative Center and North Three Counties, including Sanhe City, Dachang Hui Autonomous County, and Xianghe County; west: Shijingshan) to the job centers situated in the city center. The formation of these commuting corridors is attributed to the influence of subway construction and the spatial distribution of residential and job areas, thereby characterizing Beijing as a TOD city. The list of stations (names and labels) in each cluster can be found in Supplementary 2.2.5, Supplementary Tables 8 and 9. In the temporal dimension, the system exhibits rush hour characteristics. Several time points are selected to observe PPS, as depicted in Supplementary 2.2.5, Supplementary Fig. 13. For a demand scale of Pr = 1.0, at 7:10, only a few isolated stations exhibit stranding phenomena, and these stations are spatially independent. By 8:00, PPS occurs, signifying the association of stations with stranded passengers and the formation of clusters. By 8:20, the size of these clusters reaches its maximum. The stranding phenomenon completely vanishes from the network by 13:00 (see Supplementary 2.2.5, Supplementary Fig. 13a–d). When the demand scale is high, such as Pr = 1.6 (see Supplementary 2.2.5, Supplementary Fig. 13f–i), the morning rush hour reveals strong associations between stations with stranded passengers, resulting in the formation of distinct clusters. As the morning peak subsides, the overall scale of PPS gradually declines. Compared to systems with lower demand, the clusters formed during the morning rush hour in high-demand systems do not fully dissipate by the onset of the evening rush hour (see Supplementary 2.2.5, Supplementary Fig. 13i). The system continues to exhibit high levels of stranding throughout the day, reflecting a persistently low efficiency in service delivery.

In the context of spatiotemporal heterogeneity driven by real-system data, both passenger waiting time and three order parameters exhibit dynamic fluctuations over time. Alternatively, to characterize the non-equilibrium responsive behaviors of the system, one can introduce non-steady-state dynamics by increasing the demand level in a system that is in a steady state and measuring the relaxation time required for the system to establish a new steady state. In this study, the morning rush hour and evening rush hour (see Supplementary 2.2.1, Supplementary Fig. 10) are considered as two successive stimuli imposed on the system. Prior to the morning rush hour, the system is in a steady state where no stations with stranded passengers are observed. If the relaxation time of the system after the morning rush hour stimulus is shorter than the time interval between the morning rush hour and evening rush hour, the system consistently returns to a steady state before the evening rush hour begins. This state is referred to as the “normal phase” in the present work. Conversely, if the relaxation time is shorter than the time interval between the morning rush hour and evening rush hour, the accumulation of stranding phenomena within the system leads to a continuous decline in service efficiency. This state is referred to as the “stranded phase”. By varying the passenger demand scale (Pr), the changes in average passenger waiting time and the three order parameters over time are plotted to observe the system’s responsive behaviors, as presented in Fig. 3. The average passenger waiting time directly reflects the system’s service efficiency. To illustrate the phase transition characteristics, Fig. 3a presents the summation of the average passenger waiting time over the entire day as a function of Pr. Importantly, a transition point is observed at Pr ≈ 1.4, which can be defined as the threshold for resilience failure. To validate the reasonableness of the phase transition behavior, we input passenger and train schedule data from March 3–7, 2019, April 5–9, 2019, August 4–8, 2019, and October 7–11, 2021, and similarly behavior can be seen in Supplementary 2.2.2, Supplementary Fig. 11. When the demand scale is below this threshold, such as Pr = 1.0 representing the demand scale on a typical day, three order parameters reflecting the level of stranded passengers exhibit distinct morning and evening rush hour characteristics with two peaks in the temporal dimension. Moreover, these two peaks do not overlap, creating a clear time window where no stranding phenomenon occurs. This finding implies that under a normal demand scale for the morning and evening rush hour stimuli, the existing subway service effectively suppresses the occurrence of PPS within a limited time, without affecting the subsequent rush hour. As the demand scale decreases, both the peak values of the three order parameters for the morning and evening rush hours diminish. When Pr < 1.0, only the morning rush hour exhibits stations with stranded passengers and stranding clusters, while the evening rush hour is nearly absent. As Pr increases, the relaxation time for the morning rush hour extends, and the start time of the evening rush hour is advanced. After Pr reaches 1.4, the stranded station clusters generated by the morning rush hour fail to dissipate completely before the onset of the evening rush hour. Consequently, there is no time window without stranding between the morning rush hour and evening rush hour, making the subway network incapable of providing effective service due to PPS. This observation contrasts with the distinct dynamic characteristics of the morning rush hour and evening rush hour, which are clearly separated when Pr < 1.4. Hence, we define Pr = 1.4 as the transition point of this system, serving as a metric for measuring the threshold of service resilience failure.

Fig. 3: Average passenger waiting time and order parameters over time.
figure 3

a Averaged passenger waiting time (tw) as a function of Pr, which gives a transition point around pr = 1.4. bd Temporal evolution of mc, ns, and nt throughout the day as functions of Pr, which show rush hours of morning and evening. The transition from the Normal phase to the Stranded phase can be determined by whether there is a correlation between the two peak periods.

In general, analytically proving the existence of a phase transition point requires the use of renormalization group theory or Landau’s phenomenological theory, both of which have been highly successful in explaining critical behavior in equilibrium phase transitions. However, for the non-equilibrium system studied in this work, there is currently no well-established analytical framework available for reference. Therefore, we refer to this transition as a phase transition-like phenomenon, rather than a rigorous phase transition, and we hope that the study of such behavior in PPS can inspire future research on service systems with spatiotemporal correlations.

To verify the robustness of the results, we conducted a sensitivity analysis on the impact of passenger demand fluctuations. In the simulation, passengers were independently sampled from empirical data, with the expected demand scale Pr being identical across all stations. To examine the effect of demand variability on system responses, a 5% random perturbation was introduced to the demand scale of each station, relative to the system-level Pr. The results show that all four order parameters exhibit significant changes around Pr≈1.4, which closely matches the transition point identified in the main simulation. This confirms that the model is robust against moderate demand perturbations and that the experimental findings are stable and reliable (see Supplementary 2.2.3 for details).

Dynamics mechanism of cluster growth

Understanding the dynamic mechanism behind PPS generation is crucial for comprehending the phase transition-like behaviors in service systems. It holds significant practical implications for enhancing the resilience of the subway. The emergence of PPS within complex dynamical systems, which include basic demand and supply units, is due to intricate interconnections. In this study, the eigen microstate method of non-equilibrium statistical physics is used to uncover the characteristic dynamic patterns of PPS formation. This method aids in understanding both the formation and dissolution of clusters. According to the singular value decomposition (SVD)43, the spatiotemporal correlation matrix A, representing stranded passenger counts at each station, can be decomposed into A = U Σ VT. Here, U and V represent the left and right singular vectors corresponding to the spatial and temporal modes, respectively, and Σ is a diagonal matrix containing the singular values σI. By equation \({{\boldsymbol{A}}}_{I}^{{\rm{e}}}\equiv {{\boldsymbol{U}}}_{I}\bigotimes {{\boldsymbol{V}}}_{I}\), we obtain \({{\boldsymbol{A}}}_{I}^{{\rm{e}}}\). We call the ensemble defined by \({{\boldsymbol{A}}}_{I}^{{\rm{e}}}\) an eigen ensemble of the system, where I represents the index of eigenstates. We consider σI as the probability amplitude and \({\omega }_{I}={\sigma }_{I}^{2}\) as the probability of the eigen ensemble \({{\boldsymbol{A}}}_{I}^{{\rm{e}}}\) in the statistical ensemble A. The greater the probability ωI associated with an eigen microstate, the larger its contribution to the formation of the PPS phenomenon. The eigen patterns with the largest eigenvalues are crucial factors determining the PPS phenomenon. By comparing the spatiotemporal characteristics of these key eigen microstates with the spatiotemporal characteristics of supply and demand, the micro mechanisms underlying the formation of these eigen patterns can be identified. Considering that the four commuting corridors are independent in the spatial dimension, the eigen microstate method is applied separately to analyze Clusters I–IV.

Taking Cluster I (Fig. 4a) of the northern commuting corridor as an example, this corridor serves two adjacent large residential centers, Huilongguan and Tiantongyuan, collectively known as the “Huitian area” for commuting demands. This area covers approximately 63 square kilometers and accommodates nearly 900,000 residents, earning the title of “Asia’s largest sleeping town”. A large number of residents commute between the Huitian area and the city center by taking the subway as their daily transportation. We concentrate on the morning rush hour, from 6:00 to 13:00, to reveal the formation and vanishing of Cluster I. We take a time snapshot every 10 min to record the number of stranded passengers at each station in Cluster I, resulting in a spatiotemporal correlation matrix of stranded passenger counts with 43 snapshots. By performing SVD on this matrix, we obtain 8 independent eigen microstates \({({A}_{I}^{e})}_{it}\) and their eigenvalues ωI. ωI are shown in Fig. 4b, and the sum of probabilities of the top three micro eigenstates reaches 99.983%. We consider these three patterns, named the Local Pattern, Nonlocal Pattern, and Topology Pattern, based on their potential causes (more details in Supplementary 2.2.4), as the major mechanisms of the PPS phenomenon. They provide explanations for the impact of passenger demand on PPS, the propagation mechanism of PPS, and the impact of network topology on PPS. Similar analyses are conducted for Cluster II–IV (see Supplementary 2.3.2, Supplementary Figs. 1719), as well, leading to evolution mechanisms similar to Cluster I. It is worth noting that the eigen microstate method can be regarded as an unsupervised machine learning method that excavates hidden patterns from the spatiotemporal data. The interpretations of these patterns often require a phenomenological and empirical perspective46. Therefore, although the eigen microstate method in this study yields rigorous eigenmodes, the interpretation and naming of these patterns are somewhat subjective and should be used as references.

Fig. 4: Station distribution and probabilities of eigen microstates for Cluster I.
figure 4

a Distribution of stations and critical stations within Cluster I. The labeled critical stations include Station 200 (Huoying), Station 87 (LisuiQiao), Station 231 (BeiYuan), Station 232 (WangjingXi), Station 86 (Tiantong Yuan), Station 85 (Tiantong Yuan), Station 88 (Lishuiqiao Nan), and Station 89 (BeiyuanluBei). b Probabilities of the first 8-th eigen microstates corresponding to Cluster I during 6:00–13:00.

The impact of supply and demand scale on cluster growth

The equilibrium between supply and demand is a fundamental factor that determines the state of the system. Therefore, we investigate the changes in the influence of different patterns by manipulating the demand scale and supply scale. In the present study, we maintain the spatiotemporal characteristics of the supply and use the ratio of scheduled train departures to actual train departures as the system’s service supply scale, denoted as Ps. The details of the train departure frequency regulation scheme can be found in the Supplementary 2.3.3. The eigen microstate method is used to analyze the Local, Nonlocal, and Topological patterns of Cluster I. While adjusting supply and service scales, the network’s topology remains constant, rendering the absolute deviations in stranding due to the topological structure negligible. Thus, the shifts in the contributions of Local and Nonlocal patterns can be captured by the contribution of the Topological pattern. Figure 5a illustrates the proportional contribution of the Topological pattern depending on both Pr and Ps, which equals the combined Local and Nonlocal patterns by considering the normalization condition of these three contributions. The blue area represents supply surplus, while the red area represents supply shortage. In the region where Pr is relatively small and Ps is relatively large, the system does not exhibit stranding due to excessive supply. Thus, the eigen microstate method is not applicable, as indicated by the blank area in Fig. 5a. The black dashed line in the green region corresponds to the boundary of the combined changes in the Local and Nonlocal patterns. Below this boundary, the Topological pattern dominates the PPS phenomena, and the influence of the Local and Nonlocal patterns is minimal. With an increasing ratio of Ps over Pr, the influence of the Local and Nonlocal patterns gradually amplifies, confirming that these two patterns arise from the mismatch between supply scale and demand scale.

Fig. 5: Impact of demand regulation on passenger stranding patterns.
figure 5

a Contribution of Topological pattern depending on scales of supply and demand. b Contributions of Local pattern, Nonlocal pattern, and Topological pattern in the total variance for different values of Ps. c Contributions of Local pattern, Nonlocal pattern, and Topological pattern in the total variance for different values of Pr.

To examine the impact of supply scale regulation on the stranding phenomenon, we use Cluster I as an example. Under the condition of constant demand scale, we increase the supply scale on Line 5 and Line 13, where Cluster I is located, to enhance the supply scale while maintaining the spatiotemporal distribution characteristics of the supply. This allows us to observe the inhibitory effect of increased supply scale on the Local and Nonlocal patterns caused by demand surplus (see Fig. 5b), corresponding to the white dashed line parallel to the x-axis in Fig. 5a at Pr = 1.0. As shown in Fig. 5b (The contributions of the three patterns corresponding to different Ps are detailed in the Supplementary 2.3.4, Supplementary Fig. 21), with the increase in the supply scale, the contribution of the Topological pattern continues to rise, while both the Local and Nonlocal patterns are suppressed. In Fig. 5b, the increase in the contribution of the Topological pattern comes at the expense of decreased contributions from the Local and Nonlocal patterns. This indicates the validity of associating the Local and Nonlocal patterns with supply shortages.

When Ps > 1.5, the Nonlocal pattern, which is an important mechanism in the PPS, is almost completely suppressed, and the contribution of the Local pattern also experiences a significant reduction. The Local pattern is more sensitive to changes in the supply scale compared to the Nonlocal pattern. When Ps≈1.3, the contribution of the Local pattern decreases rapidly, indicating that the increase in supply scale directly meets the demand. Meanwhile, the contribution of the Nonlocal pattern decreases slowly. When Ps [1.3, 1.5], the Local and Nonlocal patterns exhibit mutual influences. With the increase of supply scale, the Nonlocal pattern shows a weak peak that initially increases and then decreases, while the Local pattern exhibits a valley. It is important to note that with the increase in supply, the absolute value of the stranding scale decreases, but the contributions of the Local and Nonlocal patterns slightly increase. The Local pattern is highly sensitive to supply change, leading to a decrease in its contribution as supply increases. The Nonlocal pattern is triggered by the stranding generated by the Local pattern, allowing it to propagate downstream through the PPS mechanism. Therefore, the regulation of the Nonlocal pattern by supply scale is indirect, with the response to an increase in supply lagging behind that of the Local pattern. It is worth noting that when the supply exceeds 1.5, the contribution of the Nonlocal pattern is almost completely eliminated, while the improvement in the Local pattern’s contribution slows with further increases in the supply scale.

The results validate the rationality of the previously analyzed cluster growth mechanism and provide valuable insights for formulating regulatory policies. Increasing the supply within a specified range is beneficial for suppressing both Local and Nonlocal patterns effectively. The influence on the Nonlocal pattern gradually strengthens as the supply increases to the range of 1.3–1.5. However, once the supply exceeds 1.5, the inhibitory effect of the Local pattern significantly diminishes, and the Nonlocal pattern is completely eliminated. An increased transportation supply has a limited impact on suppressing both Local and Nonlocal patterns. To further enhance the system’s service efficiency, it is recommended that regulatory policies focus on optimizing the network’s topological structure.

In the context of constant supply, accommodating passenger demand remains a critical issue. Therefore, we keep the supply constant at its real scale and adjust the demand scale Pr, while monitoring the contributions of the three patterns. The results are shown in Fig. 5c, corresponding to the white dashed line parallel to the y-axis in Fig. 5a, which represents Ps = 1.0. The demand regulation method aligns with the approach described in Methods section, as implemented in The simulation system. As illustrated in Fig. 5c, after Pr exceeds 0.6, an increase in Pr leads to the Local and Nonlocal patterns becoming the dominant factors contributing to passenger stranding. The Local and Nonlocal patterns are both enhanced, while the influence of the Topological pattern significantly diminishes, nearly eliminating its contribution. This further confirms that the Local and Nonlocal patterns originate from the matching between demand and supply. The results suggest that the supply scale is effective in suppressing the Local and Nonlocal patterns when the demand is high, particularly in suppressing the Local pattern. When the demand scale is below 0.6, increasing the supply has a limited effect on suppressing the Local and Nonlocal patterns; therefore, alternative approaches like modifying the network structure to enhance system efficiency should be considered.

Furthermore, we observed that as Pr increases, the Topological pattern and the Local pattern of Cluster I, respectively, dominate at different stages, while the influence of the Local pattern in Clusters II–IV remains significant. This is due to the fact that Cluster I was constructed earlier and has a relatively complex topological structure. High-demand and transfer stations are closely located, thereby intensifying the combined impact of multiple patterns on passenger stranding. Moreover, during the process of changing Pr, the Topological pattern in this cluster has a relatively larger contribution compared to other clusters. Conversely, the TOD pattern is more dominant in Clusters II–IV, which consist predominantly of non-transfer stations. Consequently, the Local pattern caused by demand remains prominent in these clusters.

Discussion

In this study, we examine the subway system as a complex system that consists of two types of basic units, namely passengers and subway trains, with a service relationship. We propose a heuristic approach, named the Heuristic Witness Method, to delineate travel paths and identify stranding states in the system. By employing computational simulations of a big-data-driven model system, we explore the dynamics of the stranding phenomenon within the subway system, particularly how it evolves in response to variations in the scale of supply. Our computational results unveil analogous behaviors of phase transitions in both service efficiency, as quantified by the average waiting time for passengers, and the scale of the stranding phenomenon within the subway. We identify a transition point, which quantitatively characterizes the threshold of subway service resilience failure. Employing the method of eigen microstates from non-equilibrium statistical physics, we elucidate the formation mechanisms of the PPS phenomenon. These achievements enhance the understanding of the features of service efficiency in subway networks and provides a theoretical foundation for strategies such as topological planning and optimization of train schedules to improve service. The proposed framework, involving complex systems comprising multiple interdependent basic units with service relationships, offers a valuable perspective for studying urban systems. In the pursuit of smart cities, this framework serves as a reference for evaluating urban planning, governmental policies, and business decisions. Furthermore, the methodology used in the present work has broader implications for similar scheduling and logistics management challenges encountered in other service systems, including demand-driven or flexible bus scheduling, elevator dispatching in skyscrapers, supply chain management, medical appointment assignment, logistics management for aircraft carriers, and container logistics management.