Approximating Matrix Functions with Deep Neural Networks and Transformers

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Padmanabhan, Rahul, Brugiapaglia, Simone
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911431654375424
author Padmanabhan, Rahul
Brugiapaglia, Simone
author_facet Padmanabhan, Rahul
Brugiapaglia, Simone
contents Transformers have revolutionized natural language processing, but their use for numerical computation has received less attention. We study the approximation of matrix functions, which map scalar functions to matrices, using neural networks including transformers. We focus on functions mapping square matrices to square matrices of the same dimension. These types of matrix functions appear throughout scientific computing, e.g., the matrix exponential in continuous-time Markov chains and the matrix sign function in stability analysis of dynamical systems. In this paper, we make two contributions. First, we prove bounds on the width and depth of ReLU networks needed to approximate the matrix exponential to an arbitrary precision. Second, we show experimentally that a transformer encoder-decoder with suitable numerical encodings can approximate certain matrix functions at a relative error of 5% with high probability. Our study reveals that the encoding scheme strongly affects performance, with different schemes working better for different functions.
format Preprint
id arxiv_https___arxiv_org_abs_2602_07800
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Approximating Matrix Functions with Deep Neural Networks and Transformers
Padmanabhan, Rahul
Brugiapaglia, Simone
Machine Learning
Numerical Analysis
Neural and Evolutionary Computing
Transformers have revolutionized natural language processing, but their use for numerical computation has received less attention. We study the approximation of matrix functions, which map scalar functions to matrices, using neural networks including transformers. We focus on functions mapping square matrices to square matrices of the same dimension. These types of matrix functions appear throughout scientific computing, e.g., the matrix exponential in continuous-time Markov chains and the matrix sign function in stability analysis of dynamical systems. In this paper, we make two contributions. First, we prove bounds on the width and depth of ReLU networks needed to approximate the matrix exponential to an arbitrary precision. Second, we show experimentally that a transformer encoder-decoder with suitable numerical encodings can approximate certain matrix functions at a relative error of 5% with high probability. Our study reveals that the encoding scheme strongly affects performance, with different schemes working better for different functions.
title Approximating Matrix Functions with Deep Neural Networks and Transformers
topic Machine Learning
Numerical Analysis
Neural and Evolutionary Computing
url https://arxiv.org/abs/2602.07800