  The cross section is one of the most important physical quantities in
high-energy physics and the most time consuming to compute. While machine
learning has proven to be highly successful in numerical calculations in
high-energy physics, analytical calculations using machine learning are still
in their infancy. In this work, we use a sequence-to-sequence model,
specifically, a transformer, to compute a key element of the cross section
calculation, namely, the squared amplitude of an interaction. We show that a
transformer model is able to predict correctly 97.6% and 99% of squared
amplitudes of QCD and QED processes, respectively, at a speed that is up to
orders of magnitude faster than current symbolic computation frameworks. We
discuss the performance of the current model, its limitations and possible
future directions for this work.
