Expressive Power of ReLU and Step Networks under Floating-Point Operations

Yeachan Park, Geonho Hwang, Wonyeol Lee, Sejun Park · DOI

Abstract

Theoretical guarantees in deep learning, such as the Universal Approximation Theorem, typically assume that neural networks operate on infinite-precision real numbers. However, modern hardware relies on floating-point (FP) arithmetic, which introduces rounding errors and violates basic algebraic properties like associativity. This paper bridges the gap between idealized theory and hardware reality by proving that ReLU and Step networks retain their fundamental expressive power—specifically their ability to memorize datasets and approximate continuous functions—even when constrained by standard floating-point formats like float32 and bfloat16.

Introduction

Most mathematical proofs regarding neural network capacity assume that weights, inputs, and activations belong to the set of real numbers ($\mathbb{R}$). In practice, computers use a discrete subset of the reals known as floating-point numbers. These numbers have limited precision and range, and operations performed on them are subject to rounding. A significant concern in the field is whether these hardware-level inaccuracies diminish the theoretical capabilities of neural networks. This research addresses this by analyzing the expressive power of networks under two floating-point models: $\mathbb{F}_p$ (unbounded exponent) and $\mathbb{F}_{p,q}$ (bounded exponent, covering IEEE 754 standards).

Methodology and Architectural Construction

To prove that floating-point networks are as capable as their real-valued counterparts, the authors employ explicit construction. They design specific 3-layer Step networks and 4-layer ReLU networks that are mathematically guaranteed to function correctly despite rounding errors.

A key challenge in this construction is the "ReLU-Step Paradox." In exact mathematics, a Step function can be created by subtracting two ReLUs. In floating-point math, if the ReLUs have very large values, their difference might be lost to precision errors. The authors overcome this by utilizing technical tools like Sterbenz’s Lemma, which identifies conditions under which floating-point subtraction is exact, and by mapping inputs into stable "local neighborhoods."

Schematic of the multi-layer feed-forward network architecture used for the existence proofs in floating-point arithmetic.

The architecture shown above illustrates the general structure used in these proofs, where operations are defined using floating-point summation ($\bigoplus$) and multiplication ($\otimes$).

Key Insights

The Intrinsic Error Threshold

Because floating-point systems are discrete, a network can never be perfectly accurate for all real-valued targets. The authors define an "intrinsic error"—the minimum distance between a target value and the nearest representable floating-point number. They prove that networks can approximate functions up to this physical hardware limit plus an arbitrarily small $\epsilon$.

Efficiency and Robustness

Surprisingly, the transition from real numbers to floating-point numbers does not require a significant increase in network size. The number of parameters required to memorize $n$ data points remains $O(n)$, matching classical results. Furthermore, the study confirms that even low-precision formats like bfloat16 possess sufficient exponent bits to satisfy the conditions for universal approximation, provided the data is scaled appropriately.

Key Results

  • Memorization: A 3-layer Step network or a 4-layer ReLU network with $O(n)$ parameters can perfectly memorize $n$ distinct floating-point input/output pairs.
  • Universal Approximation: For any continuous function on a unit cube, there exists a floating-point ReLU network that approximates it within the bounds of intrinsic hardware error.
  • Hardware Compatibility: These proofs are tailored to the specific bit-configurations used in modern GPUs, such as the 23-bit significand of float32.

Limitations and Future Work

While this work establishes the existence of expressive floating-point networks, it does not address trainability. Floating-point rounding can create flat regions in the loss landscape, potentially making it difficult for standard optimization algorithms like Stochastic Gradient Descent (SGD) to find these solutions. Additionally, the analysis is currently limited to ReLU and Step activations; smooth activations like Sigmoid or GeLU present further challenges due to varying software implementations of transcendental functions across different libraries.

Summary updated

BibTeX
@article{park2024expressive,
  author = {Yeachan Park and Geonho Hwang and Wonyeol Lee and Sejun Park},
  title = {{Expressive Power of ReLU and Step Networks under Floating-Point Operations}},
  journal = {Neural Networks},
  year = {2024},
  doi = {10.1016/j.neunet.2024.106297},
}
Figure