arXiv:2605.01702cs.LG2026-05

浮点神经网络可精确表示函数及梯度,突破实际计算限制。

Floating-Point Networks with Automatic Differentiation Can Represent Almost All Floating-Point Functions and Their Gradients

  • 用自动微分在浮点运算下逼近任意函数值与梯度
  • 多目标损失梯度可同时精准表示,条件宽松
  • 适用于ReLU、GELU等主流激活函数,适合模型优化研究

理论表明,在紧致域上任意可微函数都存在神经网络近似其函数值与梯度。但该结论依赖实数参数与精确运算,无法用于实际。本文研究浮点算术下神经网络是否仍具备类似能力,其中输入梯度通过自动微分算法 $D^ ext{AD}$ 计算。我们证明:对任意浮点函数 $ϕ$(如损失函数),存在浮点网络 $f$ 可表示 $ϕigcirc f$ 的函数值,而 $D^ ext{AD}(ϕigcirc f)$ 可表示其梯度。进一步,当给定 $ϕ_1,\ dots,ϕ_n$ 时,在温和条件下,$D^ ext{AD}(ϕ_iigcirc f)$ 可同时表示所有梯度,而 $f$ 保持目标值。结果适用于 $ ext{ReLU}$、$ ext{ELU}$、$ ext{GeLU}$、$ ext{Swish}$、$ ext{Sigmoid}$、$ ext{tanh}$ 等常见激活函数。

原文摘要 · Abstract (English)

Theoretical studies show that for any differentiable function on a compact domain, there exists a neural network that approximates both the function values and gradients. However, such a result cannot be used in practice since it assumes real parameters and exact internal operations. In contrast, real implementations only use a finite subset of reals and machine operations with round-off errors. In this work, we investigate whether a similar result holds for neural networks under floating-point arithmetic, when the gradient with respect to the input is computed by the automatic differentiation algorithm $D^\mathtt{AD}$. We first show that given a floating-point function $ϕ$ (e.g., a loss function), arbitrary function values and gradients can be represented by a floating-point network $f$ and $D^\mathtt{AD}(ϕ\circ f)$, respectively. We further extend this result: given $ϕ_1,\dots,ϕ_n$, $D^\mathtt{AD}(ϕ_i\circ f)$ can simultaneously represent arbitrary gradients while $f$ represents the target values, under mild conditions. Our results hold for practical activation functions, e.g., $\mathrm{ReLU}$, $\mathrm{ELU}$, $\mathrm{GeLU}$, $\mathrm{Swish}$, $\mathrm{Sigmoid}$, and $\mathrm{tanh}$.

神经网络自动微分浮点计算梯度表示

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。