Accelerating Matrix Diagonalization through Decision Transformers with Epsilon-Greedy Optimization
Kshitij Bhatta, Geigh Zollicoffer, Manish Bhattarai, Phil Romero, Christian F. A. Negre, Anders M. N. Niklasson, Adetokunbo Adedoyin
TL;DR
This work reimagines matrix diagonalization as a sequential decision problem by formulating it as an MDP and solving it with a Decision Transformer augmented by an epsilon-greedy exploration strategy. It introduces a Jacobi-rotation–based environment, constructs a trajectory dataset from Hamiltonian symmetric matrices, and trains a causal transformer to predict pivot actions and returns-to-go. The approach achieves a 49.23% reduction in required diagonalization steps and can transfer to smaller matrix sizes without retraining, offering significant speedups (up to ~45x) over the FastEigen baseline while maintaining robust performance. These results suggest that transformer-based sequence models can serve as effective, data-driven eigen-solvers with practical implications for high-performance computing and scientific workflows.
Abstract
This paper introduces a novel framework for matrix diagonalization, recasting it as a sequential decision-making problem and applying the power of Decision Transformers (DTs). Our approach determines optimal pivot selection during diagonalization with the Jacobi algorithm, leading to significant speedups compared to the traditional max-element Jacobi method. To bolster robustness, we integrate an epsilon-greedy strategy, enabling success in scenarios where deterministic approaches fail. This work demonstrates the effectiveness of DTs in complex computational tasks and highlights the potential of reimagining mathematical operations through a machine learning lens. Furthermore, we establish the generalizability of our method by using transfer learning to diagonalize matrices of smaller sizes than those trained.
