Skip to main content
Have a personal or library account? Click to login
Why Transformers Fail and Ensemble Models Succeed in Approximating AMS-02 Proton Spectra Cover

Why Transformers Fail and Ensemble Models Succeed in Approximating AMS-02 Proton Spectra

Open Access
|Nov 2026
Read online

Abstract

The use of Machine learning models in cosmic ray physics is currently a very popular topic across cosmic ray physicists, even widely discussed at international conferences. There is a need to replace or at least supplement traditional physics-based methods with machine learning models, and the topic of approximating cosmic ray spectra is no exception. Traditional physics-based models, like the Force-field approximation, provide a baseline and fast approximation, but suffer from failures at higher rigidities. This paper compares performance between two machine learning architectures: Gradient Boosted Decision Trees (XGBoost) and the Transformer. We demonstrate that XGBoost achieves a state-of-the-art approximation, successfully modeling the spectra with R2 scores consistently exceeding 0.96 for rigidities under 11 GV. In contrast, a custom Transformer-based model fails after 6.5 GV on the same data.

DOI: https://doi.org/10.2478/aei-2026-0017 | Journal eISSN: 1338-3957 | Journal ISSN: 1335-8243
Language: English
Page range: 48 - 57
Submitted on: Nov 23, 2025
Accepted on: Jan 27, 2026
Published online: Nov 26, 2026
Published in print: Sep 1, 2026
Published by: Technical University of Košice
In partnership with: Paradigm Publishing Services
Publication frequency: 4 issues per year

© 2026 Martin Nguyen, Pavol Bobík, Ján Genči, published by Technical University of Košice
This work is licensed under the Creative Commons Attribution 4.0 License.