Skip to main content
Seminar | Mathematics and Computer Science Division

Differentiable Programming in Swift

LANS Seminar

Abstract: Swift is a statically-typed, high-performance programming language introduced in 2014. As one of the fastest-growing open source programming languages, it has gained wide adoption in app development and is growing a server application ecosystem. As Swift is gaining momentum in the scientific computing and machine learning community in recent years, we have added experimental support for differentiable programming in the core of the language.

Differentiable programming in Swift features type system extensions to make differentiable functions a first-class citizen, as well as generic interfaces for custom differentiable data types and support for separate compilation between differentiable library code and client code. By integrating automatic differentiation in the Swift compiler, we statically detect common differentiability mistakes and display warnings and errors right in the IDE, enabling a natural software development and debugging experience.

In this talk, we present the design of this experimental language feature, how it works under the hood, and what we have learned from the AD community.