Applications of Tropical Mathematics to Neural Network Architecture
Abstract
Using the methods provided by tropical mathematics we can simplify the structure of a neural network, which increases its explainability, without decreasing its accuracy. This paper aims to explore the use of tropical functions in neural networks and compare their efficiency with classical ones. Theoretical framework of tropical mathematics is a semiring with idempotent addition, which is a natural approach to piecewise-linear neural networks, e.g. networks with ReLU activation. Within this approach, piecewise-linear convex function is a tropical polynomial, and general piecewise-linear functions are tropical rational functions. Thus a layer of a neural network with linear preactivation and ReLU activation can be viewed as a vector-valued tropical rational function, which in turn can be represented by two tropical layers. Two tropical layers were implemented, and five tropical architectures were constructed. The models were trained on a heart disease dataset, aiming to determine the presence of heart disease. All models had the same hyperparameters. Each of the models was trained for 100 epochs using Adam and SGD optimizers. The results of the comparison showed that the best accuracy was achieved by a mixed-architecture model using two linear layers. The comparison results showed that the best accuracy was achieved by a mixed-architecture model with two linear layers with a min-layer and a max-layer in between. This accuracy was achieved by using an Adam optimizer. The classical model scored 77.3% and the tropical 77.7%.
References
L. Zhang, G. Naitzat, and L.-H. Lim, “Tropical Geometry of Deep Neural Networks,” in Proc. of International Conference on Machine Learning (PMLR), 2018, vol. 80, pp. 5824–5832, 2018.
Y. Luo and F. Shiqing, “Min-Max-Plus Neural Networks,” in arXiv, [Online], preprint arXiv:2102.06358, 2021.
M. Kazaryan, Tropical geometry, Moscow: MCNMO, 2012 (in Russian).
O. Ceyhan, “Algorithmic Complexities in Backpropagation and Tropical Neural Networks,” in arXiv, [Online], preprint arXiv:2101.00717, 2021.
G. Smyrnis and P. Maragos, “Tropical polynomial division and neural networks,” in arXiv, [Online], preprint arXiv:1911.12922, 2019.
P. Hartman, “On functions representable as a difference of convex functions,” Pacific Journal of Mathematics, vol. 9, no. 3, pp. 707–713, 1959.
G. Smyrnis, P. Maragos, and G. Retsinas, “Maxpolynomial Division with Application To Neural Network Simplification,” in Proc. of ICASSP 2020 — IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain, May 2020, pp. 4192–4196, 2020; doi:10.1109/icassp40776.2020.9053540
D. Nikolaos and M. P. Maragos, “Advances in the training, pruning and enforcement of shape constraints of Morphological Neural Networks using Tropical Algebra,” in arXiv, [Online], preprint arXiv:2011.07643v1, 2020.
G. X. Ritter and P. Sussner, “An introduction to morphological neural networks,” in Proc. of 13th Int. Conf. on Pattern Recognition, IEEE, Vienna, Austria, 1996, vol. 4, pp. 709–717, 1996;
doi:10.1109/ICPR.1996.547657
V. Charisopoulos and P. Maragos, “A Tropical Approach to Neural Networks with Piecewise Linear Activations,” in arXiv, [Online], preprint arXiv:1805.0874, 2018.
G. Fournier, “A tropical approach to neural networks,” M.S. thesis, Dept. Mathematics, Universite deˊLille, Lille, France, 2019.
M. H. A. Alfarra, “Applications of Tropical Geometry in Deep Neural Networks,” M.S. thesis, Dept. Computer, Electrical and Mathematical Science and Engineering, King Abdullah University of Science and Technology, Thuwal, Kingdom of Saudi Arabia, 2019.
PyTorch Contributors, “Pytorch documentation,” in Pytorch.org, 2023. [Online]. Available: https://pytorch.org/docs/stable/index.html
S. Fan, L. Liu, and Y. Luo, “An Alternative Practice of Tropical Convolution to Traditional Convolutional Neural Networks,” in Proc. of 2021 The 5th International Conference on Compute and Data Analysis, Sanya, China, pp. 162–168, 2021; doi:10.1145/3456529.3456557
This work is licensed under a Creative Commons Attribution 4.0 International License.