Kotlin∇: A shape-safe DSL for differentiable programmingDownload PDF

Sep 17, 2019 (edited Sep 22, 2019)NeurIPS 2019 Workshop Program Transformations SubmissionReaders: Everyone
  • Keywords: kotlin, differentiation, type safe
  • TL;DR: Automatic differentiation in Kotlin with compile-time shape verification for array-programming.
  • Abstract: Kotlin is a statically-typed programming language with support for embedded domain specific languages, asynchronous programming, and multi-platform compilation. In this work, we present an algebraically-based implementation of automatic differentiation (AD) with shape-safe tensor operations, written in pure Kotlin. Our approach differs from existing AD frameworks in that Kotlin∇ is the first shape-safe AD library fully compatible with the Java type system, requiring no metaprogramming, reflection or compiler intervention to use. A working prototype is available: https://github.com/breandan/kotlingrad.
8 Replies