{"paper_id":"015ac9ac-e95f-4d8d-a3c4-96682c5d3057","body_text":"A Comparative Analysis of a Multi-Headed Self-Attention Mechanism-Based Transformer Model for Bus Travel Time Prediction Using Heterogeneous Datasets Across Multiple Bus Routes | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article A Comparative Analysis of a Multi-Headed Self-Attention Mechanism-Based Transformer Model for Bus Travel Time Prediction Using Heterogeneous Datasets Across Multiple Bus Routes Md Ahnaf Zahin, Rehnoma Tarannom, Yaw Adu-Gyamfi This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7756700/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Accurate prediction of travel time is critical for improving transit service delivery and can potentially increase passenger use and satisfaction. To date, many models developed for predicting bus travel times are limited to small networks due to poor performance in large, densely populated urban areas with complex traffic and long-range dependencies. This study introduces a deep learning-based single-step, multi-station forecasting framework for predicting average bus travel times across multiple routes, stops, and trips using heterogeneous data sources (GTFS records and vehicle probe data) collected over one week in Saint Louis, Missouri. A multi-headed self-attention univariate Transformer Neural Network model was developed to estimate mean hourly travel times. Its performance was compared with Multivariate GRU and LSTM models, as well as Historical Average and XGBoost benchmark models. Using five hours of historical data to predict the next hour, the proposed transformer achieved the lowest minimum and mean MAPE values (4.32% and 8.29%) and performed consistently well during both peak and off-peak periods. While XGBoost delivered the fastest computation time (6.28 seconds), the transformer remained competitive (7.42 seconds) while offering higher accuracy. These results demonstrated the transformer’s suitability and scalability for real-time bus travel time prediction in large, complex urban transit networks. Deep Learning Travel Time prediction Mean Absolute Percentage Errors (MAPE) Transformer Model Self-attention mechanism Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {\"props\":{\"pageProps\":{\"initialData\":{\"identity\":\"rs-7756700\",\"acceptedTermsAndConditions\":true,\"allowDirectSubmit\":true,\"archivedVersions\":[],\"articleType\":\"Research Article\",\"associatedPublications\":[],\"authors\":[{\"id\":528804006,\"identity\":\"5beda887-66d5-4a21-b9ba-96f8bd6912ca\",\"order_by\":0,\"name\":\"Md Ahnaf Zahin\",\"email\":\"\",\"orcid\":\"\",\"institution\":\"University of Missouri\",\"correspondingAuthor\":false,\"prefix\":\"\",\"firstName\":\"Md\",\"middleName\":\"Ahnaf\",\"lastName\":\"Zahin\",\"suffix\":\"\"},{\"id\":528804007,\"identity\":\"32cf375e-25f2-4303-938c-4d94ef771bb1\",\"order_by\":1,\"name\":\"Rehnoma Tarannom\",\"email\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA9UlEQVRIiWNgGAWjYFAD9uYDDIwNQAYPiMeGRyVcjudYAqlaJHIMiNNiPr/52YefO+7I6TbkfHvwccc9efmeww8YPpQdxqlF5hib8czeM8+MzQ6c3W4480yx4YazbQaMM87h1iLBxmDMwNt2OHHbwd5t0rxtCYwb+BkMmIEieLSwf2b8C9JymOeZ9N+2BPv5/ewfmP/i1cJjzAy25RgPmzRjW0Jiw9keA2ZGvFpyipll2w4bm51hM5PsPZOQvOHMmYKDPefScWthPr6Z8W3bYTmz+4+fSfzckWA7vyd944MfZdY4tWAHB0hUPwpGwSgYBaMADQAAAMJZYNdMi3YAAAAASUVORK5CYII=\",\"orcid\":\"\",\"institution\":\"University of Nebraska–Lincoln\",\"correspondingAuthor\":true,\"prefix\":\"\",\"firstName\":\"Rehnoma\",\"middleName\":\"\",\"lastName\":\"Tarannom\",\"suffix\":\"\"},{\"id\":528804009,\"identity\":\"c36a084d-3fe0-4faf-87bb-9d5d7a129137\",\"order_by\":2,\"name\":\"Yaw Adu-Gyamfi\",\"email\":\"\",\"orcid\":\"\",\"institution\":\"University of Missouri\",\"correspondingAuthor\":false,\"prefix\":\"\",\"firstName\":\"Yaw\",\"middleName\":\"\",\"lastName\":\"Adu-Gyamfi\",\"suffix\":\"\"}],\"badges\":[],\"createdAt\":\"2025-10-01 05:53:28\",\"currentVersionCode\":1,\"declarations\":\"\",\"doi\":\"10.21203/rs.3.rs-7756700/v1\",\"doiUrl\":\"https://doi.org/10.21203/rs.3.rs-7756700/v1\",\"draftVersion\":[],\"editorialEvents\":[],\"editorialNote\":\"\",\"failedWorkflow\":false,\"files\":[{\"id\":93664316,\"identity\":\"163a2cdf-0340-4857-830e-d3c9edfc1878\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:47:48\",\"extension\":\"docx\",\"order_by\":0,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":5965457,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Manuscript.docx\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/502bfb4e31c3ee75d842f2fb.docx\"},{\"id\":93663017,\"identity\":\"3afadca5-fdf5-4d9c-ad73-9705c273acb2\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"json\",\"order_by\":1,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":5276,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"2035eb8009a4440db3a838500c54b179.json\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/ce3bb9e90daeed9d56bed154.json\"},{\"id\":93663025,\"identity\":\"63b2fff1-7392-4eb8-8d4f-b2ee445fe703\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"xml\",\"order_by\":2,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":186782,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"2035eb8009a4440db3a838500c54b1791enriched.xml\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/78dfe7881737ac2a1e4477f4.xml\"},{\"id\":93664315,\"identity\":\"8eca861b-7141-44fc-8399-1f1f26baf864\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:47:48\",\"extension\":\"jpeg\",\"order_by\":6,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":182318,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"floatimage1.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/bbdbeb35ab079d0ac9bade48.jpeg\"},{\"id\":93663019,\"identity\":\"f8d0b26f-38ec-41c1-8fbe-8dd11f818f0e\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"png\",\"order_by\":7,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":7125,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"floatimage2.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/54b999cf0a7abbb321127e11.png\"},{\"id\":93663999,\"identity\":\"6ecafb9e-0844-451c-8c48-5ad75a68273b\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:39:48\",\"extension\":\"png\",\"order_by\":8,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":1533315,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"floatimage3.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/1f0dc00932c2e84bf2528ce5.png\"},{\"id\":93663020,\"identity\":\"8a55dbe4-9650-4ee4-8f05-9e9b0a103e26\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"png\",\"order_by\":9,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":20185,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"floatimage4.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/e41f4593b6de650bfd566367.png\"},{\"id\":93663018,\"identity\":\"13c612e4-efa1-4bea-a9d9-4be8dc432749\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"png\",\"order_by\":10,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":13246,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"floatimage5.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/3cea03e6a33848c182716a4a.png\"},{\"id\":93663996,\"identity\":\"5bd03b88-8bde-4af7-98a0-f788a41ccbba\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:39:48\",\"extension\":\"jpeg\",\"order_by\":11,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":120676,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"floatimage6.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/4127ef0772f500b5abf3f6c4.jpeg\"},{\"id\":93663023,\"identity\":\"a5672266-17f7-4bd9-982d-46603acb6de8\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"jpeg\",\"order_by\":12,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":107487,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"floatimage7.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/65f9f673f73cc3e097d86ae5.jpeg\"},{\"id\":93663029,\"identity\":\"4a4fa8bb-4c07-4320-82fc-010875033f6d\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"png\",\"order_by\":13,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":11081,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"floatimage8.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/7a530c44ada477d19482ab86.png\"},{\"id\":93663043,\"identity\":\"24aa51b1-2c74-4867-af2d-361bf43e9dd4\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"png\",\"order_by\":14,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":17765,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"floatimage9.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/e6239347bf1b907924afc144.png\"},{\"id\":93663998,\"identity\":\"d04a5b92-2eb6-4db1-b0e1-50f89c7970a8\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:39:48\",\"extension\":\"jpeg\",\"order_by\":15,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":15831,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"groupimage1.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/c0d4eb8f07749c0b3849bacb.jpeg\"},{\"id\":93664318,\"identity\":\"ac63685f-93fa-49b5-92e3-f8c5cec7c324\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:47:48\",\"extension\":\"jpeg\",\"order_by\":16,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":64975,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"groupimage2.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/d477f8f747464bc5d6f47441.jpeg\"},{\"id\":93663031,\"identity\":\"18431195-6711-455b-ac2f-cfacde8eacff\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"jpeg\",\"order_by\":17,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":42265,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"groupimage3.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/56652e66fe276728280b8b87.jpeg\"},{\"id\":93665571,\"identity\":\"3cf749c3-6372-4c0c-a11a-6f5860ab0043\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:55:48\",\"extension\":\"jpeg\",\"order_by\":18,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":64250,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"groupimage4.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/7bbbdba2e0a0500a8ba478c2.jpeg\"},{\"id\":93663038,\"identity\":\"35e40575-ac40-4c88-a976-ac0d2d72c3b5\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"jpeg\",\"order_by\":19,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":121446,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"groupimage5.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/d82fc4c587d06c3cc68cbabc.jpeg\"},{\"id\":93663030,\"identity\":\"16a572b8-83b5-455e-a8a1-7df56194b50a\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"jpeg\",\"order_by\":20,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":29968,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"groupimage6.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/34eef8b82475b73a2d339de0.jpeg\"},{\"id\":93663047,\"identity\":\"9a450c8a-2720-4f9c-9826-dcecd340b0b4\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"jpeg\",\"order_by\":21,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":79745,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"groupimage7.jpeg\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/68d993887732225e494637e5.jpeg\"},{\"id\":93664005,\"identity\":\"abb2e03b-8fbf-4b8c-aa06-050e6506f11d\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:39:49\",\"extension\":\"png\",\"order_by\":22,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":36751,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinefloatimage1.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/f579a4e6d301c98910bfb78d.png\"},{\"id\":93663044,\"identity\":\"d5616400-834a-42b0-a49c-de9c83a8b2a7\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"png\",\"order_by\":23,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":4802,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinefloatimage2.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/f0ce7df55ce7a69ee47a0066.png\"},{\"id\":93663050,\"identity\":\"781dd85c-32a1-459c-8fb6-600fe1cf828e\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"png\",\"order_by\":24,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":187192,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinefloatimage3.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/e7ab3044ce89d8bba3fc7472.png\"},{\"id\":93663034,\"identity\":\"5117f71f-c014-4e94-8918-353b78566008\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"png\",\"order_by\":25,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":5345,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinefloatimage4.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/541524ca3bde41b1b7df0bd1.png\"},{\"id\":93664319,\"identity\":\"5ee4727e-d542-43b0-8339-adba9661bdea\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:47:48\",\"extension\":\"png\",\"order_by\":26,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":5390,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinefloatimage5.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/67709d4fc7f0b8f3e4b092c9.png\"},{\"id\":93663045,\"identity\":\"f686ca55-666f-4fb1-8c28-d1f62ad662a9\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"png\",\"order_by\":27,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":51429,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinefloatimage6.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/78a0105ab7e5d75f8ed1516a.png\"},{\"id\":93664008,\"identity\":\"49b5373d-7654-4f5e-a0d6-744f2a33f716\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:39:49\",\"extension\":\"png\",\"order_by\":28,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":28718,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinefloatimage7.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/2d9d9092084702aa23c785ff.png\"},{\"id\":93663036,\"identity\":\"1c5a2252-22eb-4252-b38b-ae2493670ac4\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"png\",\"order_by\":29,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":3359,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinefloatimage8.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/59e435924ef87e59ee5201d7.png\"},{\"id\":93663037,\"identity\":\"d6628ff7-89f1-4be8-abff-5865c971b40b\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"png\",\"order_by\":30,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":8007,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinefloatimage9.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/0d07eae3b6140e21e4ad3572.png\"},{\"id\":93663040,\"identity\":\"fa902ba9-a49f-45b7-b06a-ddecc66e3eef\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"png\",\"order_by\":31,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":5125,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinegroupimage1.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/ba3db9ff54b29ec3db4169f0.png\"},{\"id\":93663042,\"identity\":\"b26d105a-89d5-42ca-a41e-1e2178712e30\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"png\",\"order_by\":32,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":15692,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinegroupimage2.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/e8fc0fbce09733e129250de5.png\"},{\"id\":93663051,\"identity\":\"12c59c3b-0f5c-4425-b910-20210498aa08\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"png\",\"order_by\":33,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":19358,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinegroupimage3.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/aced345216c7d0900a78e194.png\"},{\"id\":93663039,\"identity\":\"1d2c6241-e9f1-469c-8388-4db31d16fa49\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:48\",\"extension\":\"png\",\"order_by\":34,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":18984,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinegroupimage4.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/51acfbcb311e0a0d19284a41.png\"},{\"id\":93663041,\"identity\":\"2a9d3c5f-31bc-41b4-a435-ae8cbdb22d5c\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"png\",\"order_by\":35,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":49859,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinegroupimage5.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/4c5056b145ac8f73e0487836.png\"},{\"id\":93664003,\"identity\":\"3f7d1cee-838e-49df-861f-d07a3daf0ddd\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:39:48\",\"extension\":\"png\",\"order_by\":36,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":11758,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinegroupimage6.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/3667db53c08575b2117a2174.png\"},{\"id\":93663048,\"identity\":\"6ba8ec49-3451-4937-9f6e-35f05e962248\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:31:49\",\"extension\":\"png\",\"order_by\":37,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":53087,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Onlinegroupimage7.png\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/5136acd99bbb8efb7e837e21.png\"},{\"id\":93664006,\"identity\":\"49d67efa-9452-4344-9961-5e51d2a39696\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:39:49\",\"extension\":\"xml\",\"order_by\":38,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":185317,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"2035eb8009a4440db3a838500c54b1791structuring.xml\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/3f68ffbcdbcd509d4f63d661.xml\"},{\"id\":93664007,\"identity\":\"1c92ac41-088f-48bc-b1ec-3c309f43379a\",\"added_by\":\"auto\",\"created_at\":\"2025-10-16 08:39:49\",\"extension\":\"html\",\"order_by\":39,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"acdc-reference\",\"size\":195592,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"earlyproof.html\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1/6de609340e2589444c140df9.html\"},{\"id\":107972086,\"identity\":\"c8cb2e5f-d120-46c6-abd7-308a270984b2\",\"added_by\":\"auto\",\"created_at\":\"2026-04-28 06:56:51\",\"extension\":\"pdf\",\"order_by\":1,\"title\":\"\",\"display\":\"\",\"copyAsset\":false,\"role\":\"manuscript-pdf\",\"size\":1500283,\"visible\":true,\"origin\":\"\",\"legend\":\"\",\"description\":\"\",\"filename\":\"Manuscript.pdf\",\"url\":\"https://assets-eu.researchsquare.com/files/rs-7756700/v1_covered_629ee3f5-fa10-4d2c-95d0-470423464c28.pdf\"}],\"financialInterests\":\"No competing interests reported.\",\"formattedTitle\":\"A Comparative Analysis of a Multi-Headed Self-Attention Mechanism-Based Transformer Model for Bus Travel Time Prediction Using Heterogeneous Datasets Across Multiple Bus Routes\",\"fulltext\":[],\"fulltextSource\":\"\",\"fullText\":\"\",\"funders\":[],\"hasAdminPriorityOnWorkflow\":false,\"hasManuscriptDocX\":false,\"hasOptedInToPreprint\":true,\"hasPassedJournalQc\":\"\",\"hasAnyPriority\":false,\"hideJournal\":true,\"highlight\":\"\",\"institution\":\"\",\"isAcceptedByJournal\":false,\"isAuthorSuppliedPdf\":true,\"isDeskRejected\":\"\",\"isHiddenFromSearch\":false,\"isInQc\":false,\"isInWorkflow\":false,\"isPdf\":true,\"isPdfUpToDate\":true,\"isWithdrawnOrRetracted\":false,\"journal\":{\"display\":true,\"email\":\"info@researchsquare.com\",\"identity\":\"researchsquare\",\"isNatureJournal\":false,\"hasQc\":true,\"allowDirectSubmit\":true,\"externalIdentity\":\"\",\"sideBox\":\"\",\"snPcode\":\"\",\"submissionUrl\":\"/submission\",\"title\":\"Research Square\",\"twitterHandle\":\"researchsquare\",\"acdcEnabled\":true,\"dfaEnabled\":false,\"editorialSystem\":\"\",\"reportingPortfolio\":\"\",\"inReviewEnabled\":false,\"inReviewRevisionsEnabled\":true},\"keywords\":\"Deep Learning, Travel Time prediction, Mean Absolute Percentage Errors (MAPE), Transformer Model, Self-attention mechanism\",\"lastPublishedDoi\":\"10.21203/rs.3.rs-7756700/v1\",\"lastPublishedDoiUrl\":\"https://doi.org/10.21203/rs.3.rs-7756700/v1\",\"license\":{\"name\":\"CC BY 4.0\",\"url\":\"https://creativecommons.org/licenses/by/4.0/\"},\"manuscriptAbstract\":\"\\u003cp\\u003eAccurate prediction of travel time is critical for improving transit service delivery and can potentially increase passenger use and satisfaction. To date, many models developed for predicting bus travel times are limited to small networks due to poor performance in large, densely populated urban areas with complex traffic and long-range dependencies. This study introduces a deep learning-based single-step, multi-station forecasting framework for predicting average bus travel times across multiple routes, stops, and trips using heterogeneous data sources (GTFS records and vehicle probe data) collected over one week in Saint Louis, Missouri. A multi-headed self-attention univariate Transformer Neural Network model was developed to estimate mean hourly travel times. Its performance was compared with Multivariate GRU and LSTM models, as well as Historical Average and XGBoost benchmark models. Using five hours of historical data to predict the next hour, the proposed transformer achieved the lowest minimum and mean MAPE values (4.32% and 8.29%) and performed consistently well during both peak and off-peak periods. While XGBoost delivered the fastest computation time (6.28 seconds), the transformer remained competitive (7.42 seconds) while offering higher accuracy. These results demonstrated the transformer\\u0026rsquo;s suitability and scalability for real-time bus travel time prediction in large, complex urban transit networks.\\u003c/p\\u003e\",\"manuscriptTitle\":\"A Comparative Analysis of a Multi-Headed Self-Attention Mechanism-Based Transformer Model for Bus Travel Time Prediction Using Heterogeneous Datasets Across Multiple Bus Routes\",\"msid\":\"\",\"msnumber\":\"\",\"nonDraftVersions\":[{\"code\":1,\"date\":\"2025-10-16 08:31:43\",\"doi\":\"10.21203/rs.3.rs-7756700/v1\",\"editorialEvents\":[{\"type\":\"communityComments\",\"content\":0}],\"status\":\"published\",\"journal\":{\"display\":true,\"email\":\"info@researchsquare.com\",\"identity\":\"researchsquare\",\"isNatureJournal\":false,\"hasQc\":true,\"allowDirectSubmit\":true,\"externalIdentity\":\"\",\"sideBox\":\"\",\"snPcode\":\"\",\"submissionUrl\":\"/submission\",\"title\":\"Research Square\",\"twitterHandle\":\"researchsquare\",\"acdcEnabled\":true,\"dfaEnabled\":false,\"editorialSystem\":\"\",\"reportingPortfolio\":\"\",\"inReviewEnabled\":false,\"inReviewRevisionsEnabled\":true}}],\"origin\":\"\",\"ownerIdentity\":\"fcad6cce-2f60-4872-aa52-bcf12d346ac4\",\"owner\":[],\"postedDate\":\"October 16th, 2025\",\"published\":true,\"recentEditorialEvents\":[],\"rejectedJournal\":[],\"revision\":\"\",\"amendment\":\"\",\"status\":\"posted\",\"subjectAreas\":[],\"tags\":[],\"updatedAt\":\"2026-04-28T06:56:04+00:00\",\"versionOfRecord\":[],\"versionCreatedAt\":\"2025-10-16 08:31:43\",\"video\":\"\",\"vorDoi\":\"\",\"vorDoiUrl\":\"\",\"workflowStages\":[]},\"version\":\"v1\",\"identity\":\"rs-7756700\",\"journalConfig\":\"researchsquare\"},\"__N_SSP\":true},\"page\":\"/article/[identity]/[[...version]]\",\"query\":{\"redirect\":\"/article/rs-7756700\",\"identity\":\"rs-7756700\",\"version\":[\"v1\"]},\"buildId\":\"8U1c8b4HqxoKbykW_rLl7\",\"isFallback\":false,\"isExperimentalCompile\":false,\"dynamicIds\":[84888],\"gssp\":true,\"scriptLoader\":[]}","source_license":"CC-BY-4.0","license_restricted":false}