12
This is a preprint. Please, cite us as: A.L. Alfeo, M.G.C.A. Cimino, S. Egidi, B. Lepri, A. Pentland, G. Vaglini, ”Stigmergy-Based Modeling to Discover Urban Activity Patterns from Posi- tioning Data” in Proc. SBP-BRiMS The International Conference on Social Computing, Behavioral-Cultural Modeling and Prediction and Behavior Rep- resentation in Modeling and Simulation (SBP-BRiMS 2017), LNCS 10354, pp. 292-301, Washington, DC, USA, 5-8 July, 2017, (ISBN 978-3-319-60239-4) DOI : 10.1007/978 - 3 - 319 - 60240 - 0 35 arXiv:1704.03667v2 [cs.AI] 21 Jan 2019

arXiv:1704.03667v2 [cs.AI] 21 Jan 2019 · 2019-01-23 · "Stigmergy-Based Modeling to Discover Urban Activity Patterns from Posi-tioning Data" in Proc. SBP-BRiMS The International

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

This is a preprint. Please, cite us as:A.L. Alfeo, M.G.C.A. Cimino, S. Egidi, B. Lepri, A. Pentland, G. Vaglini,”Stigmergy-Based Modeling to Discover Urban Activity Patterns from Posi-tioning Data” in Proc. SBP-BRiMS The International Conference on SocialComputing, Behavioral-Cultural Modeling and Prediction and Behavior Rep-resentation in Modeling and Simulation (SBP-BRiMS 2017), LNCS 10354, pp.292-301, Washington, DC, USA, 5-8 July, 2017, (ISBN 978-3-319-60239-4) DOI :10.1007/978− 3− 319− 60240− 0 35

arX

iv:1

704.

0366

7v2

[cs

.AI]

21

Jan

2019

Stigmergy-based modeling to discover urbanactivity patterns from positioning data.

Antonio L. Alfeo1, Mario G. C. A. Cimino1 Sara Egidi1, Bruno Lepri2, AlexPentland3, and Gigliola Vaglini1

1 University of Pisa, largo Lazzarino 1, Pisa, [email protected], [email protected],

[email protected], [email protected] Bruno Kessler Foundation, via S. Croce, 77, Trento, Italy

[email protected] M.I.T. Media Laboratory, Cambridge, MA 02142, USA

[email protected]

Abstract. Positioning data offer a remarkable source of informationto analyze crowds urban dynamics. However, discovering urban activitypatterns from the emergent behavior of crowds involves complex systemmodeling. An alternative approach is to adopt computational techniquesbelonging to the emergent paradigm, which enables self-organization ofdata and allows adaptive analysis. Specifically, our approach is based onstigmergy. By using stigmergy each sample position is associated witha digital pheromone deposit, which progressively evaporates and aggre-gates with other deposits according to their spatiotemporal proximity.Based on this principle, we exploit positioning data to identify high-density areas (hotspots) and characterize their activity over time. Thischaracterization allows the comparison of dynamics occurring in differentdays, providing a similarity measure exploitable by clustering techniques.Thus, we cluster days according to their activity behavior, discoveringunexpected urban activity patterns. As a case study, we analyze taxitraces in New York City during 2015.

Keywords: Urban mobility, stigmergy, emergent paradigm, hotspot,pattern mining, taxi-GPS traces.

1 Introduction

The increasing volume of urban human mobility data arises unprecedented op-portunities to monitor and understand crowd dynamics. Identifying events whichdo not conform to the expected patterns can enhance the awareness of decisionmakers for a variety of purposes, such as the management of social events or ex-treme weather situations [1]. For this purpose GPS-equipped vehicles provide ahuge amount of reliable data about urban human mobility, exhibiting correlationwith people daily life, events, and city structure [2]. The majority of the methodsapproaching the analysis of vehicle traces can be grouped into three categories:cluster-based, classification-based, and pattern mining-based ; whereas the main

application problems include the hotspot discovery, the extraction of mobilityprofiles, and the detection and monitoring of big events and crowd behavior [3].For example, in [4] the impact of a social event is evaluated by analyzing taxitraces. Here, the authors model typical passenger flow in an area, in order tocompute the probability that an event happens. Then, the event impact is mea-sured by analyzing abnormal flows in the area via Discrete Fourier Transform.In [5] GPS trajectories are mapped through an Interactive Voting-based MapMatching Algorithm. This mapping is used for off-line characterization of nor-mal drivers’ behavior and real-time anomaly detection. Furthermore, the causeof the anomaly is found exploiting social network data. In [6] the authors use aMultiscale Principal Component Analysis to analyze taxi GPS data in order todetect traffic congestion.

One of the main issues concerning the analysis of this kind of data is their di-mensionality. Many approaches handle it by focusing on specific areas (hotspots)whose high concentration of events and people can summarize mobility dynam-ics [7]. As an example, in [8] a density-based spatial clustering is employedto perform spatiotemporal analysis on taxi pick-up/drop-off to find seasonalhotspots. Authors in [9] use OPTICS algorithm in order to detect city hotspotsas density-based clusters of taxi drop-off positions. Recently, in [10] an ImprovedAuto-Regressive Integrated Moving Average algorithm is proposed; it is aimed todetect urban mobility hotspots via taxi GPS traces and analyze the dynamics ofpick-ups in dense locations of the city. However, due to the complexity of humanmobility data, the modeling and comparison of their dynamics over time remainhard to manage and parametrize [11]. In this paper, we present an innovativeapproach based on stigmergy [12] that aims to handle both complexity and di-mensionality of these data, providing an analysis of urban crowds dynamics byexploiting taxi GPS data. Specifically, our investigation covers the city hotspotsidentification, the characterization of their activity over time and the unfoldingof unexpected activity pattern.

The paper is structured as follows. In Section 2 the architectural view ofour approach is described. In Section 3 the experimental studies and results arepresented. Finally, Section 4 summarizes conclusions and future work.

2 Approach Description

In this section, we present our approach, based on the principle of stigmergy.Stigmergy is an indirect coordination mechanism used in social insect colonies[12]. It is based on the release of chemical markers (pheromones), which aggregatewhen subsequently deposited in proximity with each other. This mechanism canbe employed in the context of data processing, providing self-organization ofdata [13] while unfolding their spatial and temporal dynamics [14]. By exploitingstigmergy, we discover city hotspots, characterize their activity dynamics (i.e.presence of people over time) and assess unexpected activity patterns. In orderto focus on activity dynamics, we employ New York City taxi positioning data,

considering the amount of passengers together with the GPS position of eachpick-up/drop-off.

2.1 Hotspot Detection

At the beginning, data samples are transformed in digital pheromone deposits,allowing the progressive emergence of city hotspots (i.e. the most high-densityareas within the city). Firstly, data are treated by the smoothing process (Fig.1),in order to remove insignificant activity levels and highlight relevant dynamics.This process is implemented by applying a sigmoidal function to the samples.Then, a mark is released in correspondence of each smoothed sample in a three-dimensional virtual environment. Marks are defined by a truncated cone witha given width and intensity (height) equal to data sample value. The trailingprocess aggregates marks, forming a stigmergic trail, which is characterized byevaporation (i.e. temporal decay δ). Eq. 1 describes the trail at time instant i.

Ti = (Ti−1 − δ) +Marki (1)

As an effect, isolated marks tend to disappear, whereas the arrival of newmarks in a given region counteracts the evaporation. Thus, aggregation andevaporation can act as an agglomerative spatiotemporal clustering with his-torical memory. Hotspots are identified as the city areas corresponding to theoverlapping of the most relevant trails obtained by processing data in early morn-ing (i.e. 3am-8am), morning (i.e. 9am-2pm), afternoon/evening (i.e. 3pm-8pm),and night (i.e. 9pm-2am) time slots. As an example, Fig. 1 shows the hotspotsidentified in Manhattan (New York City). Their locations correspond to: EastHarlem - Upper East Side (A), Midtown East (B), Broadway (C), East Village- Gramercy - MurrayHill (D), Soho - Tribeca (E), Chelsea (F) and Time Square- Midtown West - Garment (G).

Fig. 1. The stigmergy-based process of hotspot discovery.

2.2 Hotspot Activity Characterization

For each identified hotspot, we generate the activity time series, by periodicallycollecting the amount of activity occurred in the hotspot during a day. Let usconsider an activity time series; what is actually interesting is not the continuousvariation of the activity over time, but the transition from one type of behaviorto another.

Generally, given a time window each hotspot behavior can be characterizedby an ideal time series segment of hotspot activity representing that specificbehavior. More formally, we define it as an archetype. An example of an archetypeis asleep behavior, which usually occurs during the night, between the calmingdown of the nightlife and the arrival of the workers; here the city exhibits itslowest activity level.

Fig. 2. The architecture of a SRF.

In order to detect an archetypal behavior in hotspot activity time series, wedesign a processing schema called Stigmergic Receptive Field (SRF), becauseit is receptive to a specific archetype and it processes samples employing theprinciple of stigmergy. Specifically, SRF computes a degree of similarity betweena specific archetype (Fig. 2a) and an activity time series (Fig. 2a’), by subse-quently processing their samples, which are assumed to be normalized between0 and 1.

First, samples undergo the clumping process (Fig. 2b and Fig. 2b’), whichacts as a sort of soft discretization creating clumps of samples. Clumps arrange-ment can be parametrized allowing to fit the analysis over the archetype’s levelsof interest. The clumping can be implemented as a double sigmoidal function.Second, the marking process (Fig. 2c and Fig. 2c’) enables the release of a markin a bi-dimensional virtual environment in correspondence of the sample value.The mark can be implemented by a trapezoid with given intensity (height) and

width ε. Third, the trailing process accumulates marks creating the trail struc-ture, whose intensity decays (i.e. evaporates) of a given rate δ at each step oftime. As an effect, evaporation rate and mark width allow the trail to capturecoarse spatiotemporal structure in data, handling micro-fluctuations. Fourth,current Tact and archetypal trails Tarc are compared by the similarity process(Fig. 2d), by using the Jaccard coefficient [15] as defined in Eq. 2.

S =|Tarc ∩ Tact||Tarc ∪ Tact|

(2)

This coefficient provides a measure of similarity between 1 (identical trails)and 0 (non-overlapping trails). Finally, the activation process is applied to en-hance only relevant similarity values and remove insignificant values accordingto the activation thresholds αa, βa. This process can be implemented by usingthe already mentioned sigmoidal function (Eq. 3).

f(x, αa, βa) =1

(1 + e−αa(x−βa))(3)

In order to provide an effective similarity, the SRF’s parameters have tobe properly tuned. With this aim, the Adaptation process uses the DifferentialEvolution (DE) to adapt the structural parameters of the SRF: (i) the clumpinginflection points α, β, γ, λ; (ii) the mark width ε; (iii) the trail evaporation δ;(iv) the activation thresholds αa, βa. The aim of DE is to minimize the meansquare error (MSE), considering the error as the difference between the targetS and the computed S similarity values over a set of M labeled time series (Eq.4).

Fitness =

∑Mi=1(|Si − Si|2)

M(4)

The target similarity value is 1 if the current time series exhibits the archety-pal behaviour, 0 otherwise.

Since any real signal is usually similar to more than one archetype, a col-lection of SRFs, specialized on different archetypes and ordered for increasingactivity, is arranged in a connectionist topology to make a Stigmergic Perceptron(Fig. 3). Specifically, adopted archetypes are: Asleep (Fig. 3g), i.e. the hotspotat its lowest activity level; Falling (Fig. 3f), i.e. the flow just before the cityactivity calms down; Awakening (Fig. 3e), i.e. the waking up of urban life aftera calm phase; Flow (Fig.3d), i.e. the hotspot at its operating capacity, usuallyexhibited during working hours; Chill (Fig. 3c), which usually occurs after arush hour, when people leave work and take taxis to return home; Rise (Fig.3b), i.e. the hotspot transition to its most intense activity level; and Rush-Hour(Fig. 3a), which usually occurs in early morning and late afternoon, when peoplemovement is at its highest rate.

A perceptron computes a single output from multiple inputs, by forming alinear combination of them. Similarly, the stigmergic perceptron (SP) combines

Fig. 3. The overall processing of activity samples.

linearly SRFs’ outcomes by computing their weighted mean, using the providedsimilarities Si as weights (Eq. 5).

ActivityLevel =

∑Ni=1(Si ∗ i)∑Ni=1(Si)

(5)

The resulting value is called activity level and is defined between zero andN, where N is the number of SRFs. An important aspect concerning hotspotactivity level computation is to train each SRF inside a SP in order to preventmultiple activations of SRFs. Let us consider the most sensitive SRF parameter,i.e. the evaporation δ. High evaporation prevents marks aggregation and patternreinforcement, while low evaporation causes the saturation of the trail. In orderto handle this sensitivity, the adaptation of each SRF inside a SP is twofold: (i)the Global Training phase is aimed to determine an interval for the evaporationrate of each SRF. The interval [δmin, δmax] is obtained considering the narrowestinterval including the fitness values above its 90th percentile, while the intervalsfor the other parameters can be statically assigned on the basis of applicationdomain constraints; and (ii) the Local Training phase aims to find the optimumvalues for every module of each single SRF, by using the interval generated inthe Global Training phase. As a result, a proper trained Stigmergic Perceptronprovides the characterization of hotspot activity, by transforming a given timeseries of activity samples in a new time series of activity levels. In order tocompute the overall similarity between hotspot activity levels gathered in twodifferent days, we employ a further SRF (Fig. 3h) which uses one activity leveltime series just like it was an archetype. The adaptation in this specific SRFtunes mark width ε, trail evaporation δ, and activation thresholds αa and βa. Asfitness function, we use the Mean Squared Error (MSE) between computed andideal similarity over a set of labeled pairs of activity time series (i.e. the trainingset).

2.3 Unexpected patterns detection

Exploiting the mechanism described above, we generate the similarity matrix,that is the collection of similarities obtained by matching with each other theactivity level time series of the training set. Provided similarity matrix can beprocessed by a fuzzy relational clustering technique, grouping days according totheir daily activity similarity. Specifically, we employ Fuzzy C-Mean to computethe clusters centroid. The number of clusters corresponds to the number of dailyactivity behaviors taken into account in the analysis. Based on these centroids,the membership degrees of further daily activity level time series can be com-puted. The membership degrees are between 0 (not belonging to the cluster)and 1 (completely belonging to the cluster). By exploiting the membership de-grees un as a distance, we measure the extraneousness of current activity levelwith respect to its expected cluster. The Extraneousness Index (EI) is definedas the Manhattan Distance between current daily activity level series d and thecentroid of the cluster in which current day is assumed to belong. In Eq. 6, thecomputation case with 3 clusters is shown.

EI(d) = (|u1(d)− u1(C2)|+ |u2(d)− u2(C2)|+ |u3(d)− u3(C3)|)/2 (6)

We define as an Unexpected Pattern a day characterized by an activity levelwhose EI exceeds the maximum EI computed over the training set.

3 Experimental Studies and Results

We have analyzed a dataset of taxi traces provided by the Taxi and LimousineCommission of New York City, which contains information about all medalliontaxi trips from 2009 to 2016 [16]. We focus our investigation on dynamics oc-curred during 2015 in Manhattan considering that it attracts the most of thetaxi trips in New York City. A pre-processing step has been performed to removemissing values and discretize data in spatiotemporal bins defined as a squaredarea 10-foot- wide with duration of 5 minutes. Then, the min-max normaliza-tion is applied. In order to search for hotspots characterizing every possible cityroutine (i.e. summer and winter ones), the hotspot discovery procedure has beenperformed comprising data gathered in working days and week-ends of February2015 and June 2015.

Since archetypes are assumed to be general, the training set for the SP’sglobal and local phases is generated by using the pure archetype time series asseeds and applying spatial noise and temporal shift.

In order to validate the SP archetypal behavior detection, a set of time serieshave been manually labeled and the difference with the actual results of theSP is used to evaluate detection error. Each label corresponds to the expectedSP result according to the archetypal behavior visually detected in current timeseries (i.e. 1 if Asleep, 2 if Falling, and so on). To this purpose, 35 time series

(i.e. 5 for each archetype) have been provided to the SP. The obtained MSE isshown in Table 1. By considering the activity level operative range (i.e. [1 7])and the provided MSE values, the system shows good detection performances,proving the functional effectiveness of the SRF and the SP.

Table 1. Mean Square Error in Archetypal Behavior Detection via SP.

ARCHETYPE Asleep Falling Awakening Flow Chill Rise Rush-hour TOT

MSE 0.215 0.029 0.029 0.028 0.166 0.020 0.143 0.633

In the next processing phase, a further SRF is aimed to assess the similaritybetween daily activity levels. It is provided with a training set obtained by select-ing a set of pairs of daily activity levels. In order to supply a clustering process,such SRF is trained to distinguish similar and dissimilar signals, according to thebehavioral class of daily activity levels, namely: (i) Working days (expected tofall between Monday and Tuesday), when crowd movements are mainly causedby working routines; (ii) Entertainment days (expected to fall on Friday andSaturday), in which people tend to spend the night out; (iii) Leisure days (ex-pected to fall on Sunday), which are characterized by limited transportationusage. Their target similarity is 1 if days belong to the same behavioral class, 0otherwise. Since the defined classes refer to the cyclical sequence of week days,our ground truth can be provided by the calendar itself. The 10% of computeddaily activity levels have been used to create these pairs (i.e. 1296 pairs overall).

The Fuzzy C-Mean algorithm is used to group days according to their stigmergy-based similarity in order to arrange them among the three provided clusters,namely: Working, Entertainment and Leisure days. Upon this, we exploit theExtraneousness Index in Eq. 6 to assess unexpected patterns.

We show results obtained analyzing hotspot D, since it is characterized bymultiple usages [17] allowing the displaying of every activity level behavioralclass. Interestingly, this area is also found to be an hotspot by [9].

Fig. 4. Membership degrees of days in September and October. The whitest, the higher.

Fig. 4 shows the computed membership degree for each cluster, obtained withdays in September and October. The whitest the box, the higher the degree.

Clearly, the stigmergy-based characterization of hotspot daily activity allowsto cluster days according to their behavioral class which corresponds to thearrangement we assumed. Indeed, most of the Sundays (highlighted by a circlein Fig. 4) exhibit their highest membership degree with Leisure day cluster. Thesame happened with days in Entertainment and Working cluster. It is worthnoting that provided approach allows the mapping of daily behaviors to emergefrom data instead of being explicitly injected into the system.

However, some days does not confirm this behavior. Indeed, by comparingtheir EI with the maximum EI in the training set (red line in Fig. 5), they arerecognized as an unexpected pattern (red spot in Fig. 5).

Fig. 5. Extraneousness Index computed over days in September and October.

Table 2 shows the most relevant unexpected patterns detected by analyzingthe whole year 2015. Each unexpected pattern date is shown together with theirmost probable cause, such as an occurred social event.

Table 2. Most relevant unexpected patterns detected all over 2015.

EI Date and occurred city event

0.96 06-Sep, Labour Day celebration0.94 24-May, Memorial Day0.86 31-Oct, Halloween0.83 26-Nov, Thanksgiving0.83 28-Jun, Gay Pride0.82 25-Dec, Christmas0.81 01-Jan, New Year’s Eve0.80 04-Apr, Easter (holy Saturday)0.79 27-Jan, Winter Storm Juno [18]0.74 05-Sep, Labour Day celebrations0.63 03-Jul, Independence Day0.63 31-Dec, New Year’s Eve0.61 15-Mar, NYC Half Marathon0.49 24-Sep, Pope Francis in NYC [19]

EI provides a continuous measure of the magnitude of unexpected patterns,allowing the comparison of their impact on hotspot activity dynamics. As anexample, Easter affects the activity in hotspot D much more than the NYCHalf Marathon. Indeed, the greatest Easter celebrations in NYC are kept by theSt. Patrick Cathedral, which is located in the area corresponding to hotspot D,whereas this area was not directly involved in the NYC Half Marathon 2015. Byrepeating the analysis in the same date on hotspot C, the computed EI resultsroughly 60% higher (i.e. 0.96); indeed the zone corresponding to hotspot C wasdirectly crossed by NYC Half Marathon 2015.

4 Conclusion

In this paper, we proposed a novel approach aimed to provide knowledge discov-ery in the context of human urban mobility data. In contrast with the literaturein the field, our approach does not require the in-depth modeling of the dynamicsunder investigation since it relies on data self-organization provided by employ-ing the principle of stigmergy. Indeed, by using stigmergy, the spatiotemporaldensity in data has been exploited to identify city hotspots and characterize theirdynamics, allowing to generate data-driven prototypes of typical daily activity.By treating them via a clustering technique, we were able to discern expectedpatterns from unexpected ones, which were found to be usually related to variousevents. One of the most promising improvements for this investigation can beachieved by cross-checking results obtained via vehicle GPS data with other datasources (e.g. social media or car crash data). Indeed, by employing a more de-tailed ground truth, the system can be specialized to model and detect patternscharacterized by a timescale shorter than a daily one.

References

1. Sagl, G., Loidl, M., Beinat, E.: A visual analytics approach for extracting spatio-temporal urban mobility information from mobile network traffic. ISPRS Interna-tional Journal of Geo-Information, 1(3), 256–271 (2012).

2. Veloso, M., Phithakkitnukoon, S., Bento, C.: Urban mobility study using taxitraces. ACM, In Proceedings of the 2011 international workshop on Trajectorydata mining and analysis, 23–30 (2011).

3. Mazimpaka J. D., Timpf S.: Trajectory data mining: A review of methods andapplications. Journal of Spatial Information Science, 2016.13, 61–9, (2016).

4. Zhang, W., Qi, G., Pan, G., Lu, H., Li, S., Wu, Z.: City-scale social event detectionand evaluation with taxi traces. ACM, Transactions on Intelligent Systems andTechnology, 6(3), 40 (2015).

5. Pan, B., Zheng, Y., Wilkie, D., Shahabi, C.: Crowd sensing of traffic anomaliesbased on human mobility and social media. ACM, In Proceedings of the 21st ACMSIGSPATIAL International Conference on Advances in Geographic InformationSystems, 344–353. (2013).

6. Kuang, W., An, S., Jiang, H.: Detecting traffic anomalies in urban areas using taxiGPS data. Mathematical Problems in Engineering, (2015).

7. Hu, Yujie, Harvey J. Miller, Xiang Li. : Detecting and analyzing mobility hotspotsusing surface networks. Transactions in GIS, 18.6, 911–935, (2014).

8. Lu, Yu: An Intelligent System for Taxi Service Monitoring, Analytics and Visualiza-tion. Proceedings of the Twenty-Fifth International Joint Conference on ArtificialIntelligence, (2016).

9. Keler, Andreas, Jukka M. Krisp.: Is there a relationship between complicated cross-ings and frequently visited locations? A case study with boro taxis and OSM inNYC. 13th International Conference on Location-Based Services, (2016).

10. Li X., Pan G., Wu Z., Qi G., Li S., Zhang D., Zhang W., and Wang Z.: Prediction ofurban human mobility using large-scale taxi traces and its applications. Frontiersof Computer Science, 6(1), 111–121, (2012).

11. Castro, P. S., Zhang, D., Chen, C., Li, S., Pan, G.: From taxi GPS traces to socialand community dynamics: A survey. ACM Computing Surveys, 46(2), 17. (2013).

12. Marsh, L., Onof, C.: Stigmergic epistemology, stigmergic cognition. Cognitive Sys-tems Research, 9(1-2), 136–149, (2008).

13. Vernon, D., Metta, G., Sandini, G.: A Survey of Artificial Cognitive Systems: Impli-cations for the Autonomous Development of Mental Capabilities in ComputationalAgents. IEEE Transactions on Evolutionary Computation, 11(2), 151–180, (2007).

14. Barsocchi P., Cimino M.G.C.A., Ferro E., Lazzeri A., Palumbo F., Vaglini, G.:Monitoring elderly behavior via indoor position-based stigmergy Pervasive andMobile Computing, Elsevier Science, 23, 26–42, (2015).

15. Niwattanakul S., Singthongchai J., Naenudorn E., Wanapu S.: Using of Jaccardcoefficient for keywords similarity. In Proceedings of the International MultiCon-ference of Engineers and Computer Scientists, 1, 6, (2013).

16. NYC.gov, Taxi and Limousine Commission (TLC) Trip Record Data,http://www.nyc.gov/html/tlc/html/about/trip record data.shtml

17. Zola, interactive map for zone and land use of NYC.http://maps.nyc.gov/doitt/nycitymap/template?applicationName=ZOLA

18. Weather NYC: Thousands of transatlantic travellers face serious disruption causedby New York winter storm ’Juno’. The Independent. January 26, 2015.

19. UsaToday: Papal visit to bring blizzard of traffic to D.C., New York and Philadel-phia. September 22, 2015.