Source-linked AI summary

A deep learning approach for detecting traffic accidents from social media data

Zhenhua Zhang, Qing Heb, Jing Gao, Ming Ni

arXiv:1801.01528v1cs.SIstat.OT

TL;DR

Traffic accidents are difficult to detect reliably from conventional traffic data and noisy, unstructured tweets. This paper extracts individual and paired token features from geotagged Twitter data, compares deep-learning classifiers, and validates tweets against accident logs and loop-detector data. DBN achieves 85% overall accuracy and tweet observations align with 66% of freeway accident-log cases and over 80% of nearby abnormal local-road traffic data.

  • Problem

    Traffic-accident detection must handle unreliable detector data and noisy, unstructured, sparse, and ambiguous tweets.

  • Method

    The paper extracts individual and paired token features from geotagged tweets, classifies them with DBN and LSTM, and validates results against accident logs and loop-detector data.

  • Results

    DBN achieves 85% overall accuracy with 44 individual and 17 paired token features, while nearly 66% of freeway tweets match accident logs and over 80% relate to nearby abnormal local-road traffic.

  • Takeaways & Limitations

    Paired tokens improve detection when individual features are limited, and Twitter can supplement existing accident-detection methods.

  • Takeaways & Limitations

    Because the study uses only geotagged tweets, Twitter is unlikely to cover all traffic accidents and is treated as a supplement rather than a replacement.

Abstract

from arXiv · show

This paper employs deep learning in detecting the traffic accident from social media data. First, we thoroughly investigate the 1-year over 3 million tweet contents in two metropolitan areas: Northern Virginia and New York City. Our results show that paired tokens can capture the association rules inherent in the accident-related tweets and further increase the accuracy of the traffic accident detection. Second, two deep learning methods: Deep Belief Network (DBN) and Long Short-Term Memory (LSTM) are investigated and implemented on the extracted token. Results show that DBN can obtain an overall accuracy of 85% with about 44 individual token features and 17 paired token features. The classification results from DBN outperform those of Support Vector Machines (SVMs) and supervised Latent Dirichlet allocation (sLDA). Finally, to validate this study, we compare the accident-related tweets with both the traffic accident log on freeways and traffic data on local roads from 15,000 loop detectors. It is found that nearly 66% of the accident-related tweets can be located by the accident log and more than 80% of them can be tied to nearby abnormal traffic data. Several important issues of using Twitter to detect traffic accidents have been brought up by the comparison including the location and time bias, as well as the characteristics of influential users and hashtags.

1 Introduction

Traffic accidents require fast, accurate detection, but traditional traffic-data methods face reliability challenges. This study explores Twitter and deep learning as complementary approaches to accident detection.

  • Motivation: Accurate and fast accident detection is critical for reducing the impacts of traffic disruptions, injuries, and fatalities.Traffic accidents disturb traffic operations and can cause severe urban problems.
  • Limitations of traditional methods: Traditional detector-based methods provide accurate accident locations and times but depend on reliable field data.Detector failures and communication errors remain recurring operational challenges.
  • Contributions: The paper’s contributions include examining tweet content, comparing classifiers, and validating results against traditional traffic data.The provided contribution passage is truncated but explicitly links the study to tweet-based reporting and later validation.
  • Twitter as a data source: Twitter offers user-contributed information that can complement traditional methods for detecting traffic accidents.Each tweet acts as a potential “We Media” data source for event detection.
  • Study approach: The study compares deep learning methods for classifying noisy, unstructured accident-related tweets.The introduction identifies DNN and LSTM as the investigated approaches and frames deep learning as multi-level feature learning.

2 Literature review

Prior transportation studies use social media for traffic-related analysis, but accident detection remains difficult because tweets are sparse, localized, brief, ambiguous, and unstructured. Deep learning is examined as a way to model these text features.

  • Social media applications: Social media has been used for activity identification, special-event analysis, traffic-flow prediction, transport information management, and travel-mode detection.The literature also covers destination and route choice applications.
  • Incident detection: Prior incident-detection studies leverage tweet location and time information to detect small-scale incidents and relate tweets to traffic conditions.Researchers have also compared multiple regression and machine-learning models for traffic-incident detection.
  • Research challenges: Traffic-accident tweets are challenging because they are small in quantity, geographically concentrated, short-lived, and linguistically ambiguous.These characteristics motivate examining the timeliness and accuracy of tweet-based detection for small-scale events.
  • Text modeling: Language-modeling methods convert unstructured text into structured data for supervised or unsupervised learning tasks.The literature frames text modeling as information extraction from messages.
  • Deep learning: Deep learning uses additional layers and hierarchical feature extraction, with DBN and LSTM identified as approaches for classifying accident-related tweets.The paper expects these methods to model inter-feature correlations and short tweet contexts.

3 Data description and preprocessing

The study collects geotagged tweets from Northern Virginia and New York City, filters them for explicit accident content, and converts them into structured token features for analysis.

  • Study areas: The study covers Northern Virginia and the New York Metropolitan Area as two metropolitan research settings.Northern Virginia contains a 2,500 km^2 road network, while the New York study area can reach 3,000 km^2.
  • Raw data: More than 3 million geotagged tweets were collected during 2014 using Twitter’s Streaming API and geographic bounding boxes.The collection includes more than 584,000 tweets in Northern Virginia and 2,420,000 in New York City.
  • Accident definition: The dataset focuses on tweets explicitly indicating collisions, disabled vehicles, or vehicles on fire, excluding congestion and construction content.The exclusion reflects that congestion and construction do not necessarily indicate traffic accidents.
  • Tweet preprocessing: Candidate tweets are identified using accident-related vocabulary derived from approximately 100 traffic-accident news articles.Frequent words are selected after excluding common words and terms tied to specific geographic or event features.
  • Tweet preprocessing: The preprocessing loop samples filtered tweets, manually labels them, extracts frequent accident-related words, and reapplies word-based filtering.This iterative procedure produces a more targeted collection of accident-related tweets.
  • Filtering rules: The procedure accommodates misspellings and word variants while excluding tweets from listed influential users and retaining public mentions of users or hashtags.These rules address short, lightly edited social-media text and location-information concerns.
  • Dataset construction: More than 900 accident-related tweets were combined with twice as many randomly selected non-accident tweets to form a balanced database.The non-accident sample is twice the size of the accident-related sample.
  • Structured database construction: Tokens are filtered and stemmed, then encoded as binary indicators so tweets become a structured database for feature analysis and classification.A token feature equals 1 when the stemmed token appears in a tweet and 0 otherwise.

4 Feature Selection

Feature selection combines individual-token associations with paired-token association rules. The paired features capture within-tweet relationships that single-token correlations may miss.

  • Feature selection: Feature selection retains a subset of document features according to a predetermined importance measure.The process reduces the original feature set to words with the highest scores.
  • Individual token features: The phi coefficient measures association between manual accident labels and individual tokens, selecting tokens with |ϕ| higher than 0.1.This rule selects 27 individual tokens.
  • Individual token features: Individual-token analysis includes topic-related terms and route numbers, while stemming can change displayed words such as “accident” to “accid”.Route-number tokens form a small portion and have lower correlations than hashtags, preserving model generalization according to the passage.
  • Paired token features: Paired-token features address cases where associations among tokens provide stronger accident indications than correlations between a single token and the label.For example, “car” may increase accident probability after “accident” but decrease it after “maintenance” or “repair”.
  • Paired token features: The Apriori algorithm uses support and confidence to identify frequent token combinations and their association with accident labels.Support measures token-combination frequency, while confidence focuses on paired tokens related to traffic accidents.
  • Paired token features: 38 token pairs are found when support equals 0.01 and confidence equals 0.1.The selected combinations reflect accident-related language customs in tweets, including oral expressions such as “just”.
  • Feature statistics: Changing confidence changes the number of paired tokens, whereas the number of correlated individual tokens remains nearly unchanged above 0.6.The paired-token features are incorporated into the classification model as binary indicators.

5 Classification by Deep Learning

The paper develops DBN and LSTM approaches for classifying accident-related tweets, using individual and paired token features and comparing them with established classifiers. DBN generally performs best, while parameter choices affect computation time and LSTM and sLDA face challenges with tweet characteristics.

  • Deep Belief Network (DBN): DBN uses densely connected layers with no within-layer connections, corresponding to a Restricted Boltzmann Machine structure.Its neural functions and basic architecture are illustrated in Figure 3.
  • Long Short-Term Memory (LSTM): LSTM retains sequential input information through an internal state derived from the recurrent neural network structure.The paper presents LSTM as the second deep learning network for language modeling and tweet classification.
  • Feature selection: Paired-token feature selection yields 17 paired token features and 16 individual tokens within those paired features at confidence 0.8.Combining paired and individual features produces accuracy around 0.8 when the correlation coefficient 𝜙 is 0.2; lower 𝜙 may improve performance but can cause overfitting.
  • Computational considerations: Increasing neurons in the second and third layers changes regression results little but substantially increases computation time.Computation time is identified as important for real-time applications.
  • Classification comparisons: DBN shows overall better performance than ANN, SVMs, and LSTM, while deep learning methods also outperform sLDA in tweet classification.DBN’s advantage over SVMs and ANN becomes larger as more token features are included.
  • Classification comparisons: Tweet characteristics constrain LSTM and sLDA because tweets are short, unordered, and insufficient for reliable topic distributions or sequential modeling.The paper reports that both sLDA and LSTM do not perform well in this setting.

6 Validation with Accident Log and Traffic Data

The validation compares accident-related tweets with freeway accident logs and nearby loop-detector data, revealing useful coverage alongside substantial spatial, temporal, and credibility constraints.

  • Coverage and scope: Geo-tagged tweets are unlikely to cover all accidents and are better treated as a supplement than a replacement for existing detection methods.Only a small portion of tweets are geo-tagged, and drivers may avoid tweeting near accident sites for safety reasons.
  • Freeway accident-log validation: 66% of 110 accident-related tweets were map-matched to freeway accident records using maximum gaps of 4 miles and 1 hour.The average distance gap was 1.8 miles; 31% were posted before, 21.9% during, and 46.6% after the logged accident.
  • Freeway accident-log validation: Some accident-related tweets could not be matched because their locations or posting times did not correspond to any accident-log record.The unmatched set included 37 tweets, most of which still clearly expressed accidents.
  • User and hashtag effects: Influential users and hashtags appeared in 16 map-matched and 10 non-map-matched tweets, including posts from reporters, authorities, and ordinary users.Tweets containing names such as vatraffic and wtoptraffic can provide effective freeway accident locations when posted by informed users.
  • Freeway accident-log validation: Tweet locations may differ from accident sites because users post after driving onward, while GPS errors and map-matching inaccuracies further enlarge gaps.Freeway tweets may mention incomplete location information even when they clearly describe an accident.
  • Loop-detector validation: More than 80% of accident-related tweets could be traced to abnormal nearby traffic when the probability threshold was set to 0.9.Most accidents slightly affected surrounding traffic, while some severely affected it; nearby detectors sometimes recorded abnormal conditions selectively.

7 Conclusions and discussions

The paper combines token-based feature selection, deep-learning classification, and validation against traffic records and detector data to assess Twitter for traffic-accident detection. Results support Twitter as a useful but noisy secondary source, with evidence of potentially unrecorded accidents and important time, location, hashtag, and user effects.

  • Feature Selection: Paired token features capture association rules in accident-related tweets and further improve detection accuracy when individual token features are limited.The paper identifies both individual and paired tokens as indicators of traffic accidents.
  • Classification: 85% overall accuracy was achieved by DBN using 44 individual token features and 17 paired token features.DBN outperformed ANN, LSTM, SVMs, and sLDA in the reported classification comparisons.
  • Validation: Nearly 66% of accident-related freeway tweets could be located by the accident log, while more than 80% of local-road tweets were related to nearby abnormal traffic data.These comparisons also examine Twitter’s time and location effectiveness, hashtags, and influential users.
  • Discussion: Social media data may be noisy or unreliable, so Twitter should function as a secondary source rather than replace traditional accident-detection methods.The paper identifies potentially unrecorded accidents as a reason for continued study and integration with conventional data.
  • Future Work: The calibrated model could support real-time traffic-accident detection, while future community-created datasets could enable more accurate models.The paper presents these as potential directions for emergency response and future research.
Loading 1801.01528v1…