Differentiable programming

Differentiable programming is a programming paradigm in which the programs can be differentiated throughout, usually via automatic differentiation.[1][2][3] This allows for gradient based optimization of parameters in the program, often via gradient descent. Differentiable programming has found use in a wide variety of areas, particularly scientific computing and artificial intelligence.[3]

Approaches

Most differentiable programming frameworks work by constructing a graph containing the control flow and data structures in the program.[4] Earlier attempts generally fall into two groups:

  • Static, compiled graph based approaches such as TensorFlow,[note 1] Theano, and MXNet. They tend to allow for good compiler optimization and easier scaling to large systems, but their static nature limits interactivity and the types of programs that can be created easily (e.g. those involving loops or recursion), as well as making it harder for users to reason effectively about their programs.[4][5][6]
  • Operator overloading, dynamic graph based approaches such as PyTorch and AutoGrad. Their dynamic and interactive nature lets most programs be written and reasoned about more easily. However, they lead to interpreter overhead (particularly when composing many small operations), poorer scalability, and struggle to gain benefit from compiler optimization.[5][6][3]

Both of these early approaches are only able to differentiate code written in a suitable manner for the framework, limiting their interoperability with other programs.

More recent packages in the Julia programming language — Zygote, the Swift programming language — Swift for TensorFlow, and a new programming language — Myia, resolve the issues that earlier attempts faced by treating the language's syntax as the graph. The intermediate representation of arbitrary code can then be differentiated directly, optimized, and compiled.[4][7][5]

Applications

Differentiable programming has been applied in areas such as combining deep learning with physics engines in robotics, differentiable ray tracing, image processing, and probabilistic programming.[8][9][10][11][3]

gollark: Just mess with the encoder settings a lot?
gollark: It would theoretically be very simple if you could make people actually feed data into it.
gollark: One cool thing nobody seems to have made is a shop price comparison site.
gollark: It isn't. IIRC there exists, at least, a Raspberry Pi variant with a blue PCB in Brazil.
gollark: Aren't there different ones produced in Brazil and China?

See also

Notes

  1. TensorFlow 1 uses the static graph approach, whereas TensorFlow 2 uses the dynamic graph approach by default.

References

  1. Wang, Fei; Decker, James; Wu, Xilun; Essertel, Gregory; Rompf, Tiark (2018), Bengio, S.; Wallach, H.; Larochelle, H.; Grauman, K. (eds.), "Backpropagation with Callbacks: Foundations for Efficient and Expressive Differentiable Programming" (PDF), Advances in Neural Information Processing Systems 31, Curran Associates, Inc., pp. 10201–10212, retrieved 2019-02-13
  2. Innes, Mike (2018). "On Machine Learning and Programming Languages" (PDF). SysML Conference 2018.
  3. Innes, Mike; Edelman, Alan; Fischer, Keno; Rackauckas, Chris; Saba, Elliot; Viral B Shah; Tebbutt, Will (2019), ∂P: A Differentiable Programming System to Bridge Machine Learning and Scientific Computing, arXiv:1907.07587
  4. Innes, Michael; Saba, Elliot; Fischer, Keno; Gandhi, Dhairya; Rudilosso, Marco Concetto; Joy, Neethu Mariya; Karmali, Tejan; Pal, Avik; Shah, Viral (2018-10-31). "Fashionable Modelling with Flux". arXiv:1811.01457 [cs.PL].
  5. "Automatic Differentiation in Myia" (PDF). Retrieved 2019-06-24.
  6. "TensorFlow: Static Graphs". Retrieved 2019-03-04.
  7. Innes, Michael (2018-10-18). "Don't Unroll Adjoint: Differentiating SSA-Form Programs". arXiv:1810.07951 [cs.PL].
  8. Degrave, Jonas; Hermans, Michiel; Dambre, Joni; wyffels, Francis (2016-11-05). "A Differentiable Physics Engine for Deep Learning in Robotics". arXiv:1611.01652 [cs.NE].
  9. "Differentiable Monte Carlo Ray Tracing through Edge Sampling". people.csail.mit.edu. Retrieved 2019-02-13.
  10. "SciML Scientific Machine Learning Open Source Software Organization Roadmap". sciml.ai. Retrieved 2020-07-19.
  11. "Differentiable Programming for Image Processing and Deep Learning in Halide". people.csail.mit.edu. Retrieved 2019-02-13.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.