MLX rsqrt: finite directional derivatives lost to an intermediate ratio
Authors/Creators
Description
Independent GERO research by Xamit Kadirbekov. MLX CPU float32 reciprocal-square-root JVP and VJP can return infinity or zero even when the complete weighted derivative is a normal finite float32 value. With x=v=1e-30, the expected weighted derivative is approximately -5e14, while the original implementation returns -infinity. With x=v=1e32, the expected value is approximately -5e-17, while the original returns negative zero. References use the actual binary32 inputs.
A fresh C++ source build at 59d600b5e64c238427d0f8d897ab7c682ef4d3d2 gives 443 failed pairs out of 2,136 in each of three layouts. The research correction gives zero; restoring the original gives the same 443. Forward outputs are unchanged. This is one implementation issue, not 443 separate defects. The portable archive independently rebuilds from pinned MLX, fmt and json sources, verifies 2,176 Git blobs and reproduces all nine CSVs byte for byte.
The correction and higher-derivative controls are included. The relevant v0.32.2 methods are source-identical, but the release runtime was not executed. No GPU, full upstream suite, performance or model/device/customer impact is claimed. The patch is not an accepted upstream change. Bounded source, issue/PR and GERO catalog searches found no exact duplicate of the positive-finite, nonzero-seed scale result; related singular and complex-derivative work is credited in the report.
Report and mutable publication status: https://www.gero.uz/research/articles/mlx-rsqrt-directional-derivative-scale.html
GitHub report: https://github.com/kadyrbekovhamit-cyber/gero-numerical-observatory/blob/main/catalog/reports/mlx-rsqrt-directional-derivative-scale.md
Archive SHA-256: 3daa70771459d21cbbe2fc694517294acb29b4b8d68fd1384cc1a8c291505040
License scope: original report and observations CC BY 4.0; original GERO code MIT; included upstream software retains its own licenses and notices, as detailed in LICENSES.md. AI-assisted research and preparation. No video binary is included.
32-second English video overview: https://youtube.com/shorts/d9Mdhyou1Rw. Original diagrams and disclosed synthetic narration. The report was sent to Apple’s open-source routing address; no acknowledgment or upstream acceptance is claimed.