Traffic Incident Detection Using Probabilistic Topic Model

Akira Kinoshita Atsuhiro Takasu, Jun Adachi The University of National Institute of Informatics 2-1-2 Hitotsubashi, Chiyoda, 2-1-2 Hitotsubashi, Chiyoda, Tokyo, Tokyo, Japan [email protected] {takasu,adachi}@nii.ac.jp

ABSTRACT economic loss to society. A technology that can detect traf- Trac congestion is quite common in urban settings, and is fic incidents in real time and alert people accordingly would not always caused by trac incidents. In this paper, we pro- therefore be a desirable way of reducing these ill e↵ects. pose a simple method for detecting trac incidents by using Against this background, there have been many studies probe-car data to compare usual and current trac states, on AID, e.g., [2, 13]. Most of the approaches exploit data thereby distinguishing incidents from spontaneous conges- sent from stationary sensors and cameras installed on roads. tion. First, we introduce a trac state model based on a However, the installation and maintenance of such sensors probabilistic topic model to describe trac states for a vari- is expensive, with only the main routes likely to have them ety of roads, deriving formulas for estimating the model pa- [17]. On the other hand, probe-car data (PCD), on which rameters from observed data using an expectation–maximi- we focus in this paper, are becoming increasingly important, zation algorithm. Next, we propose an incident detection as the number of probe cars and the size of the associated method based on our model, which issues an alert when a data archives increase. PCD includes timestamps and the car’s behavior is suciently di↵erent from usual. We con- locations of vehicles, and may contain additional values such ducted an experiment with data collected on the Shuto Ex- as the probe cars’ speed and direction. Although a PCD sys- pressway in Tokyo over the 2011 calendar year. The results tem cannot monitor all cars, it enables trac administrators showed that our method discriminates successfully between to watch a vast area at a lower cost than by using stationary anomalous car trajectories and the more usual, slowly mov- sensors. In addition, a PCD system can follow a probe car’s ing trac. However, our method does sometimes classify sequence of movements in detail, which is hard to achieve abnormally fast-moving cars as trac incidents. via stationary sensors, and trajectory mining can be applied to the collected data. Using PCD for freeways, it is easy to detect any reduction Categories and Subject Descriptors in speed, which sometimes implies congestion, by analyzing H.2.8 [Database Management]: Database Applications— the speeds of the probe cars. However, this method is less Data mining, Spatial databases and GIS applicable to local streets where there are many crossings and trac lights that cause cars to stop frequently but nor- mally. Moreover, speed reduction is not always an abnormal General Terms circumstance, even on freeways, and is not always caused by Algorithms incidents such as accidents, which we would regard as sud- den and unusual trac events in this paper. Keywords There are two types of congestion: spontaneous and ab- normal [2]. Detecting spontaneous congestion is less impor- Anomaly detection, automatic incident detection, proba- tant, as it originates in road design and urban planning. bilistic topic model, probe-car data, trac state estimation Any road may have potential bottlenecks, such as upslopes, curves, junctions, tollgates, and narrow sections. Vehicles 1. INTRODUCTION are likely to slow down at the bottlenecks, with vehicular Automatic incident detection (AID) is a crucial technol- gaps shortening and drivers in the following cars having to ogy in intelligent transport systems, particularly in terms brake. Congestion will then occur even without a trac of reducing congestion on freeways [10]. Trac incidents of- incident [7]. Spontaneous congestion also occurs when the ten cause trac congestion, causing great inconvenience and trac demands exceed the trac capacity of such bottle- necks, and it is not resolved until the demand drops below the capacity [12]. The drivers may be familiar with the lo- cations of such potential bottlenecks, and they can avoid them. On the other hand, abnormal congestion originates in trac incidents, which need to be detected in real time to prevent or resolve any sudden heavy congestion. (c) 2014, Copyright is with the authors. Published in the Workshop Pro- In this paper, we propose an AID method for detecting ceedings of the EDBT/ICDT 2014 Joint Conference (March 28, 2014, trac incidents by discovering abnormal car movements, Athens, Greece) on CEUR-WS.org (ISSN 1613-0073). Distribution of this paper is permitted under the terms of the Creative Commons license CC- distinguishing such movements from those occurring in spon- by-nc-nd 4.0.

323 taneous congestion. Our method measures di↵erences be- tween the current and usual trac states, and has two as- Table 1: Notation Notation Definition pects; namely, trac state estimation and anomaly detec- K Number of trac states. tion. First, we employ a probabilistic topic model [4] to k Index of a trac state. model generation of PCD, which is influenced by hidden traf- S Number of segments. fic situations, such as “smooth” and “congested.” The model s Index of a segment. introduces a single set of several hidden component states, x n-th data in the s-th segment. that are associated with probabilistic distributions over the sn N Number of observations in the s-th segment. PCD values, and all the road segments have their respec- s Parameter of the k-th distribution. tive mixing coecients. Using archived PCD, maximum- k Mixing coecient vector in segment s. likelihood parameters of the model are estimated by an ex- s ( s s=1, ,S , k k=1, ,K ). pectation–maximization (EM) algorithm. The estimated ··· ··· (s, x) Tra{ }c state in{s when} x was observed. model reflects the usual state over the whole observation (s) Usual trac state in s. period. Our incident detection method simply follows the d(s, x) Divergence of (s, x) from (s). intuitive meaning of “anomaly.” To detect incidents, the X Set of data observed in the s-th segment, proposed method estimates the hidden state behind an ob- s i.e., X = x ,x , ,x . served PCD value and compares this current state with the s s1 s2 sNs X Whole set{ of data, i.e.,··· X = }X , ,X . usual state. If the current state is significantly di↵erent from 1 S X Data sequence from car c, { ··· } the usual state, it is recognized as an anomaly. c i.e., X = (s ,x ), (s ,x ), , (s ,x ) . We conducted an experiment using PCD observed for three c 1 1 2 2 Nc Nc D(X ) Divergenceh of X . ··· i of the routes of the system in Tokyo over c c the 2011 calendar year. The experiment showed that the proposed method can be e↵ective for AID. The main contributions of this paper are as follows. features: v(d, t, l), v(d, t, l) v(d, t 1,l), v(d, t, l 1) and v(d, t, l +1) v(d, t, l), where link l 1 is the next link up- We propose a method for estimating trac states by stream of l, and l + 1 is the next link downstream. These • applying a probabilistic topic model to PCD, whereby feature vectors are filtered using the heuristics above and an- road segments are characterized in terms of their ex- alyzed by distance-based outlier detection. In another AID pected performance. study, Akatsuka et al. [2] proposed an alternative feature vector. From the viewpoint of machine learning, AID can We propose a new method for detecting anomalous car • be regarded as a classification problem. Abdulhai et al. [1] trajectories according to the di↵erences between the used neural networks, and Yuan et al. [18] used support estimated states behind the trajectory and the usual vector machines, to classify the observed vectors from sta- states indicated by the learned model, whereby the tionary sensors as being incident based or otherwise. AID detection is conducted adaptively in terms of the seg- can also be regarded as an application of the change-point ments. detection problem in time-series analysis, with Wang et al. Our experiment showed that the usual trac state [13] developing a hybrid method using time-series analysis • could be estimated using the observed PCD, and that and machine learning. our AID method had good selectivity for anomalous In this paper, we regard the AID problem as an anomaly behavior by cars encountering incidents. detection problem. Previous work exploits characteristics of congested trac, such as slowdown, in which vehicular speed decreases even in the absence of a trac incident. We 2. RELATED WORK take another approach to follow the intuitive meaning of Although many studies have considered the trac state “anomaly”; namely, an event di↵erent than usual. For this estimation problem, there is no general agreement about a purpose, the trac should be described by a probabilistic formal definition of a“trac state.” Some research estimates model. We therefore exploit the idea of probabilistic topic the trac state in terms of vehicular speed [11, 19], and models, which was originally studied in the field of natural this kind of estimation characterizes states, i.e., quantized language processing [5, 4]. The proposed method estimates speeds, as“free”or“congested”[6]. Yoon et al. [17] proposed both a set of trac states over an entire route and the mix- two feature values based on vehicular speed to detect a“bad” ing coecients for each road segment, with a trac state trac state, i.e., slow trac. In contrast, Kerner et al. [8] corresponding to a topic. used travel time. Xia et al. [15] used a clustering method to identify congested trac in a feature space involving trac flow, speed, and occupancy, which has been well studied in 3. METHODOLOGY trac engineering [12]. Table 1 summarizes the notations used in this paper. AID can be considered to be an application of anomaly This section describes our trac state model and incident or outlier detection. Zhu et al. [20] applied the outlier de- detection method. We first introduce a method for applying tection methods to feature vectors carefully extracted from a probabilistic topic model to PCD. Our task is to estimate PCD using heuristics. If an incident occurs, cars upstream the model parameters using a PCD archive and to identify of the incident will travel slower and downstream cars will incidents by comparing the usual and current trac states, travel faster. In addition, a car passing before the incident which are obtained from the learned model. will travel faster at that position than one passing just after the incident. If v(d, t, l) is the vehicular speed in link l at 3.1 Traffic State Model time t on date d, Zhu et al. proposed the following four Intuitively, we can identify some trac states as “smooth”

324 or “congested” regardless of location. Vehicles travel fast in gorithm, using X as training data [3]. For simplicity, we smooth states and behave in a stop-and-go fashion in heavily introduce the symbol as a set of all parameters in the congested states. When observing the speed of a probe car, model. For the entire set X of observed data, the likelihood the value is likely to be small if the car is in “congested under the model introduced above is given by the following trac,” or large if the trac is “smooth.” The value will equation: also be a↵ected by geographical conditions, such as curves S N K and slopes. In short, the behavior of a car is a↵ected by s L(X)= ⇡skp(xsn k). (3) the surrounding trac state, and the observed values for | s=1 n=1 k=1 the probe car will change, whereas the trac state is latent X and varies according to the time and place. This relation The update equations are derived by considering the maxi- between trac states and PCD can be modeled using the mization of the following Q function under constraint (2): latent Dirichlet allocation [5], the simplest topic model [4]. S Ns K Trac states are strongly related to roads, so we introduce Q(X, , ˆ) = p(k xsn, ˆ) log p(k, xsn ), (4) the segment as the unit for watching trac. The segment | | s=1 n=1 k=1 is defined independently of the PCD by the spatiotemporal X X X space of observation. For example, one such segment could where be defined as the section between Interchanges A and B ⇡ˆskp(xsn ˆk) on the inbound direction of Route 3 between 6 a.m. and p(k xsn, ˆ) = snk (5) K | 9 a.m. PCD includes timestamps and location data, that | ⌘ ⇡ˆskp(xsn ˆk) are obtained via GPS and are represented by longitude and | k=1 latitude, and each probe-car observation can be assigned to X p(k, xsn ) = ⇡skp(xsn k), (6) a predefined segment. | | PCD also has information on values such as speed and and ˆ refers to the parameters estimated in the previous direction that can be recorded directly in the PCD or cal- EM iteration. culated using sequential observation. Here, all the observa- This Q is maximized by introducing Lagrange multipli- tions are aggregated for each segment, and a set X of the s ers and setting its partial derivative to zero. The update observed data for the s-th segment is obtained. The symbol equation for k is then derived by solving the equation: xsn,then-th value of Xs, might have either a scalar or a vector value. For simplicity in this paper, we assumed that S Ns snk xsn was a scalar value, but our method could be extended p(xsn k)=0. (7) p(xsn k) k | to observe vector values. s=1 n=1 X X | Our model associates a trac state with a probability For example, assume a Poisson distribution for p when any distribution. Let K be the number of states, with the k-th xsn values, e.g., speed, are nonnegative integers, then: trac state corresponding to the parameter k. The prob- xsn k ability distribution for the s-th segment, given by p(x s), is k e | p(xsn k) p(xsn k)= , (8) described in terms of a mixture of these K distributions and | ⌘ | xsn! can be described as follows: where k is both the mean and variance, and is the only K parameter of p. In this case, by solving equation (7), the p(x s)= ⇡skp(x k), (1) | | update equation for k is derived as: k=1 X S N where ⇡ is the mixing coecient for the k-th state and s sk x satisfies the conditions: snk sn s=1 n=1 K k = X X . (9) S Ns 0 ⇡sk 1, ⇡sk =1 (2)   snk k=1 s=1 n=1 X X X for each s. The state parameters 1, , K are identi- { ··· } For the mixing coecient s for the s-th segment, we obtain, cal for all segments, but the mixing coecient vector s = regardless of p, the equation: T (⇡s1 ⇡sK ) is di↵erent for each segment. By using a global ··· Ns k, we can compare and characterize segments in terms of local s. For example, straight sections are dominated by snk n=1 “smooth” states, with sections that include tollgates that are ⇡sk = X . (10) dominated by “congested” states. Ns Finally, for each segment, the generative process for this We now have the EM algorithm for estimating the param- model was as follows. eters of our trac state model: After generating at ran- dom, the EM iteration alternates between the E step, which 1. Choose a hidden state k multinomial probability calculates all using equation (5), and the M step, which distribution Multi( ). ⇠ snk s updates according to equations (7) and (10), until the log 2. Generate the value xsn p(xsn k). likelihood log L(X) converges. ⇠ | 3.2 Parameter Estimation 3.3 Incident Detection Our model is described by a mixture distribution, with We have now described our trac state model and its pa- its maximum-likelihood parameters estimated by an EM al- rameter estimation method. Given the estimated parameter

325 G:Good, M:Moderate, S:Stop (s) G G G G G M S G G (s, x) G G M S S S G Xc x1 x2 x3 x4 x5 x6 x7 route segment 1 2 3 4 5 6 7 8 9

Figure 1: Concept of divergence comparison

and the value x observed in segment s, the posterior dis- tribution is given by p(k x, s). We now define the current trac state when x was| observed, denoted by (s, x), as the maximum probable state given x. Using the posterior distribution with Bayes’ theorem, (s, x)isestimatedas: Figure 2: Three routes of Shuto Expressway within the Tokyo area (s, x) = arg max ⇡skp(x k) . (11) k { | }

Meanwhile, the learned model itself reflects the usual state tion for p as equation (8). The divergence is derived as: over the whole observation period because the parameters (sn,xn) are estimated to fit the distribution in the dataset. We can d(sn,xn)=(sn) (sn,xn) + (sn,xn) log . (sn) therefore define the usual trac state for the s-th segment, (14) denoted by (s), as the maximum probable state: The behavior of a car c is determined as anomalous if the estimated state behind the observed data sequence Xc (s) = arg max ⇡sk. (12) is quite di↵erent from the usual state. We define the di- k vergence of Xc from the usual state, denoted by Dall(Xc), We now have the usual and the current trac states for as: each segment. Figure 1 describes our idea of incident de- Nc tection via divergence comparison. For example, the usual Dall(Xc)= d(sn,xn). (15) n=1 state (s) may indicate smooth trac in a straight mid- X night segment, congested trac in a rush-hour segment, or The more a car behaves di↵erently from its usual behav- stop-and-go trac in segments that contain tollgates for any ior, the larger Dall(Xc)willbe. Dall(Xc) is considered as time of day. If (s) indicates congested trac and (s, x)is a score of the degree of anomaly, with c being determined also congested, the current trac remains usual and would as anomalous when Dall(Xc) is suciently large, i.e., larger not be considered an anomaly. If the usual state (s) indi- than a predefined threshold. cates free-flowing trac and the current state (s, x) indi- There are two points to consider about Dall(Xc). First, cates stop-and-go trac, then it would be suspected that an Dall(Xc) will also increase the longer the car c runs, and any anomaly caused by an incident has occurred. car would eventually be determined as being anomalous. We Our AID method measures the degree of anomaly for each therefore define the normalized divergence D(Xc)asthesum probe car’s trajectory. Assume that a probe car c traverses a of the largest N divergences d(sn,xn)ifNc is not less than road, observing a set of Nc values. Let Xc be the sequence of N. Otherwise, D(Xc) is equivalent to Dall(Xc). We have data such that each is a tuple of segment and value observed used D instead of Dall in the rest of the paper. Second, by c as described in Table 1. Let xn be an observed value when a car generates values periodically, no observation or in a segment sn. Of course, we can count how many times multiple observations in a trajectory can be assigned to a (sn,xn) di↵ers from (sn), but this approach regards ma- single segment. Our idea of divergence comparison in Figure jor di↵erences in the same light as minor di↵erences, which 1 assumed that one segment corresponded to one current perhaps stem from individual variation rather than from a state, which might require interpolation or aggregation of trac incident. We therefore introduce the divergence of the data for each segment. current state from the usual state, denoted by d(sn,xn), to quantify the di↵erence between the two states. Because in 4. EXPERIMENT our model each state is associated with a probability distri- bution, we measure this di↵erence in terms of the Kullback– 4.1 Dataset and Preprocessing Leibler divergence of the current state’s distribution from Our probe-car dataset was obtained from probe cars trav- the usual state’s distribution. The k-th state corresponds to eling on three routes on the Shuto Expressway system in the probability distribution p(x k), and therefore: | Tokyo during 2011. The route information is displayed in Figure 2, with the three routes being shown as thick red p(x (sn,xn)) d(sn,xn)= p(x )log | , (13) lines on a map of Tokyo. | (sn,xn) p(x ) x | (sn) Data preprocessing comprised four phases: 1) segment X definition, 2) map matching, 3) trajectory identification, and where p is discrete. For example, assume Poisson distribu- 4) interpolation. These procedures are described below.

326 4.1.1 Segment Definition 0.030 line, inbound, Seg. #25 Trac state information is strongly related to geograph- ical conditions. We defined road segments by partitioning 0.025 each route on the expressway every 50 m for estimation at a finer level of granularity. The direction was noted. This 0.020 experiment did not consider temporal partitioning, even though the trac in some places changed considerably over 0.015 time. Therefore, each segment represented a certain 50-m Distribution length of roadway for a certain direction on a certain express- 0.010 way route, and all data for a segment were treated without 0.005 any consideration of time.

0.000 4.1.2 Map Matching 020406080100120 Despite the above definition of a segment being based on Speed [km/h] an expressway route, location data in PCD were described in terms of the two-dimensional (2-D) coordinates of longi- Figure 3: Histogram of speed of probe cars in a tude and latitude, with the original observation not being segment and estimated Poisson mixture related to any particular segment. It was therefore neces- sary to identify the segment that the probe car was in from the time and position for every observation, even though in 4.1.4 Interpolation this experiment we did not consider the timestamps. Map We used a probe car’s speed as the observed value in this matching is a technology for identifying the road segment experiment. However, as mentioned in Section 3.3, our de- on which the vehicle is traveling and for locating the vehi- tection method estimated the current state for each trajec- cle within that segment [9], and several methods have been tory for each segment that the car had passed. Our 50-m proposed [14, 16]. In this experiment, map matching was segment was too short for fast-moving probe cars to conduct conducted in the simplest way: a probe car’s observation observations in every segment, whereas a slow-moving car was matched with the nearest segment to the car’s location. generated multiple data in a single segment. We therefore The direction was estimated from the angular di↵erence be- formed an observation sequence for a trajectory by linear tween the probe car’s heading azimuth in the PCD and the interpolation, giving a sequence of consecutive observations segment’s azimuth for each direction, and then choosing the at 50-m intervals. direction that gave the smaller angle. 4.2 Parameter Estimation 4.1.3 Trajectory Identification In this experiment, the observed values represented the After map matching, each probe-car observation whose lo- speed of probe cars as nonnegative integers. We therefore cation was represented by coordinates in the 2-D space was assumed a Poisson distribution for the probability distribu- matched with the nearest-neighbor segment, as defined in tion corresponding to each trac state. the first phase of preprocessing. However, the observations We also assumed K, the number of trac states, to be 8. form a collection of punctuated data, with each observation In a preliminary experiment, we estimated the parameters of being separate from the others. Therefore, the continuous our trac model while varying the value of K up to 100, and movement of the car, i.e., its trajectory, is not directly avail- we used the Akaike information criterion (AIC) to evaluate able. To identify trajectories, we grouped all observations the model. However, the e↵ect of K was substantially less in the probe-car dataset by the car’s ID and sorted them than that of the likelihood for improving the AIC, with AIC by timestamp for each group, before concatenating them in being almost the same regardless of K.IfK is assumed chronological order whenever the time gap between two con- to be large, there is a tendency for multiple states to have secutive observations was 10 min or less. A probe car does almost the same distribution. not always travel the entire length of a route, because it can We implemented the EM algorithm described in Section enter or exit the route at intermediate junctions. For a car 3.2 using OpenMP for multiprocessing. The estimation was traveling on a single route, its trajectory can be visualized in executed on our 32-core Xeon computer for each route of the terms of a time–space diagram [12]. Figure 5 is an example Shuto Expressway. It took about 1 min for each direction of of such a diagram and will be described in detail later. the Shibuya and routes, and about 2 min for each After the trajectory identification, we labeled each trajec- direction of the . Figure 3 shows the actual tory, using the trac log made available by the administra- histogram for a segment of the inbound as a tor of the Shuto Expressway. This trac log is recorded via step line chart and the estimated Poisson mixture as a solid stationary sensors on or alongside the roads every 5 min, to- curved line. Each of the eight Poisson distributions was gether with notations about incidents such as accidents and multiplied by the mixing coecients ⇡sk, and each is also construction. A trajectory was labeled as anomalous when- shown in Figure 3 as dashed curves. The estimated curve ever a car passed a stationary sensor that had recorded an almost fits the actual histogram for the training dataset. incident at that time. Table 2 summarizes the statistical information for our probe-car dataset after trajectory iden- 4.3 Incident Detection tification. The number of anomalies means the number of Using the estimated trac model, we examined whether trajectories for a probe car passing the scene of an incident the proposed method could identify anomalous trajectories. when the incident occurred but does not indicate the num- We calculated the divergence for each trajectory and sorted ber of unique incidents. the trajectories in order of their divergence. The divergence

327 Table 2: Statistics on trajectories in our probe-car dataset Shibuya route Ikebukuro route Routes Inbound Outbound Inbound Outbound Inbound Outbound Period January 1, 2011 – December 31, 2011 (365 days) # of trajectories 100,581 95,386 95,293 88,345 128,789 114,942 #ofanomalies 4,259 2,475 4,365 3,891 6,089 5,603 Average travel distance [km] 5.7 5.8 6.4 6.7 7.5 8.1

Table 3: AID results Shibuya route Shinjuku route Ikebukuro route Routes Inbound Outbound Inbound Outbound Inbound Outbound Our method 0.912 0.812 0.927 0.919 0.902 0.933 AUC Baseline [20] 0.802 0.794 0.846 0.780 0.823 0.805

1.0 1.0 0.8 0.8 0.6 Proposed method 0.6 Proposed method

TPR 0.4 Baseline TPR 0.4 Baseline 0.2 0.2 0.0 0.0 0.00.20.40.60.81.0 0.00.20.40.60.81.0 1.0 1.0 0.8 0.8 0.6 Proposed method 0.6 Proposed method 0.4 Baseline 0.4 Baseline

Precision 0.2 Precision 0.2 0.0 0.0 0.00.20.40.60.81.0 0.00.20.40.60.81.0 FPR FPR (a) Ikebukuro route, outbound (the best case) (b) Shibuya route, outbound (the worst case)

Figure 4: ROC curves (upper frames) and precision vs. false positive rate (lower frames) of a trajectory was calculated by summing the top N di- our probe-car datasets. The results showed that our method vergences among the observations. In a preliminary exper- had better selectivity for cars that have passed incident lo- iment, we conducted the detection for several values of N, cations, despite using fewer heuristics about anomalies than obtaining the best result when N was 20. Because we were the baseline method. Figure 4 shows the ROC curves in the using 50-m segments, the divergences of trajectories were upper frames and the precision against FPR in the lower normalized to 1-km equivalents. frames. Although the ROC curve should connect points For comparison, we implemented a second method based (0,0) and (1,1), that of the baseline method broke o↵be- on Zhu et al. [20], which was described in Section 2. The fore (1,1) was reached, because the method filtered out some method was modified to enable its application to our data- feature vectors, with the number of subject trajectories be- set, and although it detected outlier segments represented ing less than the total number of trajectories. The AUC of by the pair of time and position, our system was evaluated the baseline method was calculated by interpolating linearly in terms of anomalous cars. Therefore, we judged that a de- between the right-hand end of the ROC curve and (1,1). Fig- tection event was successful if the detected car was labeled ure 4(a) shows the curves for the outbound Ikebukuro route, as an anomaly in our dataset, even if the detected segment which was the best case in our experiment. The precision for the detected car was not a segment involving an incident. exceeded 80% for the worst 1,000 trajectories. Figure 4(b) Our detection method gives an alert when the divergence shows the curves for the outbound Shibuya route, which was of a trajectory exceeds a given threshold, and the compared the worst case. method gives an alert when the average distance of a fea- Figure 5 shows examples of trajectories for the outbound ture vector from other vectors exceeds a given threshold. Shibuya route that had much divergence in terms of their The lower the threshold, the more alerts will be issued. We time–space diagram. Each plot shows the position of a probe evaluated the selectivity performance of the two methods car against time. The position is represented as the dis- in terms of a receiver-operating characteristic (ROC) curve. tance from the origin of the line: the bottom corresponds to An ROC curve is drawn by plotting the true positive rate the Tokyo interchange, the westernmost along the Shibuya (TPR), which is equivalent to recall, against the false posi- route, and the top corresponds to the Tanimachi (eastern- tive rate (FPR). The area under the curve (AUC) indicates most) junction. Horizontal pink lines indicate the positions the discrimination performance, with larger AUC values in- of interchanges and junctions. The inbound direction is the dicating better discrimination. direction from the bottom to the top in this diagram. There- The results are displayed in Table 3 and Figure 4. Table fore, trajectories downward and to the right involve travel- 3 reports the AUC of the proposed and baseline methods on ing along the outbound Shibuya route. The color of the plot

328 Shibuya route (2011/12/29) Shibuya route (2011/05/04) Tanimachi Tanimachi

Takagicho Takagicho

Shibuya Shibuya Shibuya Shibuya

Ohashi Ohashi Ikejiri Ikejiri Sangenjaya Sangenjaya

Yo g a Yo g a Tokyo Tokyo 03:00 03:10 03:20 03:30 03:40 03:50 04:00 04:00 04:10 04:20 04:30 04:40 04:50 05:00 Time Time (a) True positive example: a car involved in an accident (b) False positive example: an abnormally fast car

Figure 5: Time–space diagrams for probe cars indicates the speed of the probe car at that point. Green section. However, from Ikejiri to Yoga, the coecients for represents high speed (100 km/h), red is moderate speed (50 the faster states decrease as the slower states begin to domi- km/h), and blue is “almost stopped” (0 km/h). The color nate, because the cars usually travel more slowly in this sec- changes gradually according to the speed. The trajectory tion. Therefore, although the marked trajectory in Figure marked with an arrow in Figure 5(a) was the most anoma- 5(b) does not seem to include any incidents, this behavior lous trajectory, with this car being directly a↵ected by an was quite di↵erent from the usual running pattern, and our incident. The diagram shows that this car was “stop-and- method identified this as an anomaly. It is noteworthy that go” between Sangenjaya and Yoga. On the other hand, the our trac state model has enabled this sort of analysis, with marked trajectory in Figure 5(b) was ranked as no. 301 every segment being characterized using a single set of trac among the anomalous trajectories. This car did not en- states. Although we used the data sequence to give observa- counter an incident. The diagram shows the car traveling tions at 50-m intervals for each probe car, stationary sensors rapidly along the route. can also generate similar data except for tracking informa- tion for each car. Because parameter estimation does not 5. DISCUSSION require such information, this road characteristics analysis can be conducted using stationary sensors, and its output In Figure 4(b), the TPR of the proposed method was slug- might be applied to other problems; e.g., route guidance. gish when the TPR was around 0.1, indicating that the pro- The Shuto Expressway system has many bottlenecks, such posed method rarely detected anomalous cars correctly even as curves and narrow sections that involve frequent changes when the threshold was lowered to some degree. Cars whose in vehicular speed, unlike freeways. We speculate that this is trajectories became anomalous at this point traveled rapidly, the reason that our intuitive method found that “unusual” with the car of the marked trajectory in Figure 5(b) being car behavior worked better than a heuristic method that an example of such cars. This car traversed the route be- pays attention to changes in speed. On the other hand, a fore dawn, when the trac is usually smooth. One of the significantly fast car can be surely determined as an anomaly possible reasons for such false positives is that our experi- if its behavior is statistically unusual relative to the past ment did not consider temporal partitioning in the segment observations, although this kind of “unusualness” is not a definition, even though the trac changed considerably over problem for drivers. Anomalies accompanying a slowdown time. The spatial length of a segment, as well as parameters in vehicular speed can be regarded as a subset of the anom- K and N, should also be determined in future studies. alies discussed in this paper. The administrator and drivers The following discussion demonstrates another analysis on have the option to filter the outcome of our detection al- the abovementioned false positives based on the estimated gorithm using additional heuristics. However, a particular trac states. In this experiment, we used the speed of the incident is hard to detect by the proposed method if the traf- probe car, and the trac state was represented by the Pois- fic behavior in the incident is just like regular spontaneous son distribution, which was characterized by the mean and congestion. We are currently conducting investigations into variance parameter . The stacked area chart in Figure 6 detailed issues as a further study, expanding our dataset shows the estimated mixing coecients for the eight Pois- sphere from only three routes to all the routes on the Shuto son distributions for each segment of the outbound Shibuya Expressway system. route. The horizontal axis shows the position along the route, and cars travel from left to right. The colored ar- eas show the mixing coecient for each state varying with 6. CONCLUSION position. They are in order of ,withthebottommostbe- We have studied the problem of detecting trac incidents ing the slowest, and the topmost being the fastest. From using probe-car data. Although congestion can be detected Tanimachi to Ikejiri, the top three fastest states were dom- by monitoring vehiclar speeds, it is chronic in some spots inant, which means that cars usually travel quickly in this and does not necessarily indicate the occurrence of an in-

329 1.0 [7] East Nippon Expressway Co., Ltd. Generation mechanism of trac congestion caused by trac 0.8 concentration. http://www.e-nexco.co.jp/activity/ safety/mechanism.html. Accessed: 2013-12-06.

0.6 [8] B. Kerner, C. Demir, R. Herrtwich, S. L. Klenov, H. Rehborn, M. Aleksic, and A. Haug. Trac state detection with floating car data in road networks. In 0.4 Proceedings of the 8th International IEEE Conference

Mixing coefficient on Intelligent Transportation Systems,pages44–49, 0.2 2005. [9] M. A. Quddus, W. Y. Ochieng, and R. B. Noland. 0.0 Current map-matching algorithms for transport applications: State-of-the art and future research Ikejiri Yo g aTokyo ShibuyaShibuya Ohashi directions. Transportation Research Part C: Emerging Tanimachi Takagicho Sangenjaya Technologies,15(5):312–328,2007. Route −→ [10] J. M. Sussman. ITS: A short history and a perspective on the future. In Perspectives on Intelligent Figure 6: Mixing coecients for eight Poisson dis- Transportation Systems (ITS), pages 3–17. Springer tributions for each segment of the outbound Shibuya US, 2005. route [11] S. Tao, V. Manolopoulos, S. Rodriguez Duenas, and A. Rusu. Real-time urban trac state estimation with cident. To detect trac incidents, we propose an approach a-gps mobile phones as probes. Journal of that compares the current trac state with the usual one for Transportation Technologies,2(1):22–31,2012. that location in terms of anomalous car movements, using [12] M. Treiber and A. Kesting. Trac Flow Dynamics. a probabilistic topic model to describe the state of moni- Springer Berlin Heidelberg, 2013. tored trac. We proposed an incident detection method [13] J. Wang, X. Li, S. Liao, and Z. Hua. A hybrid that measured the di↵erence between the usual and current approach for automatic incident detection. IEEE states. Our method was applied to real probe-car data that Transactions on Intelligent Transportation Systems, were collected on the Shuto Expressway system in Tokyo, 14(3):1176–1185, 2013. and the discrimination performance was evaluated. The re- [14] C. E. White, D. Bernstein, and A. L. Kornhauser. sults showed that our method could discriminate trajecto- Some map matching algorithms for personal ries a↵ected by incidents from other trajectories, although navigation assistants. Transportation Research Part C: abnormally fast cars were also reported as anomalies, giving Emerging Technologies,8(1ˆaA¸S6):91–108,˘ 2000. a low precision for certain routes. [15] J. Xia, W. Huang, and J. Guo. A clustering approach to online freeway trac state identification using its 7. ACKNOWLEDGMENTS data. KSCE Journal of Civil Engineering, The trac log used in our experiment as the ground truth 16(3):426–432, 2012. for incident occurrence was made available by Metropolitan [16] J.-s. Yang, S. Kang, and K.-s. Chon. The map Expressway Co., Ltd. matching algorithm of gps data with relatively long polling time intervals. Journal of the Eastern Asia 8. REFERENCES Society for Transportation Studies,6:2561–2573,2005. [1] B. Abdulhai and S. G. Ritchie. Enhancing the [17] J. Yoon, B. Noble, and M. Liu. Surface street trac universality and transferability of freeway incident estimation. In Proceedings of the 5th international detection using a bayesian-based neural network. conference on Mobile systems, applications and Transportation Research Part C: Emerging services, MobiSys ’07, pages 220–232, New York, NY, Technologies,7(5):261–280,1999. USA, 2007. ACM. [2] H. Akatsuka, A. Takasu, K. Aihara, and J. Adachi. [18] F. Yuan and R. L. Cheu. Incident detection using incident detection based on probe car data. support vector machines. Transportation Research In International Conference on Information Systems Part C: Emerging Technologies,11(3–4):309–328, (Information Systems 2013),pages103–110,2013. 2003. Trac Detection and Estimation. [3] C. M. Bishop. Pattern Recognition and Machine [19] Y. Yuan, J. W. C. Van Lint, R. Wilson, F. van Learning, chapter 9. Springer, 2006. Wageningen-Kessels, and S. Hoogendoorn. Real-time [4] D. M. Blei. Probabilistic topic models. Commun. lagrangian trac state estimator for freeways. IEEE ACM, 55(4):77–84, Apr. 2012. Transactions on Intelligent Transportation Systems, [5] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent 13(1):59–70, 2012. dirichlet allocation. J. Mach. Learn. Res.,3:993–1022, [20] T. Zhu, J. Wang, and W. Lv. Outlier mining based Mar. 2003. automatic incident detection on urban arterial road. [6] C. de Fabritiis, R. Ragona, and G. Valenti. Trac In Proceedings of the 6th International Conference on estimation and prediction based on real time floating Mobile Technology, Application & Systems, Mobility car data. In Proceedings of the 11th International ’09, pages 29:1–29:6, New York, NY, USA, 2009. IEEE Conference on Intelligent Transportation ACM. Systems,pages197–203,2008.

330