Generalized Orders of Magnitude for Scalable, Parallel, High-Dynamic-Range Computation

Franz A. Heinsen, Leo Kozachkov
10/3/2025
cs.LGcs.AImath.NA

No official code found. Best implementation: glassroom/generalized_orders_of_magnitude (11 stars, MIT, PyTorch, last commit 2025-12-06). 3 more below.

Abstract

Many domains, from deep learning to finance, require compounding real numbers over long sequences, often leading to catastrophic numerical underflow or overflow. We introduce generalized orders of magnitude (GOOMs), a principled extension of traditional orders of magnitude that incorporates floating-point numbers as a special case, and which in practice enables stable computation over significantly larger dynamic ranges of real numbers than previously possible. We implement GOOMs, along with an efficient custom parallel prefix scan, to support native execution on parallel hardware such as GPUs. We demonstrate that our implementation of GOOMs outperforms traditional approaches with three representative experiments, all of which were previously considered impractical or impossible, and now become possible and practical: (1) compounding real matrix products far beyond standard floating-point limits; (2) estimating spectra of Lyapunov exponents in parallel, orders of magnitude faster than with previous methods, applying a novel selective-resetting method to prevent state colinearity; and (3) capturing long-range dependencies in deep recurrent neural networks with non-diagonal recurrent states, computed in parallel via a prefix scan, without requiring any form of stabilization. Our results show that our implementation of GOOMs, combined with efficient parallel scanning, offers a scalable and numerically robust alternative to conventional floating-point numbers for high-dynamic-range applications.

View on arXivView PDF

Code Implementations(4)

PyTorchMIT

Reference implementation of parallel methods for estimating Lyapunov exponents, orders-of-magnitude faster than with previous methods, as proposed in "Generalized Orders of Magnitude for Scalable, Parallel, High-Dynamic-Range Computation" (Heinsen and Kozachkov, 2025).

20PythonJun 18, 202510 months agoMIT
dynamical-systemsgeneralized-orders-of-magnitudegoomslyapunov-exponentslyapunov-spectrum+1 more
PyTorchMIT

Reference implementation of the deep RNN described in "Generalized Orders of Magnitude for Scalable, Parallel, High-Dynamic-Range Computation" (Heinsen and Kozachkov, 2025).

70PythonJun 18, 202510 months agoMIT
deep-learninggeneralized-orders-of-magnitudegoomspytorchrecurrent-neural-networks+1 more
PyTorchMIT

Reference implementation of generalized orders of magnitude, as proposed in "Generalized Orders of Magnitude for Scalable, Parallel, High-Dynamic-Range Computation" (Heinsen and Kozachkov, 2025).

110PythonJun 18, 202510 months agoMIT
generalized-orders-of-magnitudegoomshigh-dynamic-rangepytorch
PyTorchMIT

Reference implementation of selective resetting for parallel prefix scans, as proposed in "Generalized Orders of Magnitude for Scalable, Parallel, High-Dynamic-Range Computation" (Heinsen and Kozachkov, 2025).

20PythonJun 24, 202510 months agoMIT
parallel-scanparallel-scanningpscanpytorchselective-resetting

Similar Papers

Cite this paper

@article{heinsen2025generalized,
  title  = {Generalized Orders of Magnitude for Scalable, Parallel, High-Dynamic-Range Computation},
  author = {Franz A. Heinsen and Leo Kozachkov},
  year   = {2025},
  eprint = {2510.03426},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.03426v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.03426.svg)](https://codeofpaper.com/paper/2510.03426)

Discussion