Proceedingsbeitrag
Zitieren …

Taylor Expansion in Neural Networks: How Higher Orders Yield Better Predictions

Pavel Zwerschke 1, Arvid Weyrauch ORCID-iD-Icon 1, Markus Götz ORCID-iD-Icon 1 und Charlotte Debus  1
1 Scientific Computing Center (SCC), Karlsruher Institut für Technologie (KIT)
DOI: 10.5445/IR/1000175300
Verlagsausgabe veröffentlicht am 21.10.2024
CC BY-NC 4.0
Abstract

Deep learning has become a popular tool for solving complex problems in a variety of domains. Transformers and the attention mechanism have contributed a lot to this success. We hypothesize that the enhanced predictive capabilities of the attention mechanism can be attributed to higher-order terms in the input. Expanding on this idea and taking inspiration from Taylor Series approximation, we introduce “Taylor layers” as higher order polynomial layers for universal function approximation. We evaluate Taylor layers of second and third order on the task of time series forecasting, comparing them to classical linear layers as well as the attention mechanism. Our results on two commonly used datasets demonstrate that higher expansion orders can improve prediction accuracy given the same amount of trainable model weights. Interpreting higher-order terms as a form of token mixing, we further show that second order (quadratic) Taylor layers can efficiently replace canonical dot-product attention, increasing prediction accuracy while reducing computational requirements.