# Short-Term and Long-Term Travel Time Prediction Using Transformer-Based Techniques
###### Abstract  
In the evolving field of Intelligent Transportation Systems (ITSs), accurate and reliable traffic prediction is essential in enhancing management and planning capabilities. Accurately predicting traffic conditions over both short-term and long-term intervals is vital for the practical application of ITS. The integration of deep learning into traffic prediction has proven crucial in advancing traffic prediction beyond traditional approaches, particularly in analyzing and forecasting complex traffic scenarios. Despite these advancements, the existing methods are unable to effectively handle both short-term and long-term traffic patterns given their complex nature, revealing a need for more comprehensive forecasting solutions. To address this need, we propose a new approach named the Short-Term and Long-Term Integrated Transformer (SLIT). SLIT is a Transformer-based encoder-decoder architecture, designed for the effective prediction of both short-term and long-term travel time durations. The architecture integrates the Enhanced Data Preprocessing (EDP) with the Short-Term and Long-Term Integrated Encoder-Decoder (SLIED). This harmonious combination enables SLIT to effectively capture the complexities of traffic data over varying time horizons. Extensive evaluations on a large-scale real-world traffic dataset demonstrate the excellence of SLIT compared with existing competitive methods in both short- and long-term travel time predictions across various metrics. SLIT exhibits significant improvements in prediction results, particularly in short-term forecasting. Remarkable improvements are observed in SLIT, with enhancements of up to 9.67% in terms of all evaluation metrics across various time horizons. Furthermore, SLIT demonstrates the capability to analyze traffic patterns across various road complexities, proving its adaptability and effectiveness in diverse traffic scenarios with improvements of up to 10.83% in different road conditions. The results of this study highlight the high potential of SLIT in significantly enhancing traffic prediction within ITS. Intelligent Transportation Systems; travel time prediction; short-term prediction; long-term prediction 2024  
H.-T.-C.-D.-H.-T.-S.  
is essential for effective route planning for users and traffic flow management for urban planners. Due to its significant impact on numerous real-world applications, travel time prediction has captured growing interest, establishing itself as a notable research topic. This focus reflects the significance of leveraging large-scale datasets to improve the predictive accuracy of traffic models, serving as a foundation for advancing ITS applications. In the development of ITS, traditional methods for predicting traffic always serve as the foundation for improvements in managing and planning traffic. These traditional approaches, including statistical models and machine learning, play a crucial role in the initial understanding of traffic patterns and in making predictions. However, these methods show their limitations, especially in dealing with the complex, non-linear nature of traffic data and the dynamic conditions on the roads. This situation highlights the need for more advanced solutions that can effectively address these challenges. Given these circumstances, the rise of deep learning represents a significant advancement. It leads to a new era in how we handle and analyze complex traffic data. The ability of deep learning models to identify complex patterns in extensive datasets makes them particularly suitable for addressing the challenges of traffic prediction tasks. In traffic prediction, the categorization of short-term and long-term predictions varies across the academic literature. For example, Ref. [1] generally classifies short-term predictions as those lasting under 15 min, while long-term predictions are considered to surpass 1 h. Other studies, such as [2; 3; 4; 5], categorize long-term predictions as those that extend past 1 day.