language-agnosticdifferentiationautomatic-differentiation

What is differentiable programming?


Native support for differential programming has been added to Swift for the Swift for Tensorflow project. Julia has similar with Zygote.

What exactly is differentiable programming?


Solution

  • I like to think about this question in terms of user-facing features (differentiable programming) vs implementation details (automatic differentiation).

    From a user's perspective:

    Explained in code:

    def f(x):
      return x * x * x
    
    ∇f = gradient(f)
    print(∇f(4)) # 48.0
    
    # Using the `gradient` API:
    # ↳ differentiable programming.
    
    # How `gradient` works to compute the gradient of `f`:
    # ↳ automatic differentiation.