techlist.io
OpenAI2017-09-283 min read

Curated summary

Nonlinear computation in deep linear networks

Read original(opens in new tab)

Nonlinear Computation in Deep Linear Networks

The post argues that deep linear networks, when implemented with floating-point arithmetic, are not truly linear. Near zero, float32 rounding and underflow introduce genuine nonlinearities, and evolution strategies can exploit them to solve problems that a standard linear network trained by backpropagation handles poorly. On MNIST, this approach lifts a linear network's test accuracy from 92% to 96.7%.

Why Floating-Point Arithmetic Is Nonlinear

  • Neural networks normally alternate linear layers with nonlinear activations like tanh or ReLU. In exact math, stacked linear layers collapse into one linear layer.
  • Computers approximate real numbers with finite bits. In IEEE float32, a number has 1 sign bit, 8 exponent bits, and 23 fraction bits.
  • The smallest normal positive number is min = 1.0...0 × 2^-126. The gap between 0 and min is about 2^20 times larger than the gap between min and the next representable number, so values below min underflow to zero.
  • Because of this underflow, arithmetic near zero stops obeying the usual algebraic laws. The post gives two examples:
    • With a = 0.4×min, b = 0.5×min, c = 1/min, the expression (a+b)×c evaluates to 0, while (a×c)+(b×c) evaluates to 0.9.
    • With a = 2.5×min, b = −1.6×min, c = 1×min, (a+b)+c gives min, but (b+c)+a gives 2.5×min.
  • TensorFlow builds its primitives with denormals disabled (ftz=true), so any non-matrix-multiply operation near magnitude 1e-38 carries an implicit nonlinearity.

Exploiting the Nonlinearity with Evolution Strategies

  • Standard backpropagation relies on symbolic differentiation, which cannot see these tiny-scale nonlinearities, so it struggles to train networks that depend on them.
  • Evolution strategies (ES) estimate gradients by sampling perturbations of the parameters instead of differentiating the computation, so they can exploit the behavior.
  • The authors scale activations so they fall into float32's nonlinear near-zero range. The architecture is a 784→512→512→10 network with no nonlinear activations, using scaling factors of 2^125 to keep intermediate values in that range.

Results

  • A deep linear network trained with backpropagation reached about 94% training and 92% test accuracy on MNIST.
  • The same linear architecture trained with ES reached over 99% training and 96.7% test accuracy.
  • The authors attribute the gain to the float32 nonlinearities, which let each layer form nonlinear combinations of lower-level features.

Future Directions

  • The authors suggest extending the approach to recurrent neural networks.
  • They also propose using these nonlinearities to improve harder tasks such as language modeling and machine translation.

Continue with another curated summary.