## 2 Related Work  
### Smart Public Transportation System  
Smart Public Transportation Systems (SPTSs) aim to maximize the efficiency, safety, and convenience of public transportation services by integrating cutting-edge technologies. These systems utilize real-time data, Internet of Things (IoT) devices, and intelligent algorithms to improve various aspects such as route optimization, transportation congestion management, and passenger experience enhancement, as shown in Figure 1.  
For example, GPS tracking technology can monitor bus locations in real-time, and mobile applications can provide passengers with up-to-date arrival information. In addition, predictive analytics technology can predict bus arrival times and analyze transportation data to suggest optimal routes, which greatly contributes to reducing transportation congestion, increasing public transportation reliability, and enhancing passenger convenience [21]. In addition to these functionalities, real-time bus arrival time prediction is a key feature of the SPTS. Accurate predictions allow passengers to manage their time better and reduce waiting periods at bus stops.  
Several studies have explored the potential of machine-learning algorithms to enhance the accuracy of these predictions. [PERSON] et al. (2019) proposed how IoT technologies can be integrated to optimize transportation flow and improve the responsiveness and adaptability of public transportation systems. Their work contributes to maximizing the efficiency of public transportation operations through real-time data analysis [22]. [PERSON], [PERSON], and [PERSON] (2017) highlighted the role of advanced algorithms in predicting bus arrival times within SPTS. They explored the use of support vector machines (SVMs) combined with genetic algorithms (GAs) to improve prediction models, highlighting the importance of optimization techniques to improve prediction accuracy [23]. Their work highlighted the potential of hybrid models, which combine the strengths of different algorithms to provide a more robust approach for handling the complexity of real-time data in public transportation. Other researchers have contributed to the development of SPTSs by focusing on different aspects of smart transportation, such as network optimization, passenger demand forecasting, and adaptive scheduling. For example, research on network optimization has proposed algorithms to dynamically adjust bus routes based on real-time demand and transportation conditions to improve operational efficiency [24; 25]. Another important area, passenger demand forecasting, uses historical and real-time data to predict passenger volumes to enable better resource allocation and reduce overcrowding during rush hours [26]. Recently, research has focused on combining transfer learning and attention mechanisms to enable more sophisticated predictions in public transportation systems. [PERSON] et al. (2024) proposed a model that combines transfer learning and attention mechanisms to predict the arrival time of freight trains on the China-Europe Railway Express, demonstrating  
Figure 1: Overall structure of a smart public transportation system: organic connection of real-time data collection, analysis, and service provision.  
high prediction performance even when data are sparse. Such a model can be similarly applied in smart public transportation systems, contributing to real-time data processing and improved prediction accuracy [27].  
These research efforts collectively highlight the potential of smart public transportation systems to revolutionize urban mobility. They provide a solid foundation for the development of advanced bus arrival time-prediction models such as those proposed in this study. As discussed in this study, the BAT-Transformer model builds upon these advancements by integrating machine-learning techniques with the robustness of the transformer architecture, offering a promising solution to the challenges faced in real-time public transportation management.