Introduction
In modern computational fields such as deep learning, finance, and dynamical systems, algorithms often require compounding numbers over extremely long sequences—for instance, multiplying thousands of matrices in a recurrent neural network (RNN). Standard floating-point formats like Float32 and Float64 possess rigid "ceilings" and "floors." When values exceed these limits, they trigger overflow or underflow, resulting in what researchers term "catastrophic numerical error."
To circumvent this, practitioners typically employ "stabilization" techniques like gradient clipping or LayerNorm. While effective, these methods often distort the underlying mathematical objectives or force computations to remain sequential to maintain stability, significantly hindering performance on parallel hardware like GPUs. This paper introduces Generalized Orders of Magnitude (GOOMs), a numerical representation designed to absorb massive fluctuations in magnitude without traditional stabilization.
Methodology: The GOOM Representation
The core innovation of GOOMs is representing a real number $x$ as a complex logarithm $x' = a + bi$, such that $x = e^{x'}$.
- Representation: The real part ($a$) encodes the "order of magnitude," while the imaginary part ($b$) handles the sign via Euler's identity ($e^{i\pi} = -1$).
- Implementation: By leveraging existing complex data types (Complex64/128), GOOMs utilize standard floating-point hardware to store the logarithms of the target values. This allows for a dynamic range that dwarfs standard formats.
- Log-Matrix-Multiplication-Exp (LMME): The authors developed matrix multiplication kernels that operate directly in the log-domain, effectively scaling the "log-sum-exp" trick to high-dimensional linear algebra.
Parallelizing the Sequential
A significant breakthrough presented is the "selective-resetting" method for parallel prefix scans. In tasks like QR decomposition, which are traditionally sequential to prevent vector collinearity, selective resetting allows the system to detect when vectors become too similar and "reset" them to an orthonormal basis mid-computation. This enables these algorithms to be flattened into parallel operations on a GPU, provided the underlying number system can handle the interim numerical "explosions" before the reset occurs.
Experimental Validation and Results
The authors tested GOOMs across synthetic matrix chains, dynamical systems for estimating Lyapunov exponents, and large-scale deep learning tasks (e.g., training a 124M-parameter RNN on "The Pile").
Key Findings
- Extreme Stability: In matrix compounding tests, Float32 and Float64 failed almost immediately due to overflow. In contrast, GOOMs (Complex64) successfully processed chains of up to 1,000,000 steps without error.
- Computational Speedups: For estimating Lyapunov exponents, the GOOM-based parallel algorithm achieved speedups of 100x to 1000x over traditional sequential methods as the number of steps increased.
- Robust Deep Learning: RNNs were trained successfully without any traditional stabilization or normalization layers. The GOOM representation naturally absorbed the state magnitude fluctuations that typically crash standard training runs.
Discussion and Future Work
While GOOMs offer unprecedented robustness, they currently carry a "software-level" overhead, running approximately 2x slower and using 2-3x more memory than standard floats because modern GPUs are not yet optimized for log-domain complex math.
Future development focuses on creating dedicated CUDA or Triton kernels to eliminate the speed penalty. Furthermore, the authors suggest that future hardware could support GOOMs natively—perhaps using a single bit for the imaginary part—which would drastically reduce the memory footprint and potentially replace formats like BrainFloat16 in massive-scale model training.
Summary updated