Attention-based Data Analytical Models for Traffic Flow Prediction

Accurate prediction of traffic flow is important for the successful deployment of smart transportation systems. It can potentially help relieve traffic congestion, make better travel decisions, reduce carbon emission, and improve traffic operation efficiency. Although numerous methods have been developed for traffic flow predictions, most of these methods are not capable of tackling long-time series because they are restricted by their short-term memories and do not have access to the entire time series while predicting the traffic flow. To address this issue, one goal of this project is to develop attention-based methodologies for traffic flow predictions. The proposed attention-based methods employ the attention mechanism that enables neural networks to have access to the entire long-time series while predicting so that gradient vanishing and limited memory problems brought by long-time series can be effectively addressed. Another goal of this project is to develop parallel attention-based traffic flow prediction methodologies. These methods employ the transformer network where identical self-attention layers are stacked for parallel computing. To demonstrate the effectiveness of the proposed model, this research uses the traffic flow prediction dataset from Kaggle that includes hourly traffic data on four different junctions. The proposed predictive models will enable a real-time and accurate traffic flow prediction and will help road users make better decisions to alleviate traffic congestion.

Mineta Consortium for Transportation Mobility
San José State University
Principal Investigator: 
Yupeng Wei
PI Contact Information: 

Mineta Transportation Institute
San José State University
210 N. 4th St., 4th Floor
San José, CA 95112

Yupeng Wei

Funding Source(s) and Amounts Provided (by each agency or organization): 

U.S. Department of Transportation, Office of the Assistant Secretary for Research and Technology - $6,361

Total Project Cost: 
Agency ID or Contract Number: 
January 2022 to December 2022
Impacts/Benefits of Implementation: 

The proposed methods can help road users make better travel decisions to avoid traffic congestion areas so that passenger and freight movements can be optimized to improve the mobility of people and goods. Moreover, they can also help reduce carbon emissions and reduce the risks of traffic incidents.

Project Number: 



Contact Us

SJSU Research Foundation   210 N. 4th Street, 4th Floor, San Jose, CA 95112    Phone: 408-924-7560   Email: