nntrainer DivideLayer: finite forward values, incorrect denominator gradients
Authors/Creators
Description
One mathematical implementation defect reproduced in the actual C++ nntrainer DivideLayer at main commit a7ea056e79ab8e14447ea305c1b634e233343258. Finite, nonzero float32 inputs can produce zero, infinity or NaN denominator gradients despite finite forward values and representable exact derivatives.
On 4,096 selected unique input triples: 1,302 failing inputs before correction, zero after, and the same 1,302 after restoring the original formula. All 25 focused Divide tests pass after the local correction; the three added regression tests fail with the original formula. Exact rational expected values were independently cross-checked.
Scope: equal-shape contiguous CPU FP32. No full-suite, complete-model, device, performance or user-impact claim. The general numerical mechanism has an acknowledged prior MLX analogue; the new evidence is a separately executed nntrainer implementation. The candidate patch is not represented as accepted upstream.
Files contain the report, compact pinned build-source archive, required submodule sources and test datasets, omitted-asset manifest, exact inputs, native outputs, candidate patch, regressions and mutation proof. Original GERO report/diagrams: CC BY 4.0; original probe code: MIT. nntrainer and third-party source retain their own licenses and notices. AI-assisted preparation disclosed.
Canonical GitHub: https://github.com/kadyrbekovhamit-cyber/gero-numerical-observatory/tree/main/catalog
Pinned source: https://github.com/nntrainer/nntrainer/blob/a7ea056e79ab8e14447ea305c1b634e233343258/nntrainer/layers/divide_layer.cpp
Prior MLX analogue: https://www.gero.uz/research/articles/mlx-divide-scale-autodiff.html
Files
gero-nntrainer-divide-evidence-2026-09-14.zip
Files
(20.5 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:78126eb23572464ed590d6d7fa5ec7aa
|
20.5 MB | Preview Download |
|
md5:9bc16806219eae04fd43ad6f5c97c803
|
7.3 kB | Preview Download |