###### Abstract  
In urban public transportation systems, the accuracy of bus arrival time prediction is crucial to reduce passenger waiting time, increase satisfaction, and ensure efficient transportation operations. However, traditional bus information systems (BISs) rely on neural network models, which have limited prediction accuracy, and some public transportation systems have non-fixed or irregular arrival times, making it difficult to directly apply traditional prediction models. Therefore, we used a Transformer Encoder model to effectively learn the long-term dependencies of time series data, and a multi-headed attentional mechanism to reduce the root mean square error (RMSE) and lower the mean absolute percentage error (MAPE) compared to other models to improve prediction performance. The model was trained on real bus-operation data collected from a public data portal covering the Gangnam-gu area of Seoul, Korea, and data preprocessing included missing value handling, normalization and one-hot encoding, and resampling techniques. A linear projection process, learnable location-encoding technique, and a fully connected layer were applied to the transformer-encoder model to capture the time series data more precisely. Therefore, we propose BAT-Transformer, a method that applies a linear projection process, learnable location-encoding technique, and a fully connected layer using bus data. It is expected to help optimize public transportation systems and show its applicability in various urban environments. bus information system; resampling; transformer-encoder; bus information terminal; time series +
Footnote †: journal:  
real-time processing constraints, resulting in poor prediction accuracy, especially in systems without fixed arrival times. A closer look at the issues with the existing BIS reveals the following problems: First, limited dependency learning capabilities prevent existing models from adequately reflecting the continuity of data over time, resulting in poor forecast accuracy [3]. Second, slow training speeds pose a significant problem in situations requiring real-time predictions. Processing large datasets requires a long time, often preventing the prediction model from reflecting the latest data [4]. Third, real-time processing limitations are particularly problematic in urban environments, where transportation conditions change rapidly. Existing models often fail to quickly incorporate real-time data, resulting in predictions that differ significantly from actual conditions [5]. Finally, the complexity of hyperparameter tuning makes model optimization difficult and requires substantial time and resources [6]. One of the main problems caused by these issues is the high latency of bus arrival time prediction, defined as the difference between the actual arrival time and the predicted arrival time, which has a significant impact on the user experience. In fact, passengers experienced unnecessary waiting times, and the current error margin of the BIS was approximately 2 min. According to a survey by the Seoul Metropolitan Government, approximately 78.1% of BIS users frequently use bus information terminals (BITs) installed at bus stops; however, a significant portion of them cite frequent system malfunctions (25.5%) and inaccurate arrival information (10.6%) as major inconveniences [7]. In bus arrival time prediction, existing studies have mainly utilized recurrent neural network (RNN)-based models to predict transportation flows over time. [PERSON] et al. (2020) modeled transportation patterns through deep learning, with a particular focus on using Long Short-Term Memory (LSTM) to handle long-term dependencies [8]. In addition, [PERSON] et al. (2016) presented a methodology to effectively predict transportation flows using LSTM and Gated Recurrent Unit (GRU) models. [PERSON] et al.